Tools: mode AUTOLAND enhancements

This commit is contained in:
Henry Wurzburg 2025-01-01 17:25:12 -06:00
parent 76f6455fd2
commit f722212f1e

View File

@ -4241,17 +4241,28 @@ class AutoTestPlane(vehicle_test_suite.TestSuite):
def AutoLandMode(self): def AutoLandMode(self):
'''Test AUTOLAND mode''' '''Test AUTOLAND mode'''
self.set_parameters({
"AUTOLAND_DIR_OFF": 45,
})
self.customise_SITL_commandline(["--home", "-35.362938,149.165085,585,173"]) self.customise_SITL_commandline(["--home", "-35.362938,149.165085,585,173"])
self.context_collect('STATUSTEXT') self.context_collect('STATUSTEXT')
self.takeoff(alt=80, mode='TAKEOFF') self.takeoff(alt=80, mode='TAKEOFF')
self.wait_text("Autoland direction", check_context=True) self.wait_text("Autoland direction", check_context=True)
self.change_mode(26) self.change_mode(26)
self.wait_disarmed(120) self.wait_disarmed(120)
self.progress("Check the landed heading matches takeoff") self.progress("Check the landed heading matches takeoff plus offset")
self.wait_heading(173, accuracy=5, timeout=1) self.wait_heading(218, accuracy=5, timeout=1)
loc = mavutil.location(-35.362938, 149.165085, 585, 173) loc = mavutil.location(-35.362938, 149.165085, 585, 218)
if self.get_distance(loc, self.mav.location()) > 35: if self.get_distance(loc, self.mav.location()) > 35:
raise NotAchievedException("Did not land close to home") raise NotAchievedException("Did not land close to home")
self.set_parameters({
"TKOFF_OPTIONS": 2,
})
self.wait_ready_to_arm()
self.set_autodisarm_delay(0)
self.arm_vehicle()
self.progress("Check the set dir on arm option")
self.wait_text("Autoland direction", check_context=True)
def RCDisableAirspeedUse(self): def RCDisableAirspeedUse(self):
'''Test RC DisableAirspeedUse option''' '''Test RC DisableAirspeedUse option'''