From db9cc9ac84e3d41a0682cfc00492f84d83795fe6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 28 Apr 2024 16:53:12 +1000 Subject: [PATCH] AP_DAL: use ahrs for EAS2TAS this uses the stored value calculated once per loop --- libraries/AP_DAL/AP_DAL.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_DAL/AP_DAL.cpp b/libraries/AP_DAL/AP_DAL.cpp index 986fe66bcf..6c8824a5a4 100644 --- a/libraries/AP_DAL/AP_DAL.cpp +++ b/libraries/AP_DAL/AP_DAL.cpp @@ -65,7 +65,7 @@ void AP_DAL::start_frame(AP_DAL::FrameType frametype) _RFRN.lat = _home.lat; _RFRN.lng = _home.lng; _RFRN.alt = _home.alt; - _RFRN.EAS2TAS = AP::baro().get_EAS2TAS(); + _RFRN.EAS2TAS = ahrs.get_EAS2TAS(); _RFRN.vehicle_class = (uint8_t)ahrs.get_vehicle_class(); _RFRN.fly_forward = ahrs.get_fly_forward(); _RFRN.takeoff_expected = ahrs.get_takeoff_expected();