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 2, 2024
1 parent 481f319 commit 31c1135
Show file tree
Hide file tree
Showing 2 changed files with 43 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
40 changes: 40 additions & 0 deletions Tools/autotest/arduplane.py
Original file line number Diff line number Diff line change
Expand Up @@ -6052,6 +6052,45 @@ def ForceArm(self):
)
self.disarm_vehicle()

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

model = "glider"

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 @@ -6183,6 +6222,7 @@ def tests(self):
self.GPSPreArms,
self.SetHomeAltChange,
self.ForceArm,
self.GliderPullup,
])
return ret

Expand Down

0 comments on commit 31c1135

Please sign in to comment.