Skip to main content
Commonmark migration
Source Link

The 3D cartesian coordinates $X, Y, Z$ in Earth-centered, Earth-fixed coordinates assuming an ellipsoidal shape is given by:

 

$$X = \left(N(\phi) + h \right) \cos\phi \cos\lambda $$

 

$$Y = \left(N(\phi) + h \right) \cos\phi \sin\lambda $$

 

$$Z = \left(\frac{b^2}{a^2} N(\phi) + h \right) \sin\phi $$

 

where $\phi, \lambda, h$ are latitude, longitude, and altitude, and $a, b$ are the equatorial and polar radii of the ellipsoid used, and

 

$$N(\phi) = \frac{a^2}{\sqrt{a^2\cos^2\phi + b^2 \sin^2\phi}}. $$

 

Lat, lon, alt in "GPS coordinates} is based on WGS 84 with $a, b$ of 6378.1370 and 6356.7523 kilometers, respectively.

The 3D cartesian coordinates $X, Y, Z$ in Earth-centered, Earth-fixed coordinates assuming an ellipsoidal shape is given by:

 

$$X = \left(N(\phi) + h \right) \cos\phi \cos\lambda $$

 

$$Y = \left(N(\phi) + h \right) \cos\phi \sin\lambda $$

 

$$Z = \left(\frac{b^2}{a^2} N(\phi) + h \right) \sin\phi $$

 

where $\phi, \lambda, h$ are latitude, longitude, and altitude, and $a, b$ are the equatorial and polar radii of the ellipsoid used, and

 

$$N(\phi) = \frac{a^2}{\sqrt{a^2\cos^2\phi + b^2 \sin^2\phi}}. $$

 

Lat, lon, alt in "GPS coordinates} is based on WGS 84 with $a, b$ of 6378.1370 and 6356.7523 kilometers, respectively.

The 3D cartesian coordinates $X, Y, Z$ in Earth-centered, Earth-fixed coordinates assuming an ellipsoidal shape is given by:

$$X = \left(N(\phi) + h \right) \cos\phi \cos\lambda $$

$$Y = \left(N(\phi) + h \right) \cos\phi \sin\lambda $$

$$Z = \left(\frac{b^2}{a^2} N(\phi) + h \right) \sin\phi $$

where $\phi, \lambda, h$ are latitude, longitude, and altitude, and $a, b$ are the equatorial and polar radii of the ellipsoid used, and

$$N(\phi) = \frac{a^2}{\sqrt{a^2\cos^2\phi + b^2 \sin^2\phi}}. $$

Lat, lon, alt in "GPS coordinates} is based on WGS 84 with $a, b$ of 6378.1370 and 6356.7523 kilometers, respectively.

added 211 characters in body
Source Link
uhoh
  • 30.7k
  • 9
  • 98
  • 313

MathematicallyTo just define an angle (without the radius), mathematically you might think so. However sin is insensitive near the poles and in the world of real computing numerical errors can crop up. Near the poles Sinsin will still provide the appropriate sign and cos will provide the sensitivity. This way you will have low numerical errors (for this particular step) everywhere.

But this is the latitude and distance together, so you have to have two numbers. They could be a latitude angle and a radius explicitly, but this also works. (revised per @DH's comment)

Mathematically you might think so. However sin is insensitive near the poles and in the world of real computing numerical errors can crop up. Near the poles Sin will still provide the appropriate sign and cos will provide the sensitivity. This way you will have low numerical errors (for this particular step) everywhere.

To just define an angle (without the radius), mathematically you might think so. However sin is insensitive near the poles and in the world of real computing numerical errors can crop up. Near the poles sin will still provide the appropriate sign and cos will provide the sensitivity. This way you will have low numerical errors (for this particular step) everywhere.

But this is the latitude and distance together, so you have to have two numbers. They could be a latitude angle and a radius explicitly, but this also works. (revised per @DH's comment)

added 281 characters in body
Source Link
uhoh
  • 30.7k
  • 9
  • 98
  • 313

$$\phi' = \arctan\left(\frac{Z}{X} \right)$$$$\phi' = \arctan2\left(Z, X \right) = \arctan2\left(\frac{Z}{R_E}, \frac{X}{R_E} \right) = \arctan2\left( \rho \sin(\phi'), \rho \cos(\phi') \right)$$

It turns out to be about +/- 0.2 degrees with extrema at about +/- 45 degrees. It is of course zero at the equator and poles.

$$\phi' = \arctan\left(\frac{Z}{X} \right)$$

It turns out to be about +/- 0.2 degrees with extrema at about +/- 45 degrees.

$$\phi' = \arctan2\left(Z, X \right) = \arctan2\left(\frac{Z}{R_E}, \frac{X}{R_E} \right) = \arctan2\left( \rho \sin(\phi'), \rho \cos(\phi') \right)$$

It turns out to be about +/- 0.2 degrees with extrema at about +/- 45 degrees. It is of course zero at the equator and poles.

added 281 characters in body
Source Link
uhoh
  • 30.7k
  • 9
  • 98
  • 313
Loading
added 281 characters in body
Source Link
uhoh
  • 30.7k
  • 9
  • 98
  • 313
Loading
added 302 characters in body
Source Link
uhoh
  • 30.7k
  • 9
  • 98
  • 313
Loading
Post Undeleted by uhoh
Post Deleted by uhoh
added 1 character in body
Source Link
uhoh
  • 30.7k
  • 9
  • 98
  • 313
Loading
Source Link
uhoh
  • 30.7k
  • 9
  • 98
  • 313
Loading