Skip to content

Commit

Permalink
Tools: remove wnav-speed param change tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rmackay9 authored and lthall committed Jul 19, 2024
1 parent c045f7f commit 1c7e705
Showing 1 changed file with 0 additions and 80 deletions.
80 changes: 0 additions & 80 deletions Tools/autotest/arducopter.py
Original file line number Diff line number Diff line change
Expand Up @@ -3832,86 +3832,6 @@ def SplineTerrain(self):
self.set_parameter("TERRAIN_ENABLE", 0)
self.fly_mission("wp.txt")

def WPNAV_SPEED(self):
'''ensure resetting WPNAV_SPEED during a mission works'''

loc = self.poll_home_position()
alt = 20
loc.alt = alt
items = []

# 100 waypoints in a line, 10m apart in a northerly direction
# for i in range(1, 100):
# items.append((mavutil.mavlink.MAV_CMD_NAV_WAYPOINT, i*10, 0, alt))

# 1 waypoint a long way away
items.append((mavutil.mavlink.MAV_CMD_NAV_WAYPOINT, 2000, 0, alt),)

items.append((mavutil.mavlink.MAV_CMD_NAV_RETURN_TO_LAUNCH, 0, 0, 0))

self.upload_simple_relhome_mission(items)

start_speed_ms = self.get_parameter('WPNAV_SPEED') / 100.0

self.takeoff(20)
self.change_mode('AUTO')
self.wait_groundspeed(start_speed_ms-1, start_speed_ms+1, minimum_duration=10)

for speed_ms in 7, 8, 7, 8, 9, 10, 11, 7:
self.set_parameter('WPNAV_SPEED', speed_ms*100)
self.wait_groundspeed(speed_ms-1, speed_ms+1, minimum_duration=10)
self.do_RTL()

def WPNAV_SPEED_UP(self):
'''Change speed (up) during mission'''

items = []

# 1 waypoint a long way up
items.append((mavutil.mavlink.MAV_CMD_NAV_WAYPOINT, 0, 0, 20000),)

items.append((mavutil.mavlink.MAV_CMD_NAV_RETURN_TO_LAUNCH, 0, 0, 0))

self.upload_simple_relhome_mission(items)

start_speed_ms = self.get_parameter('WPNAV_SPEED_UP') / 100.0

minimum_duration = 5

self.takeoff(20)
self.change_mode('AUTO')
self.wait_climbrate(start_speed_ms-1, start_speed_ms+1, minimum_duration=minimum_duration)

for speed_ms in 7, 8, 7, 8, 6, 2:
self.set_parameter('WPNAV_SPEED_UP', speed_ms*100)
self.wait_climbrate(speed_ms-1, speed_ms+1, minimum_duration=minimum_duration)
self.do_RTL(timeout=240)

def WPNAV_SPEED_DN(self):
'''Change speed (down) during mission'''

items = []

# 1 waypoint a long way back down
items.append((mavutil.mavlink.MAV_CMD_NAV_WAYPOINT, 0, 0, 10),)

items.append((mavutil.mavlink.MAV_CMD_NAV_RETURN_TO_LAUNCH, 0, 0, 0))

self.upload_simple_relhome_mission(items)

minimum_duration = 5

self.takeoff(500, timeout=70)
self.change_mode('AUTO')

start_speed_ms = self.get_parameter('WPNAV_SPEED_DN') / 100.0
self.wait_climbrate(-start_speed_ms-1, -start_speed_ms+1, minimum_duration=minimum_duration)

for speed_ms in 7, 8, 7, 8, 6, 2:
self.set_parameter('WPNAV_SPEED_DN', speed_ms*100)
self.wait_climbrate(-speed_ms-1, -speed_ms+1, minimum_duration=minimum_duration)
self.do_RTL()

def fly_mission(self, filename, strict=True):
num_wp = self.load_mission(filename, strict=strict)
self.set_parameter("AUTO_OPTIONS", 3)
Expand Down

0 comments on commit 1c7e705

Please sign in to comment.