2

I am lost by various coordinate systems. This problem may be simple for you, but I still have no idea. A point P which WGS84 coordinate is (a, b, c). a, b, c represents longitude, latitude, altitude, respectively. The coordinates of the Q point relative to the P point in the Cartesian coordinate system are (x, y, z). My question is, how to find the WGS84 coordinates of Q point? Is there a formula or a third-party library?

For example, a gnss device record a few line data, likes

1571729100.288,$GPGGA,07,3020.13221706(latitude),N,12118.46433560(longitude),E,4,38,0.4,5.8393,M,11.4922(altitude),M,02,0249*6D
1571729100.288,$GPGGA,07,3020.13221706,N,12118.46433560,E,4,38,0.4,5.8393,M,11.4922,M,02,0249*6D
1571729100.488,$GNVTG,108.936,T,114.767,M,40.42729,N,74.87134,K,D*3B
1571729100.503,$GPGGA,072500.40,3020.13148649,N,12118.46679048,E,4,37,0.5,5.8416,M,11.4923,M,02,0249*6B
1571729100.704,$GNVTG,108.941,T,114.773,M,40.50145,N,75.00867,K,D*30
1571729100.704,$GPGGA,0760,3020.13075439,N,12118.46924982,E,4,37,0.5,5.8253,M,11.4924,M,01,0249*68
1571729100.905,$GNVTG,109.067,T,114.898,M,40.49335,N,74.99368,K,D*3E

a point P which WGS84 coordinate is ( 12118.46433560, 3020.13221706, 11.4922), a point Q relative to P is (3, 4, 5) in Cartesian coordinate, unit in meter. Other words, the distance between P and Q is sqrt(3*3+4*4+5*5) meters. I just want to know the Q coordinate in WGS84

YanXu
  • 21
  • 1
  • 5
  • Where is the origin off that cartesian coordinate system? Is it a result of a projection of the earth on a plane? May be they are Earth-centered? – Andreas Müller Dec 03 '19 at 10:25
  • You can get cartesian coordinates of WGS84 point by project in pseudo-mercator (EPSG: 3857) for example. Look for example at PyProj : https://pyproj4.github.io/pyproj/stable/examples.html and an application here : https://gis.stackexchange.com/a/343326/93097. – J. Monticolo Dec 03 '19 at 10:33
  • @AndreasMüller There is no need to know the origin of Cartesian coordinate system. For example, a point P which WGS84 coordinate is ( 12013.28174165, 3012.76338356), a point Q relative to P is (3, 4) in Cartesian coordinate, unit in meter. Other words, the distance between P and Q is 5 meters. I just want to know the Q coordinate in WGS84. – YanXu Dec 03 '19 at 10:48
  • No, the coordinates of WGS are in Degree, not meter, so your coordinate example is not a geographic, but a project one. You said your Q would be (x,y,z) but now your example has two components (3,4) – Andreas Müller Dec 03 '19 at 11:01
  • Thanks for edits, know i can imagine what you are trying to achieve. Your GNSS-Reciever did not measure longitude and latitude, because the value range is different. But, if you have positions relativ to a point from the receiver, you can do just an vector addition, P+Q – Andreas Müller Dec 03 '19 at 11:32
  • @AndreasMüller GNSS did measure lat/lon but in DDMM.mmmmmm. – mkennedy Dec 03 '19 at 18:31

1 Answers1

1

I think the data's in the Philippines. Is that correct?

The latitude, longitude values are in DDMM.mmmmm, packed degree-decimal minute values. For example,

3020.13221706(latitude),N, = 30° 20.13221706 = 30.00220361767 12118.46433560(longitude),E = 121° 18.46433560 = 121.3077389267

This is confirmed by several sites like this one.

What you will need to do is

1. convert the packed degrees-decimal minutes values into decimal degrees.
2. convert the decimal degrees values into 3D Cartesian geocentric XYZ values with the ellipsoidal height values, not the above MSL/geoid values.
3. Add your xyz offsets.
4. Convert back to decimal degrees.

This question has python code for the conversions you'll need for steps 2 and 4.

mkennedy
  • 18,916
  • 2
  • 38
  • 60
  • The data is located in China, and I confirmed that the latitude, longitude value is DDMM.mmmmm, packed degree-decimal minute values. You're right, very thanks. – YanXu Dec 04 '19 at 01:27