You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In your code for altitude you have
altitude = 44330.0 * (
1.0 - ((self.pressure / self.sea_level_pressure) ** 0.190284)
)
return round(altitude, 1)
In the Bosch Sensor guide (ex: in bmp180 they show a different formula page 16 of: https://cdn-shop.adafruit.com/datasheets/BST-BMP180-DS000-09.pdf).
Since you are raising the difference in pressure & SLP to a power small differences can make a difference.
Consider this return value instead, because it eliminates the over rounding of altitude limits accuracy to 100cm on device capable of a couple of centimeters:
altitude = 44330.0 * (
1.0 - ((self.pressure / self.sea_level_pressure) ** (1.0 / 5.255))
)
return altitude
The text was updated successfully, but these errors were encountered:
In your code for altitude you have
altitude = 44330.0 * (
1.0 - ((self.pressure / self.sea_level_pressure) ** 0.190284)
)
return round(altitude, 1)
In the Bosch Sensor guide (ex: in bmp180 they show a different formula page 16 of: https://cdn-shop.adafruit.com/datasheets/BST-BMP180-DS000-09.pdf).
Since you are raising the difference in pressure & SLP to a power small differences can make a difference.
Consider this return value instead, because it eliminates the over rounding of altitude limits accuracy to 100cm on device capable of a couple of centimeters:
altitude = 44330.0 * (
1.0 - ((self.pressure / self.sea_level_pressure) ** (1.0 / 5.255))
)
return altitude
The text was updated successfully, but these errors were encountered: