jonasoreland / runnerup

A open source run tracker
GNU General Public License v3.0
741 stars 274 forks source link

FEATURE REQUEST: Real-time distance calibration #642

Open Cagier opened 6 years ago

Cagier commented 6 years ago

When I run my local 5k, due to normal GPS fluctuations (and probably my own staggering around the place), I can end up with a final recorded distance in RunnerUp of anything between 4.6k and 5.4k. I don't feel this is an issue with RunnerUp (or any other app) but as this can affect your target pace and effort (especially in a PB attempt) it would be nice if there was a way of easily minimising this "drift".

In the real world, when doing a 5k, 10k, half marathon, etc., there are normally fairly accurate physical distance markers along the track. If you could "snap" the current distance to these then you could re-adjust your current distance to the nearest km (or mile). E.g. when passing a 3k marker and Runnerup thinks that you have done 2.8712 or even 3.243, it could just be reset to 3.000 on the fly. You wouldn't have to use it at every marker, just if the deviation was annoying you. (Ideally we could do this with button on the pebble watch or on a headset rather than having to press buttons on the phone.)

Maybe this feature exists elsewhere but I haven't heard of it on other apps or devices, although I'm sure that it can be done after the fact. Although, you are resetting the RunnerUp calculated distance, I don't think this could be reflected in other apps after uploading to the likes of Strava and RunKeeper (as they recalculate themselves based on the actual GPS points) so it probably wouldn't correct the final reported distance there but it would help to make RunnerUp more accurate itself.

On the other hand, sometime if I think I am further behind than I should be it can help me to run faster!

gerhardol commented 6 years ago

The GPS errors often depends on the environment and will vary more in certain situations so the drift is not constant. It often makes more sense to just adjust the offset. I have played around a little with this in a PC application. Personally, I would rather use the accelerator and gyroscope to try to adjust the distance. There are some work done but I have not seen any algorithms that are usable. If possible the algorithm should drop/adjust the GPS points better. Phone GPS set the points to the best available point where dedicated run GPS set the GPS where most likely from previous, so the measure distance better.

Note that mst external sites like Strava only uses the GPS points for the distance.

moobyfr commented 6 years ago

@Cagier : do you use the feature to get the lap time every km ? I noticed that I'm getting some drift, the sum of all lap are far away from the measured distance from the start.

Cagier commented 6 years ago

Thanks guys.

Gerhard, I agree with what you are saying and I know there could be some potential solutions to tighten up GPS accuracy and it is probably also hardware-dependent to some extent. There have been other GPS issues discussed with various parameter adjustments and algorithm changes suggested but I don't think we will ever get 100% accuracy.

However, I'm not really too concerned with improving the recording accuracy after the run - I would just like to be able to calibrate the actual distance traveled when actually running a race (or chasing a PB) if it drifts for any reason so that I'm not misled into running too fast or too slow towards the end. I understand that external sites will ignore these corrections but that the deviations will be small anyway.

Blindauer, I don't seem to be experiencing that same problem. I don't normally do that but I happened to set a 1k autolap on a 19k run today and the sum of the lap distances exactly matches the total distance recorded.

Now that is "Autolap" and maybe you are referring to "Distance triggered audio cues" which I have had some issues with in the past? However, the lap history has always seemed to be accurate enough once completed.

Again, I'm not trying to fix an "error" in the distance calculation, especially as it could be caused by me weaving around or running under a bridge. I would just like to calibrate it to the real-world distance markers as I pass them so I know how far I really have left to run. For example, in my last Half Marathon I thought I was nearly 300m further along the route than I was. It was hard to calculate how much to adjust my pace by but if I could have "reset" the distance to 18k when I passed the 18k marker on the route then life would have been a bit easier for me for the next few minutes!

It's just a suggestion and I don't know if anyone else thinks that this might be a good idea though. This option might not be for everyone but I think it would be nice to be able to switch the facility on before certain events...

gerhardol commented 6 years ago

I implemented a Suunto script that does what you want to have. However, that was a special setup when I was pacing a marathon. I would not trust a phone without display for that. The probability that someone else would use the script is minimal, it is too specialized.

To have a reasonable chance that someone gets interested enough to implement this, you need to describe it better. It is not likely that a separate button to implement this will be added.

One example: RU should have a "race mode" to better predict the finish time in races with distance markers.

A manual lap should (optionally from global settings) adjust the distance to the nearest distance unit (km/mile) and apply a setting factor from the total measured GPS distance vs the adjusted distance. Stop will not affect the adjustment. The distance recorded at every point will "jump" at the adjustment points (and most external services will ignore the distance).

Cagier commented 6 years ago

OK. I have started to work on this myself. I have managed to get a PoC version working which rounds to the nearest km when a given condition is true (currently based on elapsed time). I hope to be able to get a long press or multi-click on the pebble to do trigger the rounding but I need to delve a bit more into the pebble sdk to get this right. However, it may be possible that in the newer sdk other buttons may be available. I will experiment more and post my results here (probably at some distant time in the future!) Thanks for the help and feedback.