From 3be8d094df5a8280c95d4df51dd20e3b22c9db1c Mon Sep 17 00:00:00 2001 From: dodoradio Date: Sun, 9 Jul 2023 23:06:27 +0100 Subject: Add altimeter Asteroid watches don't generally have a pressure sensor, as it isn't generally exposed by android's HAL. Hence we use the basic 12Pa/m relationship to calculate an approximation for altitude from the pressure sensor (barometer) reading. This kind of precision seems appropriate given that a) we don't expect this to be used as a flight computer and b) the android barometer, while precise, isn't super accurate anyway. In order to make the reading a bit more useful, we allow the user to calibrate the current altitude. Since we allow separate calibration of this from the barometer calibration, we use the uncalibrated barometer reading as the input for our calculation. --- src/main.qml | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main.qml') diff --git a/src/main.qml b/src/main.qml index 5471752..2457d8c 100644 --- a/src/main.qml +++ b/src/main.qml @@ -55,6 +55,11 @@ Application { width: pv.width property string name: qsTr("Barometer") } + Altimeter { + height: pv.height + width: pv.width + property string name: qsTr("Altimeter") + } } path: Path { -- cgit v1.2.3-54-g00ecf