mirror of https://github.com/ArduPilot/ardupilot
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:
parent
7e5808a97b
commit
b6a089f90e
|
@ -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…
Reference in New Issue