diff --git a/libraries/AP_AHRS/AP_AHRS.h b/libraries/AP_AHRS/AP_AHRS.h index f8c87da36f..abb36f2e13 100644 --- a/libraries/AP_AHRS/AP_AHRS.h +++ b/libraries/AP_AHRS/AP_AHRS.h @@ -548,10 +548,6 @@ public: */ // roll/pitch/yaw euler angles, all in radians - float roll; - float pitch; - float yaw; - float get_roll() const { return roll; } float get_pitch() const { return pitch; } float get_yaw() const { return yaw; } @@ -681,6 +677,11 @@ public: private: + // roll/pitch/yaw euler angles, all in radians + float roll; + float pitch; + float yaw; + // optional view class AP_AHRS_View *_view; diff --git a/libraries/AP_AHRS/examples/AHRS_Test/AHRS_Test.cpp b/libraries/AP_AHRS/examples/AHRS_Test/AHRS_Test.cpp index 38a4eaefa2..a413891687 100644 --- a/libraries/AP_AHRS/examples/AHRS_Test/AHRS_Test.cpp +++ b/libraries/AP_AHRS/examples/AHRS_Test/AHRS_Test.cpp @@ -84,9 +84,9 @@ void loop(void) hal.console->printf( "r:%4.1f p:%4.1f y:%4.1f " "drift=(%5.1f %5.1f %5.1f) hdg=%.1f rate=%.1f\n", - (double)ToDeg(ahrs.roll), - (double)ToDeg(ahrs.pitch), - (double)ToDeg(ahrs.yaw), + (double)ToDeg(ahrs.get_roll()), + (double)ToDeg(ahrs.get_pitch()), + (double)ToDeg(ahrs.get_yaw()), (double)ToDeg(drift.x), (double)ToDeg(drift.y), (double)ToDeg(drift.z),