Reputation: 1507
I created a small javascript webapp that uses navigator.geolocation.watchPosition
to track the visitor's position. From the data I receive I notice that the best accuracy from my measurements is 5m. I thought this would be enough to calculate a maximum and current speed.
But it seems that the speeds are not that accurate. I sometimes get results with a 10km/h difference compared to a "real" gps app.
Is this a limitation for a webapp or is it a mistake I am making in my calculations? To calculate the speed I compare the current position to the last position and calculate the difference/time.
Upvotes: 0
Views: 326
Reputation: 326
5m is the best accuracy you can get, but most of the time it's less accurate than this. I would say it's about 30m, but in my experience it happened, that the devices position was about 1 km from the real position I really was. This was not persistent, but just one value I got. If you would like to make a good accuracy speed calculation, you need to filter the gps coordinate values. Or you could use the built in speed function, that's quite accurate too.
Upvotes: 1