APM:Copter
Macros | Enumerations | Variables
mode_poshold.cpp File Reference
#include "Copter.h"
Include dependency graph for mode_poshold.cpp:

Go to the source code of this file.

Macros

#define POSHOLD_SPEED_0   10
 
#define POSHOLD_BRAKE_TIME_ESTIMATE_MAX   (600*4)
 
#define POSHOLD_BRAKE_TO_LOITER_TIMER   (150*4)
 
#define POSHOLD_WIND_COMP_START_TIMER   (150*4)
 
#define POSHOLD_CONTROLLER_TO_PILOT_MIX_TIMER   (50*4)
 
#define POSHOLD_SMOOTH_RATE_FACTOR   0.0125f
 
#define POSHOLD_WIND_COMP_TIMER_10HZ   40
 
#define LOOP_RATE_FACTOR   4
 
#define TC_WIND_COMP   0.0025f
 
#define POSHOLD_STICK_RELEASE_SMOOTH_ANGLE   1800
 
#define POSHOLD_WIND_COMP_ESTIMATE_SPEED_MAX   10
 

Enumerations

enum  poshold_rp_mode {
  POSHOLD_PILOT_OVERRIDE =0, POSHOLD_BRAKE, POSHOLD_BRAKE_READY_TO_LOITER, POSHOLD_BRAKE_TO_LOITER,
  POSHOLD_LOITER, POSHOLD_CONTROLLER_TO_PILOT_OVERRIDE
}
 

Variables

struct {
   poshold_rp_mode   roll_mode: 3
 
   poshold_rp_mode   pitch_mode: 3
 
   uint8_t   braking_time_updated_roll: 1
 
   uint8_t   braking_time_updated_pitch: 1
 
   float   pilot_roll
 
   float   pilot_pitch
 
   float   brake_gain
 
   int16_t   brake_roll
 
   int16_t   brake_pitch
 
   int16_t   brake_timeout_roll
 
   int16_t   brake_timeout_pitch
 
   int16_t   brake_angle_max_roll
 
   int16_t   brake_angle_max_pitch
 
   int16_t   brake_to_loiter_timer
 
   int16_t   controller_to_pilot_timer_roll
 
   int16_t   controller_to_pilot_timer_pitch
 
   int16_t   controller_final_roll
 
   int16_t   controller_final_pitch
 
   Vector2f   wind_comp_ef
 
   int16_t   wind_comp_roll
 
   int16_t   wind_comp_pitch
 
   uint16_t   wind_comp_start_timer
 
   int8_t   wind_comp_timer
 
   int16_t   roll
 
