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
+4 -1
View File
@@ -67,6 +67,9 @@
#include <lib/ecl/geo/geo.h>
#include <dataman/dataman.h>
#include <mathlib/mathlib.h>
#include <matrix/math.hpp>
using matrix::wrap_pi;
/**
@@ -526,7 +529,7 @@ BottleDrop::task_main()
float approach_direction = get_bearing_to_next_waypoint(flight_vector_s.lat, flight_vector_s.lon, flight_vector_e.lat,
flight_vector_e.lon);
approach_error = _wrap_pi(ground_direction - approach_direction);
approach_error = wrap_pi(ground_direction - approach_direction);
if (counter % 90 == 0) {
mavlink_log_info(&_mavlink_log_pub, "drop distance %u, heading error %u", (unsigned)distance_real,
+5 -2
View File
@@ -39,6 +39,9 @@
#include "blocks.hpp"
#include <lib/ecl/geo/geo.h>
#include <matrix/math.hpp>
using matrix::wrap_2pi;
namespace control
{
@@ -77,8 +80,8 @@ void BlockWaypointGuidance::update(
missionCmd.lat,
missionCmd.lon);
_psiCmd = _wrap_2pi(psiTrack -
_xtYawLimit.update(_xt2Yaw.update(xtrackError.distance)));
_psiCmd = wrap_2pi(psiTrack -
_xtYawLimit.update(_xt2Yaw.update(xtrackError.distance)));
}
BlockUorbEnabledAutopilot::BlockUorbEnabledAutopilot(SuperBlock *parent, const char *name) :