mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-28 19:32:36 +08:00
vmount: add missing yaw wrap at the end of a ROI update
This commit is contained in:
committed by
Daniel Agar
parent
35409b4079
commit
93ef70c43d
@@ -51,6 +51,8 @@
|
|||||||
#include <mathlib/mathlib.h>
|
#include <mathlib/mathlib.h>
|
||||||
#include <matrix/math.hpp>
|
#include <matrix/math.hpp>
|
||||||
|
|
||||||
|
using matrix::wrap_pi;
|
||||||
|
|
||||||
namespace vmount
|
namespace vmount
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -197,6 +199,8 @@ void OutputBase::_handle_position_update(bool force_update)
|
|||||||
_angle_setpoints[1] += _cur_control_data->type_data.lonlat.pitch_angle_offset;
|
_angle_setpoints[1] += _cur_control_data->type_data.lonlat.pitch_angle_offset;
|
||||||
_angle_setpoints[2] += _cur_control_data->type_data.lonlat.yaw_angle_offset;
|
_angle_setpoints[2] += _cur_control_data->type_data.lonlat.yaw_angle_offset;
|
||||||
|
|
||||||
|
// make sure yaw is wrapped correctly for the output
|
||||||
|
_angle_setpoints[2] = wrap_pi(_angle_setpoints[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OutputBase::_calculate_output_angles(const hrt_abstime &t)
|
void OutputBase::_calculate_output_angles(const hrt_abstime &t)
|
||||||
|
|||||||
Reference in New Issue
Block a user