Happy new year, everybody 🙂

It would be interesting to know the average surface gravity of Earth. I looked over at Wikipedia: Standard Gravity and found:

The standard acceleration due to gravity (or standard acceleration of free fall), sometimes abbreviated as standard gravity, usually denoted by ɡ

_{0}or ɡ_{n}, is the nominal gravitational acceleration of an object in a vacuum near the surface of the Earth. It is defined by standard as 9.80665 m/s^{2}

If we look at US Standard Atmosphere, we find the same thing. So what’s the problem?

Both sources tell us:

The value of

ɡ_{0}defined above is a nominal midrange value on Earth, originally based on the acceleration of a body in free fall at sea level at a geodetic latitude of 45°.

Nominal midrange? What is that? That’s not an average for the whole Earth. We will have to figure it out by other means.

A National Geospatial Intelligence Agency document tells us how to do it. Appendix B gives us all the math we need. We will however use the latest values for a and b derived from here. Create a new file called *efacts.sh* with:

```
#!/usr/bin/bash
# Zoe Phin 2019/12/15
echo ' function __(s, p, n) { printf "%-3s\t%25.*f\n", s, p, n }
BEGIN { π = atan2(0,-1)
# Given
GM = 3.9860046055e14 # Earth Mass * G
a = 6378137.678 # Semi-major axis
b = 6356752.964 # Semi-minor axis
ω = 7.292115e-5 # Angular Velocity
G = 6.67428e-11 # Gravity "Constant"
Mₐ = 5.148e18 # Mass of the Atmosphere
# Derived
Mₑ = GM / G # Mass of the Earth (with Atmosphere)
Mₒ = Mₑ − Mₐ # Mass of the Earth (w/o Atmosphere)
GMₒ = G × Mₒ # Atmosphere-less Constant
F = (a − b) / b # Flattening Factor
f = 1 / F # Inverse Flattening
e = √(1 − b²/a²) # 1st Eccentricity
E = √(a²/b² − 1) # 2nd Eccentricity
Rₚ = a²/b # Polar Radius of Curvature
R₁ = a × (1 − F/3) # Mean Radius of the Three Semi-Axes
R₂ = Rₚ × (1 − (⅔)E² + \# Radius of a Sphere of Equal Area
(26/45)E⁴ − \
(100/189)E⁶ + \
(7034/14175)E⁸ − \
(220652/467775)E¹⁰ )
R₃ = ³√(a² × b) # Radius of a Sphere of Equal Volume
t = tan⁻¹(E)
q = ½ × ( (t + 3×t/E²) − 3/E )
Q = 3 × ( (1 + 1/E²) × (1 − t/E) )-1
__( "GM" , 00 , GM )
GM = GMₒ # Warning ! Switching to Atmosphere-less Constant
m = (ω² × a ² × b) / GM # Normal Gravity Formula Constant
J₂ = (e²/3) × (1−(2×m×E)/(15×q)) # Dynamical Form Factor
U₀ = t*GM/(a×e) + ⅓×ω²×a² # Normal Gravity Potential
Gₑ = GM/(a×b) × (1 − m − (m×E×Q)/(6×q)) # Normal Gravity at the Equator
Gₚ = GM/a² × (1 + m × (E×Q)/(3×q)) # Normal Gravity at the Poles
k = (b × Gₚ)/(a × Gₑ) − 1
Gₘ = Gₑ × (1 + (⅙)e² + (⅓)k + \# Mean Value of Normal Gravity
(59/360)e⁴ + (5/18)ke² + \
(2371/15120)e⁶ + (259/1080)ke⁴ + \
(270229/1814400)e⁸ + (9623/45360)ke⁶) \
__( "a" , 03 , a )
__( "b" , 03 , b )
__( "ω" , 11 , ω )
__( "G" , 16 , G )
__( "Mₑ" , 00 , Mₑ )
__( "Mₐ" , 00 , Mₐ )
__( "Mₒ" , 00 , Mₒ )
__( "GMₒ", 03 , GMₒ)
__( "F" , 16 , F )
__( "f" , 09 , f )
__( "e" , 15 , e )
__( "E" , 15 , E )
__( "Rₚ" , 04 , Rₚ )
__( "R₁" , 04 , R₁ )
__( "R₂" , 04 , R₂ )
__( "R₃" , 04 , R₃ )
__( "q" , 12 , q )
__( "Q" , 12 , Q )
__( "m" , 14 , m )
__( "J₂" , 15 , J₂ )
__( "U₀" , 04 , U₀ )
__( "Gₑ" , 10 , Gₑ )
__( "Gₚ" , 10 , Gₚ )
__( "k" , 15 , k )
__( "Gₘ" , 10 , Gₘ )
}'| sed 's/#.*//' | sed '/__/s/,/,\\\n/' | sed -r '
/__/! { y,πωₚₑₐₒₘ₀₁₂₃₄×−,pWpeaom01234*-,;
s,³√(.*),(\1)^(1/3),g; s,tan⁻¹\(E\),atan2(E\,1),g;
s,½,1/2,g; s,⅓,1/3,g; s,⅙,1/6,g; s,⅔,2/3,g; s,²,^2,g;
s,⁴,^4,g; s,⁶,^6,g; s,⁸,^8,g; s,¹⁰,^10,g; s,√,sqrt,g;
s,\)ke,\)*k*e,g; s,\)([Eke]),\)*\1,g }' | awk -f -
```

