rainerblind / aTrainingTracker

An android app for tracking your sports activities (supporting ANT+ and BTLE)
GNU General Public License v3.0
45 stars 18 forks source link

Occasionally adds a large distance during recording when screen turned off #36

Open jgOhYeah opened 4 years ago

jgOhYeah commented 4 years ago

Hello, Firstly, Thankyou for such a versatile app that nearly always "just works."

The last two rides I have recorded, I have had a bit of an issue with recordings adding a large number (in the order of 100km) to the distance at a point during the ride. This seems to coincide with when I would have stopped and checked my phone, then turned the phone screen off. I don't recall having issues with screen turnoff interrupting the app before.

I am running the app on a Samsung S10e running Android 10 and One UI 2.0, talking Ant+ to a Garmin speed sensor and a Garmin cadence sensor. Optimise battery usage setting is set to "Not optimised" and it appears to be running in the background successfully. When riding I generally have the phone with screen off in my pocket.

If it helps, the notification in the notification bar after the jump in distance would also say that the active time is currently over a day, when it would only have been going an hour or two at most. The distance in the distance box in the dashboard shows the incorrect distance and the distance in the workouts tab shows the correct distance.

I have attached cut down versions of the TCX files exported by a Training Tracker with the points around near where the issue is. Two points from one of them are also here below:

Do you have any idea why this is happening or any sugestions to resolve it? Thanks in advance.

CutDownTCXFiles.zip

<Trackpoint>
  <Time>2020-06-14T06:23:08Z</Time>
  <Position>
    <LatitudeDegrees>-36.21572042987399</LatitudeDegrees>
    <LongitudeDegrees>144.88646121667452</LongitudeDegrees>
  </Position>
  <AltitudeMeters>59.134090423583984</AltitudeMeters>
  <DistanceMeters>13574.28</DistanceMeters>
  <Cadence>0.0</Cadence>
  <Extensions>
    <TPX xmlns="http://www.garmin.com/xmlschemas/ActivityExtension/v2">
  <Speed>0.0</Speed>
    </TPX>
  </Extensions>
</Trackpoint>  
<Trackpoint>
  <Time>2020-06-14T06:23:09Z</Time>
  <Position>
    <LatitudeDegrees>-36.215703705475136</LatitudeDegrees>
    <LongitudeDegrees>144.88646074463688</LongitudeDegrees>
  </Position>
  <AltitudeMeters>59.83164978027344</AltitudeMeters>
  <DistanceMeters>139946.448</DistanceMeters>
  <Cadence>1.0770432</Cadence>
  <Extensions>
    <TPX xmlns="http://www.garmin.com/xmlschemas/ActivityExtension/v2">
  <Speed>7.8678561104</Speed>
    </TPX>
  </Extensions>
</Trackpoint>