remove rotation 41 (ROLL_270_YAW_180)

- duplicate of 31 (ROLL_90_PITCH_180)
This commit is contained in:
Daniel Agar
2020-12-28 11:07:08 +01:00
committed by Lorenz Meier
parent a66cb0cbaf
commit 9f57df75e8
18 changed files with 19 additions and 47 deletions
-6
View File
@@ -97,12 +97,6 @@ TEST(Rotations, duplicates)
if (j == ROTATION_ROLL_180_YAW_90 && i == ROTATION_PITCH_180_YAW_270) { continue; }
// ROTATION_ROLL_90_PITCH_180 (31) = ROTATION_ROLL_270_YAW_180 (41)
if (i == ROTATION_ROLL_90_PITCH_180 && j == ROTATION_ROLL_270_YAW_180) { continue; }
if (j == ROTATION_ROLL_90_PITCH_180 && i == ROTATION_ROLL_270_YAW_180) { continue; }
// otherwise all rotations should be different
ASSERT_GT((transformed_1 - transformed_2).norm(), 0) << "Rotation " << i << " and " << j << " equal";
}
+1 -4
View File
@@ -284,10 +284,7 @@ rotate_3f(enum Rotation rot, float &x, float &y, float &z)
return;
}
case ROTATION_ROLL_90_PITCH_180:
// FALLTHROUGH
case ROTATION_ROLL_270_YAW_180: {
case ROTATION_ROLL_90_PITCH_180: {
tmp = y;
x = -x;
y = -z;
+3 -5
View File
@@ -90,18 +90,17 @@ enum Rotation {
ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
ROTATION_PITCH_315 = 39,
ROTATION_ROLL_90_PITCH_315 = 40,
ROTATION_ROLL_270_YAW_180 = 41,
ROTATION_MAX
};
typedef struct {
struct rot_lookup_t {
uint16_t roll;
uint16_t pitch;
uint16_t yaw;
} rot_lookup_t;
};
const rot_lookup_t rot_lookup[] = {
static constexpr rot_lookup_t rot_lookup[ROTATION_MAX] = {
{ 0, 0, 0 },
{ 0, 0, 45 },
{ 0, 0, 90 },
@@ -143,7 +142,6 @@ const rot_lookup_t rot_lookup[] = {
{ 90, 68, 293 },
{ 0, 315, 0 },
{ 90, 315, 0 },
{270, 0, 180 },
};
/**