Convert Geolocation to 3d position

Hello:

I have a globe mesh model like the one seen in google earth. I wonder if there is a common way, like formula or api for unity, to convert the geolocation (altitude, longitude) to be located for the globe model.

Thanks for any suggestions and guidelines.

Do you mean spherical coordinates, like for a simple sphere (http://en.wikipedia.org/wiki/Spherical_coordinate_system), or real-live coordinates? Real-live coordinates can get pretty involved depending on how detailed you need to get. Look into Mercator projection, UTM (http://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system) etc.

The simplest form is

x = r * sin (lat) * cos (lon)
y = r * sin (lat) * sin (lon)
z = r * cos (lat)

where r is radius (altitude = r + height_above_r) lon is longitude lat is latitude

This may all be off by 90 degrees depending on your orientation