mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 22:13:34 +08:00
replace FW_THR_CRUISE with FW_THR_TRIM
Signed-off-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
committed by
Martina Rivizzigno
parent
226b8a6f90
commit
461d0561b8
@@ -246,5 +246,14 @@ bool param_modify_on_import(bson_node_t node)
|
||||
}
|
||||
}
|
||||
|
||||
// 2022-07-07: translate FW_THR_CRUISE->FW_THR_TRIM
|
||||
{
|
||||
if (strcmp("FW_THR_CRUISE", node->name) == 0) {
|
||||
strcpy(node->name, "FW_THR_TRIM");
|
||||
PX4_INFO("copying %s -> %s", "FW_THR_CRUISE", "FW_THR_TRIM");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -685,7 +685,7 @@ private:
|
||||
(ParamFloat<px4::params::FW_T_SINK_R_SP>) _param_sinkrate_target,
|
||||
|
||||
(ParamFloat<px4::params::FW_THR_ALT_SCL>) _param_fw_thr_alt_scl,
|
||||
(ParamFloat<px4::params::FW_THR_CRUISE>) _param_fw_thr_cruise,
|
||||
(ParamFloat<px4::params::FW_THR_TRIM>) _param_fw_thr_trim,
|
||||
(ParamFloat<px4::params::FW_THR_IDLE>) _param_fw_thr_idle,
|
||||
(ParamFloat<px4::params::FW_THR_LND_MAX>) _param_fw_thr_lnd_max,
|
||||
(ParamFloat<px4::params::FW_THR_MAX>) _param_fw_thr_max,
|
||||
|
||||
@@ -230,9 +230,9 @@ PARAM_DEFINE_FLOAT(NPFG_SW_DST_MLT, 0.32f);
|
||||
PARAM_DEFINE_FLOAT(NPFG_PERIOD_SF, 1.5f);
|
||||
|
||||
/**
|
||||
* Cruise throttle
|
||||
* Trim throttle
|
||||
*
|
||||
* This is the throttle setting required to achieve the desired cruise speed. Most airframes have a value of 0.5-0.7.
|
||||
* This is the throttle setting required to achieve FW_AIRSPD_TRIM during level flight. Most airframes have a value of 0.5-0.7.
|
||||
*
|
||||
* @unit norm
|
||||
* @min 0.0
|
||||
@@ -241,25 +241,7 @@ PARAM_DEFINE_FLOAT(NPFG_PERIOD_SF, 1.5f);
|
||||
* @increment 0.01
|
||||
* @group FW L1 Control
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(FW_THR_CRUISE, 0.6f);
|
||||
|
||||
/**
|
||||
* Scale throttle by pressure change
|
||||
*
|
||||
* Automatically adjust throttle to account for decreased air density at higher altitudes.
|
||||
* Start with a scale factor of 1.0 and adjust for different propulsion systems.
|
||||
*
|
||||
* When flying without airspeed sensor this will help to keep a constant performance over large altitude ranges.
|
||||
*
|
||||
* The default value of 0 will disable scaling.
|
||||
*
|
||||
* @min 0.0
|
||||
* @max 10.0
|
||||
* @decimal 1
|
||||
* @increment 0.1
|
||||
* @group FW L1 Control
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(FW_THR_ALT_SCL, 0.0f);
|
||||
PARAM_DEFINE_FLOAT(FW_THR_TRIM, 0.6f);
|
||||
|
||||
/**
|
||||
* Throttle max slew rate
|
||||
|
||||
@@ -1074,7 +1074,7 @@ void Navigator::reset_position_setpoint(position_setpoint_s &sp)
|
||||
|
||||
float Navigator::get_cruising_throttle()
|
||||
{
|
||||
/* Return the mission-requested cruise speed, or default FW_THR_CRUISE value */
|
||||
/* Return the mission-requested cruise speed, or default FW_THR_TRIM value */
|
||||
if (_mission_throttle > FLT_EPSILON) {
|
||||
return _mission_throttle;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user