@@ -4201,6 +4201,20 @@ def FlyEachFrame(self):
4201
4201
self .fly_mission (mission_file , strict = False , quadplane = quadplane , mission_timeout = 400.0 )
4202
4202
self .wait_disarmed ()
4203
4203
4204
+ def AutoLandMode (self ):
4205
+ '''Test AUTOLAND mode'''
4206
+ self .customise_SITL_commandline (["--home" , "-35.362938,149.165085,585,173" ])
4207
+ self .context_collect ('STATUSTEXT' )
4208
+ self .takeoff (alt = 80 , mode = 'TAKEOFF' )
4209
+ self .wait_text ("Takeoff initial direction" , check_context = True )
4210
+ self .change_mode (26 )
4211
+ self .wait_disarmed (120 )
4212
+ self .progress ("Check the landed heading matches takeoff" )
4213
+ self .wait_heading (173 , accuracy = 5 , timeout = 1 )
4214
+ loc = mavutil .location (- 35.362938 , 149.165085 , 585 , 173 )
4215
+ if self .get_distance (loc , self .mav .location ()) > 35 :
4216
+ raise NotAchievedException ("Did not land close to home" )
4217
+
4204
4218
def RCDisableAirspeedUse (self ):
4205
4219
'''Test RC DisableAirspeedUse option'''
4206
4220
self .set_parameter ("RC9_OPTION" , 106 )
@@ -6548,6 +6562,7 @@ def tests1b(self):
6548
6562
self .MAV_CMD_DO_AUX_FUNCTION ,
6549
6563
self .SmartBattery ,
6550
6564
self .FlyEachFrame ,
6565
+ self .AutoLandMode ,
6551
6566
self .RCDisableAirspeedUse ,
6552
6567
self .AHRS_ORIENTATION ,
6553
6568
self .AHRSTrim ,
0 commit comments