   int16_t   pitch
 
poshold
 

Macro Definition Documentation

◆ LOOP_RATE_FACTOR

#define LOOP_RATE_FACTOR   4

◆ POSHOLD_BRAKE_TIME_ESTIMATE_MAX

#define POSHOLD_BRAKE_TIME_ESTIMATE_MAX   (600*4)

Definition at line 11 of file mode_poshold.cpp.

Referenced by Copter::ModePosHold::run().

◆ POSHOLD_BRAKE_TO_LOITER_TIMER

#define POSHOLD_BRAKE_TO_LOITER_TIMER   (150*4)

Definition at line 12 of file mode_poshold.cpp.

Referenced by Copter::ModePosHold::run().

◆ POSHOLD_CONTROLLER_TO_PILOT_MIX_TIMER

#define POSHOLD_CONTROLLER_TO_PILOT_MIX_TIMER   (50*4)

◆ POSHOLD_SMOOTH_RATE_FACTOR

#define POSHOLD_SMOOTH_RATE_FACTOR   0.0125f

◆ POSHOLD_SPEED_0

#define POSHOLD_SPEED_0   10

Definition at line 8 of file mode_poshold.cpp.

Referenced by Copter::ModePosHold::run().

◆ POSHOLD_STICK_RELEASE_SMOOTH_ANGLE

#define POSHOLD_STICK_RELEASE_SMOOTH_ANGLE   1800

◆ POSHOLD_WIND_COMP_ESTIMATE_SPEED_MAX

#define POSHOLD_WIND_COMP_ESTIMATE_SPEED_MAX   10

◆ POSHOLD_WIND_COMP_START_TIMER

#define POSHOLD_WIND_COMP_START_TIMER   (150*4)

Definition at line 13 of file mode_poshold.cpp.

Referenced by Copter::ModePosHold::run().

◆ POSHOLD_WIND_COMP_TIMER_10HZ

#define POSHOLD_WIND_COMP_TIMER_10HZ   40

◆ TC_WIND_COMP

#define TC_WIND_COMP   0.0025f

Enumeration Type Documentation

◆ poshold_rp_mode

Enumerator
POSHOLD_PILOT_OVERRIDE 
POSHOLD_BRAKE 
POSHOLD_BRAKE_READY_TO_LOITER 
POSHOLD_BRAKE_TO_LOITER 
POSHOLD_LOITER 
POSHOLD_CONTROLLER_TO_PILOT_OVERRIDE 

Definition at line 25 of file mode_poshold.cpp.

Variable Documentation

◆ brake_angle_max_pitch

int16_t brake_angle_max_pitch

Definition at line 51 of file mode_poshold.cpp.

◆ brake_angle_max_roll

int16_t brake_angle_max_roll

Definition at line 50 of file mode_poshold.cpp.

◆ brake_gain

float brake_gain

Definition at line 45 of file mode_poshold.cpp.

Referenced by Copter::ModeFlowHold::flowhold_flow_to_angle().

◆ brake_pitch

int16_t brake_pitch

Definition at line 47 of file mode_poshold.cpp.

◆ brake_roll

int16_t brake_roll

Definition at line 46 of file mode_poshold.cpp.

◆ brake_timeout_pitch

int16_t brake_timeout_pitch

Definition at line 49 of file mode_poshold.cpp.

◆ brake_timeout_roll

int16_t brake_timeout_roll

Definition at line 48 of file mode_poshold.cpp.

◆ brake_to_loiter_timer

int16_t brake_to_loiter_timer

Definition at line 52 of file mode_poshold.cpp.

◆ braking_time_updated_pitch

uint8_t braking_time_updated_pitch

Definition at line 38 of file mode_poshold.cpp.

◆ braking_time_updated_roll

uint8_t braking_time_updated_roll

Definition at line 37 of file mode_poshold.cpp.

◆ controller_final_pitch

int16_t controller_final_pitch

Definition at line 58 of file mode_poshold.cpp.

◆ controller_final_roll

int16_t controller_final_roll

Definition at line 57 of file mode_poshold.cpp.

◆ controller_to_pilot_timer_pitch

int16_t controller_to_pilot_timer_pitch

Definition at line 56 of file mode_poshold.cpp.

◆ controller_to_pilot_timer_roll

int16_t controller_to_pilot_timer_roll

Definition at line 55 of file mode_poshold.cpp.

◆ pilot_pitch

float pilot_pitch

Definition at line 42 of file mode_poshold.cpp.

◆ pilot_roll

float pilot_roll

Definition at line 41 of file mode_poshold.cpp.

◆ pitch

int16_t pitch

Definition at line 69 of file mode_poshold.cpp.

Referenced by GCS_MAVLINK_Copter::handleMessage().

◆ pitch_mode

poshold_rp_mode pitch_mode

Definition at line 36 of file mode_poshold.cpp.

◆ poshold

struct { ... } poshold

◆ roll

int16_t roll

Definition at line 68 of file mode_poshold.cpp.

Referenced by GCS_MAVLINK_Copter::handleMessage().

◆ roll_mode

poshold_rp_mode roll_mode

Definition at line 35 of file mode_poshold.cpp.

◆ wind_comp_ef

Vector2f wind_comp_ef

Definition at line 61 of file mode_poshold.cpp.

◆ wind_comp_pitch

int16_t wind_comp_pitch

Definition at line 63 of file mode_poshold.cpp.

◆ wind_comp_roll

int16_t wind_comp_roll

Definition at line 62 of file mode_poshold.cpp.

◆ wind_comp_start_timer

uint16_t wind_comp_start_timer

Definition at line 64 of file mode_poshold.cpp.

◆ wind_comp_timer

int8_t wind_comp_timer

Definition at line 65 of file mode_poshold.cpp.