PX4 Firmware
PX4 Autopilot Software http://px4.io
GpsFailure Class Reference

#include <gpsfailure.h>

Inheritance diagram for GpsFailure:
Collaboration diagram for GpsFailure:

Public Member Functions

 GpsFailure (Navigator *navigator)
 
 ~GpsFailure ()=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
 
MissionBlockoperator= (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_GPSF_LT >) _param_nav_gpsf_lt,(ParamFloat< px4::params::NAV_GPSF_R >) _param_nav_gpsf_r,(ParamFloat< px4::params::NAV_GPSF_P >) _param_nav_gpsf_p,(ParamFloat< px4::params::NAV_GPSF_TR >) _param_nav_gpsf_tr) enum GPSFState
 
void set_gpsf_item ()
 Set the GPSF item. More...
 
void advance_gpsf ()
 Move to next GPSF item. More...
 

Private Attributes

 _gpsf_state {GPSF_STATE_NONE}
 
hrt_abstime _timestamp_activation {0}
 
uORB::Publication< vehicle_attitude_setpoint_s_att_sp_pub {ORB_ID(vehicle_attitude_setpoint)}
 
uORB::Publication< vehicle_attitude_setpoint_s_fw_virtual_att_sp_pub {ORB_ID(fw_virtual_attitude_setpoint)}
 

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}
 

Detailed Description

Definition at line 51 of file gpsfailure.h.

Constructor & Destructor Documentation

◆ GpsFailure()

GpsFailure::GpsFailure ( Navigator navigator)

Definition at line 55 of file gpsfailure.cpp.

◆ ~GpsFailure()

GpsFailure::~GpsFailure ( )
default

Member Function Documentation

◆ advance_gpsf()

void GpsFailure::advance_gpsf ( )
private

Move to next GPSF item.

Definition at line 152 of file gpsfailure.cpp.

References _gpsf_state, NavigatorMode::_navigator, Navigator::get_mavlink_log_pub(), mavlink_log_critical, and mavlink_log_emergency.

Referenced by on_activation(), and on_active().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DEFINE_PARAMETERS()

GpsFailure::DEFINE_PARAMETERS ( (ParamFloat< px4::params::NAV_GPSF_LT >)  _param_nav_gpsf_lt,
(ParamFloat< px4::params::NAV_GPSF_R >)  _param_nav_gpsf_r,
(ParamFloat< px4::params::NAV_GPSF_P >)  _param_nav_gpsf_p,
(ParamFloat< px4::params::NAV_GPSF_TR >)  _param_nav_gpsf_tr 
)
inlineprivate

Definition at line 62 of file gpsfailure.h.

◆ on_activation()

void GpsFailure::on_activation ( )
overridevirtual

This function is called one time when mode becomes active, pos_sp_triplet must be initialized here.

Reimplemented from NavigatorMode.

Definition at line 71 of file gpsfailure.cpp.

References _gpsf_state, _timestamp_activation, advance_gpsf(), hrt_absolute_time(), and set_gpsf_item().

Here is the call graph for this function:

◆ on_active()

◆ on_inactive()

void GpsFailure::on_inactive ( )
overridevirtual

This function is called while the mode is inactive.

Reimplemented from NavigatorMode.

Definition at line 62 of file gpsfailure.cpp.

References _gpsf_state, NavigatorMode::_navigator, and Navigator::get_can_loiter_at_sp().

Here is the call graph for this function:

◆ set_gpsf_item()

void GpsFailure::set_gpsf_item ( )
private

Set the GPSF item.

Definition at line 126 of file gpsfailure.cpp.

References _gpsf_state, NavigatorMode::_navigator, position_setpoint_triplet_s::current, mission_result_s::flight_termination, Navigator::get_mission_result(), Navigator::get_position_setpoint_triplet(), position_setpoint_triplet_s::next, position_setpoint_triplet_s::previous, Navigator::set_mission_result_updated(), Navigator::set_position_setpoint_triplet_updated(), and position_setpoint_s::valid.

Referenced by on_activation(), and on_active().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _att_sp_pub

uORB::Publication<vehicle_attitude_setpoint_s> GpsFailure::_att_sp_pub {ORB_ID(vehicle_attitude_setpoint)}
private

Definition at line 78 of file gpsfailure.h.

Referenced by on_active().

◆ _fw_virtual_att_sp_pub

uORB::Publication<vehicle_attitude_setpoint_s> GpsFailure::_fw_virtual_att_sp_pub {ORB_ID(fw_virtual_attitude_setpoint)}
private

Definition at line 79 of file gpsfailure.h.

Referenced by on_active().

◆ _gpsf_state

GpsFailure::_gpsf_state {GPSF_STATE_NONE}
private

Definition at line 74 of file gpsfailure.h.

Referenced by advance_gpsf(), on_activation(), on_active(), on_inactive(), and set_gpsf_item().

◆ _timestamp_activation

hrt_abstime GpsFailure::_timestamp_activation {0}
private

Definition at line 76 of file gpsfailure.h.

Referenced by on_activation(), and on_active().


The documentation for this class was generated from the following files: