jonasoreland / runnerup

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

GPS problem #464

Closed sasadangelo closed 7 years ago

sasadangelo commented 7 years ago

Hi all, I used runnerup for almost 4 months and I can confirm it is the best runner up, even better of most smartwatch for runners. But it has a big issue in my opinion: the GPS tracking. I have a Samsung Galaxy A3 updated to Android 6 and the GPS seemed quite precise. I tested it with my car (the error was very low). The problem is that when I tested it in an official race I find out that the GPS has an error of almost 20/30 meters per Km. Runnerup completed 10 Km 2/3 minutes before completion of the official distance. This is the reason why I put on Playstore a 2 stars review ... hope this problem will be solved soon because the app is unusable.

sasadangelo commented 7 years ago

Any suggestion on this issue? How can I track whether Runnerup gps tracking work fine or not?

filin2009 commented 7 years ago

Do you try to use other gps-trackers (such as Strava, Endomondo, Runkeeper,...) in official race/distance? How much is distance error with it? Usually, distance error in gps-trackers is 2-3% (it means 20-30meters per 1 km) - it is normal.

powellc commented 7 years ago

I second that. Even using a paid GPS app on my phone the distance is usually off by a little bit. The worst are longer races like halfs or full marathons. I've had it be off by as much as a mile over the marathon distance. But considering what GPS is doing (triangulating your position from space using relativistic physics and time differentials), I'm okay with that ;)

sasadangelo commented 7 years ago

4 months ago I used always Runkeeper and at that time it was hard for me go under 6' per Km pace. Starting using Runnerup go below 6' per Km became more easy. So I suspected something wrong in Runnerup or Runkeeper. Who lies? So I tested Runnerup with my car and approximately the results were good. So I continued to use it. Sunday I run a race and I finished the race in 59':56'' real time. Runnerup was almost at 57'. 2 minutes/300 meters of error for a 10K. Is it a lot? Is it normal? I do not know but I expected a more precise measure. The distance affects also the calculation of speed/pace. I use vocal coach that calculate pace in a 200m distance (I think) and it is greatly affected by this error.

sasadangelo commented 7 years ago

Last year for same race and route I used Runkeeper (same smartphone). At the end of race the measure was 10Km and the time reported by official clock (just few secs off).

gerhardol commented 7 years ago

Most GPS apps just use the GPS track from the GPS receiver. It is not possible to control the GPS accuracy as such from the device. The GPS firmware have several filters already, but the track is optimized to always show the most likely posiotion in each point, not the most likely path (as sportwatches do). Bad data in the phone means a bad track. For most apps you cannot do much about it.

The only difference is to apply a filter of points after. RunnerUp uses the maximum sampling rate from the receiver. You can decrease that and add a time/distance folder. I use 2s and 10m, this increases the precision when GPS is bad. I want to set this as default values to increase precision. Another filter could be to record fewer points when the accuracy is bad. A third could be to use accelerometer data to drop points. Auto Pause should be off, that is even harder to detect.

RunnerUp saves the precision data that is available from the firmware. Maybe something can be done with that data. Again, the likely outcome would be to drop points when accuracy is bad. I have not found a good algorithm for the data though. It is possible to include the accuracy in GPX exports if someone want to play around with it.

I have compared many apps on my Sony Xperia Z3 in the same runs to other GPS (Garmin 305, Suunto Ambit 3 and more). Most apps have no filter an can occasionally be bad, those with configurable filter are close to the "official" distance.

300m error for 10 km is not much, but that depends on many factor, in some kind of order: GPS quality on device, the environment (high buildings etc), the filter on the device, how the device was worn, the weather (rain -reflections), how close you can run to the ideal path, the accuracy of the control measured distance.

sasadangelo commented 7 years ago

You said: "The only difference is to apply a filter of points after. RunnerUp uses the maximum sampling rate from the receiver. You can decrease that and add a time/distance folder. I use 2s and 10m, this increases the precision when GPS is bad. I want to set this as default values to increase precision."

