Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pressure altitude in CAN datagrams missing #25

Open
Simsys opened this issue Apr 26, 2024 · 2 comments
Open

Pressure altitude in CAN datagrams missing #25

Simsys opened this issue Apr 26, 2024 · 2 comments

Comments

@Simsys
Copy link
Member

Simsys commented Apr 26, 2024

There is no CAN datagram that contains the pressure altitude

@degeflija
Copy link

degeflija commented Apr 26, 2024

Hi, pressure altitude depends on setting a reference pressure. Normally thats QNH, in exceptions QFE. The sensor only knows ambient pressure, but - at start up - does not have any reference.

The way I do that in the AD57 SW is (to save the pilot from doing this) :

  • I keep a push down silo of values of amb pressure. Every second I push a value, the oldest one drops out.

  • I observe GPS speed and air speed. When both are sufficiently high, I decide on take off.

  • In that moment I pick the oldest amb pressure value from the stack (which is presumably not deteriorated by take off), and calculate

      g_ConfigData.QNH = QNH_at ( g_SensorData.GPS_Altitude,
                                  g_SensorData.AmbPressure,
                                  g_SensorData.GPS_Latitude
                         );
    

Formula can be derived from any textbook. Special caution has to be applied for cases of power outage in the air, which would create a fake takeoff. I maintain the last QNH and elelvation in EEPROM and I detect cases of fake takeoff. Then I start with EEPROM values. My little morcel of AI.
As a fallback, my AD57 SW allows for correcting QNH and start point elevation, yet only in flight, not on ground.

As far as I know, Klaus has not implemented anything like this in the sensor, for good reason, when you think about it.

BTW : Thats currently an issue with Uwe's OpenSoar. In OpenSoar you have to set QNH manually.

@Simsys
Copy link
Member Author

Simsys commented Apr 30, 2024

Hi Horst, it is clear that the sensor box does not recognise reference pressures such as QNH or QFE. Nevertheless, the sensor box can output a barometric altitude with reference to a fixed pressure (1013.2 hPa, for example).

  • The Flarm devices, which contain a pressure sensor, do something similar (see $PGRMZ, Flarm dataport protocol).
  • Klaus also outputs a pressure-related altitude on the NMEA interface (see $PLARV, Larus NMEA protocol)

This data point is missing on the CAN bus interface

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants