How to know if FC is inverted?

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
ctzsnooze3
Posts: 11
Joined: Thu Aug 07, 2014 7:23 am

How to know if FC is inverted?

Post by ctzsnooze3 »

Hi

I'm experimenting with inverted flight, and I need a variable that indicates the angle of the accelerometer while inverted.

att.angle[PITCH] appears to max out at 90 degrees (vertical), at 10 per degree of rotation. If the FC is rotated past vertical vertical to inverted, this value does not increase beyond 900 (as far as I can tell it stays at 900 for any angle past vertical, but I may be wrong on that). att. angle(ROLL) appears to work the same way.

When connected to the GUI I see a value for 'Z' which is +512 when flat level right side up, and -512 when flat inverted. If I had access to data like that I am sure I could do much better with my code.

If anyone could help I would be very grateful.

Chris

PS - I can see a variable accZ in IMU.cpp but I cannot figure out what its units are, or how it relates to the angle of the FC, or even how I can use it within MultiWii.cpp

Post Reply