-
Notifications
You must be signed in to change notification settings - Fork 17.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AP_InertialSensor: Rework rotation handling
Right now, MPU based imus perform the rotations in the driver in an implicit way when converting sensor bus data to actual x, y, z data. MPU6000 and MPU9250 : x = y, y = x, z = -z meaning ROTATION_ROLL_180_YAW_90 LSM9DS0 and L3G4200 : x = x, y = -y, z = -z meaning ROTATION ROLL_180 This commit removes these implict rotations from the drivers and modify the per-board orientations so the behaviour doesn't change, by applying a combination of ROLL_180_YAW_90 and then the former board rotation for MPU9250 and MPU6000 and applying a combination of ROLL_180 and the former board rotation for LSM9DS0 and L3G4200. RASPILOT had a compilation flag inside the LSM9DS0 driver to add a YAW_90 rotation. When added to the ROLL_180 applied when converting data, it gives the same rotation as the computed rotation for the mpu6000, i.e ROLL_180_YAW_90 Checks: Leftovers and mistakes fixed by tridge included Tested by lucasdemarchi with https://gist.github.com/d049489154f4f90141644b3c90403009
- Loading branch information
Showing
5 changed files
with
49 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters