mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-29 22:13:34 +08:00
rotation: added another missing rotation
This commit is contained in:
@@ -194,5 +194,10 @@ rotate_3f(enum Rotation rot, float &x, float &y, float &z)
|
|||||||
tmp = z; z = x; x = -tmp;
|
tmp = z; z = x; x = -tmp;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
case ROTATION_ROLL_180_PITCH_270: {
|
||||||
|
tmp = z; z = x; x = tmp;
|
||||||
|
y = -y;
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ enum Rotation {
|
|||||||
ROTATION_PITCH_90 = 24,
|
ROTATION_PITCH_90 = 24,
|
||||||
ROTATION_PITCH_270 = 25,
|
ROTATION_PITCH_270 = 25,
|
||||||
ROTATION_ROLL_270_YAW_270 = 26,
|
ROTATION_ROLL_270_YAW_270 = 26,
|
||||||
|
ROTATION_ROLL_180_PITCH_270 = 27,
|
||||||
ROTATION_MAX
|
ROTATION_MAX
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -111,7 +112,8 @@ const rot_lookup_t rot_lookup[] = {
|
|||||||
{270, 0, 135 },
|
{270, 0, 135 },
|
||||||
{ 0, 90, 0 },
|
{ 0, 90, 0 },
|
||||||
{ 0, 270, 0 },
|
{ 0, 270, 0 },
|
||||||
{270, 0, 270 }
|
{270, 0, 270 },
|
||||||
|
{180, 270, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user