2

I'm trying to convert X/Y/Z coords to Latitude/Longitude coords so I can plot them on a Google Map, but math not being my strongest subject I'm having trouble.

Could anyone help me with the conversion? or is there a way to plot X/Y/Z directly onto Google Maps?

Thanks

Tempster102
  • 190
  • 2
  • 10
  • Reverse of this question. http://stackoverflow.com/questions/1185408/converting-from-longitude-latitude-to-cartesian-coordinates – desimusxvii Sep 11 '12 at 03:54
  • @Tempster102 can you please post some code related to this question how you get that functionality? – Rahul May 01 '19 at 13:42

1 Answers1

3
lat = asin(z / R) //Latitude
lon = atan2(y, x) //Longitube

Where R is the approx radius of earth.

Here's link to really simple & clear explaination of it.

Amandeep Jiddewar
  • 1,757
  • 1
  • 14
  • 29