autotest: test guided attitude control with no GPS

This commit is contained in:
Peter Barker 2024-06-11 07:37:52 +10:00 committed by Peter Barker
parent 470663b30b
commit 47625e693e
1 changed files with 12 additions and 0 deletions

View File

@ -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