Re: converting star coordinates to x,y,z
From: Brian Tung (brian_at_isi.edu)
Date: 12/09/04
- Next message: lal_truckee: "Re: Holy S----! An 8" Mak-Cass for $999 Canadian?!"
- Previous message: Brian Tung: "Re: converting star coordinates to x,y,z"
- In reply to: rjackso_at_columbus.rr.com: "converting star coordinates to x,y,z"
- Next in thread: mike0collins_at_hotmail.com: "Re: converting star coordinates to x,y,z"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 9 Dec 2004 17:25:56 +0000 (UTC)
Rick wrote:
> I'm working on a project of modeling the stars of the constellations in
> 3-D; not for their positions relative to Earth, but relative to any
> given person being at 0,0,0.
You need RA, Dec, and parallax for each star. You can then convert to
rectangular coordinates as follows:
1. First, convert RA and Dec to decimal degrees.
RA_deg = 15*RA_h + RA_m/4 + RA_s/240
Dec_deg = Dec_d + Dec_m/60 + Dec_s/3600
2. Next, convert parallax to distance (in parsecs).
Dist = 1/Par_arcsec, *or*
Dist = 1000/Par_mas
Here, mas = milliarcseconds, a common unit for parallax.
3. Then convert to rectangular coordinates. There is no fixed way
to do this; however, one way is
x = Dist * cos(Dec_deg) * cos(RA_deg)
y = Dist * cos(Dec_deg) * sin(RA_deg)
z = Dist * sin(Dec_deg)
Many programming languages perform trigonometric operations in
radians rather than degrees. In that case, first convert the
coordinates to radians:
RA_rad = RA_deg * (PI/180)
Dec_rad = Dec_deg * (PI/180)
where PI = 3.14159..., and then
x = Dist * cos(Dec_rad) * cos(RA_rad)
y = Dist * cos(Dec_rad) * sin(RA_rad)
z = Dist * sin(Dec_rad)
I guess I should have made you look it up, but I'm feeling generous
today.
Brian Tung <brian@isi.edu>
The Astronomy Corner at http://astro.isi.edu/
Unofficial C5+ Home Page at http://astro.isi.edu/c5plus/
The PleiadAtlas Home Page at http://astro.isi.edu/pleiadatlas/
My Own Personal FAQ (SAA) at http://astro.isi.edu/reference/faq.txt
- Next message: lal_truckee: "Re: Holy S----! An 8" Mak-Cass for $999 Canadian?!"
- Previous message: Brian Tung: "Re: converting star coordinates to x,y,z"
- In reply to: rjackso_at_columbus.rr.com: "converting star coordinates to x,y,z"
- Next in thread: mike0collins_at_hotmail.com: "Re: converting star coordinates to x,y,z"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|