Acknowledged

Toybox.Activity.getActivityInfo().currentLocation gives wrong values one day after GPS fix on Epix2

I have some responses from Epix2 users, that the sunrise/sunset calculation is wrong one day after an activity with GPS.

I use the getActivityInfo().currentLocation on my watchface to calculate. I use the code since many years for all devices without problems.

I check the return of .currentLocation of Null and store the value to storage, if it not Null. The saved value are then used if the return is Null.

On Epix2  it seems, after GPS fix all is ok, the return is saved and the calculation is correct. But one day after fix, the return is not Null the return is a wrong value. Therefore my saved position is not used and the calculation is wrong.

I can’t reproduce this on Sim and have no Epix2 to check the issue.

Have anyone similar user responses? Is this a firmware problem on an Epix2 device or what’s the difference to another devices?

Parents
  • Are you checking the quality of the location data? There are some cases where the returned location can be some value like [0,0] or [180,180], which would be used by your app to calculate the sunrise/sunset values since they aren't null, but they aren't really valid positions. If you check Activity.currentLocationAccuracy() and it returns QUALITY_NOT_AVAILABLE, you can assume the position you're getting isn't valid and fall back to your stored value.

Comment
  • Are you checking the quality of the location data? There are some cases where the returned location can be some value like [0,0] or [180,180], which would be used by your app to calculate the sunrise/sunset values since they aren't null, but they aren't really valid positions. If you check Activity.currentLocationAccuracy() and it returns QUALITY_NOT_AVAILABLE, you can assume the position you're getting isn't valid and fall back to your stored value.

Children
No Data