mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-06 19:00:27 +08:00
AC_PID: remove calls to SlewCalculator2D
This commit is contained in:
committed by
Peter Barker
parent
584c8f16f9
commit
e8649c8bf6
@@ -96,10 +96,6 @@ Vector2f AC_PID_2D::update_all(const Vector2f &target, const Vector2f &measureme
|
||||
|
||||
// update I term
|
||||
update_i(dt, limit);
|
||||
|
||||
// calculate slew limit
|
||||
_slew_calc.update(Vector2f{_pid_info_x.P + _pid_info_x.D, _pid_info_y.P + _pid_info_y.D}, dt);
|
||||
_pid_info_x.slew_rate = _pid_info_y.slew_rate = _slew_calc.get_slew_rate();
|
||||
|
||||
_pid_info_x.target = _target.x;
|
||||
_pid_info_x.actual = measurement.x;
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <cmath>
|
||||
#include <AC_PID/AP_PIDInfo.h>
|
||||
#include <Filter/SlewCalculator2D.h>
|
||||
|
||||
/// @class AC_PID_2D
|
||||
/// @brief Copter PID control class
|
||||
@@ -73,9 +72,6 @@ public:
|
||||
void set_integrator(const Vector3f& i) { set_integrator(Vector2f{i.x, i.y}); }
|
||||
void set_integrator(const Vector2f& i);
|
||||
|
||||
// return current slew rate of slew limiter. Will return 0 if SMAX is zero
|
||||
float get_slew_rate(void) const { return _slew_calc.get_slew_rate(); }
|
||||
|
||||
const AP_PIDInfo& get_pid_info_x(void) const { return _pid_info_x; }
|
||||
const AP_PIDInfo& get_pid_info_y(void) const { return _pid_info_y; }
|
||||
|
||||
@@ -103,8 +99,6 @@ protected:
|
||||
AP_PIDInfo _pid_info_x;
|
||||
AP_PIDInfo _pid_info_y;
|
||||
|
||||
SlewCalculator2D _slew_calc; // 2D slew rate calculator
|
||||
|
||||
private:
|
||||
const float default_kp;
|
||||
const float default_ki;
|
||||
|
||||
Reference in New Issue
Block a user