mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-27 16:20:36 +08:00
RLT: set yaw to current yaw during climb
This commit is contained in:
committed by
Dennis Mannhart
parent
998a95db55
commit
c76621bdb2
@@ -54,7 +54,6 @@
|
||||
#include <systemlib/mavlink_log.h>
|
||||
#include <systemlib/err.h>
|
||||
#include <lib/ecl/geo/geo.h>
|
||||
#include <lib/mathlib/mathlib.h>
|
||||
#include <navigator/navigation.h>
|
||||
#include <uORB/uORB.h>
|
||||
#include <uORB/topics/mission.h>
|
||||
@@ -1227,7 +1226,7 @@ Mission::heading_sp_update()
|
||||
point_from_latlon[1], point_to_latlon[0], point_to_latlon[1]);
|
||||
|
||||
if (d_current > _navigator->get_acceptance_radius()) {
|
||||
float yaw = _wrap_pi(
|
||||
float yaw = wrap_pi(
|
||||
get_bearing_to_next_waypoint(point_from_latlon[0],
|
||||
point_from_latlon[1], point_to_latlon[0],
|
||||
point_to_latlon[1]) + yaw_offset);
|
||||
|
||||
@@ -155,7 +155,7 @@ RTL::set_rtl_item()
|
||||
_mission_item.lon = gpos.lon;
|
||||
_mission_item.altitude = return_alt;
|
||||
_mission_item.altitude_is_relative = false;
|
||||
_mission_item.yaw = NAN;
|
||||
_mission_item.yaw = _navigator->get_local_position()->yaw;
|
||||
_mission_item.acceptance_radius = _navigator->get_acceptance_radius();
|
||||
_mission_item.time_inside = 0.0f;
|
||||
_mission_item.autocontinue = true;
|
||||
|
||||
Reference in New Issue
Block a user