conversion: added rotation +45 degree in pitch

This commit is contained in:
Andreas Antener
2018-02-28 10:08:58 +01:00
committed by Lorenz Meier
parent 11e3081efd
commit add20389f6
2 changed files with 9 additions and 0 deletions
+7
View File
@@ -265,5 +265,12 @@ rotate_3f(enum Rotation rot, float &x, float &y, float &z)
z = -0.156434f * tmpx + 0.000000f * tmpy + 0.987688f * tmpz;
return;
}
case ROTATION_PITCH_45: {
tmp = HALF_SQRT_2 * x + HALF_SQRT_2 * z;
z = HALF_SQRT_2 * z - HALF_SQRT_2 * x;
x = tmp;
return;
}
}
}
+2
View File
@@ -81,6 +81,7 @@ enum Rotation {
ROTATION_YAW_293_PITCH_68_ROLL_90 = 30,
ROTATION_PITCH_90_ROLL_270 = 31,
ROTATION_PITCH_9_YAW_180 = 32,
ROTATION_PITCH_45 = 33,
ROTATION_MAX
};
@@ -124,6 +125,7 @@ const rot_lookup_t rot_lookup[] = {
{ 90, 68, 293 },
{270, 90, 0 },
{ 0, 9, 180 },
{ 0, 45, 0 },
};
/**