PX4 Firmware
PX4 Autopilot Software http://px4.io
|
#include <datalinkloss.h>
Public Member Functions | |
DataLinkLoss (Navigator *navigator) | |
~DataLinkLoss ()=default | |
void | on_inactive () override |
This function is called while the mode is inactive. More... | |
void | on_activation () override |
This function is called one time when mode becomes active, pos_sp_triplet must be initialized here. More... | |
void | on_active () override |
This function is called while the mode is active. More... | |
Public Member Functions inherited from MissionBlock | |
MissionBlock (Navigator *navigator) | |
Constructor. More... | |
virtual | ~MissionBlock ()=default |
MissionBlock (const MissionBlock &)=delete | |
MissionBlock & | operator= (const MissionBlock &)=delete |
Public Member Functions inherited from NavigatorMode | |
NavigatorMode (Navigator *navigator) | |
virtual | ~NavigatorMode ()=default |
NavigatorMode (const NavigatorMode &)=delete | |
NavigatorMode | operator= (const NavigatorMode &)=delete |
void | run (bool active) |
virtual void | on_inactivation () |
This function is called one time when mode becomes inactive. More... | |
Private Member Functions | |
DEFINE_PARAMETERS ((ParamFloat< px4::params::NAV_DLL_CH_T >) _param_nav_dll_ch_t,(ParamInt< px4::params::NAV_DLL_CH_LAT >) _param_nav_dll_ch_lat,(ParamInt< px4::params::NAV_DLL_CH_LON >) _param_nav_dll_ch_lon,(ParamFloat< px4::params::NAV_DLL_CH_ALT >) _param_nav_dll_ch_alt,(ParamInt< px4::params::NAV_AH_LAT >) _param_nav_ah_lat,(ParamInt< px4::params::NAV_AH_LON >) _param_nav_ah_lon,(ParamFloat< px4::params::NAV_AH_ALT >) _param_nav_ah_alt,(ParamFloat< px4::params::NAV_DLL_AH_T >) _param_nav_dll_ah_t,(ParamInt< px4::params::NAV_DLL_N >) _param_nav_dll_n,(ParamInt< px4::params::NAV_DLL_CHSK >) _param_nav_dll_chsk) enum DLLState | |
void | set_dll_item () |
Set the DLL item. More... | |
void | advance_dll () |
Move to next DLL item. More... | |
Private Attributes | |
_dll_state {DLL_STATE_NONE} | |
Additional Inherited Members | |
Static Public Member Functions inherited from MissionBlock | |
static bool | item_contains_position (const mission_item_s &item) |
Protected Member Functions inherited from MissionBlock | |
bool | is_mission_item_reached () |
Check if mission item has been reached. More... | |
void | reset_mission_item_reached () |
Reset all reached flags. More... | |
bool | mission_item_to_position_setpoint (const mission_item_s &item, position_setpoint_s *sp) |
Convert a mission item to a position setpoint. More... | |
void | set_loiter_item (struct mission_item_s *item, float min_clearance=-1.0f) |
Set a loiter mission item, if possible reuse the position setpoint, otherwise take the current position. More... | |
void | set_takeoff_item (struct mission_item_s *item, float abs_altitude, float min_pitch=0.0f) |
Set a takeoff mission item. More... | |
void | set_land_item (struct mission_item_s *item, bool at_current_location) |
Set a land mission item. More... | |
void | set_idle_item (struct mission_item_s *item) |
Set idle mission item. More... | |
void | set_vtol_transition_item (struct mission_item_s *item, const uint8_t new_mode) |
Set vtol transition item. More... | |
void | mission_apply_limitation (mission_item_s &item) |
General function used to adjust the mission item based on vehicle specific limitations. More... | |
void | issue_command (const mission_item_s &item) |
float | get_time_inside (const mission_item_s &item) const |
float | get_absolute_altitude_for_item (const mission_item_s &mission_item) const |
Protected Attributes inherited from MissionBlock | |
mission_item_s | _mission_item {} |
bool | _waypoint_position_reached {false} |
bool | _waypoint_yaw_reached {false} |
bool | _waypoint_position_reached_previously {false} |
hrt_abstime | _time_first_inside_orbit {0} |
hrt_abstime | _action_start {0} |
hrt_abstime | _time_wp_reached {0} |
uORB::Publication< actuator_controls_s > | _actuator_pub {ORB_ID(actuator_controls_2)} |
Protected Attributes inherited from NavigatorMode | |
Navigator * | _navigator {nullptr} |
Definition at line 49 of file datalinkloss.h.
DataLinkLoss::DataLinkLoss | ( | Navigator * | navigator | ) |
Definition at line 57 of file datalinkloss.cpp.
|
default |
|
private |
Move to next DLL item.
Definition at line 159 of file datalinkloss.cpp.
References _dll_state, NavigatorMode::_navigator, vehicle_status_s::data_link_lost_counter, Navigator::get_mavlink_log_pub(), Navigator::get_mission_result(), Navigator::get_vstatus(), mavlink_log_critical, MissionBlock::reset_mission_item_reached(), Navigator::set_mission_result_updated(), mission_result_s::stay_in_failsafe, and warnx.
Referenced by on_activation(), and on_active().
|
inlineprivate |
Definition at line 61 of file datalinkloss.h.
|
overridevirtual |
This function is called one time when mode becomes active, pos_sp_triplet must be initialized here.
Reimplemented from NavigatorMode.
Definition at line 74 of file datalinkloss.cpp.
References _dll_state, advance_dll(), and set_dll_item().
|
overridevirtual |
This function is called while the mode is active.
Reimplemented from NavigatorMode.
Definition at line 82 of file datalinkloss.cpp.
References advance_dll(), MissionBlock::is_mission_item_reached(), and set_dll_item().
|
overridevirtual |
This function is called while the mode is inactive.
Reimplemented from NavigatorMode.
Definition at line 65 of file datalinkloss.cpp.
References _dll_state, NavigatorMode::_navigator, and Navigator::get_can_loiter_at_sp().
|
private |
Set the DLL item.
Definition at line 91 of file datalinkloss.cpp.
References _dll_state, MissionBlock::_mission_item, NavigatorMode::_navigator, mission_item_s::acceptance_radius, mission_item_s::altitude, mission_item_s::altitude_is_relative, mission_item_s::autocontinue, position_setpoint_triplet_s::current, mission_result_s::flight_termination, Navigator::get_acceptance_radius(), Navigator::get_loiter_radius(), Navigator::get_mission_result(), Navigator::get_position_setpoint_triplet(), mission_item_s::lat, mission_item_s::loiter_radius, mission_item_s::lon, MissionBlock::mission_item_to_position_setpoint(), mission_item_s::nav_cmd, NAV_CMD_LOITER_TIME_LIMIT, position_setpoint_triplet_s::next, mission_item_s::origin, ORIGIN_ONBOARD, position_setpoint_triplet_s::previous, MissionBlock::reset_mission_item_reached(), Navigator::set_can_loiter_at_sp(), Navigator::set_mission_result_updated(), Navigator::set_position_setpoint_triplet_updated(), mission_item_s::time_inside, position_setpoint_s::valid, warnx, and mission_item_s::yaw.
Referenced by on_activation(), and on_active().
|
private |
Definition at line 80 of file datalinkloss.h.
Referenced by advance_dll(), on_activation(), on_inactive(), and set_dll_item().