Mild Fuzz
Mild Fuzz

Reputation: 30671

What does navigator.gelocation accuracy relate to?

Using the navigator.geolocation object in JavaScript. Trying to establish accurate ranges, but wondering exactly how accurate they are.

navigator.geolocation has an accuracy value, but I don't know what they number relates to in real terms. Does the value have a real world equivalent?

Upvotes: 1

Views: 1183

Answers (2)

phihag
phihag

Reputation: 287755

The geolocation standard specified the accuracy as being in meters, and that it should correspond to a 95% confidence level.

So if you draw a circle with a radius of accuracy around the actual physical position, (at least) 19 out of 20 reported positions fall within that circle. In practice, this value allows you to roughly gauge the quality of positioning: If it is above 100, the positioning is only accurate to city level. If it is less than 10, the values are of high quality.

Upvotes: 2

pete
pete

Reputation: 25081

From the W3C Editor's Draft:

"The accuracy attribute denotes the accuracy level of the latitude and longitude coordinates. It is specified in meters and must be supported by all implementations. The value of the accuracy attribute must be a non-negative real number.

The altitudeAccuracy attribute is specified in meters. If the implementation cannot provide altitude information, the value of this attribute must be null. Otherwise, the value of the altitudeAccuracy attribute must be a non-negative real number.

The accuracy and altitudeAccuracy values returned by an implementation should correspond to a 95% confidence level."

Also, per the MDN:

"enableHighAccuracy – A boolean which indicates to the device that you wish to obtain it’s most accurate readings (this parameter may or may not make a difference, depending on your hardware)"

Upvotes: 0

Related Questions