Welcome to SP!  -
 Distance to the Center of the Earth Article

# Distance to the Center of the Earth

Page Type: Article

Object Title: Distance to the Center of the Earth

Page By: Klenke

Created/Edited: May 16, 2013 / May 29, 2013

Object ID: 849764

Hits: 2134

Page Score: 88.61%  - 27 Votes

## The Equation to Determine the Distance to the Center of the Earth

Calculate the distance to the center of the Earth
Enter an elevation and latitude
Elevation: Meters Feet
Latitude:   Degrees
 Distance: Meters Feet

This is the equation to determine the distance of any point on, below, or above the surface of the Earth to the center of the Earth. It was derived (solved as an explicit equation) last year (2012) but I had not included it due here to it being intended as an appendix to a book by a Canadian author who contacted me about the matter. But circumstances have coaxed me into providing it now.

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) = {(a4cos2Φ+ b4sin2Φ)/(a2cos2Φ + b2sin2Φ) + 2Z(a2cos2Φ + b2sin2Φ)½ + Z2}½

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) = $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$

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)
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 and b must be in meters. If Z is in feet, a and b must be in feet.

The WGS 84 ellipsoid defines a and b as:
a = 6,378,137.0 meters = 20,925,646.325 ft
b = 6,356,752.3 meters = 20,855,486.548 ft

The equation will solve for all zero (on the Equator), positive (Northern Hemisphere), and negative (Southern Hemisphere) latitude angles, Φ; and for zero, positive, and negative values of elevation Z.

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*SQRT(A1^2*(COS(L1*PI()/180))^2+B1^2*(SIN(L1*PI()/180))^2)+Z1^2)

where,

A1 = ellipse parameter a
B1 = ellipse parameter b
Z1 = summit elevation above mean sea level
L1 = latitude, Φ, in degrees

The cell numbers A1, B1, Z1, and L1 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.

Caveats

Three 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 meters higher than the nominal sea level of the Earth. If the difference is small (no more than a couple of meters) then the effect can be ignored. But if terrain (summits) on that continent are measured above that "higher" sea level, then they are actually a couple of meters higher than the nominal sea level farther away.

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.

The third caveat is the answer to this equation, D, is only as accurate as the inputs that go into it. The elevation value Z is the most probable source for the largest error, particularly for regions where maps are not very precise (they lack spot elevation values for summits) or pretend to be precise but actually are not (they have spot elevations for summits but these elevations are way off).

--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θ$\sqrt{\mathrm{expr1}}$ + ZcosΦ

Ld2 = (cosθ$\sqrt{\mathrm{expr1}}$ + ZcosΦ)(cosθ$\sqrt{\mathrm{expr1}}$ + ZcosΦ) = cos2θ[expr1] + 2ZcosθcosΦ $\sqrt{\mathrm{expr1}}$ + Z2cos2Φ

Hd = (Ra + Z)sinΦ = Rgsinθ + ZsinΦ = sinθ$\sqrt{\mathrm{expr1}}$ + ZsinΦ

Hd2 = (sinθ$\sqrt{\mathrm{expr1}}$ + ZsinΦ)(sinθ$\sqrt{\mathrm{expr1}}$ + ZsinΦ) = sin2θ[expr1] + 2ZsinθsinΦ$\sqrt{\mathrm{expr1}}$ + Z2sin2Φ

D2 = Ld2 + Hd2 = [expr1](cos2θ + sin2θ) + 2Z$\sqrt{\mathrm{expr1}}$(cosθcosΦ + sinθsinΦ) + Z2(cos2Φ + sin2Φ)
= [expr1] + 2Z$\sqrt{\mathrm{expr1}}$cos(θ – Φ) + 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)

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, Φ, and elevation, Z.

Here is the expected result when Z = 0:

## Sample Summits

Here are some sample calculations using this equation courtesy of Rob (rgg).
The notes at the bottom are from Rob.

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 Distance
to the
center
Difference
with
Chimborazo
Chimborazo 20561 -1.469 -78.817 20946162 0
Huascarán Sur 22133 -9.122 -77.604 20946030 -132
Kilimanjaro 19341 -3.076 37.354 20944787 -1375
Carstensz Pyramid 16024 -4.083 137.185 20941317 -4844
Everest 29035 27.988 86.925 20939331 -6830
Aconcagua 22841 -32.653 -70.011 20928184 -17977
Equator 0 0   20925646 -20515
Elbrus 18510 43.353 42.439 20911239 -34922
Denali 20322 63.069 -151.007 20890296 -55865
Vinson 16050 -78.526 -85.617 20874335 -71826
North Pole 0 90   20855487 -90675

Notes
• The elevation at the equator is assumed to be 0 with respect to the WGS 84 ellipsoid, regardless of any local bulging effects.
• The elevation at the North Pole is also assumed to be 0 with respect to the WGS 84 ellipsoid, regardless of any local bulging effects and ignoring the ice layer.
• Some of the given mountain elevations are disputed, including Chimborazo.
• All elevations in feet have been calculated from values in meters by dividing by 0.3048.
• Longitude plays no part in the calculation, but is listed to provide the complete location of the mountain.
• 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 7 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 6 meters or 20 feet.

## Gratitude

The author would like to thank 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?)

## Images

 Viewing: 1-10 of 10

 Wolfgang Schaub Excellent!! Voted 10/10 ... 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 Posted May 16, 2013 8:36 am

 Klenke Re: Excellent!! Hasn't voted I contend that the champions may not stay the same. You may want to have an independent check of your work done. Posted May 16, 2013 6:12 pm

 Wolfgang Schaub Re: Excellent!! Voted 10/10 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. Posted May 17, 2013 2:38 am

 nartreb different HTML format?? Hasn't voted 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. Posted May 17, 2013 11:05 am

 Klenke Re: different HTML format?? Hasn't voted 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. Posted May 17, 2013 12:57 pm

 Matt Lemke Awesome! Voted 10/10 Glad to see others care about this stuff! Time to play :) Posted May 22, 2013 6:12 pm

 MoapaPk Use equipotential surface Hasn't voted ...that's my bias. Posted May 28, 2013 5:52 pm

 Enkidu Centre of Gravity Voted 10/10 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. Posted May 28, 2013 8:35 pm

 rgg Re: Centre of Gravity Voted 10/10 Could you give references to this? From what I understand, WGS 84 is already based on the Earth's center of gravity, see here. Posted May 30, 2013 7:33 am

 Dennis Poulin Important Calculation Hasn't voted 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. Posted Jun 6, 2013 6:12 pm

 Viewing: 1-10 of 10