Distance to the Center of the Earth

Distance to the Center of the Earth

Page Type Page Type: Article

The Distance Calculator


Calculate the distance to the center of the Earth
Enter an elevation, latitude, and longitude
Elevation: Meters   Feet
Latitude:   Degrees (negative for S. Hemisphere)
Longitude:   Degrees (negative for W. Hemisphere)
  Adjust for Geoid Height   Don't Adjust
  
Geoid Height:   Meters (above or below ellipsoid)
    Feet
Distance:   Meters (to the center of the Earth)
    Feet
Speed of Point:   km/hour (spin speed around axis)
    miles/hour
 

The Equation with Geoid Height Adjustment


This is the explicit equation to determine the distance of any point on, below, or above the surface of the Earth to the center of the Earth.

This equation uses the WGS 84 ellipsoid as it is the most current for defining the oblate spheroid shape of the Earth. This ellipsoid defines nominal (mean) sea level for the world by way of the two ellipse parameters a and b, the semimajor and semiminor axes respectively.


The Equation


D = f(Φ,Z,G) = {(a4cos2Φ+ b4sin2Φ)/(a2cos2Φ + b2sin2Φ) + 2(Z + G)(a2cos2Φ + b2sin2Φ)½ + (Z + G)2}½

or, in a different HTML format... (if this doesn't show square root symbols, try another browser or just use the equation above)
D = f(Φ,Z,G) = a 4 cos 2 Φ + b 4 sin 2 Φ a 2 cos 2 Φ + b 2 sin 2 Φ + 2 (Z+G) a 2 cos 2 Φ + b 2 sin 2 Φ + (Z+G) 2
where,

D is the distance to the Center of the Earth
Φ is the latitude (the angle measured north or south from the equator)
Z is the height above sea level (i.e., the elevation of the point on the Earth, such as a summit)
G is the geoid height above or below the ellipsoid (the user must also know the longitude of the point in question)
a is the semimajor axis (the equatorial diameter of the Earth)
b is the semiminor axis (the pole-to-pole diameter)

The units must be consistent across the equation. If Z is in meters, a, b, and G must be in meters. If Z is in feet, a, b, and G must be in feet.

The WGS 84 ellipsoid defines a and b as:
a = 6,378,137.000 meters = 20,925,646.3255 ft
b = 6,356,752.314 meters = 20,855,486.5945 ft

The equation will solve for all zero (on the equator), positive (Northern Hemisphere), and negative (Southern Hemisphere) latitude angles, Φ, within the range of +90 to -90 degrees; positive and negative values for longitude, λ, within the range of -360 + 360 degrees; and for zero, positive, and negative values of elevation Z and geoid height G. The geoid height must be obtained from an outside source (see below).

Microsoft Excel Format


D = SQRT((A1^4*(COS(L1*PI()/180))^2+B1^4*(SIN(L1*PI()/180))^2)/(A1^2*(COS(L1*PI()/180))^2+B1^2*(SIN(L1*PI()/180))^2)+2*(Z1+G1)*SQRT(A1^2*(COS(L1*PI()/180))^2+B1^2*(SIN(L1*PI()/180))^2)+(Z1+G1)^2)

where,

A1 = ellipse parameter a
B1 = ellipse parameter b
L1 = latitude, Φ, in degrees
Z1 = summit elevation above (or below) mean sea level
G1 = geoid height above or below the ellipsoid (i.e., positive or negative).

The cell numbers A1, B1, L1, Z1, and G1 are used as an example here only. Also, any units of measure will work (meters, feet, miles,…) as long as they are consistent across the equation.

The Geoid Height


The geoid height value, G, can be obtained from tabulated data that can be downloaded from the Internet or from websites that will do the calculation for you (example). However, I have downloaded the most practical dataset I could use on this webpage (egm84). This data is a table (a grid) of geoid heights at 30-minute (half-degree) arc increments around the globe in the latitudinal and longitudinal directions. This means the table is 361 rows (latitudes) by 721 columns (longitudes) and therefore contains over 260,000 data points (geoid heights in meters). The next level of accuracy up is egm96, which is at 15-minute arc angle increments and therefore would contain over a million data points. In the future if I think Summitpost can handle it, or I can host the table elsewhere (not directly on this page), I may upgrade the calculator above to egm96. egm2008 is way too large of a datafile (it's not even available in ASCII format, that I can tell) and the small added level of accuracy we would get from it would probably not be useful for the scope of this page.

Bilinear interpolation (wiki) is used to obtain the geoid height at a discrete, user-input latitude and longitude that falls inside the square formed by four grid points. There are more sophisticated interpolation techniques that are more accurate such as Lagrangian, bicubic, or spline but these have not been used here due to their complexity. However, I may switch over to one of these in the future if I find the time to put the math to java script. For now, bilinear interpolation is acceptable and only yields an error compared to the other techniques of less than a meter. Besides, there is more error inherent in using egm84 vs. egm96 or egm2008. If the user wishes to use the geoid heights from these latter two, they can use the geographiclib link above.

Caveats


Two caveats to this equation must be addressed:

The first is that the WGS 84 ellipsoid defines mean sea level for the world over (the "ellipsoid") and therefore does not concern itself with continental bulges and their effect on the Earth's gravitational field. These bulges can induce a non-mean sea level (see here). That is, sea level in the region around the land mass can actually be a few tens of meters higher than the nominal sea level of the Earth. Fortunately, gravimetric geoid height evaluation projects have taken place at least three times since the 1980s. This data can be used to calculate the geoid height around the world to within a fair enough accuracy for purposes of comparing summits across the globe.

The second is for summits that have not been measured for a long time, they may have compared to a sea level that was considered the standard prior to WGS 84 resetting it (i.e., using an older geodetic system, such as WGS 66, that was in effect when the summit was last measured). The differences in semimajor and semiminor axes between these two surveys should be taken into account and the height of the summit adjusted accordingly. Without intimate knowledge of when a summit or summits were last surveyed, it may be impossible to know how to make this adjustment. We can take it on faith at this moment that the adjustment is negligible. Also, it is not really determinate, in my view, when looking at a map (or using an online mapping tool such as Acme Mapper), if the elevations shown thereon are in reference to the most current geoid, or even an older geoid, or if they were referenced to a sea level that is sufficiently distant from the summit such that that sea level point itself would have a significantly different geoid height than the summit’s geoid height. In short, when old survey methods were used to triangulate the height of a summit, what was their initial sea level datum? Is this known? Can it be determined?

--Paul Klenke

The Derivation

Note: This derivation assumes your browser correctly shows the square root symbols. If it does not, possibly try a different browser.


The oblate spheroid shape of the Earth is not as flattened as the above figure would suggest and value e is small, placing ray Ra close to C and more closely parallel to ray Rg. The squashed look is provided here for clarity.

The true distance D is as shown. This is because the latitude that gives the position of a person or object on the Earth is the astronomical latitude, alat. This is a ray that extends outward from the Earth's surface at a right angle to that point. Because the Earth is an ellipsoid from the equator to the pole, a ray that is perpendicular cannot pass through the exact Center of the Earth except at two latitudes (0o at the equator and 90o at the poles). Since elevations above sea level are measured directly up from the surface, they must therefore be parallel to ray Ra.

The geocentric latitude, glat, on the other hand, defines the angle of ray Rg that extends from the Center of the Earth to the same point on the surface.

General Trigonometric Equations

D2 = Ld2 + Hd2     (Eq. A1)
Hd = (Ra + Z)sinΦ
Hr = Rgsinθ = RasinΦ ► Ra = Rgsinθ/sinΦ     (Eq. A2)
Lg = Rgcosθ     La = RacosΦ     e = Lg – La = Rgcosθ - RacosΦ
Laz = (Ra + Z)cosΦ     Ld = Laz + e
a2tanθ = b2tanΦ ► tanΦ = a2/b2tanθ ► Φ = tan-1(a2/b2tanθ) ► θ = tan-1(b2/a2tanΦ)    (Eq. A3)

These are relationships between geocentric latitude, glat (θ), and astronomical latitude, alat (Φ). See here. Note geodetic latitude is synonymous with astronomical latitude.
Also,
Rg = a 4 cos 2 Φ + b 4 sin 2 Φ a 2 cos 2 Φ + b 2 sin 2 Φ = expr1     (Eq. A4)

See here.

Combining Equations
Ld = Laz + e = (Ra + Z)cosΦ + Rgcosθ - RacosΦ = Rgcosθ + ZcosΦ = cosθexpr1 + ZcosΦ
Ld2 = (cosθexpr1 + ZcosΦ)(cosθexpr1 + ZcosΦ) = cos2θ[expr1] + 2ZcosθcosΦ expr1 + Z2cos2Φ
Hd = (Ra + Z)sinΦ = Rgsinθ + ZsinΦ = sinθexpr1 + ZsinΦ
Hd2 = (sinθexpr1 + ZsinΦ)(sinθexpr1 + ZsinΦ) = sin2θ[expr1] + 2ZsinθsinΦexpr1 + Z2sin2Φ
D2 = Ld2 + Hd2 = [expr1](cos2θ + sin2θ) + 2Zexpr1(cosθcosΦ + sinθsinΦ) + Z2(cos2Φ + sin2Φ) = [expr1] + 2Zexpr1cos(θ – Φ) + Z2
D = f(θ,Φ,Z) = expr1 + 2 Z expr1 cos θ - Φ + Z 2     (Eq. A5a)

Fully Combined Form for Distance
Substituting in Eq. A3 where θ = tan-1(b2/a2tanΦ):
D = f(Φ,Z) = expr1 + 2 Z expr1 cos tan -1 b 2 / a 2 tan Φ - Φ + Z 2     (Eq. A5b)

The second term of Eq. A5b can be further simplified to remove the contraction cos(θ – Φ), resulting in the following:
D = f(Φ,Z) = a 4 cos 2 Φ + b 4 sin 2 Φ a 2 cos 2 Φ + b 2 sin 2 Φ + 2 Z a 2 cos 2 Φ + b 2 sin 2 Φ + Z 2     (Eq. A5c)

Adjusting for Geoid Height
We must now adjust for the variation of the geoid with respect to the ellipsoid. If we can surmise that the vast majority of summit elevations, Z, are measured from the geoid, then clearly the height of the geoid relative to the ellipsoid needs to be either added or subracted to Z in the equation. There is a good figure on this page. There is of course the concern that the elevation of a summit is derived from a GPS reading, which is referenced to the ellipsoid. If such a summit exists, one would not want to add (or subtract, should that be the case) the geoid height for this summit.

The equation can be easily modified to:
D = f(Φ,Z) = a 4 cos 2 Φ + b 4 sin 2 Φ a 2 cos 2 Φ + b 2 sin 2 Φ + 2 (Z+G) a 2 cos 2 Φ + b 2 sin 2 Φ + (Z+G) 2     (Eq. A5d)

This is the final equation.
The distance to the Center of the Earth from any point, like a summit, is a function of only latitude, Φ, elevation, Z, and geoid height, G.

Here is the expected result when Z = 0 and G = 0:

Sample Summits

Here are some sample calculations using this equation. The notes at the bottom are from Rob (rgg) with modifications and additions by Klenke.
If you have javascript activated, you can swap between feet and meters, else you only get to see feet.

Select Units:  Meters Feet


Elevation
Latitude
Longitude
Geoid
height

Distance
to the
center

Difference
with
Chimborazo

(feet) (degrees) (degrees) (feet) (feet) (feet)
Chimborazo 20561 -1.469 -78.817 85.335 20946252 0
Huascarán Sur 22205 -9.122 -77.604 70.892 20946173 -79
Kilimanjaro 19341 -3.076 37.354 -64.639 20944722 -1375
Carstensz Pyramid 16024 -4.083 137.185 225.217 20941543 -4844
Everest 29035 27.988 86.925 -100.525 20939230 -6830
Aconcagua 22841 -32.653 -70.011 103.855 20928288 -17977
Elbrus 18510 43.353 42.439 51.552 20911290 -34922
Denali 20322 63.069 -151.007 48.268 20890345 -55865
Vinson 16050 -78.526 -85.617 -81.755 20874254 -71826
North Pole 0 90 n/a   42.969 20855530 -90675

Notes
  • The elevation at the equator is assumed to be 0 with respect to the WGS 84 ellipsoid. However, the geoid height will probably be non-zero there. This same effect applies to the North Pole, and the sea ice covering the Arctic Ocean is not considered "land."
  • Some of the given mountain elevations are disputed, including that of Chimborazo.
  • All elevations in feet have been calculated from values in meters by dividing by 0.3048.
  • Small errors in latitude do not have a great effect on the calculations. Near the equator and the poles the effects are actually almost negligible: an error of 1º (one full degree!) translates to less than seven meters or less than 22 feet. Relatively speaking, an error around 45 degrees latitude would have the biggest effect, but it would still be small. As an example, if the latitude of Elbrus would be wrong by 1' (one arc-minute), that translates to just over six meters or 20 feet.

Speed of a Point

The rotational speed of a point around the Earth’s axis of rotation can be calculated from its latitude, Φ, and its distance to the center of the Earth, D, with an approximation that Ψ is very nearly equal to θ. For an explanation of Ψ see the first figure above.

The derivation is as follows:

Speed = |ω| R = |ω| Rcyl = |ω| D cos[Ψ] = |ω| D cos[θ] = |ω| D cos [tan-1(b2/a2 tan(Φ))]

where,

ω is the rotational angular velocity vector of the Earth about its axis and |ω| is the scalar part of that vector.

The value of |ω| is roughly 360 degrees/24 hours = 15 degrees/hour. (Use the units of your choice here as long as you are consistent across the equation.)

In reality, there are 23 hours, 56 minutes, and 4.1 seconds in a day, so |ω| is actually 360 degrees/23.934472222 hours = 15.041066987 degrees/hour.


Alternatively, an exact solution for Rcyl can be obtained when one notes that Rcyl is equal to Ld is equal to Laz + e (or, after making the geoid adjustment, La(z+g) + e).

With a little algebra the following form can be found:

Rcyl = Ld = (Z + G)cos(Φ) + (expr1)½cos[tan-1(b2/a2tan(Φ)]

And thus:

Speed = |ω| R = |ω| Rcyl = |ω|{(Z + G)cos(Φ) + (expr1)½cos[tan-1(b2/a2tan(Φ)]}

Convert the angle (denominator) part of ω to radians if it is not in radians at this point.

The calculator at the top of this page uses the latter method to calculate the speed.

The Fastest Points


The fastest point on the surface of the Earth is not the summit of Chimborazo, as has been claimed some places on the Internet. The fastest point is the summit fo Cayambe, another volcano in Ecuador that straddles the equator. Even though Cayambe is 1570 feet (479 meters) lower than Chimborazo, its top is going 0.26 miles per hour (0.42 km/hour) faster.

The visual to use when comparing summits is to picture the globe with concentric cylinders running through it whose centers coincide with the globe’s axis of rotation. Imagine these cylinders rotating at the same speed as the Earth as it revolves around the sun. The bigger the cylinder (in the radial direction), the greater its surface speed as it rotates. The point on the surface of the Earth with the largest diameter cylinder is the point that goes the fastest. This point is Cayambe, a 18,996-ft (5790-meter) summit at a latitude of 0.0249 degrees North.



With the equation above, it is possible to check many summits against each other. For instance, a new Seven Summits list could be created for the fastest point on each continent. In the meantime, the table below lists a number of summit speeds (speeds of rotation around the earth's axis). High volcanoes close to the equator will have the fastest rotational speeds. If you have a need for speed, may I suggest a visit to Ecuador!

Select Units:  km/hour miles/hour


Elevation
Latitude
Longitude
Speed
of point

Difference
from
Cayambe

(feet) (degrees) (degrees) (mph) (mph)
Cayambe 18996 0.0249 -77.9891 1041.3502 0
Antisana 18875 -0.4844 -78.1417 1041.3073 -0.0402
Cotopaxi 18510 -0.6806 -78.4378 1041.2949 -0.0553
Chimborazo 20566 -1.4676 -78.8175 1041.0889 -0.2613
Kilimanjaro 19341 -3.0760 37.3540 1039.8698 -1.4804
Huascarán Sur 22133 -9.1220 -77.6040 1028.4244 -12.9258
Everest 29035 27.9880 86.9250 920.6687 -120.6815
Aconcagua 22841 -32.6530 -70.0110 877.7870 -163.5632
Denali 20322 63.0690 -151.0070 472.9356 -568.4146
Mt. Vinson 16050 -78.5260 -85.6170 207.7875 -833.5627
North Pole 0 90.0000 n/a   0.0000 -1041.3502

Gratitude

The author would like to thank the late Edward Earl for his review of the math and his help in reducing the final equation into a simpler form.
The author would also like to thank Rob Geurtsen for programming the math-related HTML and for making the calculation box.
The author would also like to thank you for reading this far.
I'll see you at the Center of the Earth... (is that Hell?)



Comments

Post a Comment
Viewing: 1-11 of 11
Wolfgang Schaub

Wolfgang Schaub - May 16, 2013 8:36 am - Voted 10/10

Excellent!!

... and I have to recalculate my altitudes.

The altitudes will change a bit, the champions for each continent, however, will remain. Huascaran is a fierce competitor for Chimborazo in the race for the highest ...

http://www.summitpost.org/my-highest-ones-the-seven-summits-downgraded/846667

Thanks, Paul, for this excellent contribution!

Wolfgang

Klenke

Klenke - May 16, 2013 6:12 pm - Hasn't voted

Re: Excellent!!

I contend that the champions may not stay the same. You may want to have an independent check of your work done.

Wolfgang Schaub

Wolfgang Schaub - May 17, 2013 2:38 am - Voted 10/10

Re: Excellent!!

That's exactly what I am after: independent check.

I also have a problem with the 2 formats of your equation. Separate note to follow.

nartreb

nartreb - May 17, 2013 11:05 am - Hasn't voted

different HTML format??

yes, surely the two equations listed just after the title "the Equation" are not equivalent?

First one is all under a square root, which is missing in the second. Also, the second term has 2Z times a two-term square root; that root is missing in the second equation.

I lost track of the parenthesis in the Excel version, but I think it tracks the first form.

Klenke

Klenke - May 17, 2013 12:57 pm - Hasn't voted

Re: different HTML format??

It's an issue with your browser. It looks fine (is correct) in Mozilla but the square root symbols are missing in Internet Exploder. Try a different browser. Thanks for the heads up. I'll have to put that note in the write-up, or simply remove the square root symbols everywhere to avoid the problem and instead go with 0.5 exponents.

The page isn't finished and I am learning some of the these math-related html formats. There are more html math possibilities than I ever realized.

Matt Lemke

Matt Lemke - May 22, 2013 6:12 pm - Voted 10/10

Awesome!

Glad to see others care about this stuff! Time to play :)

MoapaPk

MoapaPk - May 28, 2013 5:52 pm - Hasn't voted

Use equipotential surface

...that's my bias.

Enkidu

Enkidu - May 28, 2013 8:35 pm - Voted 10/10

Centre of Gravity

Great article.

I think elevation should be measured from earth's centre of gravity as the distance from the CG is what affects my weight and and the effect of gravity is also what holds the atmosphere in place and is consequently responsible (I know there are other local factors at play) for how much oxygen is available to breath. Last time I read anything on the topic the CG was about 10km from the geometric centre.

rgg

rgg - May 30, 2013 7:33 am - Voted 10/10

Re: Centre of Gravity

Could you give references to this? From what I understand, WGS 84 is already based on the Earth's center of gravity, see here.

Dennis Poulin

Dennis Poulin - Jun 6, 2013 6:12 pm - Hasn't voted

Important Calculation

Paul, Your formula produces a result that says my Lazy Boy is 3,957.457 miles from the center of the earth. I always wondered about that measurement because I want to keep my distance from that hell. It appears that heaven is much closer.

Dark Star - Aug 18, 2016 3:27 pm - Voted 10/10

Unicode Equation

Don't know if this will help anyone but I converted your equation into Unicode, I used ϕ phi for latitude but here is theta: θ

√[(a⁴ cos²(ϕ)+ b⁴ sin²(ϕ))/(a² cos²(ϕ) + b² sin²(ϕ)) + 2(Z + G)√[a² cos²(ϕ) + b² sin²(ϕ)] + (Z + G)²]

You can paste that into Wolfram|Alpha and it will format it nicely for you, like so: https://2.bp.blogspot.com/-IoCuHBZH0xg/V7YKtKGWFtI/AAAAAAAACBk/BTFqyTMn1TUGhNL3rkFHu2MFEUIijaJLQCLcB/s1600/equation-for-height-relative-to-geoid.gif

Usually I can get wolfram|alpha to accept value assignments and solve the equation but it just wouldn't work for this one - maybe too many equations.

now the question is -- will this comment post work with Unicode...

Viewing: 1-11 of 11