The program is written in unicode to make reading it and following Appendix B much easier. Sorry if your browser doesn’t render the code properly. I just noticed it doesn’t on my smartphone.

Make this file executable and run it:

```
> chmod +x efacts.sh
> ./efacts.sh
GM 398600460550000
a 6378137.678
b 6356752.964
ω 0.00007292115
G 0.0000000000667428
Mₑ 5972186671071637111046144
Mₐ 5148000000000000000
Mₒ 5972181523071637240414208
GMₒ 398600116958065.625
F 0.0033640939204509
f 297.256861326
e 0.081819240444396
E 0.082094488053751
Rₚ 6399594.3322
R₁ 6370985.4599
R₂ 6371007.8495
R₃ 6371001.4586
q 0.000073346392
Q 0.002688044572
m 0.00344979040432
J₂ 0.001082631230267
U₀ 62636794.1768
Gₑ 9.7803152684
Gₚ 9.8321748731
k 0.001931854280022
Gₘ 9.7976331557
```

Gₘ (mean normal gravity) is the value we’re looking for, and it’s **9.7976331557**.

Now if only the actual earth was a model, then we’d already be done. We want the most accurate answer though, and so we need measured data. We will use the EGM2008 standard, as it’s the most popular. We’ll be using this great resource to seek our answer. But first we’ll need to generate a table of latitudes and longitudes:

`> for x in `seq -89.5 89.5`; do for y in `seq -179.5 179.5`; do echo $x $y; done; done > latlon.csv`

We will upload this file to get the results. Now go there and fill out the form exactly as shown here (note Gm is our atmosphere-less value GMₒ, not GM)

This will take a while …

But Zoe, Why are we interested in Normal Gravity and not Gravity? Because we’re interested in the acceleration towards the surface and not the center of the earth.

To find the average for the whole Earth we will have to go through each latitude,longitude pair and find out their surface area using the formula from here:

dA = a

^{2}cos[ø (1-e^{2})] dø dl / (1-e^{2}sin^{2}ø)^{2}

This will generate an error of ~0.00001281 when we add up all the pairs, but that’s alright because we’ll just divide by a surface area 1.00001281 times as large.

Click on “Download results” when the site is finished, and save to EGM2008.csv in the same folder as the following code.

*egm.sh*:

```
#!/usr/bin/bash
# Zoe Phin 2019/12/17
sed 1,32d EGM2008.csv | awk '
function r(x) { return x*atan2(0,-1)/180 } {
e = 0.081819240444396; printf "%.12f %.12f\n", $5/1e5, \
(6378137.678*r(1))^2*(1-e^2)*cos(r($3))/(1-e^2*sin(r($3))^2)^2
}' | awk '
{ S += $1*$2; } END { printf "%.10f\n", S/510072261022076.375 }'
```

Run it

```
> bash egm.sh
9.7977074331
```

The best estimate for Earth’s average surface gravity using the most popular reference model is: **9.7977074331**

Note how little difference there is between this number and the previous mathematically derived value; It’s only 0.0000742774.

No one should use the “Standard Gravity” value of 9.80655 if they are interested in the whole earth. Such use will lead to a geometric error of ~0.0009025 and an arithmetic error of ~0.0088426.

Now these errors might be small, but why not make them smaller? Use my number. Thank you.

Enjoy 🙂 -Zoe