mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 02:13:33 +08:00
mc-auto: handle EKF heading reset
This commit is contained in:
committed by
Mathieu Bresciani
parent
82308da18d
commit
c06ba93175
@@ -42,7 +42,10 @@ void HeadingSmoothing::reset(const float heading, const float heading_rate)
|
||||
{
|
||||
const float wrapped_heading = matrix::wrap_pi(heading);
|
||||
_velocity_smoothing.setCurrentVelocity(wrapped_heading);
|
||||
_velocity_smoothing.setCurrentAcceleration(heading_rate);
|
||||
|
||||
if (PX4_ISFINITE(heading_rate)) {
|
||||
_velocity_smoothing.setCurrentAcceleration(heading_rate);
|
||||
}
|
||||
}
|
||||
|
||||
void HeadingSmoothing::update(const float heading_setpoint, const float time_elapsed)
|
||||
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
* @param heading [rad] [-pi,pi]
|
||||
* @param heading_rate [rad/s]
|
||||
*/
|
||||
void reset(const float heading, const float heading_rate);
|
||||
void reset(const float heading, const float heading_rate = NAN);
|
||||
|
||||
/**
|
||||
* @brief updates the heading setpoint, re-calculates trajectory, and takes an integration step
|
||||
|
||||
Reference in New Issue
Block a user