59 ModuleParams(navigator),
60 _dll_state(DLL_STATE_NONE)
99 case DLL_STATE_FLYTOCOMMSHOLDWP: {
116 case DLL_STATE_FLYTOAIRFIELDHOMEWP: {
133 case DLL_STATE_TERMINATE: {
138 warnx(
"not switched to manual: request flight termination");
167 warnx(
"%d data link losses, limit is %d, fly to airfield home",
176 if (!_param_nav_dll_chsk.get()) {
183 warnx(
"Skipping comms hold wp. Flying directly to airfield home");
191 case DLL_STATE_FLYTOCOMMSHOLDWP:
192 warnx(
"fly to airfield home");
200 case DLL_STATE_FLYTOAIRFIELDHOMEWP:
201 _dll_state = DLL_STATE_TERMINATE;
202 warnx(
"time is up, state should have been changed manually by now");
209 case DLL_STATE_TERMINATE:
211 _dll_state = DLL_STATE_END;
#define mavlink_log_critical(_pub, _text,...)
Send a mavlink critical message and print to console.
uint8_t data_link_lost_counter
Definition of a mission consisting of mission items.
DataLinkLoss(Navigator *navigator)
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
void set_dll_item()
Set the DLL item.
Helper class for Data Link Loss Mode acording to the OBC rules.
bool get_can_loiter_at_sp()
double lon
longitude in degrees
void on_active() override
This function is called while the mode is active.
struct position_setpoint_s current
void on_inactive() override
This function is called while the mode is inactive.
mission_item_s _mission_item
uint16_t nav_cmd
navigation command
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()
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 advance_dll()
Move to next DLL item.
orb_advert_t * get_mavlink_log_pub()
struct vehicle_status_s * get_vstatus()
void set_mission_result_updated()
void on_activation() override
This function is called one time when mode becomes active, pos_sp_triplet must be initialized here...
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()
uint16_t altitude_is_relative
true if altitude is relative from start point
double lat
latitude in degrees