mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 06:23:34 +08:00
flight_mode_manager: pass deltas on estimator reset
This commit is contained in:
+4
-4
@@ -73,22 +73,22 @@ void FlightTaskManualPositionSmoothVel::reActivate()
|
||||
_smoothing_z.reset(0.f, 0.f, _position(2));
|
||||
}
|
||||
|
||||
void FlightTaskManualPositionSmoothVel::_ekfResetHandlerPositionXY()
|
||||
void FlightTaskManualPositionSmoothVel::_ekfResetHandlerPositionXY(const matrix::Vector2f &delta_xy)
|
||||
{
|
||||
_smoothing_xy.setCurrentPosition(_position.xy());
|
||||
}
|
||||
|
||||
void FlightTaskManualPositionSmoothVel::_ekfResetHandlerVelocityXY()
|
||||
void FlightTaskManualPositionSmoothVel::_ekfResetHandlerVelocityXY(const matrix::Vector2f &delta_vxy)
|
||||
{
|
||||
_smoothing_xy.setCurrentVelocity(_velocity.xy());
|
||||
}
|
||||
|
||||
void FlightTaskManualPositionSmoothVel::_ekfResetHandlerPositionZ()
|
||||
void FlightTaskManualPositionSmoothVel::_ekfResetHandlerPositionZ(float delta_z)
|
||||
{
|
||||
_smoothing_z.setCurrentPosition(_position(2));
|
||||
}
|
||||
|
||||
void FlightTaskManualPositionSmoothVel::_ekfResetHandlerVelocityZ()
|
||||
void FlightTaskManualPositionSmoothVel::_ekfResetHandlerVelocityZ(float delta_vz)
|
||||
{
|
||||
_smoothing_z.setCurrentVelocity(_velocity(2));
|
||||
}
|
||||
|
||||
+4
-4
@@ -61,10 +61,10 @@ protected:
|
||||
virtual void _updateSetpoints() override;
|
||||
|
||||
/** Reset position or velocity setpoints in case of EKF reset event */
|
||||
void _ekfResetHandlerPositionXY() override;
|
||||
void _ekfResetHandlerVelocityXY() override;
|
||||
void _ekfResetHandlerPositionZ() override;
|
||||
void _ekfResetHandlerVelocityZ() override;
|
||||
void _ekfResetHandlerPositionXY(const matrix::Vector2f &delta_xy) override;
|
||||
void _ekfResetHandlerVelocityXY(const matrix::Vector2f &delta_vxy) override;
|
||||
void _ekfResetHandlerPositionZ(float delta_z) override;
|
||||
void _ekfResetHandlerVelocityZ(float delta_vz) override;
|
||||
|
||||
DEFINE_PARAMETERS_CUSTOM_PARENT(FlightTaskManualPosition,
|
||||
(ParamFloat<px4::params::MPC_JERK_MAX>) _param_mpc_jerk_max,
|
||||
|
||||
Reference in New Issue
Block a user