Provide configurable barometric state for demos and UI development. More...
Public Member Functions | |
| bool | is_started (self) |
| Return whether the controller is ready to read state. | |
| bool | is_available (self) |
| Return whether barometric support is configured and available. | |
| str|None | status_message (self) |
| Return an availability message, if one applies. | |
| float | sea_level_pressure_pa (self) |
| Return the sea-level pressure reference in pascals. | |
| BarometricState|None | latest_state (self) |
Return the latest state, or None before the first read. | |
| None | start (self) |
| Start the controller and its environmental source. | |
| None | stop (self) |
| Stop the controller and its environmental source. | |
| BarometricState | read_state (self) |
| Read and return the current processed environmental state. | |
| None | set_state (self, BarometricState state) |
| Replace the deterministic state returned by future reads. | |
| None | set_sea_level_pressure_pa (self, float pressure_pa) |
| Set the pressure reference used for absolute altitude. | |
| float | calibrate_altitude (self, float known_altitude_m, *float|None pressure_pa=None) |
| Calibrate sea-level pressure at a known altitude. | |
| None | reset_relative_altitude (self) |
| Set the current altitude as the relative-altitude zero point. | |
Provide configurable barometric state for demos and UI development.
| float environmental.barometric_controller_stub.BarometricControllerStub.calibrate_altitude | ( | self, | |
| float | known_altitude_m, | ||
| *float | None | pressure_pa = None |
||
| ) |
Calibrate sea-level pressure at a known altitude.
| known_altitude_m | Known altitude in meters above sea level. |
| pressure_pa | Measured pressure in pascals, or None to read the current pressure from the configured source. |
Reimplemented from environmental.barometric_controller_if.BarometricControllerIf.
| bool environmental.barometric_controller_stub.BarometricControllerStub.is_available | ( | self | ) |
Return whether barometric support is configured and available.
| True | Barometric support is available. |
| False | Barometric support is unavailable. |
Reimplemented from environmental.barometric_controller_if.BarometricControllerIf.
| bool environmental.barometric_controller_stub.BarometricControllerStub.is_started | ( | self | ) |
Return whether the controller is ready to read state.
| True | The controller has been started. |
| False | The controller has not been started. |
Reimplemented from environmental.barometric_controller_if.BarometricControllerIf.
| BarometricState | None environmental.barometric_controller_stub.BarometricControllerStub.latest_state | ( | self | ) |
Return the latest state, or None before the first read.
None before the first read. Reimplemented from environmental.barometric_controller_if.BarometricControllerIf.
| BarometricState environmental.barometric_controller_stub.BarometricControllerStub.read_state | ( | self | ) |
Read and return the current processed environmental state.
Reimplemented from environmental.barometric_controller_if.BarometricControllerIf.
| float environmental.barometric_controller_stub.BarometricControllerStub.sea_level_pressure_pa | ( | self | ) |
Return the sea-level pressure reference in pascals.
Reimplemented from environmental.barometric_controller_if.BarometricControllerIf.
| None environmental.barometric_controller_stub.BarometricControllerStub.set_sea_level_pressure_pa | ( | self, | |
| float | pressure_pa | ||
| ) |
Set the pressure reference used for absolute altitude.
| pressure_pa | Sea-level pressure reference in pascals. |
Reimplemented from environmental.barometric_controller_if.BarometricControllerIf.
| str | None environmental.barometric_controller_stub.BarometricControllerStub.status_message | ( | self | ) |
Return an availability message, if one applies.
None when no message applies. Reimplemented from environmental.barometric_controller_if.BarometricControllerIf.