• Also, thanks for the test code @BartS23!

    Thinking about that, I wonder whether something could be added to https://banglejs.com/apps/?id=widadjust to allow it to figure out the drift using GPS.

    Even this code:

    let lastTime = getTime();
    function calcTimeDifference(fix) {
      if (!fix.time) return;
      var t = getTime();
      print(t-lastTime);
      lastTime = t;
    }
    console.log(process.env.VERSION);
    Bangle.on("GPS", calcTimeDifference);
    Bangle.setGPSPower(1);
    NRF.setConnectionInterval(200); // low BLE speed = less GPS interference
    

    Works surprisingly well - because we know the GPS sends data once a second, we just see how many seconds the Bangle thinks have passed. Obviously it'd be better averaging over more seconds though.

    2v22:

    1.00073289871
    1.00045800209
    1.00067186355
    1.00073266029
    1.00045800209
    1.00067186355
    1.00073289871
    1.00045800209
    1.00067162513
    1.00076341629
    1.00045800209
    

    With the fix:

    1.00009155273
    1.00009155273
    1.00009155273
    1.00006103515
    1.00006103515
    1.00009155273
    1.00006103515
    1.00009155273
    1.00006103515
    1.00003051757
    1.00009155273
    

    So it's an order of magnitude better

About

Avatar for Gordon @Gordon started