Sublimis / UrbanBiker

Urban Biker issue tracker and Knowledge Base
https://urban-bike-computer.com/
18 stars 4 forks source link

Not correctly recording Ascent/Descent #48

Open wilmingtech opened 5 years ago

wilmingtech commented 5 years ago

Great app. Been using for over a year now. The only issue I have is that it doesnt correctly record the ascents/descents correctly. Tested against Strava and a Cateye GPS and Urban Biker shows a few hundred feet less of climbing. Today I recorded 2600' in Strava and UB only shows 1700'. I am on a samsung note8 with all updates. I have tried with both Barometric sensor on and off in the Urban Biker app. I run Urban Biker in GPS passive mode with Strava in the background. Any ideas on what I can do to correct this problem? Thanks!

Sublimis commented 5 years ago

Hi, please note that there's no such thing as an accurate ascent/descent measurement, even in principle. This problem is known in mathematics as Coastline paradox, and has even led to development of a new mathematical field today known as Fractal geometry. In principle, when measuring ascent/descent (just the same as for a coastline) the answer can be any number up to and including infinity; it highly depends on the length of the "stick" you use for measuring.

Physical reality is, of course, limited by the precision of the altitude sensor (e.g. barometer), noise, etc. so the measurement cannot go to infinity. However, even physically, this number can vary greatly depending on the amount of filtering an app uses when processing altitude data to compute ascent/descent. Filtering is essential in minimizing the influence of sensor noise on measurements. Without filtering all the noise would be adding up to measurements and you would probably end up with a number of 10000 or more for your example, instead of 2600 or 1700.

It is evident that in our app we chose to use somewhat smoother filtering for more conservative measurements (i.e. we chose to use "longer stick"). Reasons are simple: We wanted to avoid measuring "bumps" in the road as ascents.

Most important thing when assessing accuracy of measured ascent/descent is to observe how divergent are the ascent and descent numbers after doing a circular ride (the one with the same starting and ending points). By using Urban Biker with barometric altitude you can observe that these numbers will be close together even after doing a 100 km ride, which indicates that measurements are done correctly.

Don't be fooled by the "Correct Elevation" feature of the Strava, if you're using it: It suffers from the same issue (and some additional ones). The problem is not of technological but of fundamental nature.

To be fair when comparing ascent figures from various apps, it would be best to find a long steady slope and give it a spin. This will minimize "stick length" influence and you'll end up with numbers that won't differ as much.

You also shouldn't directly compare an app that uses barometric altitudes with the one that uses GPS alone. Barometric altitude will almost always provide smaller ascent/descent values than GPS alone. This is because GPS altitudes are notoriously inaccurate and can often fluctuate by +/- 20 meters for no apparent reason, which for the app looks like a slope. As far as we can tell, Cateye doesn't have barometer, and Strava is possibly also not using it.

Hope this will help clarify things a bit. Thank you very much for the feedback!

wilmingtech commented 5 years ago

Let me take a different approach then.

  1. Is there a way to allow Urban Bik Computer to use GPS data for Ascent/Descents instead of the barometric sensor?

  2. Is there a way to adjust the barometric readings either in the phone or in the app? In other words - "Calibrate" the barometric sensor?

Sublimis commented 5 years ago
  1. Yes, there's the option in Settings > Tracking/GPS > Altitudes called Barometric altitude. However, we would strongly advise to leave this option enabled to enjoy much more stable ascent, descent and power values (by "stable" we mean getting the same consistent numbers when riding the same track again and again).

  2. No, the only thing you can calibrate is the barometer offset in the app (in Settings > Advanced) to fix for the absolute pressure values. Note that this doesn't affect ascent nor descent, which depend only on pressure difference. Phones usually do not provide any form of barometer calibration.

If instead you think about calibrating the amount of ascent an app should measure per unit pressure, we think such a feature would open Pandora's box. There's a concept called the Barometric formula. Basically, the pressure gradient in Earth's atmosphere is a rather stable thing (at least in the troposphere, which is all that matters), and once measured doesn't require any form of calibration. This works well for airplanes, so should work well for our app too. Additionally, surely neither Strava nor Cateye are doing this kind of calibration, so it wouldn't be beneficial when trying to get an agreement between different apps.

What we could do, is to provide adjustment for the amount of altitude and barometer filtering. However, by deliberately not providing this feature (and keeping it fixed between app versions), it's possible to at least make consistent comparisons of ascents and descents between different rides and riders of our app, which we think is more useful feature than being able to adjust the amount of filtering.

Please let us know if you have more questions or suggestions, and thanks for the feedback!

TFIELSTRA commented 4 years ago

I live in Florida which is pretty flat except for a few hills and bridges. I have had a few rides the app has reported hundreds of feet assent/desend. I would rather not have that recorded. Unfortunately my phone doesn't have a barometer.