2018-12-07 03:52:05 -04:00
|
|
|
/*
|
|
|
|
support for autotune of quadplanes
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2022-02-28 21:19:23 -04:00
|
|
|
#include <AP_HAL/AP_HAL_Boards.h>
|
2018-12-07 03:52:05 -04:00
|
|
|
|
2021-09-10 03:28:21 -03:00
|
|
|
#include "quadplane.h"
|
2022-11-19 19:56:42 -04:00
|
|
|
#ifndef QAUTOTUNE_ENABLED
|
2024-07-27 02:52:11 -03:00
|
|
|
#define QAUTOTUNE_ENABLED (HAL_QUADPLANE_ENABLED && CONFIG_HAL_BOARD == HAL_BOARD_SITL)
|
2022-11-19 19:56:42 -04:00
|
|
|
#endif
|
2018-12-07 03:52:05 -04:00
|
|
|
|
|
|
|
#if QAUTOTUNE_ENABLED
|
|
|
|
|
2020-11-02 14:59:36 -04:00
|
|
|
#include <AC_AutoTune/AC_AutoTune_Multi.h>
|
2018-12-07 03:52:05 -04:00
|
|
|
|
2020-11-02 14:59:36 -04:00
|
|
|
class QAutoTune : public AC_AutoTune_Multi
|
2018-12-07 03:52:05 -04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
friend class QuadPlane;
|
|
|
|
|
|
|
|
bool init() override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
float get_pilot_desired_climb_rate_cms(void) const override;
|
2019-02-28 07:11:05 -04:00
|
|
|
void get_pilot_desired_rp_yrate_cd(float &roll_cd, float &pitch_cd, float &yaw_rate_cds) override;
|
2018-12-07 03:52:05 -04:00
|
|
|
void init_z_limits() override;
|
2023-07-13 21:58:09 -03:00
|
|
|
#if HAL_LOGGING_ENABLED
|
2018-12-21 22:26:31 -04:00
|
|
|
void log_pids() override;
|
2023-07-13 21:58:09 -03:00
|
|
|
#endif
|
2018-12-07 03:52:05 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // QAUTOTUNE_ENABLED
|