APM:Copter
|
Public Member Functions | |
bool | init (bool ignore_checks) override |
void | run () override |
bool | is_autopilot () const override |
bool | requires_GPS () const override |
bool | has_manual_throttle () const override |
bool | allows_arming (bool from_gcs) const override |
bool | in_guided_mode () const |
AutoMode | mode () const |
bool | loiter_start () |
void | rtl_start () |
void | takeoff_start (const Location &dest_loc) |
void | wp_start (const Vector3f &destination) |
void | wp_start (const Location_Class &dest_loc) |
void | land_start () |
void | land_start (const Vector3f &destination) |
void | circle_movetoedge_start (const Location_Class &circle_center, float radius_m) |
void | circle_start () |
void | spline_start (const Vector3f &destination, bool stopped_at_start, AC_WPNav::spline_segment_end_type seg_end_type, const Vector3f &next_spline_destination) |
void | spline_start (const Location_Class &destination, bool stopped_at_start, AC_WPNav::spline_segment_end_type seg_end_type, const Location_Class &next_destination) |
void | nav_guided_start () |
bool | landing_gear_should_be_deployed () const override |
void | payload_place_start () |
bool | start_command (const AP_Mission::Mission_Command &cmd) |
bool | verify_command_callback (const AP_Mission::Mission_Command &cmd) |
void | exit_mission () |
bool | do_guided (const AP_Mission::Mission_Command &cmd) |
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 |
bool | get_wp (Location_Class &loc) override |
void | run_autopilot () override |
![]() | |
void | update_navigation () |
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_Copter & | gcs () |
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 Attributes | |
AutoMode | _mode = Auto_TakeOff |
uint16_t | loiter_time_max |
uint32_t | loiter_time |
int32_t | nav_delay_time_max |
uint32_t | nav_delay_time_start |
int32_t | condition_value |
uint32_t | condition_start |
LandStateType | land_state = LandStateType_FlyToLocation |
struct { | |
PayloadPlaceStateType state = PayloadPlaceStateType_Calibrating_Hover_Start | |
uint32_t hover_start_timestamp | |
float hover_throttle_level | |
uint32_t descend_start_timestamp | |
uint32_t place_start_timestamp | |
float descend_throttle_level | |
float descend_start_altitude | |
float descend_max | |
} | nav_payload_place |
Additional Inherited Members | |
![]() | |
static AutoYaw | auto_yaw |
![]() | |
Parameters & | g |
ParametersG2 & | g2 |
AC_WPNav *& | wp_nav |
AC_Loiter *& | loiter_nav |
AC_PosControl *& | pos_control |
AP_InertialNav & | inertial_nav |
AP_AHRS & | ahrs |
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 |
|
inlineoverridevirtual |
Implements Copter::Mode.
|
private |
void Copter::ModeAuto::circle_movetoedge_start | ( | const Location_Class & | circle_center, |
float | radius_m | ||
) |
Definition at line 247 of file mode_auto.cpp.
Referenced by do_circle().
|
private |
Definition at line 888 of file mode_auto.cpp.
Referenced by run().
void Copter::ModeAuto::circle_start | ( | ) |
Definition at line 301 of file mode_auto.cpp.
Referenced by circle_movetoedge_start(), and verify_circle().
|
private |
Definition at line 1348 of file mode_auto.cpp.
Referenced by start_command().
|
private |
Definition at line 1160 of file mode_auto.cpp.
Referenced by start_command().
|
private |
Definition at line 1387 of file mode_auto.cpp.
Referenced by start_command().
|
private |
Definition at line 1400 of file mode_auto.cpp.
Referenced by start_command().
|
private |
Definition at line 1437 of file mode_auto.cpp.
Referenced by start_command().
bool Copter::ModeAuto::do_guided | ( | const AP_Mission::Mission_Command & | cmd | ) |
|
private |
Definition at line 1293 of file mode_auto.cpp.
Referenced by start_command().
|
private |
Definition at line 1103 of file mode_auto.cpp.
Referenced by start_command().
|
private |
Definition at line 1194 of file mode_auto.cpp.
Referenced by start_command().
|
private |
Definition at line 1126 of file mode_auto.cpp.
Referenced by do_loiter_time(), and start_command().
|
private |
Definition at line 1374 of file mode_auto.cpp.
Referenced by start_command().
|
private |
Definition at line 1304 of file mode_auto.cpp.
Referenced by start_command().
|
private |
Definition at line 1281 of file mode_auto.cpp.
Referenced by start_command().
|
private |
Definition at line 1065 of file mode_auto.cpp.
Referenced by start_command().
|
private |
Definition at line 1414 of file mode_auto.cpp.
Referenced by start_command().
|
private |
Definition at line 1482 of file mode_auto.cpp.
Referenced by start_command().
|
private |
Definition at line 1368 of file mode_auto.cpp.
Referenced by start_command().
|
private |
Definition at line 1502 of file mode_auto.cpp.
Referenced by start_command().
|
private |
Definition at line 1355 of file mode_auto.cpp.
Referenced by start_command().
|
private |
Definition at line 1205 of file mode_auto.cpp.
Referenced by start_command().
|
private |
Definition at line 1058 of file mode_auto.cpp.
Referenced by start_command().
|
private |
Definition at line 1322 of file mode_auto.cpp.
Referenced by start_command().
|
private |
Definition at line 1458 of file mode_auto.cpp.
Referenced by start_command().
|
private |
Definition at line 1328 of file mode_auto.cpp.
Referenced by start_command().
|
private |
Definition at line 1333 of file mode_auto.cpp.
Referenced by do_guided(), and start_command().
void Copter::ModeAuto::exit_mission | ( | ) |
Definition at line 563 of file mode_auto.cpp.
Referenced by Copter::exit_mission().
|
overrideprotectedvirtual |
Reimplemented from Copter::Mode.
Definition at line 619 of file mode_auto.cpp.
|
inlineoverridevirtual |
Implements Copter::Mode.
|
inlinevirtual |
Reimplemented from Copter::Mode.
|
overridevirtual |
Implements Copter::Mode.
Definition at line 23 of file mode_auto.cpp.
|
inlineoverridevirtual |
Reimplemented from Copter::Mode.
|
private |
Definition at line 861 of file mode_auto.cpp.
Referenced by run().
void Copter::ModeAuto::land_start | ( | ) |
Definition at line 217 of file mode_auto.cpp.
Referenced by do_land(), and verify_land().
void Copter::ModeAuto::land_start | ( | const Vector3f & | destination | ) |
|
overridevirtual |
Reimplemented from Copter::Mode.
Definition at line 345 of file mode_auto.cpp.
|
private |
Definition at line 912 of file mode_auto.cpp.
Referenced by run().
bool Copter::ModeAuto::loiter_start | ( | ) |
Definition at line 105 of file mode_auto.cpp.
Referenced by exit_mission().
|
inline |
Definition at line 250 of file Copter.h.
Referenced by do_guided(), and verify_circle().
|
inlineoverrideprotectedvirtual |
Implements Copter::Mode.
|
inlineoverrideprotectedvirtual |
Implements Copter::Mode.
|
private |
Definition at line 903 of file mode_auto.cpp.
Referenced by run().
void Copter::ModeAuto::nav_guided_start | ( | ) |
Definition at line 333 of file mode_auto.cpp.
Referenced by do_nav_guided_enable().
|
private |
Definition at line 957 of file mode_auto.cpp.
Referenced by run().
|
private |
Definition at line 1025 of file mode_auto.cpp.
Referenced by payload_place_run().
|
private |
Definition at line 1009 of file mode_auto.cpp.
Referenced by payload_place_run().
|
private |
|
private |
Definition at line 987 of file mode_auto.cpp.
Referenced by payload_place_run().
void Copter::ModeAuto::payload_place_start | ( | ) |
Definition at line 359 of file mode_auto.cpp.
Referenced by do_payload_place().
|
private |
|
inlineoverridevirtual |
Implements Copter::Mode.
|
private |
Definition at line 880 of file mode_auto.cpp.
Referenced by run().
void Copter::ModeAuto::rtl_start | ( | ) |
Definition at line 127 of file mode_auto.cpp.
Referenced by do_RTL().
|
overridevirtual |
Implements Copter::Mode.
Definition at line 57 of file mode_auto.cpp.
|
overrideprotectedvirtual |
Reimplemented from Copter::Mode.
Definition at line 632 of file mode_auto.cpp.
|
private |
Definition at line 818 of file mode_auto.cpp.
Referenced by run().
void Copter::ModeAuto::spline_start | ( | const Vector3f & | destination, |
bool | stopped_at_start, | ||
AC_WPNav::spline_segment_end_type | seg_end_type, | ||
const Vector3f & | next_spline_destination | ||
) |
void Copter::ModeAuto::spline_start | ( | const Location_Class & | destination, |
bool | stopped_at_start, | ||
AC_WPNav::spline_segment_end_type | seg_end_type, | ||
const Location_Class & | next_destination | ||
) |
bool Copter::ModeAuto::start_command | ( | const AP_Mission::Mission_Command & | cmd | ) |
navigation commands
do commands
Definition at line 371 of file mode_auto.cpp.
Referenced by Copter::start_command().
|
private |
Definition at line 729 of file mode_auto.cpp.
Referenced by run().
void Copter::ModeAuto::takeoff_start | ( | const Location & | dest_loc | ) |
Definition at line 136 of file mode_auto.cpp.
Referenced by do_takeoff().
|
private |
Definition at line 1033 of file mode_auto.cpp.
Referenced by do_land(), and do_payload_place().
|
private |
Definition at line 1808 of file mode_auto.cpp.
Referenced by verify_command().
|
private |
conditional commands
Definition at line 646 of file mode_auto.cpp.
Referenced by verify_command_callback().
bool Copter::ModeAuto::verify_command_callback | ( | const AP_Mission::Mission_Command & | cmd | ) |
Definition at line 547 of file mode_auto.cpp.
Referenced by Copter::verify_command_callback().
|
private |
Definition at line 1520 of file mode_auto.cpp.
Referenced by verify_command().
|
private |
Definition at line 1723 of file mode_auto.cpp.
Referenced by verify_command().
|
private |
Definition at line 1717 of file mode_auto.cpp.
Referenced by verify_command().
|
private |
Definition at line 1876 of file mode_auto.cpp.
Referenced by verify_command().
|
private |
Definition at line 1863 of file mode_auto.cpp.
Referenced by verify_command().
|
private |
Definition at line 1782 of file mode_auto.cpp.
Referenced by verify_command().
|
private |
Definition at line 1565 of file mode_auto.cpp.
Referenced by verify_command().
|
private |
Definition at line 1742 of file mode_auto.cpp.
Referenced by verify_command().
|
private |
Definition at line 1840 of file mode_auto.cpp.
Referenced by verify_command().
|
private |
Definition at line 1513 of file mode_auto.cpp.
Referenced by verify_command().
|
private |
Definition at line 1751 of file mode_auto.cpp.
Referenced by verify_command().
|
private |
Definition at line 1760 of file mode_auto.cpp.
Referenced by verify_command().
|
private |
Definition at line 1770 of file mode_auto.cpp.
Referenced by verify_command().
|
overrideprotectedvirtual |
Reimplemented from Copter::Mode.
Definition at line 614 of file mode_auto.cpp.
|
overrideprotectedvirtual |
Reimplemented from Copter::Mode.
Definition at line 609 of file mode_auto.cpp.
Referenced by verify_within_distance().
|
private |
Definition at line 775 of file mode_auto.cpp.
Referenced by run().
void Copter::ModeAuto::wp_start | ( | const Vector3f & | destination | ) |
Definition at line 183 of file mode_auto.cpp.
Referenced by do_land(), do_loiter_unlimited(), do_nav_wp(), do_payload_place(), and verify_payload_place().
void Copter::ModeAuto::wp_start | ( | const Location_Class & | dest_loc | ) |
|
private |
Definition at line 307 of file Copter.h.
Referenced by circle_movetoedge_start(), circle_start(), get_wp(), init(), land_start(), landing_gear_should_be_deployed(), loiter_start(), nav_guided_start(), payload_place_start(), rtl_start(), run(), spline_start(), takeoff_start(), and wp_start().
|
private |
Definition at line 375 of file Copter.h.
Referenced by do_wait_delay(), and verify_wait_delay().
|
private |
Definition at line 374 of file Copter.h.
Referenced by do_wait_delay(), do_within_distance(), verify_wait_delay(), and verify_within_distance().
|
private |
Definition at line 377 of file Copter.h.
Referenced by do_land(), and verify_land().
|
private |
Definition at line 367 of file Copter.h.
Referenced by do_loiter_time(), do_nav_wp(), do_spline_wp(), verify_loiter_time(), verify_nav_wp(), and verify_spline_wp().
|
private |
Definition at line 366 of file Copter.h.
Referenced by do_loiter_time(), do_nav_wp(), do_spline_wp(), verify_loiter_time(), verify_nav_wp(), and verify_spline_wp().
|
private |
Definition at line 370 of file Copter.h.
Referenced by do_nav_delay(), and verify_nav_delay().
|
private |
Definition at line 371 of file Copter.h.
Referenced by do_nav_delay(), and verify_nav_delay().
struct { ... } Copter::ModeAuto::nav_payload_place |
Referenced by do_payload_place(), payload_place_run(), payload_place_start(), and verify_payload_place().
PayloadPlaceStateType Copter::ModeAuto::state = PayloadPlaceStateType_Calibrating_Hover_Start |