Closed mrueg closed 4 years ago
@could you please move this to opendata-stuttgart/sensors-software. Its not related to the feinstaub API. First comments: You need the barometric pressure at sealevel for the position to get the height? Where should this come from (in a reasonable resolution)? GPS is okay for latitude or longitude, but the accuracy for height is around -/+ 8 to 10 m. So to get the elevation you need 2 BME280, one at the ground and one at the height of the sensor. But most people should know at which floor they live and approximate height of a floor.
Maybe there are differences in small particles collected depending if the sensor is on the ground or mounted on the 5th floor. If a sensor reports barometric pressure and has GPS data included, this could be used to calculate the elevation of the sensor. BME180 provides "Up to 0.03hPa / 0.25m resolution", which seems to be good enough to do get that estimate. Calculating it can be achieved using https://en.wikipedia.org/wiki/Barometric_formula assuming a constant temperature between reference and actual location and either the "standard" sea-level pressure and the GPS-based altitude or the data for the local (based on GPS) barometric pressure.
See also (german wikipedia) https://de.wikipedia.org/wiki/Barometrische_H%F6henmessung#Physikalischer_Hintergrund_der_barometrischen_Methode