Skip to content

Commit

Permalink
SITL: ease gps_glitch_auto_test
Browse files Browse the repository at this point in the history
shortened glitch duration
extended timeout in gps_glitch_auto_test
  • Loading branch information
rmackay9 committed Apr 21, 2016
1 parent bd24dd7 commit a5de231
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Tools/autotest/arducopter.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ def fly_gps_glitch_loiter_test(mavproxy, mav, timeout=30, max_distance=20):
return success

# fly_gps_glitch_auto_test - fly mission and test reaction to gps glitch
def fly_gps_glitch_auto_test(mavproxy, mav, timeout=30, max_distance=100):
def fly_gps_glitch_auto_test(mavproxy, mav, timeout=120):

# set-up gps glitch array
glitch_lat = [0.0002996,0.0006958,0.0009431,0.0009991,0.0009444,0.0007716,0.0006221]
Expand Down Expand Up @@ -584,7 +584,6 @@ def fly_gps_glitch_auto_test(mavproxy, mav, timeout=30, max_distance=100):
# record time and position
tstart = get_sim_time(mav)
tnow = tstart
start_pos = sim_location(mav)

# initialise current glitch
glitch_current = 0;
Expand All @@ -595,7 +594,7 @@ def fly_gps_glitch_auto_test(mavproxy, mav, timeout=30, max_distance=100):
# record position for 30 seconds
while glitch_current < glitch_num:
tnow = get_sim_time(mav)
desired_glitch_num = int((tnow - tstart) * 2)
desired_glitch_num = int((tnow - tstart) * 2.2)
if desired_glitch_num > glitch_current and glitch_current != -1:
glitch_current = desired_glitch_num
# apply next glitch
Expand Down

0 comments on commit a5de231

Please sign in to comment.