How do I convert Longitude/Latitude/Altitude to XYZ Coordinates? (starter info included)



Hello,
For a fun project in Flash, I'm plotting satellites in 3D space. I'm
able to generate the longitude, latitude, and altitude for a
satellite, and need to convert it into X, Y, and Z coordinates to show
up in my project. I'm not too worried about supreme accuracy, so I
don't need to mess with the non-perfect roundness of the earth and
other precession items.

Here's what I know so far:

*Altitude is the distance a point is away from sea level.
*Latitude measures vertically on the Earth, with values ranging from
-90 to 90.
*Longitude measures horizontally on the Earth, with values ranging
from -180 to 180.
*c = a squared + b squared
*c = 6378.1km (Earth radius) + altitude, (altitude is often referred
to as h in math formulas)

Now for X, Y, and Z, I'm guessing there is some sin and cos involved,
and more basic triangle fun. This runs over my head sometimes more
than other times. Today it's as high as a satellite and I can't see
it.

Any clues on how to proceed? I appreciate any feedback you can
provide. :)

Thank you,
.



Relevant Pages


Loading