# How do I calculate time dilation on GPS satelites due to Earth's mass?

I found this answer which gives as the formula

$$T_2 = \frac{T_0}{\sqrt{1-\frac{2GM}{c^2 R}}}$$

that should result in the time $T_2$ passed on a GPS satellite while $T_0$ seconds pass in the center of earth. I assume the following:

• $G\approx 6.674 \cdot 10^{-11} \frac{\text{N} \cdot \text{m}^2}{\text{kg}^2}$ is the gravitational constant
• $M = 5.97237 \cdot 10^{24} \text{kg}$ is the mass of Earth
• $c = 299792458 \text{m/s}$ is the speed of light,
• $R = 20180\text{km} + 6378\text{km}$ is the distance of the GPS satellite from Earths center of mass.

Then I get:

\begin{align} t_\Delta &= T_2 - T_0\\ &= \left (\frac{1}{\sqrt{1-\frac{2GM}{c^2 R}}} - 1 \right ) \cdot T_0\\ &\approx \left (\frac{1}{\sqrt{0.9999999996660677}} - 1 \right ) \cdot 86400s\\ &\approx 14.4\mu s \end{align}

While it is in the same ballpark, it is still quite different from the 45$\mu s$ provided in the linked answer. Where is the mistake?

## Python script

T0 = 24 * 60 * 60
G = 6.673e-11
M = 5.97237e+24
c = 299792458
R = 26558.16
print((1/(1 - 2 * G * M / (c**2 * R * 10**3))**0.5 - 1 ) * T0)


The expressions in the quoted answer are pretty misleading (I hesitate to say wrong, but, well). These are time dilations with respect to flat space, so with respect to an observer at infinity which is not moving with respect to objects in the gravitational field of Earth. What you actually need are the dilations with respect to an observer on the surface because those are the clocks you are comparing, not some hypothetical clock-at-infinity.

[I apologise in advance for the really casual sign conventions and names for things below: I am just improvising, badly. Sorry.]

So, if we assume that the Earth is not rotating (because I don't want to bother with the special-relativistic effect due to that as well as I am lazy and it is very small), clocks on the surface will run slow with respect to far-off clocks, and we can compute that rate (I am using $r$ for rates)

$$r_E = \frac{1}{\sqrt{1 - \frac{2GM}{c^2 R_E}}}$$

Where $R_E$ is the radius of the Earth.

Plugging in numbers we get

$$r_E \approx 1 + 6.961\times 10^{-10}$$

This is how much clocks on the surface run slow compared to 'stationary' clocks at infinity.

For the satellite, the gravitational correction (again, with respect to clocks at infinity) is

$$r_S \approx 1 + 1.670\times 10^{-10}$$

So the GR difference between the rate on the surface and the rate on the satellite is

$$r_S - r_E \approx -5.291\times 10^{-10}$$

Which means the satellite runs fast compared to us. But then we need to correct that by the special relativity factor which is (using $\rho$ because I need some new variable as I've chosen terrible names)

\begin{align} \rho_S &= \frac{1}{\sqrt{1-\frac{v^2}{c^2}}}\\ &\approx 1 + 8.352\times 10^{-11} \end{align}

And this is in the opposite direction (the satellite is slow compared to us), so the total difference in rates is

$$r_S - R_E + \rho_S - 1 \approx -4.456\times 10^{-10}$$

And multiplying by $86400\,\mathrm{s}$ to get a daily difference, we get

$$-38.5\,\frac{\mathrm{\mu s}}{\text{day}}$$

Which, I think, is about right.

The actual difference is about 44us/day for GRT exclusively, so you were correct before you tried to apply SRT which works out to 45.7us. The SRT shift is valid for the displacement that occurs during signal transit to the receiver on earth so if you used the velocity on the surface of earth this would be valid since SRT only works in GPS as perpendicular circumstance. However if you used the value predicted for zero g in SRT at satellite altitude you will be off by a factor of 2(pi) since GRT assumes locally flat space. Further the difference between satellites uses the Sagnac correction factor which is basically Doppler, therefore clocks in San Francisco run 0.0015us/150,000us different, relative to NY city clocks where C-v and C+v are the respective clock rate adjustments, where v is the velocity of the spin at satellite altitude.
sources [4] Straumann N. General Relativity and Relativistic Astrophysics, Springer-Verlag, Berlin, Second printing 1991, pp. 459, [5] CCIR Internat. Telecom, Union Annex to Vol 7, No: 439-5. Geneva 150-4 (1990). [6] CCDS Bur. Int. Poids et Mes. 9th Sess., 14-17, 1980. [7] Saburi et al. IEEE Trans. IM25, 473-7, 1976. [8] A. G. Kelly, "The Sagnac Effect and the GPS Synchronization of Clock-Stations" Ph. D. HDS Energy Ltd., Celbridge, Co. Kildare, Ireland. Also, A. G. Kelly, Inst. Engrs. Ireland 1995 and 1996, Monographs 1 & 2.