Accuracy of Latitude and Longitude on API

How accurate are the latitude and longitude reported on the API? How are the coordinates acquired? Is there a GPS system in the sensors?


Hello @Alisha_Jimenez ,

The coordinates are set and reported by the user installing a Purpleair sensor. Users can be as accurate as they want. If you navigate to and filter by “Position Rating (stars)” you’ll see a confidence rating of the location reported by users.

For reference here is what the Purpleair API documentation says:

position_rating	Integer	
A 'star' rating of position accuracy. 0 stars is nowhere near the claimed location whereas 5 stars is close to the map location as indicated by the latitude and longitude values.
1 Like

Hello @carlkidcrypto-paa,

Do you know how the Position Rating (stars) is calculated? Who assigns the rating?

1 Like

Unfortunately, I do not know how it is calculated.
All I know is that users are prompted to place their sensors on a map during setup.
I imagine PurpleAir might use a combo of shipping address versus where a user says the sensor is on a map. (this is just a guess). PurpleAir assigns the rating.

You can always reach out to for more information.

1 Like

PurpleAir assigns the rating. They do not appear to have documented how it is calculated. However, based on this thread about WiFi Status Indicators, I suspect they are comparing the user reported location to a location associated with the public IP address assigned to the sensor.

I’m discussing this with PurpleAir support. My sensor location rating is “0”, even though it’s accurately located on their map. Support is looking into it.They say, “The PurpleAir map uses Google’s Geocoding API to manage location comparison with latitude and longitude. The star rating is most likely based on a series of factors based on the mapping that Google Geocoding reports.”

As I read this, “The star rating is most likely based on”… is an indication that PurpleAir does not actually know what it is based on. Series of factors? What factors? Maybe if you don’t have Google set as your default search engine, you lose a few stars. And if you’re not using G-mail, you lose a few more. No Android phone? Your rating is 0!

Shouldn’t PurpleAir know what the star rating is based on prior to publishing it on their website as if it provided some meaningful information?

The star rating is calculated using Google’s Geolocation API. When a sensor connects to WiFi, it sends the IP address to Google for a location estimate. This is then compared against the latitude and longitude set during registration to determine the star rating.

If the sensor is reconnected to a different WiFi network, then the location check will be performed again and updated.

@Nalo, the 7.03 and 7.04 firmware versions currently have a bug affecting geolocation for some sensors. This was not an issue with Google’s API but rather the firmware of PurpleAir sensors. We have resolved the issue for your device, and it now reports a 5-star rating.

If anyone else suspects that there is an error in their sensor’s location star rating, please send an email to

That’s great for me, it solves my problem with geolocation.

It’s not so great for PurpleAir, though. Accuracy of the data that PurpleAir reports should be your highest priority. Unless someone knows to specifically check a device’s location rating, they wouldn’t know a device is being reported as being “Nowhere near” or “Far” from where it is depicted on your map. I’d suggest that any device with a 0, 1 or 2 location rating should be displayed with the other outcasts down at Antartica, until their location rating is at least a 3. I’d also suggest that PurpleAir periodically notify device owners if their rating is anything less than 5, and ask them to confirm the device’s location. Why would you display air quality information on a map when your service indicates the device is nowhere near the location you’re showing it at? That’s the opposite of accuracy. PurpleAir’s desire to be known as an accurate air quality reporting entity should not be publishing readings they believe were taken nowhere near their location shown on PurpleAir’s map.

You currently show 4 of the 8 sensors near Lahaina as being nowhere near where they are shown on your map. The Big Island of Hawaii has more than 20 sensors that are identified as being nowhere near where they are shown on your map.

You have to fix this if PurpleAir wants to earn a reputation for accuracy.

I see that all 4 of the “0” location ratings near Lahaina are running the 7.04 firmware. 3 of the 4 “5” ratings are running 7.02 firmware.

This supports your suggestion there’s a problem with the 7.04 firmware.

Do you have plans to upgrade all our sensors with a firmware that will fix this?

If so, what is the timetable for the upgrade?