diff --git a/libraries/AP_TECS/AP_TECS.cpp b/libraries/AP_TECS/AP_TECS.cpp index a06b903804..fdb7eba1dd 100644 --- a/libraries/AP_TECS/AP_TECS.cpp +++ b/libraries/AP_TECS/AP_TECS.cpp @@ -20,6 +20,7 @@ const AP_Param::GroupInfo AP_TECS::var_info[] PROGMEM = { // @DisplayName: Maximum Climb Rate (metres/sec) // @Description: This is the best climb rate that the aircraft can achieve with the throttle set to THR_MAX and the airspeed set to the default value. For electric aircraft make sure this number can be achieved towards the end of flight when the battery voltage has reduced. The setting of this parameter can be checked by commanding a positive altitude change of 100m in loiter, RTL or guided mode. If the throttle required to climb is close to THR_MAX and the aircraft is maintaining airspeed, then this parameter is set correctly. If the airspeed starts to reduce, then the parameter is set to high, and if the throttle demand require to climb and maintain speed is noticeably less than THR_MAX, then either CLMB_MAX should be increased or THR_MAX reduced. // @Increment: 0.1 + // @Range: 0.1 20.0 // @User: User AP_GROUPINFO("CLMB_MAX", 0, AP_TECS, _maxClimbRate, 5.0f), @@ -27,13 +28,14 @@ const AP_Param::GroupInfo AP_TECS::var_info[] PROGMEM = { // @DisplayName: Minimum Sink Rate (metres/sec) // @Description: This is the sink rate of the aircraft with the throttle set to THR_MIN and the same airspeed as used to measure CLMB_MAX. // @Increment: 0.1 + // @Range: 0.1 10.0 // @User: User AP_GROUPINFO("SINK_MIN", 1, AP_TECS, _minSinkRate, 2.0f), // @Param: TIME_CONST // @DisplayName: Controller time constant (sec) // @Description: This is the time constant of the TECS control algorithm. Smaller values make it faster to respond, large values make it slower to respond. - // @Range: 3.0-10.0 + // @Range: 3.0 10.0 // @Increment: 0.2 // @User: Advanced AP_GROUPINFO("TIME_CONST", 2, AP_TECS, _timeConst, 5.0f), @@ -41,7 +43,7 @@ const AP_Param::GroupInfo AP_TECS::var_info[] PROGMEM = { // @Param: THR_DAMP // @DisplayName: Controller throttle damping // @Description: This is the damping gain for the throttle demand loop. Increase to add damping to correct for oscillations in speed and height. - // @Range: 0.1-1.0 + // @Range: 0.1 1.0 // @Increment: 0.1 // @User: Advanced AP_GROUPINFO("THR_DAMP", 3, AP_TECS, _thrDamp, 0.5f), @@ -49,7 +51,7 @@ const AP_Param::GroupInfo AP_TECS::var_info[] PROGMEM = { // @Param: INTEG_GAIN // @DisplayName: Controller integrator // @Description: This is the integrator gain on the control loop. Increase to increase the rate at which speed and height offsets are trimmed out - // @Range: 0.0-0.5 + // @Range: 0.0 0.5 // @Increment: 0.02 // @User: Advanced AP_GROUPINFO("INTEG_GAIN", 4, AP_TECS, _integGain, 0.1f), @@ -57,7 +59,7 @@ const AP_Param::GroupInfo AP_TECS::var_info[] PROGMEM = { // @Param: VERT_ACC // @DisplayName: Vertical Acceleration Limit (metres/sec^2) // @Description: This is the maximum vertical acceleration either up or down that the controller will use to correct speed or height errors. - // @Range: 1.0-10.0 + // @Range: 1.0 10.0 // @Increment: 0.5 // @User: Advanced AP_GROUPINFO("VERT_ACC", 5, AP_TECS, _vertAccLim, 7.0f), @@ -65,7 +67,7 @@ const AP_Param::GroupInfo AP_TECS::var_info[] PROGMEM = { // @Param: HGT_OMEGA // @DisplayName: Height complementary filter frequency (radians/sec) // @Description: This is the cross-over frequency of the complementary filter used to fuse vertical acceleration and baro alt to obtain an estimate of height rate and height. - // @Range: 1.0-5.0 + // @Range: 1.0 5.0 // @Increment: 0.05 // @User: Advanced AP_GROUPINFO("HGT_OMEGA", 6, AP_TECS, _hgtCompFiltOmega, 3.0f), @@ -73,7 +75,7 @@ const AP_Param::GroupInfo AP_TECS::var_info[] PROGMEM = { // @Param: SPD_OMEGA // @DisplayName: Speed complementary filter frequency (radians/sec) // @Description: This is the cross-over frequency of the complementary filter used to fuse longitudinal acceleration and airspeed to obtain a lower noise and lag estimate of airspeed. - // @Range: 0.5-2.0 + // @Range: 0.5 2.0 // @Increment: 0.05 // @User: Advanced AP_GROUPINFO("SPD_OMEGA", 7, AP_TECS, _spdCompFiltOmega, 2.0f), @@ -81,7 +83,7 @@ const AP_Param::GroupInfo AP_TECS::var_info[] PROGMEM = { // @Param: RLL2THR // @DisplayName: Bank angle compensation gain // @Description: Increasing this gain turn increases the amount of throttle that will be used to compensate for the additional drag created by turning. Ideally this should be set to approximately 10 x the extra sink rate in m/s created by a 45 degree bank turn. Increase this gain if the aircraft initially loses energy in turns and reduce if the aircraft initially gains energy in turns. Efficient high aspect-ratio aircraft (eg powered sailplanes) can use a lower value, whereas inefficient low aspect-ratio models (eg delta wings) can use a higher value. - // @Range: 5.0 to 30.0 + // @Range: 5.0 30.0 // @Increment: 1.0 // @User: Advanced AP_GROUPINFO("RLL2THR", 8, AP_TECS, _rollComp, 10.0f), @@ -89,7 +91,7 @@ const AP_Param::GroupInfo AP_TECS::var_info[] PROGMEM = { // @Param: SPDWEIGHT // @DisplayName: Weighting applied to speed control // @Description: This parameter adjusts the amount of weighting that the pitch control applies to speed vs height errors. Setting it to 0.0 will cause the pitch control to control height and ignore speed errors. This will normally improve height accuracy but give larger airspeed errors. Setting it to 2.0 will cause the pitch control loop to control speed and ignore height errors. This will normally reduce airsped errors, but give larger height errors. A value of 1.0 gives a balanced response and is the default. - // @Range: 0.0 to 2.0 + // @Range: 0.0 2.0 // @Increment: 0.1 // @User: Advanced AP_GROUPINFO("SPDWEIGHT", 9, AP_TECS, _spdWeight, 1.0f), @@ -97,7 +99,7 @@ const AP_Param::GroupInfo AP_TECS::var_info[] PROGMEM = { // @Param: PTCH_DAMP // @DisplayName: Controller pitch damping // @Description: This is the damping gain for the pitch demand loop. Increase to add damping to correct for oscillations in speed and height. - // @Range: 0.1-1.0 + // @Range: 0.1 1.0 // @Increment: 0.1 // @User: Advanced AP_GROUPINFO("PTCH_DAMP", 10, AP_TECS, _ptchDamp, 0.0f), @@ -106,13 +108,14 @@ const AP_Param::GroupInfo AP_TECS::var_info[] PROGMEM = { // @DisplayName: Maximum Descent Rate (metres/sec) // @Description: This sets the maximum descent rate that the controller will use. If this value is too large, the aircraft will reach the pitch angle limit first and be unable to achieve the descent rate. This should be set to a value that can be achieved at the lower pitch angle limit. // @Increment: 0.1 + // @Range: 0.0 20.0 // @User: User AP_GROUPINFO("SINK_MAX", 11, AP_TECS, _maxSinkRate, 5.0f), // @Param: LAND_ARSPD // @DisplayName: Airspeed during landing approach (m/s) // @Description: When performing an autonomus landing, this value is used as the goal airspeed during approach. Note that this parameter is not useful if your platform does not have an airspeed sensor (use TECS_LAND_THR instead). If negative then this value is not used during landing. - // @Range: -1 to 127 + // @Range: -1 127 // @Increment: 1 // @User: User AP_GROUPINFO("LAND_ARSPD", 12, AP_TECS, _landAirspeed, -1), @@ -128,7 +131,7 @@ const AP_Param::GroupInfo AP_TECS::var_info[] PROGMEM = { // @Param: LAND_SPDWGT // @DisplayName: Weighting applied to speed control during landing. // @Description: Same as SPDWEIGHT parameter, with the exception that this parameter is applied during landing flight stages. A value closer to 2 will result in the plane ignoring height error during landing and our experience has been that the plane will therefore keep the nose up -- sometimes good for a glider landing (with the side effect that you will likely glide a ways past the landing point). A value closer to 0 results in the plane ignoring speed error -- use caution when lowering the value below 1 -- ignoring speed could result in a stall. - // @Range: 0.0 to 2.0 + // @Range: 0.0 2.0 // @Increment: 0.1 // @User: Advanced AP_GROUPINFO("LAND_SPDWGT", 14, AP_TECS, _spdWeightLand, 1.0f), @@ -152,7 +155,7 @@ const AP_Param::GroupInfo AP_TECS::var_info[] PROGMEM = { // @Param: LAND_SINK // @DisplayName: Sink rate for final landing stage // @Description: The sink rate in meters/second for the final stage of landing. - // @Range: 0.0 to 2.0 + // @Range: 0.0 2.0 // @Increment: 0.1 // @User: Advanced AP_GROUPINFO("LAND_SINK", 17, AP_TECS, _land_sink, 0.25f), @@ -160,7 +163,7 @@ const AP_Param::GroupInfo AP_TECS::var_info[] PROGMEM = { // @Param: TECS_LAND_TCONST // @DisplayName: Land controller time constant (sec) // @Description: This is the time constant of the TECS control algorithm when in final landing stage of flight. It should be smaller than TECS_TIME_CONST to allow for faster flare - // @Range: 1.0-5.0 + // @Range: 1.0 5.0 // @Increment: 0.2 // @User: Advanced AP_GROUPINFO("LAND_TCONST", 18, AP_TECS, _landTimeConst, 2.0f),