APM:Copter
Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Copter::ModeThrow Class Reference
Inheritance diagram for Copter::ModeThrow:
[legend]
Collaboration diagram for Copter::ModeThrow:
[legend]

Public Types

enum  ThrowModeType { ThrowType_Upward = 0, ThrowType_Drop = 1 }
 

Public Member Functions

bool init (bool ignore_checks) override
 
void run () override
 
bool requires_GPS () const override
 
bool has_manual_throttle () const override
 
bool allows_arming (bool from_gcs) const override
 
bool is_autopilot () const override
 

Protected Member Functions

const char * name () const override
 
const char * name4 () const override
 
- Protected Member Functions inherited from Copter::Mode
virtual bool landing_gear_should_be_deployed () const
 
void update_navigation ()
 
virtual void run_autopilot ()
 
virtual uint32_t wp_distance () const
 
virtual int32_t wp_bearing () const
 
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 Types

enum  ThrowModeStage {
  Throw_Disarmed, Throw_Detecting, Throw_Uprighting, Throw_HgtStabilise,
  Throw_PosHold
}
 

Private Member Functions

bool throw_detected ()
 
bool throw_position_good ()
 
bool throw_height_good ()
 
bool throw_attitude_good ()
 

Private Attributes

ThrowModeStage stage = Throw_Disarmed
 
ThrowModeStage prev_stage = Throw_Disarmed
 
uint32_t last_log_ms
 
bool nextmode_attempted
 
uint32_t free_fall_start_ms
 
float free_fall_start_velz
 

Additional Inherited Members

- Static Public Attributes inherited from Copter::Mode
static AutoYaw auto_yaw
 
- Protected Attributes inherited from Copter::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_tap
 
takeoff_state_ttakeoff_state
 
float & ekfGndSpdLimit
 
float & ekfNavVelGainScaler
 

Detailed Description

Definition at line 1099 of file Copter.h.

Member Enumeration Documentation

◆ ThrowModeStage

Enumerator
Throw_Disarmed 
Throw_Detecting 
Throw_Uprighting 
Throw_HgtStabilise 
Throw_PosHold 

Definition at line 1132 of file Copter.h.

◆ ThrowModeType

Enumerator
ThrowType_Upward 
ThrowType_Drop 

Definition at line 1114 of file Copter.h.

Member Function Documentation

◆ allows_arming()

bool Copter::ModeThrow::allows_arming ( bool  from_gcs) const
inlineoverridevirtual

Implements Copter::Mode.

Definition at line 1110 of file Copter.h.

◆ has_manual_throttle()

bool Copter::ModeThrow::has_manual_throttle ( ) const
inlineoverridevirtual

Implements Copter::Mode.

Definition at line 1109 of file Copter.h.

◆ init()

bool Copter::ModeThrow::init ( bool  ignore_checks)
overridevirtual

Implements Copter::Mode.

Definition at line 6 of file mode_throw.cpp.

◆ is_autopilot()

bool Copter::ModeThrow::is_autopilot ( ) const
inlineoverridevirtual

Reimplemented from Copter::Mode.

Definition at line 1111 of file Copter.h.

◆ name()

const char* Copter::ModeThrow::name ( ) const
inlineoverrideprotectedvirtual

Implements Copter::Mode.

Definition at line 1121 of file Copter.h.

◆ name4()

const char* Copter::ModeThrow::name4 ( ) const
inlineoverrideprotectedvirtual

Implements Copter::Mode.

Definition at line 1122 of file Copter.h.

◆ requires_GPS()

bool Copter::ModeThrow::requires_GPS ( ) const
inlineoverridevirtual

Implements Copter::Mode.

Definition at line 1108 of file Copter.h.

◆ run()

void Copter::ModeThrow::run ( void  )
overridevirtual

Implements Copter::Mode.

Definition at line 27 of file mode_throw.cpp.

Here is the call graph for this function:

◆ throw_attitude_good()

bool Copter::ModeThrow::throw_attitude_good ( )
private

Definition at line 260 of file mode_throw.cpp.

Referenced by run().

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

◆ throw_detected()

bool Copter::ModeThrow::throw_detected ( )
private

Definition at line 215 of file mode_throw.cpp.

Referenced by run().

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

◆ throw_height_good()

bool Copter::ModeThrow::throw_height_good ( )
private

Definition at line 267 of file mode_throw.cpp.

Referenced by run().

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

◆ throw_position_good()

bool Copter::ModeThrow::throw_position_good ( )
private

Definition at line 273 of file mode_throw.cpp.

Referenced by run().

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

Member Data Documentation

◆ free_fall_start_ms

uint32_t Copter::ModeThrow::free_fall_start_ms
private

Definition at line 1144 of file Copter.h.

Referenced by throw_detected().

◆ free_fall_start_velz

float Copter::ModeThrow::free_fall_start_velz
private

Definition at line 1145 of file Copter.h.

Referenced by throw_detected().

◆ last_log_ms

uint32_t Copter::ModeThrow::last_log_ms
private

Definition at line 1142 of file Copter.h.

Referenced by run().

◆ nextmode_attempted

bool Copter::ModeThrow::nextmode_attempted
private

Definition at line 1143 of file Copter.h.

Referenced by init(), and run().

◆ prev_stage

ThrowModeStage Copter::ModeThrow::prev_stage = Throw_Disarmed
private

Definition at line 1141 of file Copter.h.

Referenced by run().

◆ stage

ThrowModeStage Copter::ModeThrow::stage = Throw_Disarmed
private

Definition at line 1140 of file Copter.h.

Referenced by init(), and run().


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