mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 12:43:34 +08:00
[Position|AutoLine]SmoothVel - Update position and velocity states of the trajectories in case of EKF reset. Until now, only the position reset on XY axis was properly handled. Now, xy, vxy, z and vz are handled
This commit is contained in:
+8
-1
@@ -70,6 +70,7 @@ private:
|
||||
* Reset the required axes. when force_z_zero is set to true, the z derivatives are set to sero and not to the estimated states
|
||||
*/
|
||||
void reset(Axes axes, bool force_z_zero = false);
|
||||
void _checkEkfResetCounters(); /**< Reset the trajectories when the ekf resets velocity or position */
|
||||
|
||||
VelocitySmoothing _smoothing[3]; ///< Smoothing in x, y and z directions
|
||||
matrix::Vector3f _vel_sp_smooth;
|
||||
@@ -78,5 +79,11 @@ private:
|
||||
matrix::Vector2f _position_setpoint_xy_locked;
|
||||
float _position_setpoint_z_locked{NAN};
|
||||
|
||||
uint8_t _reset_counter{0}; /**< counter for estimator resets in xy-direction */
|
||||
/* counters for estimator local position resets */
|
||||
struct {
|
||||
uint8_t xy;
|
||||
uint8_t vxy;
|
||||
uint8_t z;
|
||||
uint8_t vz;
|
||||
} _reset_counters{0, 0, 0, 0};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user