Jump to content

Rotation and heading


Oni

Recommended Posts

Sorry if this was discussed, but even after search I can't find quick solution for this problem: when I try to get "global heading" of vehicle (0 to 359 degrees in relation to Z axis) with getVehicleRotation it gives me unexpected values in case if there is rotation along other axes. For example, if Hydra flies straight to the north, this function gives me "0" as I expect, but if I make half roll (continuing to fly in same direction), it inverts the result, giving me "180". Any way of calculating "global" heading via returned values? Or I just use wrong function? Of course there's a way of capturing two positions within small time interval and using arctan to get angle, but maybe native solution exists?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...