AP_AHRS: provide accessor for synthetic airspeed

This commit is contained in:
Peter Barker 2020-07-28 14:29:57 +10:00 committed by Peter Barker
parent ac85ec9924
commit 4e12f16608
2 changed files with 15 additions and 0 deletions

View File

@ -272,6 +272,12 @@ public:
return true;
}
// return a synthetic airspeed estimate (one derived from sensors
// other than an actual airspeed sensor), if available. return
// true if we have a synthetic airspeed. ret will not be modified
// on failure.
virtual bool synthetic_airspeed(float &ret) const WARN_IF_UNUSED = 0;
// get apparent to true airspeed ratio
float get_EAS2TAS(void) const;

View File

@ -94,6 +94,15 @@ public:
// if we have an estimate
bool airspeed_estimate(float &airspeed_ret) const override;
// return a synthetic airspeed estimate (one derived from sensors
// other than an actual airspeed sensor), if available. return
// true if we have a synthetic airspeed. ret will not be modified
// on failure.
bool synthetic_airspeed(float &ret) const override WARN_IF_UNUSED {
ret = _last_airspeed;
return true;
}
bool use_compass() override;
// return the quaternion defining the rotation from NED to XYZ (body) axes