added rotation for solos external mag

This commit is contained in:
Andreas Antener
2015-12-09 14:05:49 +01:00
committed by Lorenz Meier
parent f41f60901d
commit 94bfad5057
2 changed files with 12 additions and 1 deletions
+10
View File
@@ -239,5 +239,15 @@ rotate_3f(enum Rotation rot, float &x, float &y, float &z)
y = -z; z = -tmp;
return;
}
case ROTATION_YAW_293_PITCH_68_ROLL_90: {
float tmpx = x;
float tmpy = y;
float tmpz = z;
x = 0.143039f * tmpx + 0.368776f * tmpy + -0.918446f * tmpz;
y = -0.332133f * tmpx + -0.856289f * tmpy + -0.395546f * tmpz;
z = -0.932324f * tmpx + 0.361625f * tmpy + 0.000000f * tmpz;
return;
}
}
}
+2 -1
View File
@@ -78,6 +78,7 @@ enum Rotation {
ROTATION_ROLL_180_PITCH_270 = 27,
ROTATION_PITCH_90_YAW_180 = 28,
ROTATION_PITCH_90_ROLL_90 = 29,
ROTATION_YAW_293_PITCH_68_ROLL_90 = 30,
ROTATION_MAX
};
@@ -117,7 +118,7 @@ const rot_lookup_t rot_lookup[] = {
{270, 0, 270 },
{180, 270, 0 },
{ 0, 90, 180 },
{ 90, 90, 0 }
{ 90, 68, 293 },
};
/**