AP_NavEKF2: take EAS2TAS from AHRS rather than airspeed

This commit is contained in:
Peter Barker 2019-06-04 13:37:36 +10:00 committed by Andrew Tridgell
parent 697b8f6b53
commit 11f31c2851
2 changed files with 2 additions and 2 deletions

View File

@ -676,7 +676,7 @@ void NavEKF2_core::readAirSpdData()
if (aspeed &&
aspeed->use() &&
aspeed->last_update_ms() != timeTasReceived_ms) {
tasDataNew.tas = aspeed->get_airspeed() * aspeed->get_EAS2TAS();
tasDataNew.tas = aspeed->get_airspeed() * AP::ahrs().get_EAS2TAS();
timeTasReceived_ms = aspeed->last_update_ms();
tasDataNew.time_ms = timeTasReceived_ms - frontend->tasDelay_ms;

View File

@ -313,7 +313,7 @@ void NavEKF2_core::detectFlight()
// trigger at 8 m/s airspeed
if (_ahrs->airspeed_sensor_enabled()) {
const AP_Airspeed *airspeed = _ahrs->get_airspeed();
if (airspeed->get_airspeed() * airspeed->get_EAS2TAS() > 10.0f) {
if (airspeed->get_airspeed() * AP::ahrs().get_EAS2TAS() > 10.0f) {
highAirSpd = true;
}
}