How to convert xyz to GPS coordinate

Frequent questions asked online, offline, in forums are answered here
Posts: 27
Joined: Fri Dec 09, 2016 1:59 am

How to convert xyz to GPS coordinate

I already know how to get the GPS coordinate from mobile beacon. Dashboard is working well.
However I have to use the beacons x,y,z coordinate. I want to convert this value to GPS coordinate.
My question is that what is the formular that you guys to convert beacon's x,y,z coordinate to NMEA GPS coordinate?

smoker77
Posts: 243
Joined: Sat Feb 06, 2016 4:03 pm

Re: How to convert xyz to GPS coordinate

By default, point (X=0, Y=0) corresponds to GPS location (latitude= 0, longitude= 0), which means some point in sea near Africa.
This correspondance can be changed by setting georeference point as shown in this document: https://marvelmind.com/pics/marvelmind_ ... 10_11a.pdf
Y axis is always directed to north, X axis is directed to east.
Latitude and longitude are calculated with suppose that Earth form is ellipsoid with equator length 40075017 meters and meridian length 39940561 meters (WGS-84).

Posts: 27
Joined: Fri Dec 09, 2016 1:59 am

Re: How to convert xyz to GPS coordinate

Dear smoker
I know your GUI interfaces.
I just want to do fake geotagging using the modem.
Since modem can give the beacon's x,y,z(which is the vitual place)
I need to insert the GPS Longtitude, Latitude Altitude.
Altitude=z
What is
Latitude=
Longtitude=
I saw some of formular in ardupilot forum. I want to check that your formulation.
Also there is North west set those things about GPS are very confuse me also.
If you want to send the detail as email.
My email is donghok4@gmail.com
Thank you.

smoker77
Posts: 243
Joined: Sat Feb 06, 2016 4:03 pm

Re: How to convert xyz to GPS coordinate

As I noticed in previous post, GPS coordinates are calculated according to specified georeference point and WGS-84 Earth model.
More, detailed,
Lat= Lat_ref + y*9.013373
where
Lat - latitude, microdegrees
Lat_ref - georeference latitude, microdegrees
y - y coordinates in Marvelmind system, meters

Long= Long_ref + x*8.98315*cos(Lat_ref/1000000)
Long - longitude, microdegrees
Long_ref - georeference longitude, microdegrees
Lat_ref - georeference latitude, microdegrees
x - x coordinates in Marvelmind system, meters

Posts: 27
Joined: Fri Dec 09, 2016 1:59 am

Re: How to convert xyz to GPS coordinate

Thank you.
Lat= Lat_ref + y*9.013373

Long= Long_ref + x*8.98315*cos(Lat_ref/1000000)

Could you know why lat is more simple than long?

I am little confuse. I saw ardupilot discussion and it was very complex but it in here it looks very simple.

smoker77
Posts: 243
Joined: Sat Feb 06, 2016 4:03 pm

Re: How to convert xyz to GPS coordinate

Latitude is more simple because the length of each meridian is same, but the length of parallel depends of latitude. For example, near south and north poles length of parallel is close to zero.
Real earth has a complex form (not a sphere and not an ellipsoid), and there are lot of mathematical models of this form.
We use WGS-84 ellipsoid as the model, but in some applications more complex and more precise models with more complex formulas may be required.