mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 05:33:33 +08:00
add a new rotation to lib/conversion
This commit is contained in:
@@ -199,5 +199,10 @@ rotate_3f(enum Rotation rot, float &x, float &y, float &z)
|
|||||||
y = -y;
|
y = -y;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
case ROTATION_PITCH_90_YAW_180: {
|
||||||
|
tmp = x; x = z; z = tmp;
|
||||||
|
y = -y;
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ enum Rotation {
|
|||||||
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_ROLL_180_PITCH_270 = 27,
|
||||||
|
ROTATION_PITCH_90_YAW_180 = 28,
|
||||||
ROTATION_MAX
|
ROTATION_MAX
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -113,7 +114,8 @@ const rot_lookup_t rot_lookup[] = {
|
|||||||
{ 0, 90, 0 },
|
{ 0, 90, 0 },
|
||||||
{ 0, 270, 0 },
|
{ 0, 270, 0 },
|
||||||
{270, 0, 270 },
|
{270, 0, 270 },
|
||||||
{180, 270, 0 }
|
{180, 270, 0 },
|
||||||
|
{ 0, 90, 180 }
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user