APM:Libraries
|
Go to the source code of this file.
Macros | |
#define | ALLOW_DOUBLE_MATH_FUNCTIONS |
#define | D2R DEG_TO_RAD_DOUBLE |
#define | NUM_COORDS 10 |
Functions | |
void | setup () |
void | loop () |
static struct Location | location_from_point (Vector2f pt) |
static void | test_passed_waypoint (void) |
static void | test_one_offset (const struct Location &loc, float ofs_north, float ofs_east, float dist, float bearing) |
static void | test_offset (void) |
static void | test_accuracy (void) |
static void | test_wrap_cd (void) |
static void | test_wgs_conversion_functions (void) |
AP_HAL_MAIN () | |
Variables | |
const AP_HAL::HAL & | hal = AP_HAL::get_HAL() |
-*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- More... | |
struct { | |
Vector2f wp1 | |
Vector2f wp2 | |
Vector2f location | |
bool passed | |
} | test_points [] |
struct { | |
float ofs_north | |
float ofs_east | |
float distance | |
float bearing | |
} | test_offsets [] |
struct { | |
int32_t v | |
int32_t wv | |
} | wrap_180_tests [] |
struct { | |
int32_t v | |
int32_t wv | |
} | wrap_360_tests [] |
struct { | |
float v | |
float wv | |
} | wrap_PI_tests [] |
#define ALLOW_DOUBLE_MATH_FUNCTIONS |
Definition at line 5 of file location.cpp.
#define D2R DEG_TO_RAD_DOUBLE |
Referenced by test_wgs_conversion_functions().
#define NUM_COORDS 10 |
Referenced by test_wgs_conversion_functions().
AP_HAL_MAIN | ( | ) |
Definition at line 42 of file location.cpp.
Referenced by test_passed_waypoint().
void loop | ( | void | ) |
void setup | ( | void | ) |
|
static |
Definition at line 122 of file location.cpp.
Referenced by setup().
|
static |
Definition at line 102 of file location.cpp.
Referenced by setup().
|
static |
Definition at line 65 of file location.cpp.
Referenced by test_offset().
|
static |
Definition at line 50 of file location.cpp.
Referenced by setup().
|
static |
Definition at line 241 of file location.cpp.
Referenced by setup().
|
static |
Definition at line 206 of file location.cpp.
Referenced by setup().
float bearing |
Definition at line 94 of file location.cpp.
Referenced by get_bearing_cd(), test_offset(), and test_one_offset().
float distance |
Definition at line 94 of file location.cpp.
Referenced by CompassCalibrator::accept_sample(), AP_GPS::all_configured(), AP_ADSB::determine_furthest_aircraft(), AP_Proximity_RangeFinder::distance_min(), AP_Proximity_MAV::distance_min(), AP_Arming::gps_checks(), AP_Proximity_Backend::handle_msg(), location_update(), AP_Beacon_Marvelmind::process_beacons_distances_datagram(), AP_Beacon_Backend::set_beacon_distance(), test_offset(), and AP_Winch_Servo::update().
const AP_HAL::HAL& hal = AP_HAL::get_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 13 of file location.cpp.
Vector2f location |
Definition at line 16 of file location.cpp.
Referenced by AC_PolyFence_loader::boundary_breached(), AC_Fence::get_margin(), and test_passed_waypoint().
float ofs_east |
Definition at line 94 of file location.cpp.
Referenced by location_update(), Location_Class::set_terrain(), and test_offset().
float ofs_north |
Definition at line 94 of file location.cpp.
Referenced by location_update(), Location_Class::set_terrain(), and test_offset().
bool passed |
Definition at line 17 of file location.cpp.
Referenced by DataFlash_Class::assert_same_fmt_for_name(), test_passed_waypoint(), DataFlash_Class::validate_structure(), and DataFlash_Class::validate_structures().
const { ... } test_offsets[] |
Referenced by test_offset().
const { ... } test_points[] |
Referenced by test_passed_waypoint().
float v |
Definition at line 183 of file location.cpp.
Referenced by test_accuracy(), and test_wrap_cd().
Vector2f wp1 |
Definition at line 16 of file location.cpp.
Vector2f wp2 |
Definition at line 16 of file location.cpp.
const { ... } wrap_180_tests[] |
Referenced by test_wrap_cd().
const { ... } wrap_360_tests[] |
Referenced by test_wrap_cd().
const { ... } wrap_PI_tests[] |
Referenced by test_wrap_cd().
float wv |
Definition at line 183 of file location.cpp.
Referenced by test_wrap_cd().