Skip to content

Commit

Permalink
Merge pull request #653 from tribbloid/fix-test_goto
Browse files Browse the repository at this point in the history
fix a global_frame altitude caused bug in sitl test
  • Loading branch information
hamishwillee authored Aug 22, 2016
2 parents 2d4abf7 + 63943a3 commit a51f51f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dronekit/test/sitl/test_goto.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
simple_goto.py: GUIDED mode "simple goto" example (Copter Only)
The example demonstrates how to arm and takeoff in Copter and how to navigate to
The example demonstrates how to arm and takeoff in Copter and how to navigate to
points using Vehicle.simple_goto.
Full documentation is provided at http://python.dronekit.io/examples/simple_goto.html
Expand Down Expand Up @@ -60,9 +60,9 @@ def arm_and_takeoff(aTargetAltitude):
# processing the goto (otherwise the command after
# Vehicle.simple_takeoff will execute immediately).
while True:
# print " Altitude: ", vehicle.location.alt
# print " Altitude: ", vehicle.location.global_relative_frame.alt
# Test for altitude just below target, in case of undershoot.
if vehicle.location.global_frame.alt >= aTargetAltitude * 0.95:
if vehicle.location.global_relative_frame.alt >= aTargetAltitude * 0.95:
# print "Reached target altitude"
break

Expand Down

0 comments on commit a51f51f

Please sign in to comment.