From dd49d79798dcbafbc897bb7b1c919fb2e38a2235 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Tue, 5 Oct 2021 20:16:49 +1100 Subject: [PATCH] autotest: add test for Plane flying with a very slow GPS --- Tools/autotest/arduplane.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Tools/autotest/arduplane.py b/Tools/autotest/arduplane.py index f702a9afc3..42bf49959e 100644 --- a/Tools/autotest/arduplane.py +++ b/Tools/autotest/arduplane.py @@ -3084,6 +3084,24 @@ class AutoTestPlane(AutoTest): self.fly_mission("ap-circuit.txt", mission_timeout=1200) + def DCMFallback(self): + self.wait_ready_to_arm() + self.arm_vehicle() + + self.takeoff(50) + self.context_collect('STATUSTEXT') + self.set_parameter("EK3_POS_I_GATE", 25) + self.set_parameter("SIM_GPS_HZ", 1) + self.wait_statustext("DCM Active", check_context=True) + self.wait_statustext("EKF3 Active", check_context=True) + self.wait_statustext("DCM Active", check_context=True) + self.wait_statustext("EKF3 Active", check_context=True) + self.wait_statustext("DCM Active", check_context=True) + self.wait_statustext("EKF3 Active", check_context=True) + self.context_stop_collecting('STATUSTEXT') + + self.fly_home_land_and_disarm() + def ForcedDCM(self): self.wait_ready_to_arm() @@ -3314,6 +3332,10 @@ class AutoTestPlane(AutoTest): "Switch to DCM mid-flight", self.ForcedDCM), + ("DCMFallback", + "Really annoy the EKF and force fallback", + self.DCMFallback), + ("MAVFTP", "Test MAVProxy can talk FTP to autopilot", self.MAVFTP),