Browse Source

Plane: reflect renamed function in AP_AHRS

master
Jonathan Challinger 9 years ago committed by Andrew Tridgell
parent
commit
05eb723429
  1. 2
      ArduPlane/altitude.cpp
  2. 2
      ArduPlane/navigation.cpp
  3. 2
      ArduPlane/test.cpp

2
ArduPlane/altitude.cpp

@ -561,7 +561,7 @@ void Plane::rangefinder_height_update(void) @@ -561,7 +561,7 @@ void Plane::rangefinder_height_update(void)
}
// correct the range for attitude (multiply by DCM.c.z, which
// is cos(roll)*cos(pitch))
height_estimate = distance * ahrs.get_dcm_matrix().c.z;
height_estimate = distance * ahrs.get_rotation_body_to_ned().c.z;
// we consider ourselves to be fully in range when we have 10
// good samples (0.2s) that are different by 5% of the maximum

2
ArduPlane/navigation.cpp

@ -118,7 +118,7 @@ void Plane::calc_gndspeed_undershoot() @@ -118,7 +118,7 @@ void Plane::calc_gndspeed_undershoot()
// This prevents flyaway if wind takes plane backwards
if (gps.status() >= AP_GPS::GPS_OK_FIX_2D) {
Vector2f gndVel = ahrs.groundspeed_vector();
const Matrix3f &rotMat = ahrs.get_dcm_matrix();
const Matrix3f &rotMat = ahrs.get_rotation_body_to_ned();
Vector2f yawVect = Vector2f(rotMat.a.x,rotMat.b.x);
yawVect.normalize();
float gndSpdFwd = yawVect * gndVel;

2
ArduPlane/test.cpp

@ -431,7 +431,7 @@ int8_t Plane::test_mag(uint8_t argc, const Menu::arg *argv) @@ -431,7 +431,7 @@ int8_t Plane::test_mag(uint8_t argc, const Menu::arg *argv)
if(counter % 5 == 0) {
if (compass.read()) {
// Calculate heading
const Matrix3f &m = ahrs.get_dcm_matrix();
const Matrix3f &m = ahrs.get_rotation_body_to_ned();
heading = compass.calculate_heading(m);
compass.learn_offsets();
}

Loading…
Cancel
Save