From 47625e693e2b9014a84b14498c1ca5f6d01f6817 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Tue, 11 Jun 2024 07:37:52 +1000 Subject: [PATCH] autotest: test guided attitude control with no GPS --- Tools/autotest/arduplane.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Tools/autotest/arduplane.py b/Tools/autotest/arduplane.py index 3f714260b0..4eadb92c2f 100644 --- a/Tools/autotest/arduplane.py +++ b/Tools/autotest/arduplane.py @@ -5389,6 +5389,17 @@ class AutoTestPlane(vehicle_test_suite.TestSuite): self.disarm_vehicle(force=True) self.reboot_sitl() + def GuidedAttitudeNoGPS(self): + '''test that guided-attitude still works with no GPS''' + self.takeoff(50) + self.change_mode('GUIDED') + self.context_push() + self.set_parameter('SIM_GPS_DISABLE', 1) + self.delay_sim_time(30) + self.set_attitude_target() + self.context_pop() + self.fly_home_land_and_disarm() + def tests(self): '''return list of all tests''' ret = super(AutoTestPlane, self).tests() @@ -5499,6 +5510,7 @@ class AutoTestPlane(vehicle_test_suite.TestSuite): self.MAV_CMD_NAV_RETURN_TO_LAUNCH, self.MinThrottle, self.ClimbThrottleSaturation, + self.GuidedAttitudeNoGPS, ]) return ret