Fixed euler wrapping.

This commit is contained in:
James Goppert
2016-01-25 13:40:51 -05:00
parent a92d5c1338
commit 1778ac199c
2 changed files with 2 additions and 4 deletions
+2 -2
View File
@@ -104,8 +104,8 @@ int main()
roll_expected = 0;
yaw_expected = yaw + roll;
}
if (yaw_expected < 0) yaw_expected += 360;
if (yaw_expected > 360) yaw_expected -= 360;
if (yaw_expected < -180) yaw_expected += 360;
if (yaw_expected > 180) yaw_expected -= 360;
printf("roll:%d pitch:%d yaw:%d\n", roll, pitch, yaw);
Euler<double> euler_expected(