APM:Libraries
|
#include "AP_AutoTune.h"
#include <AP_Common/AP_Common.h>
#include <AP_HAL/AP_HAL.h>
#include <AP_Math/AP_Math.h>
#include <stdio.h>
Go to the source code of this file.
Macros | |
#define | AUTOTUNE_SAVE_PERIOD 10000U |
#define | AUTOTUNE_OVERSHOOT_TIME 100 |
#define | AUTOTUNE_UNDERSHOOT_TIME 200 |
#define | AUTOTUNE_INCREASE_STEP 5 |
#define | AUTOTUNE_DECREASE_STEP 8 |
#define | AUTOTUNE_MAX_P 5.0f |
#define | AUTOTUNE_MIN_P 0.3f |
#define | AUTOTUNE_MAX_TAU 0.7f |
#define | AUTOTUNE_MIN_TAU 0.2f |
#define | AUTOTUNE_MIN_IMAX 2000 |
#define | AUTOTUNE_MAX_IMAX 4000 |
#define | Debug(fmt, args ...) do {::printf("%s:%d: " fmt "\n", __FUNCTION__, __LINE__, ## args); } while(0) |
Variables | |
const AP_HAL::HAL & | hal |
-*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- More... | |
struct { | |
float tau | |
float Dratio | |
float rmax | |
} | tuning_table [] |
#define AUTOTUNE_DECREASE_STEP 8 |
Definition at line 55 of file AP_AutoTune.cpp.
Referenced by AP_AutoTune::check_state_exit().
#define AUTOTUNE_INCREASE_STEP 5 |
Definition at line 52 of file AP_AutoTune.cpp.
Referenced by AP_AutoTune::check_state_exit().
#define AUTOTUNE_MAX_IMAX 4000 |
Definition at line 66 of file AP_AutoTune.cpp.
Referenced by AP_AutoTune::start().
#define AUTOTUNE_MAX_P 5.0f |
Definition at line 58 of file AP_AutoTune.cpp.
Referenced by AP_AutoTune::check_state_exit().
#define AUTOTUNE_MAX_TAU 0.7f |
Definition at line 62 of file AP_AutoTune.cpp.
#define AUTOTUNE_MIN_IMAX 2000 |
Definition at line 65 of file AP_AutoTune.cpp.
Referenced by AP_AutoTune::start().
#define AUTOTUNE_MIN_P 0.3f |
Definition at line 59 of file AP_AutoTune.cpp.
Referenced by AP_AutoTune::check_state_exit().
#define AUTOTUNE_MIN_TAU 0.2f |
Definition at line 63 of file AP_AutoTune.cpp.
#define AUTOTUNE_OVERSHOOT_TIME 100 |
Definition at line 46 of file AP_AutoTune.cpp.
Referenced by AP_AutoTune::check_state_exit().
#define AUTOTUNE_SAVE_PERIOD 10000U |
Definition at line 43 of file AP_AutoTune.cpp.
Referenced by AP_AutoTune::check_save().
#define AUTOTUNE_UNDERSHOOT_TIME 200 |
Definition at line 49 of file AP_AutoTune.cpp.
Referenced by AP_AutoTune::check_state_exit().
#define Debug | ( | fmt, | |
args ... | |||
) | do {::printf("%s:%d: " fmt "\n", __FUNCTION__, __LINE__, ## args); } while(0) |
Definition at line 82 of file AP_AutoTune.cpp.
Referenced by AP_AutoTune::check_save(), AP_AutoTune::check_state_exit(), and AP_AutoTune::start().
float Dratio |
Definition at line 95 of file AP_AutoTune.cpp.
Referenced by AP_AutoTune::start().
const AP_HAL::HAL& hal |
-*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
The strategy for roll/pitch autotune is to give the user a AUTOTUNE flight mode which behaves just like FBWA, but does automatic tuning.
While the user is flying in AUTOTUNE the gains are saved every 10 seconds, but the saved gains are not the current gains, instead it saves the gains from 10s ago. When the user exits AUTOTUNE the gains are restored from 10s ago.
This allows the user to fly as much as they want in AUTOTUNE mode, and if they are ever unhappy they just exit the mode. If they stay in AUTOTUNE for more than 10s then their gains will have changed.
Using this approach users don't need any special switches, they just need to be able to enter and exit AUTOTUNE mode
Definition at line 14 of file AC_PID_test.cpp.
float rmax |
Definition at line 96 of file AP_AutoTune.cpp.
Referenced by AP_AutoTune::start().
float tau |
Definition at line 94 of file AP_AutoTune.cpp.
Referenced by NavEKF2_core::calcGpsGoodForFlight(), NavEKF3_core::calcGpsGoodForFlight(), and AP_AutoTune::start().
const { ... } tuning_table[] |
Referenced by AP_AutoTune::check_state_exit(), and AP_AutoTune::start().