Coordinate frame description conflict between imu_cpp.h and online documentation #87
KernelKlinq
started this conversation in
General
Replies: 1 comment 2 replies
-
|
The comment in imu_cpp.h was incorrect, thanks for reporting this. It has been corrected in master now. AHRS should work correctly for the 8 possible imu_align options with the FC mounted horizontally. If you want to mount the FC vertically you'll have to edit the update() method in imu_cpp.h to output NED coordinates. Or add the 16 possible vertical orientations to the imu_align enum and add corresponding code to the update() method. (Note: you probably also need to update the mag code.) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
There appears to be an inconsistency with the coordinate definitions for the IMU. The X and Y appear to be switched for accelerometer readings. I am currently trying to make a new orientation definition that allows the MadFlight FC3 to be mounted vertically. The AHRS code seems to have pitch and roll reversed when the orientation from the imu_cpp.h is implemented, even though the NED and gyro orientations seem to make sense for NED.
The imu_cpp.h file has the following comment: (x and y appear to be incorrectly switched in the text below)
The following paragraph appears in Madflight online web documents and gives a different description of the orientation test, with nose-down reading on X instead of Y.
Does anyone know if the AHRS code is wrong?
Beta Was this translation helpful? Give feedback.
All reactions