Skip to content

Commit

Permalink
AP_Math: fix up rotation test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
jschall authored and Andrew Tridgell committed Oct 19, 2014
1 parent 6076f3f commit 7084588
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions libraries/AP_Math/examples/eulers/eulers.pde
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <AP_Airspeed.h>
#include <AP_Vehicle.h>
#include <AP_ADC_AnalogSource.h>
#include <AP_Rally.h>

const AP_HAL::HAL& hal = AP_HAL_BOARD_DRIVER;

Expand Down Expand Up @@ -132,7 +133,7 @@ static void test_quaternion(float roll, float pitch, float yaw)
float roll2, pitch2, yaw2;

q.from_euler(roll, pitch, yaw);
q.to_euler(&roll2, &pitch2, &yaw2);
q.to_euler(roll2, pitch2, yaw2);
check_result("test_quaternion1", roll, pitch, yaw, roll2, pitch2, yaw2);

m.from_euler(roll, pitch, yaw);
Expand All @@ -141,7 +142,7 @@ static void test_quaternion(float roll, float pitch, float yaw)

m.from_euler(roll, pitch, yaw);
q.from_rotation_matrix(m);
q.to_euler(&roll2, &pitch2, &yaw2);
q.to_euler(roll2, pitch2, yaw2);
check_result("test_quaternion3", roll, pitch, yaw, roll2, pitch2, yaw2);

q.rotation_matrix(m);
Expand Down Expand Up @@ -192,7 +193,7 @@ static void test_conversion(float roll, float pitch, float yaw)
float roll3, pitch3, yaw3;

q.from_euler(roll, pitch, yaw);
q.to_euler(&roll2, &pitch2, &yaw2);
q.to_euler(roll2, pitch2, yaw2);
check_result("test_conversion1", roll, pitch, yaw, roll2, pitch2, yaw2);

q.rotation_matrix(m);
Expand Down

0 comments on commit 7084588

Please sign in to comment.