5
0
mirror of https://github.com/ArduPilot/ardupilot synced 2025-03-12 17:43:58 -03:00

Plane: reflect renamed function in AP_AHRS

This commit is contained in:
Jonathan Challinger 2015-12-10 14:06:37 -08:00 committed by Andrew Tridgell
parent cee706edd9
commit 05eb723429
3 changed files with 3 additions and 3 deletions

View File

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

View File

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

View File

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