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.
This commit is contained in:
Bailey K. Srimoungchanh 2022-07-20 03:10:24 -05:00 committed by Peter Barker
parent 7e5808a97b
commit b6a089f90e
1 changed files with 1 additions and 1 deletions

View File

@ -535,7 +535,7 @@ public:
// convert a vector from body to earth frame // convert a vector from body to earth frame
Vector3f body_to_earth(const Vector3f &v) const { 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 // convert a vector from earth to body frame