mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 02:43:33 +08:00
remove rotation 41 (ROLL_270_YAW_180)
- duplicate of 31 (ROLL_90_PITCH_180)
This commit is contained in:
committed by
Lorenz Meier
parent
a66cb0cbaf
commit
9f57df75e8
@@ -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";
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 },
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user