mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 22:53:33 +08:00
replace geo _wrap_pi with matrix::wrap_pi
This commit is contained in:
committed by
Lorenz Meier
parent
518daa4a8d
commit
d0bde9ab2a
@@ -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,
|
||||
|
||||
@@ -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) :
|
||||
|
||||
Reference in New Issue
Block a user