APM:Copter
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
ModeRTL Class Reference

#include <mode.h>

Inheritance diagram for ModeRTL:
[legend]
Collaboration diagram for ModeRTL:
[legend]

Public Member Functions

bool init (bool ignore_checks) override
 
void run () override
 
void run (bool disarm_on_land)
 
bool requires_GPS () const override
 
bool has_manual_throttle () const override
 
bool allows_arming (bool from_gcs) const override
 
bool is_autopilot () const override
 
RTLState state ()
 
bool state_complete ()
 
bool landing_gear_should_be_deployed () const override
 
void restart_without_terrain ()
 

Protected Member Functions

const char * name () const override
 
const char * name4 () const override
 
uint32_t wp_distance () const override
 
int32_t wp_bearing () const override
 
void descent_start ()
 
void descent_run ()
 
void land_start ()
 
void land_run (bool disarm_on_land)
 
void set_descent_target_alt (uint32_t alt)
 
- Protected Member Functions inherited from Mode
void update_navigation ()
 
virtual void run_autopilot ()
 
virtual bool get_wp (Location_Class &loc)
 
virtual bool in_guided_mode () const
 
void get_pilot_desired_lean_angles (float &roll_out, float &pitch_out, float angle_max, float angle_limit) const
 
bool takeoff_triggered (float target_climb_rate) const
 
void zero_throttle_and_relax_ac ()
 
int32_t get_alt_above_ground (void)
 
void land_run_horizontal_control ()
 
void land_run_vertical_control (bool pause_descent=false)
 
float get_surface_tracking_climb_rate (int16_t target_rate, float current_alt_target, float dt)
 
float get_pilot_desired_yaw_rate (int16_t stick_angle)
 
float get_pilot_desired_climb_rate (float throttle_control)
 
float get_pilot_desired_throttle (int16_t throttle_control, float thr_mid=0.0f)
 
float get_non_takeoff_throttle (void)
 
void update_simple_mode (void)
 
bool set_mode (control_mode_t mode, mode_reason_t reason)
 
void set_land_complete (bool b)
 
GCS_Coptergcs ()
 
void Log_Write_Event (uint8_t id)
 
void set_throttle_takeoff (void)
 
void takeoff_timer_start (float alt_cm)
 
void takeoff_stop (void)
 
void takeoff_get_climb_rates (float &pilot_climb_rate, float &takeoff_climb_rate)
 
float get_avoidance_adjusted_climbrate (float target_rate)
 
uint16_t get_pilot_speed_dn (void)
 

Private Member Functions

void climb_start ()
 
void return_start ()
 
void climb_return_run ()
 
void loiterathome_start ()
 
void loiterathome_run ()
 
void build_path (bool terrain_following_allowed)
 
void compute_return_target (bool terrain_following_allowed)
 

Private Attributes

RTLState _state = RTL_InitialClimb
 
bool _state_complete = false
 
struct {
   Location_Class   origin_point
 
   Location_Class   climb_target
 
   Location_Class   return_target
 
   Location_Class   descent_target
 
   bool   land
 
