Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/master/libraries/AC_AttitudeControl/AC_CommandModel.cpp
Views: 1798
#include "AC_CommandModel.h"1#include <AP_HAL/AP_HAL.h>23// The Command Model class holds parameters that shape the pilot desired angular rate input. This class can4// be expanded to hold the methods that shape the pilot desired input.56extern const AP_HAL::HAL& hal;78// table of user settable parameters9const AP_Param::GroupInfo AC_CommandModel::var_info[] = {1011// @Param: RATE12// @DisplayName: Maximum Controlled Rate13// @Description: Sets the maximum rate commanded.14// @Units: deg/s15// @Range: 1 36016// @User: Standard17AP_GROUPINFO_FLAGS_DEFAULT_POINTER("RATE", 1, AC_CommandModel, rate, default_rate),1819// @Param: EXPO20// @DisplayName: Controlled Expo21// @Description: Controlled expo to allow faster rotation when stick at edges22// @Values: 0:Disabled,0.1:Very Low,0.2:Low,0.3:Medium,0.4:High,0.5:Very High23// @Range: -0.5 1.024// @User: Advanced25AP_GROUPINFO_FLAGS_DEFAULT_POINTER("EXPO", 2, AC_CommandModel, expo, default_expo),2627// @Param: RATE_TC28// @DisplayName: Rate control input time constant29// @Description: Rate control input time constant. Low numbers lead to sharper response, higher numbers to softer response30// @Units: s31// @Range: 0 132// @Increment: 0.0133// @Values: 0.5:Very Soft, 0.2:Soft, 0.15:Medium, 0.1:Crisp, 0.05:Very Crisp34// @User: Standard35AP_GROUPINFO_FLAGS_DEFAULT_POINTER("RATE_TC", 3, AC_CommandModel, rate_tc, default_rate_tc),3637AP_GROUPEND38};3940// Constructor41AC_CommandModel::AC_CommandModel(float initial_rate, float initial_expo, float initial_tc) :42default_rate_tc(initial_tc),43default_rate(initial_rate),44default_expo(initial_expo)45{46AP_Param::setup_object_defaults(this, var_info);47}48495051