... just updated, fixed distance and added a 'speed' option.
Also, I noticed that the distance calculation had a Math.round in it, so every second it'd round distance travelled to the nearest meter. I have removed this now - the upshot is that when you're standing still, distance will now tick up slightly - but when running it should be more accurate.
I guess one option is to detect if the GPS thinks it is stationary, and if it is, don't add anything to the distance.
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.
... just updated, fixed distance and added a 'speed' option.
Also, I noticed that the distance calculation had a
Math.round
in it, so every second it'd round distance travelled to the nearest meter. I have removed this now - the upshot is that when you're standing still, distance will now tick up slightly - but when running it should be more accurate.I guess one option is to detect if the GPS thinks it is stationary, and if it is, don't add anything to the
distance
.