mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 13:43:34 +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:
@@ -294,5 +294,13 @@ rotate_3f(enum Rotation rot, float &x, float &y, float &z)
|
|||||||
y = -tmp;
|
y = -tmp;
|
||||||
return;
|
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_45 = 33,
|
||||||
ROTATION_PITCH_315 = 34,
|
ROTATION_PITCH_315 = 34,
|
||||||
ROTATION_ROLL_90_YAW_270 = 35,
|
ROTATION_ROLL_90_YAW_270 = 35,
|
||||||
|
ROTATION_ROLL_270_YAW_180 = 41,
|
||||||
ROTATION_MAX
|
ROTATION_MAX
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -131,6 +132,7 @@ const rot_lookup_t rot_lookup[] = {
|
|||||||
{ 0, 45, 0 },
|
{ 0, 45, 0 },
|
||||||
{ 0, 315, 0 },
|
{ 0, 315, 0 },
|
||||||
{ 90, 0, 270 },
|
{ 90, 0, 270 },
|
||||||
|
{270, 0, 180 },
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user