diff --git a/posix-configs/bebop/px4.config b/posix-configs/bebop/px4.config index 00fff38e92..0aae87725b 100644 --- a/posix-configs/bebop/px4.config +++ b/posix-configs/bebop/px4.config @@ -17,9 +17,9 @@ param set MC_YAWRATE_P 0.05 param set MC_YAWRATE_I 0.001 param set MC_YAWRATE_D 0.0 param set MC_YAW_FF 0.7 -#df_ms5607_wrapper start +df_ms5607_wrapper start df_mpu6050_wrapper start -R 8 -df_ak8963_wrapper start -R 4 +df_ak8963_wrapper start -R 32 sensors start commander start attitude_estimator_q start diff --git a/src/lib/conversion/rotation.cpp b/src/lib/conversion/rotation.cpp index 26bfc4d9ef..9ebf0586e8 100644 --- a/src/lib/conversion/rotation.cpp +++ b/src/lib/conversion/rotation.cpp @@ -255,5 +255,15 @@ rotate_3f(enum Rotation rot, float &x, float &y, float &z) y = z; z = -tmp; return; } + + case ROTATION_PITCH_9_YAW_180: { + float tmpx = x; + float tmpy = y; + float tmpz = z; + x = -0.987688f * tmpx + 0.000000f * tmpy + -0.156434f * tmpz; + y = 0.000000f * tmpx + -1.000000f * tmpy + 0.000000f * tmpz; + z = -0.156434f * tmpx + 0.000000f * tmpy + 0.987688f * tmpz; + return; + } } } diff --git a/src/lib/conversion/rotation.h b/src/lib/conversion/rotation.h index 1e1cdce268..0a327e4b62 100644 --- a/src/lib/conversion/rotation.h +++ b/src/lib/conversion/rotation.h @@ -80,6 +80,7 @@ enum Rotation { ROTATION_PITCH_90_ROLL_90 = 29, ROTATION_YAW_293_PITCH_68_ROLL_90 = 30, ROTATION_PITCH_90_ROLL_270 = 31, + ROTATION_PITCH_9_YAW_180 = 32, ROTATION_MAX }; @@ -122,6 +123,7 @@ const rot_lookup_t rot_lookup[] = { { 90, 90, 0 }, { 90, 68, 293 }, {270, 90, 0 }, + { 0, 9, 180 }, }; /**