Skip to content

Commit a51f51f

Browse files
authored
Merge pull request #653 from tribbloid/fix-test_goto
fix a global_frame altitude caused bug in sitl test
2 parents 2d4abf7 + 63943a3 commit a51f51f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dronekit/test/sitl/test_goto.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
simple_goto.py: GUIDED mode "simple goto" example (Copter Only)
33
4-
The example demonstrates how to arm and takeoff in Copter and how to navigate to
4+
The example demonstrates how to arm and takeoff in Copter and how to navigate to
55
points using Vehicle.simple_goto.
66
77
Full documentation is provided at http://python.dronekit.io/examples/simple_goto.html
@@ -60,9 +60,9 @@ def arm_and_takeoff(aTargetAltitude):
6060
# processing the goto (otherwise the command after
6161
# Vehicle.simple_takeoff will execute immediately).
6262
while True:
63-
# print " Altitude: ", vehicle.location.alt
63+
# print " Altitude: ", vehicle.location.global_relative_frame.alt
6464
# Test for altitude just below target, in case of undershoot.
65-
if vehicle.location.global_frame.alt >= aTargetAltitude * 0.95:
65+
if vehicle.location.global_relative_frame.alt >= aTargetAltitude * 0.95:
6666
# print "Reached target altitude"
6767
break
6868

0 commit comments

Comments
 (0)