tags:

views:

50

answers:

2

I need to accurately visualize points coming from iPhone (and other) GPS data in 3D.

So, what I'd like is to take a WGS84 (right?) point and transform that into an X,Y,Z vector with the origin at the center of the Earth.

I Googled for GPS/WGS84 to 3D but I think my search terms are not so great

Does someone have a pointer for where to start?

In future, I'll also need to take elevation information into account if available, but that isn't so important immediately.

Thanks!

A: 

what your looking for is representing your data in ECEF (Earth Centered Earth Fixed) notation.

Some good wikipedia stuff

paquetp
And here I was hoping we'd get an answer which included specifying the location of Earth within the universe :P
Brian S
Wonderful, thank you Sir!
octonion
A: 

Latitude and longitude are relatively easy, since they're just angles, however altitude is a bit tricky because the Earth isn't exactly round. If you don't need very great accuracy, this Wikipedia article has formulas for converting from a spherical coordinate system into a cartesian one. Be warned that this is not quite accurate because the Earth resembles an ellipsoid more than a perfect sphere.

Matti Virkkunen
ECEF uses the ellipsoid model...see my answer if you need that much precision.
paquetp
@paquetp: Oh, on second look, the article actually had links to some formulas at the bottom. Didn't notice that at first.
Matti Virkkunen
Ah glad you discussed that. I was thinking it probably wasn't as easy as simple polar to cartesian.
octonion