Browse Source

AP_InertialNav: Remove unused get_pos_z_derivative

master
Michael du Breuil 6 years ago committed by Randy Mackay
parent
commit
141429bc8e
  1. 15
      libraries/AP_InertialNav/AP_InertialNav_NavEKF.cpp
  2. 6
      libraries/AP_InertialNav/AP_InertialNav_NavEKF.h

15
libraries/AP_InertialNav/AP_InertialNav_NavEKF.cpp

@ -36,13 +36,6 @@ void AP_InertialNav_NavEKF::update(float dt) @@ -36,13 +36,6 @@ void AP_InertialNav_NavEKF::update(float dt)
_velocity_cm = velNED * 100; // convert to cm/s
_velocity_cm.z = -_velocity_cm.z; // convert from NED to NEU
}
// Get a derivative of the vertical position which is kinematically consistent with the vertical position is required by some control loops.
// This is different to the vertical velocity from the EKF which is not always consistent with the vertical position due to the various errors that are being corrected for.
if (_ahrs_ekf.get_vert_pos_rate(_pos_z_rate)) {
_pos_z_rate *= 100; // convert to cm/s
_pos_z_rate = - _pos_z_rate; // InertialNav is NEU
}
}
/**
@ -127,14 +120,6 @@ float AP_InertialNav_NavEKF::get_speed_xy() const @@ -127,14 +120,6 @@ float AP_InertialNav_NavEKF::get_speed_xy() const
return norm(_velocity_cm.x, _velocity_cm.y);
}
/**
* get_pos_z_derivative - returns the derivative of the z position in cm/s
*/
float AP_InertialNav_NavEKF::get_pos_z_derivative() const
{
return _pos_z_rate;
}
/**
* get_altitude - get latest altitude estimate in cm
* @return

6
libraries/AP_InertialNav/AP_InertialNav_NavEKF.h

@ -70,11 +70,6 @@ public: @@ -70,11 +70,6 @@ public:
*/
const Vector3f& get_velocity() const override;
/**
* get_pos_z_derivative - returns the derivative of the z position in cm/s
*/
float get_pos_z_derivative() const;
/**
* get_speed_xy - returns the current horizontal speed in cm/s
*
@ -100,7 +95,6 @@ public: @@ -100,7 +95,6 @@ public:
private:
Vector3f _relpos_cm; // NEU
Vector3f _velocity_cm; // NEU
float _pos_z_rate;
struct Location _abspos;
bool _haveabspos;
AP_AHRS_NavEKF &_ahrs_ekf;

Loading…
Cancel
Save