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

#include <navigator_mode.h>

Inheritance diagram for NavigatorMode:
Collaboration diagram for NavigatorMode:

Public Member Functions

 NavigatorMode (Navigator *navigator)
 
virtual ~NavigatorMode ()=default
 
 NavigatorMode (const NavigatorMode &)=delete
 
NavigatorMode operator= (const NavigatorMode &)=delete
 
void run (bool active)
 
virtual void on_inactive ()
 This function is called while the mode is inactive. More...
 
virtual void on_activation ()
 This function is called one time when mode becomes active, pos_sp_triplet must be initialized here. More...
 
virtual void on_inactivation ()
 This function is called one time when mode becomes inactive. More...
 
virtual void on_active ()
 This function is called while the mode is active. More...
 

Protected Attributes

Navigator_navigator {nullptr}
 

Private Attributes

bool _active {false}
 

Detailed Description

Definition at line 46 of file navigator_mode.h.

Constructor & Destructor Documentation

◆ NavigatorMode() [1/2]

NavigatorMode::NavigatorMode ( Navigator navigator)

Definition at line 45 of file navigator_mode.cpp.

References on_inactivation(), and on_inactive().

Here is the call graph for this function:

◆ ~NavigatorMode()

virtual NavigatorMode::~NavigatorMode ( )
virtualdefault

◆ NavigatorMode() [2/2]

NavigatorMode::NavigatorMode ( const NavigatorMode )
delete

Member Function Documentation

◆ on_activation()

void NavigatorMode::on_activation ( )
virtual

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

Reimplemented in Mission, RTL, PrecLand, FollowTarget, GpsFailure, DataLinkLoss, RCLoss, Loiter, EngineFailure, Land, and Takeoff.

Definition at line 92 of file navigator_mode.cpp.

References _navigator, position_setpoint_triplet_s::current, Navigator::get_position_setpoint_triplet(), and position_setpoint_s::valid.

Referenced by run().

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

◆ on_active()

void NavigatorMode::on_active ( )
virtual

This function is called while the mode is active.

Reimplemented in Mission, RTL, PrecLand, FollowTarget, GpsFailure, DataLinkLoss, RCLoss, Loiter, EngineFailure, Land, and Takeoff.

Definition at line 99 of file navigator_mode.cpp.

Referenced by run().

Here is the caller graph for this function:

◆ on_inactivation()

void NavigatorMode::on_inactivation ( )
virtual

This function is called one time when mode becomes inactive.

Reimplemented in Mission.

Definition at line 87 of file navigator_mode.cpp.

Referenced by NavigatorMode(), Mission::on_active(), and run().

Here is the caller graph for this function:

◆ on_inactive()

void NavigatorMode::on_inactive ( )
virtual

This function is called while the mode is inactive.

Reimplemented in Mission, RTL, FollowTarget, GpsFailure, DataLinkLoss, RCLoss, Loiter, and EngineFailure.

Definition at line 82 of file navigator_mode.cpp.

Referenced by NavigatorMode(), and run().

Here is the caller graph for this function:

◆ operator=()

NavigatorMode NavigatorMode::operator= ( const NavigatorMode )
delete

◆ run()

void NavigatorMode::run ( bool  active)

Definition at line 54 of file navigator_mode.cpp.

References _active, _navigator, Navigator::get_mission_result(), on_activation(), on_active(), on_inactivation(), on_inactive(), Navigator::set_mission_result_updated(), and mission_result_s::stay_in_failsafe.

Referenced by Navigator::run().

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

Member Data Documentation

◆ _active

bool NavigatorMode::_active {false}
private

Definition at line 80 of file navigator_mode.h.

Referenced by run().

◆ _navigator

Navigator* NavigatorMode::_navigator {nullptr}
protected

Definition at line 77 of file navigator_mode.h.

Referenced by DataLinkLoss::advance_dll(), EngineFailure::advance_ef(), GpsFailure::advance_gpsf(), RCLoss::advance_rcl(), RTL::advance_rtl(), Mission::altitude_sp_foh_update(), RTL::calculate_return_alt_from_cone_half_angle(), Mission::calculate_takeoff_altitude(), Mission::check_mission_valid(), PrecLand::check_state_conditions(), Mission::copy_position_if_valid(), Mission::cruising_speed_sp_update(), Mission::do_abort_landing(), Mission::do_need_move_to_land(), Mission::do_need_move_to_takeoff(), Mission::do_need_vertical_takeoff(), RTL::find_RTL_destination(), Mission::generate_waypoint_from_heading(), MissionBlock::get_absolute_altitude_for_item(), MissionBlock::get_time_inside(), Mission::heading_sp_update(), Mission::index_closest_mission_item(), MissionBlock::is_mission_item_reached(), MissionBlock::issue_command(), Mission::landing(), MissionBlock::mission_apply_limitation(), MissionBlock::mission_item_to_position_setpoint(), MissionBlock::MissionBlock(), Mission::need_to_reset_mission(), Land::on_activation(), Loiter::on_activation(), on_activation(), PrecLand::on_activation(), RTL::on_activation(), Mission::on_activation(), Land::on_active(), Takeoff::on_active(), Loiter::on_active(), GpsFailure::on_active(), FollowTarget::on_active(), PrecLand::on_active(), Mission::on_active(), Mission::on_inactivation(), RCLoss::on_inactive(), DataLinkLoss::on_inactive(), GpsFailure::on_inactive(), Mission::on_inactive(), Mission::read_mission_item(), Mission::report_do_jump_mission_changed(), Loiter::reposition(), Mission::reset_mission(), run(), PrecLand::run_state_descend_above_target(), PrecLand::run_state_horizontal_approach(), PrecLand::run_state_search(), PrecLand::run_state_start(), Mission::save_mission_state(), Mission::set_align_mission_item(), Mission::set_current_mission_index(), Mission::set_current_mission_item(), DataLinkLoss::set_dll_item(), EngineFailure::set_ef_item(), Mission::set_execution_mode(), FollowTarget::set_follow_target_item(), GpsFailure::set_gpsf_item(), MissionBlock::set_idle_item(), MissionBlock::set_land_item(), MissionBlock::set_loiter_item(), Loiter::set_loiter_position(), Mission::set_mission_item_reached(), Mission::set_mission_items(), RCLoss::set_rcl_item(), RTL::set_rtl_item(), MissionBlock::set_takeoff_item(), Takeoff::set_takeoff_position(), MissionBlock::set_vtol_transition_item(), PrecLand::slewrate(), PrecLand::switch_to_state_fallback(), PrecLand::switch_to_state_horizontal_approach(), PrecLand::switch_to_state_search(), PrecLand::switch_to_state_start(), Mission::update_mission(), and FollowTarget::update_position_sp().


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