mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-18 22:39:05 +08:00
HeadingSmoothing: set correct maximum heading
The velocity smoothing library constrains the maximum vellocity. I set the default constraint to 0 to find these exact issues. The heading smoothing did not initialize the maximum velocity which in this use case is the maximum heading. So heading was always constrained to 0 -> north until this change.
This commit is contained in:
parent
5a2efc1cb2
commit
d014d76ca7
@ -33,6 +33,11 @@
|
||||
|
||||
#include "HeadingSmoothing.hpp"
|
||||
|
||||
HeadingSmoothing::HeadingSmoothing()
|
||||
{
|
||||
_velocity_smoothing.setMaxVel(M_PI_F); // smoothed "velocity" is heading [-pi, pi]
|
||||
}
|
||||
|
||||
void HeadingSmoothing::reset(const float heading, const float heading_rate)
|
||||
{
|
||||
const float wrapped_heading = matrix::wrap_pi(heading);
|
||||
|
||||
@ -54,7 +54,7 @@
|
||||
class HeadingSmoothing
|
||||
{
|
||||
public:
|
||||
HeadingSmoothing() = default;
|
||||
HeadingSmoothing();
|
||||
~HeadingSmoothing() = default;
|
||||
|
||||
/** @param max_heading_rate [rad/s] */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user