Hi,
I'm experimenting the GPS on nrf9160 by using the ncs/samples/nrf9160/gps project. I set the GPS mode to be continuous mode. The 9160DK board is placed in a relative open area.
The initial result is encouraging. I let it run for 60s after getting the first fix. I can see the accuracy reported by GPS goes down quickly. Usually after 10~15s, the accuracy is around or below 3m and stay consistent thereafter. I understand the accuracy is a range with probability. So there's chance the true location is outside the radius as indicated by the accuracy. But if I get consistent accuracy reading that stays below 3m that probably indicates higher accuracy and/or higher confidence. Then I plot the coordinates (60 seconds) and calculated the distance from them to the average of this group of positions. It turns out that majority (>90%) of them fall in the 3m radius to the average. So that's very good result.
Now here's the inconsistent part that I don;t understand. If I stop the gps (through the api: nrf_modem_gnss_stop()) and then start over again, I'll get another set of 60s GPS data. Everything looks just like the first set: reported accuracy drops down to 3m or less quickly and the coordinates mostly fall into the radius. Except the average of the coordinates (hence the whole cluster of positions) are at a point quite some distance from the first test. It could be 6~8 meters away, or even more sometime.
I attached the data and the plot. The blue dots are from test1. Each dot is from the 1 second fix data. The size of the dot is proportional to the accuracy value of that fix. So the largest dot is the first fix. Then it get smaller and smaller. And eventually it all stays in a relatively small area. The dark blue dot (1A) is the average of all blue dots. Same situation for the yellow dots which is from the second test. The dark yellow dot(2A) is the average of all yellow dots. (the X is latitude, Y is longitude)
So my questions is, if you look at either blue or yellow individually, it all looks pretty good. If you keep the GPS in continuous mode you'll get more and more dost around the cluster and thinking that's roughly where the true position would be. But if you run a separate test, it will generate a different cluster and as we can see here from 1A to 2A it's about 6.2 meter. So how should I understand this? Why they are different? Did I miss something here?
(I uses formula here to calculate distance: https://www.movable-type.co.uk/scripts/latlong.html )
A further questions is, if I need to track position to the accuracy as data sheet specified (ie 3meter), it seems I can only keep the GPS running in continuous mode? But even so I'm not sure if the position I get is accurate or not.
Thanks!