Now that that is fixed I'm finally starting to get stable clock drift measurements. Current code can measure Bangle.js 2 clock drift in just 5 minutes somewhat accurately, usually giving 61-69 ppm for me, with occasional worse values.
Basic idea:
Raspberry Pi broadcasts time once per second with microsecond resolution.
Bangle.js 2 scans for time broadcasts in bursts, getting 4-5 time-deltas in one burst.
Largest time-delta is discarded and average of the rest is taken.
Clock drift is calculated from two time-delta-averages separated by 5 minutes.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Now that that is fixed I'm finally starting to get stable clock drift measurements. Current code can measure Bangle.js 2 clock drift in just 5 minutes somewhat accurately, usually giving 61-69 ppm for me, with occasional worse values.
Basic idea: