add option to disable use of wind estimates with npfg

This commit is contained in:
Thomas Stastny 2021-09-10 13:32:02 +02:00 committed by JaeyoungLim
parent 493bae1e09
commit b0dc3a4f51
4 changed files with 16 additions and 1 deletions

View File

@ -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]

View File

@ -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

View File

@ -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,

View File

@ -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
*