mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-02 05:04:08 +08:00
add option to disable use of wind estimates with npfg
This commit is contained in:
parent
493bae1e09
commit
b0dc3a4f51
@ -1,6 +1,6 @@
|
||||
uint64 timestamp # time since system start (microseconds)
|
||||
|
||||
uint8 wind_est_valid # (boolean) true = wind estimate is valid and being used by controller
|
||||
uint8 wind_est_valid # (boolean) true = wind estimate is valid and/or being used by controller (also indicates if wind est usage is disabled despite being valid)
|
||||
float32 lat_accel # resultant lateral acceleration reference [m/s^2]
|
||||
float32 lat_accel_ff # lateral acceleration demand only for maintaining curvature [m/s^2]
|
||||
float32 bearing_feas # bearing feasibility [0,1]
|
||||
|
||||
@ -269,6 +269,12 @@ FixedwingPositionControl::wind_poll()
|
||||
_wind_vel(1) = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
if (!_param_npfg_en_wind_estimates.get()) {
|
||||
_wind_valid = false;
|
||||
_wind_vel(0) = 0.0f;
|
||||
_wind_vel(1) = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@ -389,6 +389,7 @@ private:
|
||||
(ParamFloat<px4::params::NPFG_ROLL_TC>) _param_npfg_roll_time_const,
|
||||
(ParamFloat<px4::params::NPFG_ASPD_BUF>) _param_npfg_airspeed_buffer,
|
||||
(ParamFloat<px4::params::NPFG_SW_DST_MLT>) _param_npfg_switch_distance_multiplier,
|
||||
(ParamBool<px4::params::NPFG_EN_WIND_EST>) _param_npfg_en_wind_estimates,
|
||||
|
||||
(ParamFloat<px4::params::FW_LND_AIRSPD_SC>) _param_fw_lnd_airspd_sc,
|
||||
(ParamFloat<px4::params::FW_LND_ANG>) _param_fw_lnd_ang,
|
||||
|
||||
@ -252,6 +252,14 @@ PARAM_DEFINE_FLOAT(NPFG_ASPD_BUF, 1.5f);
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(NPFG_SW_DST_MLT, 0.32f);
|
||||
|
||||
/**
|
||||
* Enable use of wind estimates for NPFG. Disabling, controller assumes zero wind.
|
||||
*
|
||||
* @boolean
|
||||
* @group FW NPFG Control
|
||||
*/
|
||||
PARAM_DEFINE_INT32(NPFG_EN_WIND_EST, 1);
|
||||
|
||||
/**
|
||||
* Cruise throttle
|
||||
*
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user