New mission test

This commit is contained in:
Jason Short 2011-11-08 21:43:18 -08:00
parent ccc2746a22
commit bf1e991308
2 changed files with 17 additions and 6 deletions

View File

@ -79,7 +79,7 @@ def wait_altitude(mav, alt_min, alt_max, timeout=30):
return True return True
print("Failed to attain altitude range") print("Failed to attain altitude range")
return False return False
def arm_motors(mavproxy): def arm_motors(mavproxy):
'''arm motors''' '''arm motors'''
@ -98,7 +98,7 @@ def disarm_motors(mavproxy):
mavproxy.expect('APM: DISARMING MOTORS') mavproxy.expect('APM: DISARMING MOTORS')
mavproxy.send('rc 4 1500\n') mavproxy.send('rc 4 1500\n')
print("MOTORS DISARMED OK") print("MOTORS DISARMED OK")
def takeoff(mavproxy, mav): def takeoff(mavproxy, mav):
'''takeoff get to 30m altitude''' '''takeoff get to 30m altitude'''
@ -205,7 +205,7 @@ def fly_square(mavproxy, mav, side=50, timeout=120):
return ok return ok
def land(mavproxy, mav, timeout=60): def land(mavproxy, mav, timeout=60):
'''land the quad''' '''land the quad'''
@ -307,8 +307,8 @@ def fly_ArduCopter():
fly_square(mavproxy, mav) fly_square(mavproxy, mav)
loiter(mavproxy, mav) loiter(mavproxy, mav)
land(mavproxy, mav) land(mavproxy, mav)
fly_mission(mavproxy, mav, os.path.join(testdir, "mission1.txt")) fly_mission(mavproxy, mav, os.path.join(testdir, "mission_ttt.txt"))
land(mavproxy, mav) #land(mavproxy, mav)
disarm_motors(mavproxy) disarm_motors(mavproxy)
except pexpect.TIMEOUT, e: except pexpect.TIMEOUT, e:
failed = True failed = True
@ -327,4 +327,4 @@ def fly_ArduCopter():
if failed: if failed:
print("FAILED: %s" % e) print("FAILED: %s" % e)
sys.exit(1) sys.exit(1)

View File

@ -0,0 +1,11 @@
QGC WPL 110
#s fr ac cmd p1 p2 p3 p4 lat lon alt continue
0 1 3 0 0.000000 0.000000 0.000000 0.000000 -35.362881 149.165222 582.000000 1
1 0 3 22 0.000000 0.000000 0.000000 0.000000 -35.362881 149.165222 20.000000 1
2 0 3 115 360.0 10.0000 1.0 1.0 -35.362612, 149.164186 20.000000 1
3 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.362612, 149.164186 20.000000 1
4 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.363928, 149.165718 20.000000 1
5 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.363910, 149.162632 20.000000 1
6 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.365215, 149.164145 20.000000 1
7 0 3 20 0.000000 0.000000 0.000000 0.000000 -35.363228 149.161896 30.000000 1
8 0 3 21 0.000000 0.000000 0.000000 0.000000 -35.363228 149.161896 0.000000 1