diff --git a/libraries/AC_PrecLand/AC_PrecLand.cpp b/libraries/AC_PrecLand/AC_PrecLand.cpp index 9d61fe76b2..7ce211192e 100644 --- a/libraries/AC_PrecLand/AC_PrecLand.cpp +++ b/libraries/AC_PrecLand/AC_PrecLand.cpp @@ -22,33 +22,6 @@ const AP_Param::GroupInfo AC_PrecLand::var_info[] = { // @User: Advanced AP_GROUPINFO("TYPE", 1, AC_PrecLand, _type, 0), - // @Param: SPEED - // @DisplayName: Precision Land horizontal speed maximum in cm/s - // @Description: Precision Land horizontal speed maximum in cm/s - // @Range: 0 500 - // @User: Advanced - AP_GROUPINFO("SPEED", 2, AC_PrecLand, _speed_xy, AC_PRECLAND_SPEED_XY_DEFAULT), - - // @Param: VEL_P - // @DisplayName: Precision landing velocity controller P gain - // @Description: Precision landing velocity controller P gain - // @Range: 0.100 5.000 - // @User: Advanced - - // @Param: VEL_I - // @DisplayName: Precision landing velocity controller I gain - // @Description: Precision landing velocity controller I gain - // @Range: 0.100 5.000 - // @User: Advanced - - // @Param: VEL_IMAX - // @DisplayName: Precision landing velocity controller I gain maximum - // @Description: Precision landing velocity controller I gain maximum - // @Range: 0 1000 - // @Units: cm/s - // @User: Standard - AP_SUBGROUPINFO(_pi_vel_xy, "VEL_", 3, AC_PrecLand, AC_PI_2D), - AP_GROUPEND }; @@ -56,11 +29,9 @@ const AP_Param::GroupInfo AC_PrecLand::var_info[] = { // Note that the Vector/Matrix constructors already implicitly zero // their values. // -AC_PrecLand::AC_PrecLand(const AP_AHRS& ahrs, const AP_InertialNav& inav, float dt) : +AC_PrecLand::AC_PrecLand(const AP_AHRS& ahrs, const AP_InertialNav& inav) : _ahrs(ahrs), _inav(inav), - _pi_vel_xy(PRECLAND_P, PRECLAND_I, PRECLAND_IMAX, PRECLAND_FILT_HZ, dt), - _dt(dt), _have_estimate(false), _backend(NULL) { diff --git a/libraries/AC_PrecLand/AC_PrecLand.h b/libraries/AC_PrecLand/AC_PrecLand.h index 25205d36dd..48ddb1cb62 100644 --- a/libraries/AC_PrecLand/AC_PrecLand.h +++ b/libraries/AC_PrecLand/AC_PrecLand.h @@ -3,17 +3,8 @@ #include #include -#include #include -// definitions -#define AC_PRECLAND_SPEED_XY_DEFAULT 100.0f // maximum horizontal speed -#define PRECLAND_P 2.0f // velocity controller P gain default -#define PRECLAND_I 1.0f // velocity controller I gain default -#define PRECLAND_IMAX 500.0f // velocity controller IMAX default -#define PRECLAND_FILT_HZ 5.0f // velocity controller filter hz -#define PRECLAND_UPDATE_TIME 0.02f // precland runs at 50hz - // declare backend classes class AC_PrecLand_Backend; class AC_PrecLand_Companion; @@ -43,7 +34,7 @@ public: }; // Constructor - AC_PrecLand(const AP_AHRS& ahrs, const AP_InertialNav& inav, float dt); + AC_PrecLand(const AP_AHRS& ahrs, const AP_InertialNav& inav); // init - perform any required initialisation of landing controllers void init(); @@ -83,15 +74,10 @@ private: // references to inertial nav and ahrs libraries const AP_AHRS& _ahrs; const AP_InertialNav& _inav; - AC_PI_2D _pi_vel_xy; // horizontal velocity PI controller // parameters AP_Int8 _enabled; // enabled/disabled and behaviour AP_Int8 _type; // precision landing controller type - AP_Float _speed_xy; // maximum horizontal speed in cm/s - - // internal variables - float _dt; // time difference (in seconds) between calls from the main program // output from sensor (stored for logging) Vector2f _angle_to_target; // last raw sensor angle to target