New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[gpsrec] Higher precision for track length #1523
Comments
Here is the code for gpsrec (the problem also persists in other apps like run) Line 251 in 8518e76
This probably refers to the build-in Maybe this can be replaced with something like |
Espruino doesn't have toPrecision - but I think the best bet would just be to modify the |
Would this impact the distance tracked by the run app? I ran my first run with my bangle2 and also had Google Fit running on my phone (what I'm trying to move away from) and the distances tracked were 9.6 miles for the run app on bangle and 10 miles for google even though the GPS tracks look practically identical. |
To follow up on my own question, I think I found a bug in |
Hi - I guess we're talking about:
I'm pretty sure it makes no difference since when you do There have been a lot of discussions on the forum about track length calculations where folks have done tests with the existing app. I think 9.6 miles vs 10 miles is probably expected. If you get another tracker too you'll probably get a different distance. Why? Well the values from the GPS will never be entirely accurate and they have some randomness. You get them each second, so every second the distance might be 10cm off - in one minute that's 600cm, and then over time that value goes up. |
If the change is made in the modules that are used by many apps (like However the aim of this issue is to display more precision of the value. It is not about calculation problems (which probably are also there). As where to implement this best, I think the needed precision should be determined by the app, because it depends on the use case. For outdoor running, the displayed decision is not sufficient, but for other applications is might be fine or even better. |
In that case I guess you could just implement the relevant changes in the |
To improve the overall situation, my idea was to give the precision to be displayed to the |
That sounds like a good idea to me... It wouldn't affect anything else and would be backwards compatible |
So right now, distance looks like this:
I'm thinking something like:
So the default is 1 decimal place, but if you call it with However you might still get things like We could always do something along the lines of:
but is that overkill? |
To close the loop on this, I ended up getting the GPX from my google fit data and analyzed it and the bangle GPX with a few different tools and they both came out to 9.6 miles, so it seems that the google fit app live distance calculation is in the wrong instead. Thanks! |
@GrandVizierOlaf great - thanks for letting us know! |
@gfwilliams thanks for making an improvement. I'll try this next time. |
Affected hardware version
Bangle 2
Your firmware version
2v12
The bug
When plotting a track the length is shown to coarse, it seems to be rounded toward 2 digits.
Expected: Round it to three digits precision.
The problem when running a track like 12.4 or 12.5 km is that it will be shown as 12 km or 13 km, though the different is possibly just hundred meters. On the other hand, 12 km shown can be 11.51 km or 12.49 km, which is almost 1000m difference.
The text was updated successfully, but these errors were encountered: