mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-06 15:28:52 +08:00
landing target estimator: initialize landing target velocity with negative of vehicle velocity
This commit is contained in:
committed by
Lorenz Meier
parent
b7dff95782
commit
ae52f74e78
@@ -162,8 +162,10 @@ void LandingTargetEstimator::update()
|
||||
|
||||
if (!_estimator_initialized) {
|
||||
PX4_INFO("Init");
|
||||
_kalman_filter_x.init(_rel_pos(0), 0, _params.pos_unc_init, _params.vel_unc_init);
|
||||
_kalman_filter_y.init(_rel_pos(1), 0, _params.pos_unc_init, _params.vel_unc_init);
|
||||
float vx_init = _vehicleLocalPosition.v_xy_valid ? -_vehicleLocalPosition.vx : 0.f;
|
||||
float vy_init = _vehicleLocalPosition.v_xy_valid ? -_vehicleLocalPosition.vy : 0.f;
|
||||
_kalman_filter_x.init(_rel_pos(0), vx_init, _params.pos_unc_init, _params.vel_unc_init);
|
||||
_kalman_filter_y.init(_rel_pos(1), vy_init, _params.pos_unc_init, _params.vel_unc_init);
|
||||
|
||||
_estimator_initialized = true;
|
||||
_last_update = hrt_absolute_time();
|
||||
|
||||
@@ -107,7 +107,7 @@ PARAM_DEFINE_FLOAT(LTEST_POS_UNC_IN, 0.1f);
|
||||
*
|
||||
* @group Landing target Estimator
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(LTEST_VEL_UNC_IN, 1.0f);
|
||||
PARAM_DEFINE_FLOAT(LTEST_VEL_UNC_IN, 0.1f);
|
||||
|
||||
/**
|
||||
* Scale factor for sensor measurements in sensor x axis
|
||||
|
||||
Reference in New Issue
Block a user