Celestial Programming : Stellar Parallax

Many star catalogs give the distance to a star (if known) as parallax, usually in milli-arcseconds. To convert this value to something more useful, like Astronomical Units, we can use the conversions below.


$$ d = \frac{1au}{\tan \theta} $$
d = Distance in AU
\(\theta \) = Parallax in degrees (\(\theta = p/3600\))


$$ d = \frac{1}{p} $$
d = Distance in parsecs
p = Parallax in arcseconds

The parsec is dependent on the measurement for 1 AU, so you may see different conversion factors depending on the definition of an AU. The IAU has adopted the conversion factor of \( 1\ parsec = \frac{648,000}{\pi}AU \). So simply multiply parsecs by this constant to yield AU.