APM:Libraries
Classes | Functions | Variables
SmartRTL_test.cpp File Reference
#include "SmartRTL_test.h"
#include <AP_AHRS/AP_AHRS.h>
#include <AP_Baro/AP_Baro.h>
#include <AP_Compass/AP_Compass.h>
#include <AP_GPS/AP_GPS.h>
#include <AP_InertialSensor/AP_InertialSensor.h>
#include <AP_NavEKF2/AP_NavEKF2.h>
#include <AP_NavEKF3/AP_NavEKF3.h>
#include <AP_RangeFinder/AP_RangeFinder.h>
#include <AP_SerialManager/AP_SerialManager.h>
Include dependency graph for SmartRTL_test.cpp:

Go to the source code of this file.

Classes

class  DummyVehicle
 

Functions

AP_AHRS_NavEKFahrs (vehicle.ahrs)
 
void setup ()
 
void loop ()
 
void reset ()
 
void check_path (const std::vector< Vector3f > &correct_path, const char *test_name, uint32_t time_us)
 
 AP_HAL_MAIN ()
 

Variables

const AP_HAL::HALhal = AP_HAL::get_HAL()
 -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- More...
 
static AP_InertialSensor ins
 
static Compass compass
 
static AP_GPS gps
 
static AP_Baro barometer
 
static AP_SerialManager serial_manager
 
static DummyVehicle vehicle
 
AP_SmartRTL smart_rtl {true}
 
AP_BoardConfig board_config
 

Function Documentation

◆ ahrs()

AP_AHRS_NavEKF& ahrs ( vehicle.  ahrs)

◆ AP_HAL_MAIN()

AP_HAL_MAIN ( )

Referenced by check_path().

Here is the caller graph for this function:

◆ check_path()

void check_path ( const std::vector< Vector3f > &  correct_path,
const char *  test_name,
uint32_t  time_us 
)

Definition at line 96 of file SmartRTL_test.cpp.

Referenced by loop().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loop()

void loop ( void  )

Definition at line 47 of file SmartRTL_test.cpp.

Here is the call graph for this function:

◆ reset()

void reset ( )

Definition at line 87 of file SmartRTL_test.cpp.

Referenced by AP_GPS_ERB::_detect(), AP_GPS_UBLOX::_detect(), F4Light::PPM_parser::_process_dsm_pulse(), Linux::RCInput::_process_dsm_pulse(), F4Light::PPM_parser::_process_sbus_pulse(), Linux::RCInput::_process_sbus_pulse(), AP_RCProtocol_DSM::AP_RCProtocol_DSM(), PX4::PX4CAN::end(), VRBRAIN::VRBRAINCAN::end(), loop(), AP_RCProtocol_SBUS::process_pulse(), AP_RCProtocol_DSM::process_pulse(), AP_GPS_ERB::read(), AP_GPS_UBLOX::read(), and Linux::CAN::~CAN().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setup()

void setup ( void  )

Definition at line 40 of file SmartRTL_test.cpp.

Here is the call graph for this function:

Variable Documentation

◆ barometer

AP_Baro barometer
static

Definition at line 18 of file SmartRTL_test.cpp.

◆ board_config

AP_BoardConfig board_config

Definition at line 33 of file SmartRTL_test.cpp.

◆ compass

Compass compass
static

Definition at line 16 of file SmartRTL_test.cpp.

◆ gps

AP_GPS gps
static

Definition at line 17 of file SmartRTL_test.cpp.

◆ hal

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 12 of file SmartRTL_test.cpp.

◆ ins

AP_InertialSensor ins
static

Definition at line 15 of file SmartRTL_test.cpp.

◆ serial_manager

AP_SerialManager serial_manager
static

Definition at line 19 of file SmartRTL_test.cpp.

◆ smart_rtl

AP_SmartRTL smart_rtl {true}

Definition at line 32 of file SmartRTL_test.cpp.

Referenced by check_path(), loop(), reset(), and setup().

◆ vehicle

DummyVehicle vehicle
static

Definition at line 29 of file SmartRTL_test.cpp.