diff --git a/docs/_static/favicon.ico b/docs/_static/favicon.ico index 5c275d6..f30ca29 100644 Binary files a/docs/_static/favicon.ico and b/docs/_static/favicon.ico differ diff --git a/docs/conf.py b/docs/conf.py index 1a4082e..0ba8991 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - # SPDX-FileCopyrightText: 2023 Jose D. Montoya # # SPDX-License-Identifier: MIT @@ -184,9 +182,6 @@ "override": True, }, ] -python_type_aliases = { - "DigitalInOut": "digitalio.DigitalInOut", -} object_description_options = [ ("py:.*", dict(generate_synopses="first_sentence")), diff --git a/docs/requirements.txt b/docs/requirements.txt index ee61061..f06dd1d 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -2,5 +2,5 @@ # # SPDX-License-Identifier: Unlicense -sphinx-immaterial +sphinx-immaterial>=0.11.7 mock diff --git a/micropython_bmp581/bmp581.py b/micropython_bmp581/bmp581.py index 05dc6ed..6b8fbe9 100644 --- a/micropython_bmp581/bmp581.py +++ b/micropython_bmp581/bmp581.py @@ -267,10 +267,12 @@ def altitude(self) -> float: With the measured pressure p and the pressure at sea level p0 e.g. 1013.25hPa, the altitude in meters can be calculated with the international barometric formula """ + # was ** 0.190284, should be ** 0.190295 or better ** (1.0 / 5.255)) altitude = 44330.0 * ( - 1.0 - ((self.pressure / self.sea_level_pressure) ** 0.190284) + 1.0 - ((self.pressure / self.sea_level_pressure) ** (1.0 / 5.255)) ) - return round(altitude, 1) + # was round(altitude, 1), rounding limits accuracy to 100cm, sensor +/- cm + return altitude @altitude.setter def altitude(self, value: float) -> None: