Skip to content

Commit

Permalink
sort enum by mavlink MAV_SENSOR_ORIENTATION
Browse files Browse the repository at this point in the history
  • Loading branch information
baumanta authored and dagar committed May 2, 2020
1 parent 0cdf2c2 commit c37424a
Showing 1 changed file with 38 additions and 18 deletions.
56 changes: 38 additions & 18 deletions src/lib/conversion/rotation.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,27 @@ enum Rotation {
ROTATION_ROLL_270_YAW_135 = 23,
ROTATION_PITCH_90 = 24,
ROTATION_PITCH_270 = 25,
ROTATION_ROLL_270_YAW_270 = 26,
ROTATION_ROLL_180_PITCH_270 = 27,
ROTATION_PITCH_90_YAW_180 = 28,
ROTATION_PITCH_90_ROLL_90 = 29,
ROTATION_YAW_293_PITCH_68_ROLL_90 = 30,
ROTATION_PITCH_90_ROLL_270 = 31,
ROTATION_PITCH_9_YAW_180 = 32,
ROTATION_PITCH_45 = 33,
ROTATION_PITCH_315 = 34,
ROTATION_ROLL_90_YAW_270 = 35,
ROTATION_ROLL_270_YAW_180 = 41,
ROTATION_PITCH_180_YAW_90 = 26,
ROTATION_PITCH_180_YAW_270 = 27,
ROTATION_ROLL_90_PITCH_90 = 28,
ROTATION_ROLL_180_PITCH_90 = 29,
ROTATION_ROLL_270_PITCH_90 = 30,
ROTATION_ROLL_90_PITCH_180 = 31,
ROTATION_ROLL_270_PITCH_180 = 32,
ROTATION_ROLL_90_PITCH_270 = 33,
ROTATION_ROLL_180_PITCH_270 = 34,
ROTATION_ROLL_270_PITCH_270 = 35,
ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
ROTATION_ROLL_90_YAW_270 = 37,
ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
ROTATION_PITCH_315 = 39,
ROTATION_ROLL_90_PITCH_315 = 40,
ROTATION_ROLL_270_YAW_180 = 41,
ROTATION_ROLL_270_YAW_270 = 42,
ROTATION_PITCH_90_YAW_180 = 43,
ROTATION_YAW_293_PITCH_68_ROLL_90 = 44,
ROTATION_PITCH_9_YAW_180 = 45,
ROTATION_PITCH_45 = 46,
ROTATION_MAX
};

Expand Down Expand Up @@ -122,17 +132,27 @@ const rot_lookup_t rot_lookup[] = {
{270, 0, 135 },
{ 0, 90, 0 },
{ 0, 270, 0 },
{270, 0, 270 },
{180, 270, 0 },
{ 0, 90, 180 },
{ 0, 180, 90 },
{ 0, 180, 270 },
{ 90, 90, 0 },
{ 90, 68, 293 },
{180, 90, 0 },
{270, 90, 0 },
{ 0, 9, 180 },
{ 0, 45, 0 },
{ 0, 315, 0 },
{ 90, 180, 0 },
{270, 180, 0 },
{ 90, 270, 0 },
{180, 270, 0 },
{270, 270, 0 },
{ 90, 180, 90 },
{ 90, 0, 270 },
{ 90, 68, 293 },
{ 0, 315, 0 },
{ 90, 315, 0 },
{270, 0, 180 },
{270, 0, 270 },
{ 0, 90, 180 },
{293, 68, 90 },
{ 0, 9, 180 },
{ 0, 45, 0 },
};

/**
Expand Down

0 comments on commit c37424a

Please sign in to comment.