|
APM:Libraries
|
#include <AP_AutoTune.h>
Classes | |
| struct | ATGains |
| struct | log_ATRP |
Public Types | |
| enum | ATType { AUTOTUNE_ROLL = 0, AUTOTUNE_PITCH = 1 } |
Public Member Functions | |
| AP_AutoTune (ATGains &_gains, ATType type, const AP_Vehicle::FixedWing &parms, DataFlash_Class &_dataflash) | |
| void | start (void) |
| void | stop (void) |
| void | update (float desired_rate, float achieved_rate, float servo_out) |
Public Attributes | |
| bool | running:1 |
Private Types | |
| enum | ATState { DEMAND_UNSATURATED, DEMAND_UNDER_POS, DEMAND_OVER_POS, DEMAND_UNDER_NEG, DEMAND_OVER_NEG } |
Private Member Functions | |
| void | check_save (void) |
| void | check_state_exit (uint32_t state_time_ms) |
| void | save_gains (const ATGains &v) |
| void | write_log (float servo, float demanded, float achieved) |
| void | log_param_change (float v, const char *suffix) |
| void | save_float_if_changed (AP_Float &v, float value, const char *suffix) |
| void | save_int16_if_changed (AP_Int16 &v, int16_t value, const char *suffix) |
Private Attributes | |
| ATGains & | current |
| ATType | type |
| const AP_Vehicle::FixedWing & | aparm |
| DataFlash_Class & | dataflash |
| bool | saturated_surfaces:1 |
| ATGains | restore |
| ATGains | last_save |
| ATGains | next_save |
| uint32_t | last_save_ms = 0 |
| enum AP_AutoTune::ATState | state = DEMAND_UNSATURATED |
| uint32_t | state_enter_ms = 0 |
Definition at line 7 of file AP_AutoTune.h.
|
private |
| Enumerator | |
|---|---|
| DEMAND_UNSATURATED | |
| DEMAND_UNDER_POS | |
| DEMAND_OVER_POS | |
| DEMAND_UNDER_NEG | |
| DEMAND_OVER_NEG | |
Definition at line 80 of file AP_AutoTune.h.
| enum AP_AutoTune::ATType |
| Enumerator | |
|---|---|
| AUTOTUNE_ROLL | |
| AUTOTUNE_PITCH | |
Definition at line 19 of file AP_AutoTune.h.
| AP_AutoTune::AP_AutoTune | ( | ATGains & | _gains, |
| ATType | type, | ||
| const AP_Vehicle::FixedWing & | parms, | ||
| DataFlash_Class & | _dataflash | ||
| ) |
Definition at line 69 of file AP_AutoTune.cpp.
|
private |
Definition at line 240 of file AP_AutoTune.cpp.
Referenced by update().
|
private |
Definition at line 205 of file AP_AutoTune.cpp.
Referenced by update().
|
private |
Definition at line 269 of file AP_AutoTune.cpp.
Referenced by save_float_if_changed(), and save_int16_if_changed().
|
private |
Definition at line 290 of file AP_AutoTune.cpp.
Referenced by save_gains().
|
private |
Definition at line 317 of file AP_AutoTune.cpp.
Referenced by check_save(), and stop().
|
private |
Definition at line 303 of file AP_AutoTune.cpp.
Referenced by save_gains().
| void AP_AutoTune::start | ( | void | ) |
Definition at line 114 of file AP_AutoTune.cpp.
Referenced by AP_PitchController::autotune_start(), and AP_RollController::autotune_start().
| void AP_AutoTune::stop | ( | void | ) |
Definition at line 152 of file AP_AutoTune.cpp.
Referenced by AP_PitchController::autotune_restore(), and AP_RollController::autotune_restore().
| void AP_AutoTune::update | ( | float | desired_rate, |
| float | achieved_rate, | ||
| float | servo_out | ||
| ) |
Definition at line 164 of file AP_AutoTune.cpp.
Referenced by AP_PitchController::_get_rate_out(), and AP_RollController::_get_rate_out().
|
private |
Definition at line 329 of file AP_AutoTune.cpp.
Referenced by update().
|
private |
Definition at line 60 of file AP_AutoTune.h.
Referenced by check_state_exit(), and start().
|
private |
Definition at line 55 of file AP_AutoTune.h.
Referenced by check_save(), check_state_exit(), save_gains(), start(), update(), and write_log().
|
private |
Definition at line 62 of file AP_AutoTune.h.
Referenced by log_param_change(), and write_log().
|
private |
Definition at line 71 of file AP_AutoTune.h.
Referenced by save_gains(), and start().
|
private |
Definition at line 77 of file AP_AutoTune.h.
Referenced by check_save(), and start().
|
private |
Definition at line 74 of file AP_AutoTune.h.
Referenced by check_save(), and start().
|
private |
Definition at line 68 of file AP_AutoTune.h.
Referenced by check_save(), start(), and stop().
| bool AP_AutoTune::running |
Definition at line 51 of file AP_AutoTune.h.
Referenced by AP_PitchController::_get_rate_out(), AP_RollController::_get_rate_out(), start(), stop(), and update().
|
private |
Definition at line 65 of file AP_AutoTune.h.
Referenced by check_state_exit(), and update().
|
private |
Referenced by check_state_exit(), start(), update(), and write_log().
|
private |
Definition at line 87 of file AP_AutoTune.h.
|
private |
Definition at line 58 of file AP_AutoTune.h.
Referenced by log_param_change(), and write_log().
1.8.13