bailuk / AAT

Another Activity Tracker for Android
https://bailu.ch/aat
GNU General Public License v3.0
156 stars 41 forks source link

tracker/AttributesCollector: disable LOG_INTERVAL #113

Closed MaxKellermann closed 3 years ago

MaxKellermann commented 3 years ago

By setting this to zero, AAT logs the extensions with each GPS fix, instead of waiting 3 or 4 seconds.

This gives analysis software a better accuracy; not only because of the finer-grained interval: if AAT records a sensor value, it's an arbitrary value, and not the average since the last recorded value. This means that the value may contain more noise than the sensor actually provided.

And it solves a problem with Strava: if a GPS fix doesn't contain a "cadence" value, Strava just uses the previous value; but if there's no "power" value, Strava instead assumes zero, resulting in very low (and bogus) average power values.

Let's drop this limitation - this causes GPX files to grow, but the 90ies are gone, and today, we have gigabytes of free storage for GPX files.

bailuk commented 3 years ago

This is definitely an improvement because it makes tracks more accurate and more exchangeable with other apps.

But there are still some considerations:

Let's drop this limitation - this causes GPX files to grow, but the 90ies are gone, and today, we have gigabytes of free storage for GPX files.

This will also affect heap consumption as AAT loads GPX tracks completely into memory. Heap per app is usually limited on Android.

Another downside is that track loading time will increase.

Also one of the features of AAT is that it supports old Android Versions and therefore old devices.

MaxKellermann commented 3 years ago

This will also affect heap consumption as AAT loads GPX tracks completely into memory. Heap per app is usually limited on Android.

Sure, but we're talking about files in the range of a few megabytes. Phones have memory in the range of gigabytes.

AAT's internal object model is extremely inefficient. It would be very easy to reduce AAT's overall memory consumption. If memory usage is a problem, that's where I would get started - but features which are useful shall use more memory.