mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 13:33:40 +08:00
conversion: added -45 deg pitch rotation
This commit is contained in:
committed by
Lorenz Meier
parent
add20389f6
commit
ab9ee3aa6c
@@ -272,5 +272,12 @@ rotate_3f(enum Rotation rot, float &x, float &y, float &z)
|
|||||||
x = tmp;
|
x = tmp;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case ROTATION_PITCH_315: {
|
||||||
|
tmp = HALF_SQRT_2 * x - HALF_SQRT_2 * z;
|
||||||
|
z = HALF_SQRT_2 * z + HALF_SQRT_2 * x;
|
||||||
|
x = tmp;
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ enum Rotation {
|
|||||||
ROTATION_PITCH_90_ROLL_270 = 31,
|
ROTATION_PITCH_90_ROLL_270 = 31,
|
||||||
ROTATION_PITCH_9_YAW_180 = 32,
|
ROTATION_PITCH_9_YAW_180 = 32,
|
||||||
ROTATION_PITCH_45 = 33,
|
ROTATION_PITCH_45 = 33,
|
||||||
|
ROTATION_PITCH_315 = 34,
|
||||||
ROTATION_MAX
|
ROTATION_MAX
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -126,6 +127,7 @@ const rot_lookup_t rot_lookup[] = {
|
|||||||
{270, 90, 0 },
|
{270, 90, 0 },
|
||||||
{ 0, 9, 180 },
|
{ 0, 9, 180 },
|
||||||
{ 0, 45, 0 },
|
{ 0, 45, 0 },
|
||||||
|
{ 0, 315, 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user