3

Methods suggested in this, that and there all recommend the following:

$$x = R \cos(\theta) \cos(\phi)$$ $$y = R \cos(\theta) \sin(\phi)$$ $$z = R \sin(\theta),$$

where latitude is $\theta$, longitude is $\phi$ and the Earth's approximate radius is $R$ (6371km).

However, I am not sure why these equations are using $R$ rather than their documented form:

$$x = (N(\theta) + h) \cos(\theta) \cos(\phi)$$ $$y = (N(\theta) + h) \cos(\theta) \sin(\phi)$$ $$z = \left(\frac{b^2}{a^2} N(\theta) + h\right) \sin(\theta),$$

where altitude is $h$, semi-major axis is $a$, semi-minor axis is $b$ and the prime vertical radius of curvature is $N(\theta)$. Further, we can say:

$$N(\theta) = \frac{a}{\sqrt{1-{e^2}\sin^{2}(\theta)}}$$ and... $$e^2 = 1 - \frac{b^2}{a^2}$$ thus... $$z = (1 - e^2) (N(\theta) + h) \sin(\theta).$$

Now for my purposes, I am treating all points with an altitude of 1, so the $h$ can be eliminated. What I am not comprehending is how they are arriving at:

$$N(\theta) = R$$

and...

$$(1-e^2) * N(\theta) = R$$

Is it safe to use the radius of the Earth as an approximation or should I use the WGS84 constraints (semi-major and first eccentricity) in my computations?

Henry
  • 169,616
pstatix
  • 249
  • This is a three dimensional analogue of approximating an ellipse with a circle. You can do it, and for large enough ellipses whose axes are about the same size it may work well, but it's still an approximation. – Brevan Ellefsen Feb 24 '21 at 17:23

2 Answers2

2

Comments

The earth is not perfectly spherical. There is a flattening at the poles.

The WGS84 modifies spherical coordinates in two ways.

First in order to take into account the equatorial bulge through eccentricity factor $e$.

Secondly if distances are measured from an aircraft or spacecraft at an altitude $h$ above the earth this altitude should be added on to earth's radius.

Parallel lines unlike meridians are not geodesics even in the ideal spherical earth model $(e=0)$. At higher latitudes distance measured along latitudes and shortest path geodesic is more pronounced.

cube
  • 105
Narasimham
  • 42,260
1

The value of $e^2$ for the Earth is roughly $6.6\times 10^{-3}$, so that multiplied by the Earth radius is the order of 40 kilometers. As long as you don't care about missing your positions by such a margin, it does not matter whether the Earth is approximated by a sphere. As soon as you need higher accuracy, the full WGS84 equations are needed.

In addition it is very important to understand that the latitude angles in the WGS equations are not geocentric, so the $\theta$ in the two coordinate systems do not have the same values.

  • Can you elaborate on your additional note? I understand that latitude is not geocentric (they converge at the poles), but what do you mean they do not have the same values? – pstatix Jun 19 '18 at 16:48
  • I mean that taking a triple $(x,y,z)$ of geocentric Cartesian coordinates, and then calculating the angles $\theta$ and $\varphi$ in the WGS84 system on one hand and the spherical coordinate system on the other, the two values of $\varphi$ will be the same but not the two values of the $\theta$ (with some exceptions for points at the poles and equator...) – R. J. Mathar Jun 19 '18 at 17:19
  • Not sure if I understand what you mean by a spherical coordinate system? These points are WGS84, so if I converted to $(x,y,z)$ and wanted them back, I would got to WGS84 not to another system. – pstatix Jun 20 '18 at 00:23
  • 2
    I would have thought your first triplet of expressions is for spherical coordinates; your second triplet of expressions with $h=0$ is for spheroid coordinates; and your second triplet of expressions with $h\not=0$ is for spheroid coordinates plus an altitude above the surface – Henry Apr 13 '19 at 23:58