58 ModuleParams(navigator),
59 _rcl_state(RCL_STATE_NONE)
98 case RCL_STATE_LOITER: {
115 case RCL_STATE_TERMINATE: {
119 warnx(
"RC not recovered: request flight termination");
145 if (_param_nav_gpsf_lt.get() > 0.0f) {
146 warnx(
"RC loss, OBC mode, loiter");
151 warnx(
"RC loss, OBC mode, slip loiter, terminate");
161 case RCL_STATE_LOITER:
163 warnx(
"time is up, no RC regain, terminating");
170 case RCL_STATE_TERMINATE:
#define mavlink_log_critical(_pub, _text,...)
Send a mavlink critical message and print to console.
Definition of a mission consisting of mission items.
Helper class to access missions.
float get_acceptance_radius()
Get the acceptance radius.
API for the uORB lightweight object broker.
Definition of geo / math functions to perform geodesic calculations.
float altitude
altitude in meters (AMSL)
uint16_t autocontinue
true if next waypoint should follow after this one
float acceptance_radius
default radius in which the mission is accepted as reached in meters
struct position_setpoint_s next
uint16_t origin
how the mission item was generated
struct position_setpoint_s previous
Helper class for Data Link Loss Mode acording to the OBC rules.
void advance_rcl()
Move to next RCL item.
bool get_can_loiter_at_sp()
double lon
longitude in degrees
void set_rcl_item()
Set the RCL item.
struct position_setpoint_s current
RCLoss(Navigator *navigator)
struct vehicle_global_position_s * get_global_position()
mission_item_s _mission_item
uint16_t nav_cmd
navigation command
void mission_apply_limitation(mission_item_s &item)
General function used to adjust the mission item based on vehicle specific limitations.
Simple error/warning functions, heavily inspired by the BSD functions of the same names...
void reset_mission_item_reached()
Reset all reached flags.
float time_inside
time that the MAV should stay inside the radius before advancing in seconds
struct position_setpoint_triplet_s * get_position_setpoint_triplet()
struct mission_result_s * get_mission_result()
void on_active() override
This function is called while the mode is active.
bool mission_item_to_position_setpoint(const mission_item_s &item, position_setpoint_s *sp)
Convert a mission item to a position setpoint.
bool is_mission_item_reached()
Check if mission item has been reached.
float get_loiter_radius()
void on_inactive() override
This function is called while the mode is inactive.
orb_advert_t * get_mavlink_log_pub()
void set_mission_result_updated()
float yaw
in radians NED -PI..+PI, NAN means don't change yaw
float loiter_radius
loiter radius in meters, 0 for a VTOL to hover, negative for counter-clockwise
void set_can_loiter_at_sp(bool can_loiter)
Setters.
void set_position_setpoint_triplet_updated()
void on_activation() override
This function is called one time when mode becomes active, pos_sp_triplet must be initialized here...
uint16_t altitude_is_relative
true if altitude is relative from start point
double lat
latitude in degrees