Continued from: https://forums.garmin.com/developer/connect-iq/f/discussion/399601/position-altitude-activity-info-altitude
I made some debugging, because I'd like to add some GPS indicator to the app. Something similar to the colorful circle or line at the beginning of an activity, that indicates if the GPS is ready or the user should wait a few more seconds before starting to record the activity. So I added some more logs:
10:51:39 onStart 10:51:40 timerStart 10:51:49 onPosition: ac: 4, al: 28.794516, h: 0.722252, p: N 41.761165°E 024.768223°, s: 0.000000, w: 10:51:49, ai.al: 13.034976 10:51:50 onPosition: ac: 4, al: 42.072090, h: 0.722252, p: N 41.761095°E 024.768148°, s: 0.000000, w: 10:51:50, ai.al: 26.321882
What I am interested in is how can I use Position.Info.accuracy ("ac" above). When I start the app I also start the GPS sensor. On the screen I start to display the elevation from ActivityInfo.altitude ("ai.al") and what I saw was "--" for a few seconds, and then 13 and then 26 (close enough to the actual ~22 where I was standing). I thought that I'll see the accuracy increase in the 1st seconds from 0 or 1 (when I saw "--") and then to 2 (when I saw 13) and then to 3 or 4 (when I saw 26)
Especially because of the 2 "jumps" (between -- to 14 and from 13 to 26) I was hoping that the accuracy will be increasing and that I could use that to indicate red/orange/yellow/green, but apparently not
If someone knows how to acquire the data that can be used for such GPS status/fix indicatior in an app, please share your code!