ardupilot icon indicating copy to clipboard operation
ardupilot copied to clipboard

Plane: always report the airspeed estimate being used in VFR hud

Open IamPete1 opened this issue 2 years ago • 6 comments

Currently a unused airspeed sensor (ARSPD_USE = 0) will be reported rather than the airspeed estimate that the vehicle is actually flying to. This changes to use the same criteria and index as ahrs.airspeed_estimate, however as stated in the existing comment we do not constrain with wind max as we would via ahrs.

I'm actually quite tempted to remove this extra case all together and always report the exact ahrs airspeed the vehicle is flying to, I think that is more important than reporting the exact airspeed measured, as it is included in other messages, sort of anyway (SCALED_PRESSURE).

IamPete1 avatar Sep 14 '22 20:09 IamPete1

does this match what we report in the OSD HUD? if USE=0 it still reports the sensor airspeed, I think...if type=0 then it reports the synthetic airspeed, I think... and this is what I think people flying with OSD want....you want to see the airspeed sensor as it cals even when not used... while synthetic airspeed is mostly used for Qplane transition logic and stall logic(I think), its not widely used for normal flight modes, correct? so being able to see the airspeed sensor cal on the first flight is pretty important,I think...at least for OSD users...I would think it also applies to GCS HUD users

Hwurzburg avatar Sep 14 '22 23:09 Hwurzburg

@Hwurzburg This does not change OSD. It looks like there there is the option to report airspeed sensors directly or the ahrs number.

IamPete1 avatar Sep 15 '22 19:09 IamPete1

I know it does not change the OSD, but why would a GCS operator want something different than an FPV operator, is my point...maybe there should be an option for this for MAVLink like there is in OSD?

Hwurzburg avatar Sep 15 '22 20:09 Hwurzburg

The GCS user wants the best airspeed estimate, that should be the one the ahrs is using. The other airspeed sensors are reported via the scaled pressure message which the GCS could convert to airspeed. If its a question of seeing the sensor calibrate in flight there is a dedicated airspeed sensor calibration MAVLink message. Having said that a dedicated MAVLink airspeed message would be great, were still using named value float for the second sensor.

IamPete1 avatar Sep 15 '22 21:09 IamPete1

This seems to be failing CI due to the airspeed sensor being rejected by the EKF and falling back to a bad wind estimate.

IamPete1 avatar Sep 15 '22 22:09 IamPete1

need a AIRSPEED message, with instance, and type

tridge avatar Sep 20 '22 01:09 tridge

@tridge @hendjoshsr71 There is a airspeed message in development.xml.

https://github.com/mavlink/mavlink/pull/1602

    <message id="295" name="AIRSPEED">
      <wip/>
      <!-- This message is work-in-progress and it can therefore change. It should NOT be used in stable production environments. -->
      <description>Airspeed information from a sensor.</description>
      <field type="uint8_t" name="id" instance="true">Sensor ID.</field>
      <field type="float" name="airspeed" units="m/s">Calibrated airspeed (CAS) if available, otherwise indicated airspeed (IAS).</field>
      <field type="int16_t" name="temperature" units="cdegC">Temperature. INT16_MAX for value unknown/not supplied.</field>
      <field type="float" name="press_diff" units="hPa">Differential pressure. NaN for value unknown/not supplied.</field>
      <field type="float" name="press_static" units="hPa">Static pressure. NaN for value unknown/not supplied.</field>
      <field type="float" name="error" units="m/s">Error/accuracy. NaN for value unknown/not supplied.</field>
      <field type="uint8_t" name="type" enum="AIRSPEED_SENSOR_TYPE">Airspeed sensor type. NaN for value unknown/not supplied. Used to estimate accuracy (i.e. as an alternative to using the error field).</field>
    </message>

I would probably have done a smaller one getting rid of static pressure and type. Maybe changing error to heath to match the heath probability stuff we have in AP.

But I guess its a starting point. Any thoughts?

IamPete1 avatar Sep 30 '22 14:09 IamPete1

we could propose a change to AIRSPEED in development.xml that has:

  • sensor ID
  • airspeed
  • raw pressure (so we can detect tube order error)
  • temperature
  • status flags? include if in use, and health

tridge avatar Oct 03 '22 23:10 tridge

I am subscribed to this one to prepare QGC when this goes to stable. Let me know if you want in QGC available more fields other than airspeed, etc. Thanks!

Davidsastresas avatar Oct 06 '22 14:10 Davidsastresas