mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
add new rotation (#14512)
* add new rotation ROLL_270_YAW_180 fix compile error fix rotation modify roatation * modify enum to 41
This commit is contained in:
parent
a96bc6a145
commit
e82880d6d7
@ -294,5 +294,13 @@ rotate_3f(enum Rotation rot, float &x, float &y, float &z)
|
||||
y = -tmp;
|
||||
return;
|
||||
}
|
||||
|
||||
case ROTATION_ROLL_270_YAW_180: {
|
||||
x = -x;
|
||||
tmp = y;
|
||||
y = -z;
|
||||
z = -tmp;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -85,6 +85,7 @@ enum Rotation {
|
||||
ROTATION_PITCH_45 = 33,
|
||||
ROTATION_PITCH_315 = 34,
|
||||
ROTATION_ROLL_90_YAW_270 = 35,
|
||||
ROTATION_ROLL_270_YAW_180 = 41,
|
||||
ROTATION_MAX
|
||||
};
|
||||
|
||||
@ -131,6 +132,7 @@ const rot_lookup_t rot_lookup[] = {
|
||||
{ 0, 45, 0 },
|
||||
{ 0, 315, 0 },
|
||||
{ 90, 0, 270 },
|
||||
{270, 0, 180 },
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user