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


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

  • 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? Dec 3, 2019 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 : pyproj4.github.io/pyproj/stable/examples.html and an application here : gis.stackexchange.com/a/343326/93097. Dec 3, 2019 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 3, 2019 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) Dec 3, 2019 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 Dec 3, 2019 at 11:32

1 Answer 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.

  • 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 4, 2019 at 1:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.