replace geo _wrap_pi with matrix::wrap_pi

This commit is contained in:
Daniel Agar
2018-06-12 09:00:52 +02:00
committed by Lorenz Meier
parent 518daa4a8d
commit d0bde9ab2a
14 changed files with 60 additions and 313 deletions
+3 -1
View File
@@ -56,6 +56,8 @@
#include "navigator.h"
using matrix::wrap_pi;
constexpr float FollowTarget::_follow_position_matricies[4][9];
FollowTarget::FollowTarget(Navigator *navigator) :
@@ -200,7 +202,7 @@ void FollowTarget::on_active()
_current_target_motion.lat,
_current_target_motion.lon);
_yaw_rate = _wrap_pi((_yaw_angle - _navigator->get_global_position()->yaw) / (dt_ms / 1000.0f));
_yaw_rate = wrap_pi((_yaw_angle - _navigator->get_global_position()->yaw) / (dt_ms / 1000.0f));
} else {
_yaw_angle = _yaw_rate = NAN;