Skip to content

Commit

Permalink
autotest: added GliderPullup test
Browse files Browse the repository at this point in the history
  • Loading branch information
tridge committed Sep 6, 2024
1 parent 99ddbed commit 3d51dd0
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
QGC WPL 110
0 0 0 16 0.000000 0.000000 0.000000 0.000000 -35.363262 149.165237 584.000000 1
1 0 0 83 2000.000000 10.000000 30.000000 0.000000 0.000000 0.000000 0.000000 1
38 changes: 38 additions & 0 deletions Tools/autotest/arduplane.py
Original file line number Diff line number Diff line change
Expand Up @@ -6089,6 +6089,43 @@ def MAV_CMD_EXTERNAL_WIND_ESTIMATE(self):
self._MAV_CMD_EXTERNAL_WIND_ESTIMATE(self.run_cmd)
self._MAV_CMD_EXTERNAL_WIND_ESTIMATE(self.run_cmd_int)

def GliderPullup(self):
'''test pullup of glider after ALTITUDE_WAIT'''
self.start_subtest("test glider pullup")

self.customise_SITL_commandline(
[],
model="glider",
defaults_filepath="Tools/autotest/default_params/glider.parm",
wipe=True)

self.set_parameters({
"PUP_ENABLE": 1,
"SERVO6_FUNCTION": 0, # balloon lift
"SERVO10_FUNCTION": 156, # lift release
"EK3_IMU_MASK": 1, # lane switches just make log harder to read
})

self.set_servo(6, 1000)

self.load_mission("glider-pullup-mission.txt")
self.change_mode("AUTO")
self.wait_ready_to_arm()
self.arm_vehicle()
self.context_collect('STATUSTEXT')

self.progress("Start balloon lift")
self.set_servo(6, 2000)

self.wait_text("Reached altitude", check_context=True, timeout=300)
self.wait_text("Start pullup airspeed", check_context=True)
self.wait_text("Pullup airspeed", check_context=True)
self.wait_text("Pullup pitch", check_context=True)
self.wait_text("Pullup level", check_context=True)
self.wait_text("Mission complete, changing mode to RTL", check_context=True)

self.fly_home_land_and_disarm(timeout=400)

def tests(self):
'''return list of all tests'''
ret = super(AutoTestPlane, self).tests()
Expand Down Expand Up @@ -6221,6 +6258,7 @@ def tests(self):
self.SetHomeAltChange,
self.ForceArm,
self.MAV_CMD_EXTERNAL_WIND_ESTIMATE,
self.GliderPullup,
])
return ret

Expand Down

0 comments on commit 3d51dd0

Please sign in to comment.