Given the Right ascension in h m s, Declination in deg ' " and the Trigonometric parallax How can I get the cartesian (x,y,z) coordinates of a star? I'm guessing I need 3 separate formulas to get each x, y and z values.
Asked
Active
Viewed 9,791 times
3
-
Why do you need Cartesian coordinates? In any event... – J. M. ain't a mathematician Dec 23 '10 at 10:09
-
2Then your declination corresponds to $\theta$, right ascension to $\phi$ and parallax to $r$ for a properly referenced spherical coordinate system. See http://en.wikipedia.org/wiki/Spherical_coordinate_system – Ross Millikan Dec 23 '10 at 14:15
-
1@J.M. to plot thing in openGL you need Cartesian coordinates. @Ross - Thanks I'll look into it. – Justin808 Dec 24 '10 at 20:16
-
1Another use is for those running Sci-Fi games (wargames or rpgs); it's much easier to find the distance from system A to B if the reference points are cartesian instead of RA/dec/Dist from Earth. – aramis Jan 07 '20 at 13:21
1 Answers
5
I know this is old, but here is the answer:
http://fmwriters.com/Visionback/Issue14/wbputtingstars.htm
A = (RA_hours * 15) + (RA_minutes * 0.25) + (RA_seconds * 0.004166)
B = ( ABS(Dec_degrees) + (Dec_minutes / 60) + (Dec_seconds / 3600)) * SIGN(Dec_Degrees)
C = distance in light years or parsecs
Cartesian:
X = (C * cos(B)) * cos(A)
Y = (C * cos(B)) * sin(A)
Z = C * sin(B)
Justin808
- 181