   bool   terrain_used
 
rtl_path
 
uint32_t _loiter_start_time = 0
 

Additional Inherited Members

- Static Public Attributes inherited from Mode
static AutoYaw auto_yaw
 
- Protected Attributes inherited from Mode
Parametersg
 
ParametersG2g2
 
AC_WPNav *& wp_nav
 
AC_Loiter *& loiter_nav
 
AC_PosControl *& pos_control
 
AP_InertialNavinertial_nav
 
AP_AHRSahrs
 
AC_AttitudeControl_t *& attitude_control
 
MOTOR_CLASS *& motors
 
RC_Channel *& channel_roll
 
RC_Channel *& channel_pitch
 
RC_Channel *& channel_throttle
 
RC_Channel *& channel_yaw
 
float & G_Dt
 
ap_t & ap
 
takeoff_state_t & takeoff_state
 
float & ekfGndSpdLimit
 
float & ekfNavVelGainScaler
 
heli_flags_t & heli_flags
 

Detailed Description

Definition at line 927 of file mode.h.

Member Function Documentation

◆ allows_arming()

bool ModeRTL::allows_arming ( bool  from_gcs) const
inlineoverridevirtual

Implements Mode.

Reimplemented in ModeSmartRTL.

Definition at line 941 of file mode.h.

◆ build_path()

void ModeRTL::build_path ( bool  terrain_following_allowed)
private

◆ climb_return_run()

void ModeRTL::climb_return_run ( )
private

◆ climb_start()

void ModeRTL::climb_start ( )
private

◆ compute_return_target()

void ModeRTL::compute_return_target ( bool  terrain_following_allowed)
private

◆ descent_run()

void ModeRTL::descent_run ( )
protected

◆ descent_start()

void ModeRTL::descent_start ( )
protected

◆ has_manual_throttle()

bool ModeRTL::has_manual_throttle ( ) const
inlineoverridevirtual

Implements Mode.

Reimplemented in ModeSmartRTL.

Definition at line 940 of file mode.h.

◆ init()

bool ModeRTL::init ( bool  ignore_checks)
overridevirtual

Implements Mode.

Reimplemented in ModeSmartRTL.

◆ is_autopilot()

bool ModeRTL::is_autopilot ( ) const
inlineoverridevirtual

Reimplemented from Mode.

Reimplemented in ModeSmartRTL.

Definition at line 942 of file mode.h.

◆ land_run()

void ModeRTL::land_run ( bool  disarm_on_land)
protected

◆ land_start()

void ModeRTL::land_start ( )
protected

◆ landing_gear_should_be_deployed()

bool ModeRTL::landing_gear_should_be_deployed ( ) const
overridevirtual

Reimplemented from Mode.

◆ loiterathome_run()

void ModeRTL::loiterathome_run ( )
private

◆ loiterathome_start()

void ModeRTL::loiterathome_start ( )
private

◆ name()

const char* ModeRTL::name ( ) const
inlineoverrideprotectedvirtual

Implements Mode.

Reimplemented in ModeSmartRTL.

Definition at line 955 of file mode.h.

◆ name4()

const char* ModeRTL::name4 ( ) const
inlineoverrideprotectedvirtual

Implements Mode.

Reimplemented in ModeSmartRTL.

Definition at line 956 of file mode.h.

Here is the call graph for this function:

◆ requires_GPS()

bool ModeRTL::requires_GPS ( ) const
inlineoverridevirtual

Implements Mode.

Reimplemented in ModeSmartRTL.

Definition at line 939 of file mode.h.

◆ restart_without_terrain()

void ModeRTL::restart_without_terrain ( )

◆ return_start()

void ModeRTL::return_start ( )
private

◆ run() [1/2]

void ModeRTL::run ( void  )
inlineoverridevirtual

Implements Mode.

Reimplemented in ModeSmartRTL.

Definition at line 934 of file mode.h.

Here is the call graph for this function:

◆ run() [2/2]

void ModeRTL::run ( bool  disarm_on_land)

◆ set_descent_target_alt()

void ModeRTL::set_descent_target_alt ( uint32_t  alt)
inlineprotected

Definition at line 966 of file mode.h.

◆ state()

RTLState ModeRTL::state ( )
inline

Definition at line 944 of file mode.h.

◆ state_complete()

bool ModeRTL::state_complete ( )
inline

Definition at line 947 of file mode.h.

Here is the call graph for this function:

◆ wp_bearing()

int32_t ModeRTL::wp_bearing ( ) const
overrideprotectedvirtual

Reimplemented from Mode.

Reimplemented in ModeSmartRTL.

◆ wp_distance()

uint32_t ModeRTL::wp_distance ( ) const
overrideprotectedvirtual

Reimplemented from Mode.

Reimplemented in ModeSmartRTL.

Member Data Documentation

◆ _loiter_start_time

uint32_t ModeRTL::_loiter_start_time = 0
private

Definition at line 993 of file mode.h.

◆ _state

RTLState ModeRTL::_state = RTL_InitialClimb
private

Definition at line 979 of file mode.h.

◆ _state_complete

bool ModeRTL::_state_complete = false
private

Definition at line 980 of file mode.h.

◆ climb_target

Location_Class ModeRTL::climb_target

Definition at line 985 of file mode.h.

◆ descent_target

Location_Class ModeRTL::descent_target

Definition at line 987 of file mode.h.

◆ land

bool ModeRTL::land

Definition at line 988 of file mode.h.

◆ origin_point

Location_Class ModeRTL::origin_point

Definition at line 984 of file mode.h.

◆ return_target

Location_Class ModeRTL::return_target

Definition at line 986 of file mode.h.

◆ rtl_path

struct { ... } ModeRTL::rtl_path

◆ terrain_used

bool ModeRTL::terrain_used

Definition at line 989 of file mode.h.


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