Can you explain exactly I can set this values in Runnerup? Can you explain to me the meaning of time/distance folder? Thanks

In the next days I'll do some try with my car (or a better way to measure Km), runnerup and runkeeper. I want more data and also check how the parameters above can affect the precision. I'll update you on the results. Thanks

gerhardol commented 7 years ago

Settings-Advanced Poll Intervall Poll Distance The GPS sw will report GPS points when both of these are fulfilled

While overall distance are normally measured GPS point-point (Garmin has their own calculation), short term distance should be averaged to give a stable speed reporting. I do not know if this is done in RunnerUp. (I use RunnerUp primarily as a data recorder myself.)

Car speedometers have an accuracy like +15%/--2% so that is no good reference. The short term repeatability is better though (until air pressure change, tires are wear down or changed). A calibrated bike computer is a better reference.

The actual total distance is very hard to measure, what you really can do is to compare data sources and consistency. GPS is quite random, you need many activities to call the difference.

I have done a plugin to the PC program SportTracks to compare data sources: https://github.com/gerhardol/trails/wiki/Tutorials#multiple-data-sources I have done some internal tests for apps, most are the same.

sasadangelo commented 7 years ago

You said: "The only difference is to apply a filter of points after. RunnerUp uses the maximum sampling rate from the receiver. You can decrease that and add a time/distance folder. I use 2s and 10m, this increases the precision when GPS is bad. I want to set this as default values to increase precision."

I have 500ms and 0 meter but I really do not understand how to change these values to have a better measure.

gerhardol commented 7 years ago

If you increase the values you will add a filter before adding new points so less "irratic" track and better distance estimation.

sasadangelo commented 7 years ago

