Browse Source

AP_AHRS: Fixed body_to_earth

body_to_earth was not implemented consistently with earth_to_body.
Changed the order of operation to be consistent and rotate reference
frame correctly.
apm_2208
Bailey K. Srimoungchanh 3 years ago committed by Peter Barker
parent
commit
b6a089f90e
  1. 2
      libraries/AP_AHRS/AP_AHRS.h

2
libraries/AP_AHRS/AP_AHRS.h

@ -535,7 +535,7 @@ public: @@ -535,7 +535,7 @@ public:
// convert a vector from body to earth frame
Vector3f body_to_earth(const Vector3f &v) const {
return v * get_rotation_body_to_ned();
return get_rotation_body_to_ned() * v;
}
// convert a vector from earth to body frame

Loading…
Cancel
Save