35 #include <eigen3/Eigen/Eigen>
40 #include "../../auterion.hpp"
41 #include "local_frame_goto_control.hpp"
44 namespace multicopter {
56 Eigen::Vector3d _global_position_lat_lon_amsl = {
58 float _heading_enu_rad = NAN;
78 const float heading_rad = NAN)
79 : _global_position_lat_lon_amsl(global_position_lat_lon_amsl),
80 _heading_enu_rad(heading_rad) {}
83 const float heading_rad = NAN)
84 : _global_position_lat_lon_amsl(
85 {global_position_lat_lon.x(), global_position_lat_lon.y(), NAN}),
86 _heading_enu_rad(heading_rad) {}
88 inline Eigen::Vector3d getPosition()
const {
return _global_position_lat_lon_amsl; }
90 inline float getHeading()
const {
return _heading_enu_rad; }
92 inline GotoControlLimits getLimits()
const {
return _limits; }
94 GlobalFrameGotoSetpoint& withPosition(
const Eigen::Vector3d& global_position_lat_lon_amsl) {
95 _global_position_lat_lon_amsl = global_position_lat_lon_amsl;
99 GlobalFrameGotoSetpoint& withPosition(
const Eigen::Vector2d& global_position_lat_lon) {
100 _global_position_lat_lon_amsl.x() = global_position_lat_lon.x();
101 _global_position_lat_lon_amsl.y() = global_position_lat_lon.y();
105 GlobalFrameGotoSetpoint& withHeading(
const float heading_rad) {
106 _heading_enu_rad = heading_rad;
110 GlobalFrameGotoSetpoint& withAltitude(
const double z) {
111 _global_position_lat_lon_amsl.z() = z;
115 GlobalFrameGotoSetpoint& withSpeedControlLimit(
const GotoControlLimits& limits) {
120 GlobalFrameGotoSetpoint& withMaxHorizontalSpeed(
const float max_horizontal_speed_m_s_) {
121 _limits.withMaxHorizontalSpeed(max_horizontal_speed_m_s_);
125 GlobalFrameGotoSetpoint& withMaxVerticalSpeed(
const float max_vertical_speed_m_s_) {
126 _limits.withMaxVerticalSpeed(max_vertical_speed_m_s_);
130 GlobalFrameGotoSetpoint& withMaxHeadingRate(
const float max_heading_rate_rad_s_) {
131 _limits.withMaxHeadingRate(max_heading_rate_rad_s_);
Sets controller's default speed limits for global goto setpoint.
Definition: global_frame_goto_control.hpp:65
Represents a setpoint for controlling the global frame position and heading.
Definition: global_frame_goto_control.hpp:54
Represents the desired speed limit of the vehicle when controlled with a goto setpoint.
Definition: local_frame_goto_control.hpp:53