Hi Guys, Today I planned a Tempo run. 8' warmup and then 25' with a rithm of 5':42''-5':52''. During the run I had to stop because vocal coach was unstable (it reported 2' per KM and I am sure I am not Mo Farah). I started everything from scratch, but after 25' it reported 5.500 Km with a pace of 4':32''. Since this is completely out of my usual performance I did a check on Google Map to measure the distance of route. The distance was almost 4Km, an error of 1.5 Km on 5 Km is around 30%. The pace was a bit more than 6' per Km so my training session was completely useless due to out of pace. I think an error of 30% is too much.. Please what info can I provide? I have Samsung Galaxy A3. My settings have default value. Any suggestion on how to improve GPS performance?

gerhardol commented 7 years ago

Same as before: Record less points, that will filter (some) bad points.

I have a Samsung A3 (2016), that GPS sucks. Sometimes it is OK, sometimes really bad.

Not much that can be investigated by this right now. (Next version can export the GPS accuracy data, so you can see what the GPS thought about each point.) Target pace voice feedback will require better smoothing of data to be really useful, also with better GPS than the A3 though. I cannot see that function to ever work well based on GPS alone. (Maybe supported by the accelerometer.)

There can be better distance filters than just time and distance, not much different from decrease the sampling from what I have seen. RunKeeper seem to record points every 2-6 seconds, seem very close to a 2s and 10m for the few runs I checked with.

sasadangelo commented 7 years ago

Hi, Thanks for reply. You said: "Same as before: Record less points, that will filter (some) bad points."

The problem I do not how to do that in practice. Do you mean that I need to change Interval polling from 500ms to 2s and Distance polling from 0 to 10 m? Sorry if I ask you this simple question but for me it is not so easy.

If you think that these values are better, why they are not the default?

gerhardol commented 7 years ago

There is no setting that is best for every hardware, firmware and usage situation. You will have to try out what is best for you. Try 2s and 10m. (I have not really tested my A3). Dont expect the target feedback be much better.

I suggest that the default setting is changed, but there is a perception that more points are better. It is @jonasoreland that decides this.

tpruzina commented 7 years ago

Sorry for reviving old discussion, but what are the requirements here actually? We probably can't make the hardware side any better, on the other hand, with some postprocessing we could smoothen the path (curve) or alternatively use something like a kalman filter for input denoising (postprocessing).

Not much into java myself, but I've done something similar with an arduino based remotely controlled drone that had quite crappy gps chip and I think I still have C source code lying somewhere.

Would that be of any interest for the app improvement? I haven't looked at the actual source yet, so I'm not sure how android/runnerup handles things.

gerhardol commented 7 years ago

Jonas normally merges improvements, if the filter is optional the user can choose. (But as seen in this discussion, a choice is not always obvious.)

Runner-up has no filter in the application. The sampling time and distance is in the Android API.

The GPS chip driver does filtering though, likely Kalman. The filter is likely tuned to give the most probable position. A running watch is tuned to give the most likely path based on that you are running to give better pace and distance estimations. The route is often straightened due to that. Garmin GPS for the last years are poor but the SW compensates well for the shortcomings (unless you run in a switchback, cuts corners).

I propose that the most likely distance is recorded rather than GPS positions are filtered. That is what most GPS watches do. Garmin seem to filter the positions. The fused distance API in Android can be used to improve the calculations further.

Den 7 juli 2017 00:11 skrev "Tomáš Pružina" notifications@github.com:

Sorry for reviving old discussion, but what are the requirements here actually? We probably can't make the hardware side any better, on the other hand, with some postprocessing we could smoothen the path (in multipoint case) or alternatively use something like a kalman filter for denoising (postprocessing).

Not much into java myself, but I've done something similar with an arduino based remotely controlled drone that had quite crappy gps chip and I think I still have C source code lying somewhere.

Would that be of any interest for the app improvement? I haven't looked at the actual source yet, so I'm not sure how android/runnerup handles things.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jonasoreland/runnerup/issues/464#issuecomment-313533491, or mute the thread https://github.com/notifications/unsubscribe-auth/AF9Z5M8-pJd5aVYj3C3ja23H3fJM0VBNks5sLVuqgaJpZM4KyP3S .

davidhedlund commented 7 years ago

I share the same problem. GPS works fine in other apps but I never get it in RunnerUp from F-Droid, I only get this in the notification message:

Searching for GPS

Repository: https://f-droid.org/packages/org.runnerup/ RunnerUp: 1.54 Android: 4.4.2 Device: Samsung Galaxy Express 2

gerhardol commented 7 years ago

@davidhedlund The previous posts were about the accuracy of the GPS tracking, how to filter the Android GPS data. You seem to have a problem getting a connection at all. The app uses the standard Android API, if you get connection with one app you should get it with all. Only suggestion is to check that you have not disabled GPS for the app (this should only be possible on 4.4 if you have a custom ROM though.)

davidhedlund commented 7 years ago

@gerhardol Thank you.

davidedelvento commented 7 years ago

@sasadangelo If you really want to understand and debug this, instead of speculating things, see if you can borrow a phone with the same hw and use RunKeeper at the same time on the same route as RunnerUp. The visibility of the sky and the current position of the satellites do make a difference. Not being able to get a loaner, I think you should run both apps on the same route many many times to average positions out. If you have a favorite route, try that.

Also, you may try a different hw, and see how that differ from yours, even when using the same version of the app (and hopefully of the OS). See if you can get a loaner of a different phone which runs the same (at least more or less) version of Android as yours. Again, using both at the same time is also important.

@davidedelvento

gerhardol commented 7 years ago

Comparing GPS accuracy: I have tested with like 10 different apps at the same time, the primary reason was to check Cadence though. I did a brief check on the GPS points, the only difference I saw was the sampling rate, the distance and time filter. The most accurate apps compared to my running watches had reduced sampling. A filter like @tpruzina proposes "optimize for running" could improve, but I assume that other apps have tested this already. (I believe @jonasoreland did some attempts without seeing any improvement.)

gerhardol commented 7 years ago

GPS filter (and defaults) are discussed in #257