Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

Full mission example has wrong home reference frame #104

Closed
majassow opened this issue Mar 28, 2017 · 1 comment
Closed

Full mission example has wrong home reference frame #104

majassow opened this issue Mar 28, 2017 · 1 comment
Assignees

Comments

@majassow
Copy link

[Note: this is my first post in github... please let me know (gently) all the things I did wrong so I can make sure to not repeat them.]

in dronekit-example.md, the home position is set using the global frame:
home = vehicle.location.global_frame
however, the Mavlink commands are using the global relative frame:
# takeoff to 10 meters wp = get_location_offset_meters(home, 0, 0, 10); cmd = Command(0,0,0, mavutil.mavlink.MAV_FRAME_GLOBAL_RELATIVE_ALT, mavutil.mavlink.MAV_CMD_NAV_TAKEOFF, 0, 1, 0, 0, 0, 0, wp.lat, wp.lon, wp.alt)

The code as is causes the UAV to climb to your current home MSL + 10 meters.
Changing the home to:
home = vehicle.location.global_relative_frame
...causes the UAV to behave as expected.

@hamishwillee
Copy link
Collaborator

You're absolutely right @majassow - thanks. This is fixed by as part of #193.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants