mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-08 17:08:28 -04:00
AP_AHRS: rename get_dcm_matrix to get_rotation_body_to_ned
This commit is contained in:
parent
2a953c4e35
commit
6682b27456
@ -231,7 +231,7 @@ Vector2f AP_AHRS::groundspeed_vector(void)
|
||||
void AP_AHRS::update_trig(void)
|
||||
{
|
||||
Vector2f yaw_vector;
|
||||
const Matrix3f &temp = get_dcm_matrix();
|
||||
const Matrix3f &temp = get_rotation_body_to_ned();
|
||||
|
||||
// sin_yaw, cos_yaw
|
||||
yaw_vector.x = temp.a.x;
|
||||
|
@ -178,7 +178,7 @@ public:
|
||||
|
||||
// get yaw rate in earth frame in radians/sec
|
||||
float get_yaw_rate_earth(void) const {
|
||||
return get_gyro() * get_dcm_matrix().c;
|
||||
return get_gyro() * get_rotation_body_to_ned().c;
|
||||
}
|
||||
|
||||
// Methods
|
||||
@ -225,7 +225,7 @@ public:
|
||||
|
||||
// return a DCM rotation matrix representing our current
|
||||
// attitude
|
||||
virtual const Matrix3f &get_dcm_matrix(void) const = 0;
|
||||
virtual const Matrix3f &get_rotation_body_to_ned(void) const = 0;
|
||||
|
||||
// get our current position estimate. Return true if a position is available,
|
||||
// otherwise false. This call fills in lat, lng and alt
|
||||
|
@ -65,7 +65,7 @@ public:
|
||||
}
|
||||
|
||||
// return rotation matrix representing rotaton from body to earth axes
|
||||
const Matrix3f &get_dcm_matrix(void) const {
|
||||
const Matrix3f &get_rotation_body_to_ned(void) const {
|
||||
return _body_dcm_matrix;
|
||||
}
|
||||
|
||||
|
@ -48,10 +48,10 @@ const Vector3f &AP_AHRS_NavEKF::get_gyro(void) const
|
||||
return _gyro_estimate;
|
||||
}
|
||||
|
||||
const Matrix3f &AP_AHRS_NavEKF::get_dcm_matrix(void) const
|
||||
const Matrix3f &AP_AHRS_NavEKF::get_rotation_body_to_ned(void) const
|
||||
{
|
||||
if (!active_EKF_type()) {
|
||||
return AP_AHRS_DCM::get_dcm_matrix();
|
||||
return AP_AHRS_DCM::get_rotation_body_to_ned();
|
||||
}
|
||||
return _dcm_matrix;
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ public:
|
||||
|
||||
// return the smoothed gyro vector corrected for drift
|
||||
const Vector3f &get_gyro(void) const;
|
||||
const Matrix3f &get_dcm_matrix(void) const;
|
||||
const Matrix3f &get_rotation_body_to_ned(void) const;
|
||||
|
||||
// return the current drift correction integrator value
|
||||
const Vector3f &get_gyro_drift(void) const;
|
||||
|
@ -57,7 +57,7 @@ void loop(void)
|
||||
|
||||
if (now - last_compass > 100*1000UL &&
|
||||
compass.read()) {
|
||||
heading = compass.calculate_heading(ahrs.get_dcm_matrix());
|
||||
heading = compass.calculate_heading(ahrs.get_rotation_body_to_ned());
|
||||
// read compass at 10Hz
|
||||
last_compass = now;
|
||||
#if WITH_GPS
|
||||
|
Loading…
Reference in New Issue
Block a user