Summary
I verified relativity yesterday on my desk for €0, something that I wanted to do since I watched Interstellar (I am a big fan !)
Satellites rotate around the Earth in elliptical paths, according to special and general relativity theories. If a person is somehow sitting inside the satellite looking at their watch, their watch will run faster the further they are from Earth. If there are no relativistic effects, time differences shouldn’t be observed.
I thought this must already be observed by GNSS chips, which are now on nearly every smartphone, with every person on Earth.
Claude tried to convince me to buy a chip and take the measurements at home, but observatories publish the satellite data, amazingly for free, so I downloaded the open data for Potsdam station, which is nearly 30 KMs from my home, observing satellite orbits and publishing data on a horuly basis.
An open-source library RTKlib, can solve this raw data to extract position data out of the raw observations; the library accounts for relativity, multiplying by a factor to compensate for relativistic effects.
I did an experiment to process the raw observations twice
(A) run the library without modification to extract position data
(B) set the relativistic component to zero in the code, recompile, run, and take measurements
The difference was (as expected) a sinusoidal wave, corresponding to a clock difference along the orbit.
Pretty cool! I can not imagine how many days it could take me to run this exp without AI.
Experiment
My goal was to demonstrate from satellite data that an observer on Earth can notice the clock differences along the satellite orbit through two experiments to isolate this term:
dt_r = F · e · √A · sin(E_k) F = −2√μ / c² = −4.442807633e−10 s/√m
Two datasets were used, both downloaded from the BKG GNSS Data Center:
- Broadcast ephemeris (merged multi-GNSS BRDC, used by both experiments)
- Observations from station POTS
The first dataset was used to calculate the theoretically possible time “wobble” for each satellite. It shows that, depending on the eccentrity of the orbit of a satellite, the wobble can oscillate up to +/- 45ns

The real observations were then processed to prove if this wobble exists or not. RTKlib is an open-source library to process GNSS observation data and extract trajectory and position data. The library includes relativistic correction factors
Two runs were made on the data, the first one was a vanilla run, but in the second one the relativistic term was multiplied by zero.
diff --git a/src/ephemeris.c b/src/ephemeris.c
index 391f45c..d233a0a 100644
--- a/src/ephemeris.c
+++ b/src/ephemeris.c
@@ -284,7 +284,7 @@ extern void eph2pos(gtime_t time, const eph_t *eph, double *rs, double *dts,
*dts=eph->f0+eph->f1*tk+eph->f2*tk*tk;
/* relativity correction */
- *dts-=2.0*sqrt(mu*eph->A)*eph->e*sinE/SQR(CLIGHT);
+ *dts-=0.0*2.0*sqrt(mu*eph->A)*eph->e*sinE/SQR(CLIGHT); /* REL-PATCH: relativistic sat-clock correction removed */
.....
Subtracting and plotting the residual between the output of 2 runs led to a sinusoidal wave, not a continuous one, as the Potsdam station could observe this particular satellite three times per day, demonstrating the relativistic effects on the satellite in orbit.

Appendix
Full Exp steps and reproduction
https://github.com/aabdelfattah/gnss-relativity-exp/blob/main/README.md

Leave a Reply