CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
Ardupilot

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: Ardupilot/ardupilot
Path: blob/master/libraries/AC_AttitudeControl/AC_CommandModel.h
Views: 1798
1
#pragma once
2
3
/// @file AC_CommandModel.h
4
/// @brief ArduCopter Command Model Library
5
6
#include <AP_Param/AP_Param.h>
7
8
/*
9
Command model parameters
10
*/
11
12
class AC_CommandModel {
13
public:
14
AC_CommandModel(float initial_rate, float initial_expo, float initial_tc);
15
16
// Accessors for parameters
17
float get_rate_tc() const { return rate_tc; }
18
float get_rate() const { return rate; }
19
float get_expo() const { return expo; }
20
21
// Set the max rate
22
void set_rate(float input) { rate.set(input); }
23
24
// var_info for holding Parameter information
25
static const struct AP_Param::GroupInfo var_info[];
26
27
protected:
28
AP_Float rate_tc; // rate time constant
29
AP_Float rate; // maximum rate
30
AP_Float expo; // expo shaping
31
32
private:
33
const float default_rate_tc;
34
const float default_rate;
35
const float default_expo;
36
};
37
38
39