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:
Jin Chengde 2020-04-22 15:03:55 +08:00 committed by GitHub
parent a96bc6a145
commit e82880d6d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -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;
}
}
}

View File

@ -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 },
};
/**