mirror of https://github.com/ArduPilot/ardupilot
AP_WheelEncoder: update for new AC_PID settings
enable filters with AP_FILTER_ENABLED
This commit is contained in:
parent
cfebae5857
commit
5b0f30ad44
|
@ -91,12 +91,6 @@ const AP_Param::GroupInfo AP_WheelRateControl::var_info[] = {
|
||||||
// @Description: Wheel rate control PD sum maximum. The maximum/minimum value that the sum of the P and D term can output
|
// @Description: Wheel rate control PD sum maximum. The maximum/minimum value that the sum of the P and D term can output
|
||||||
// @Range: 0.000 1.000
|
// @Range: 0.000 1.000
|
||||||
|
|
||||||
// @Param: _RATE_ADV
|
|
||||||
// @DisplayName: Wheel rate Advanced parameters enable
|
|
||||||
// @Description: Wheel rate Advanced parameters enable
|
|
||||||
// @Values: 0:Disabled,1:Enabled
|
|
||||||
// @User: Advanced
|
|
||||||
|
|
||||||
// @Param: _RATE_D_FF
|
// @Param: _RATE_D_FF
|
||||||
// @DisplayName: Wheel rate Derivative FeedForward Gain
|
// @DisplayName: Wheel rate Derivative FeedForward Gain
|
||||||
// @Description: FF D Gain which produces an output that is proportional to the rate of change of the error
|
// @Description: FF D Gain which produces an output that is proportional to the rate of change of the error
|
||||||
|
@ -105,31 +99,15 @@ const AP_Param::GroupInfo AP_WheelRateControl::var_info[] = {
|
||||||
// @User: Advanced
|
// @User: Advanced
|
||||||
|
|
||||||
// @Param: _RATE_NTF
|
// @Param: _RATE_NTF
|
||||||
// @DisplayName: Wheel rate Target notch Filter center frequency
|
// @DisplayName: Wheel rate Target notch filter index
|
||||||
// @Description: Wheel rate Target notch Filter center frequency in Hz.
|
// @Description: Wheel rate Target notch filter index
|
||||||
// @Range: 10 495
|
// @Range: 1 8
|
||||||
// @Units: Hz
|
|
||||||
// @User: Advanced
|
// @User: Advanced
|
||||||
|
|
||||||
// @Param: _RATE_NEF
|
// @Param: _RATE_NEF
|
||||||
// @DisplayName: Wheel rate Error notch Filter center frequency
|
// @DisplayName: Wheel rate Error notch filter index
|
||||||
// @Description: Wheel rate Error notch Filter center frequency in Hz.
|
// @Description: Wheel rate Error notch filter index
|
||||||
// @Range: 10 495
|
// @Range: 1 8
|
||||||
// @Units: Hz
|
|
||||||
// @User: Advanced
|
|
||||||
|
|
||||||
// @Param: _RATE_NBW
|
|
||||||
// @DisplayName: Wheel rate notch Filter bandwidth
|
|
||||||
// @Description: Wheel rate notch Filter bandwidth in Hz.
|
|
||||||
// @Range: 5 250
|
|
||||||
// @Units: Hz
|
|
||||||
// @User: Advanced
|
|
||||||
|
|
||||||
// @Param: _RATE_NATT
|
|
||||||
// @DisplayName: Wheel rate notch Filter attenuation
|
|
||||||
// @Description: Wheel rate notch Filter attenuation in dB.
|
|
||||||
// @Range: 5 50
|
|
||||||
// @Units: dB
|
|
||||||
// @User: Advanced
|
// @User: Advanced
|
||||||
|
|
||||||
AP_SUBGROUPINFO(_rate_pid0, "_RATE_", 3, AP_WheelRateControl, AC_PID),
|
AP_SUBGROUPINFO(_rate_pid0, "_RATE_", 3, AP_WheelRateControl, AC_PID),
|
||||||
|
@ -207,12 +185,6 @@ const AP_Param::GroupInfo AP_WheelRateControl::var_info[] = {
|
||||||
// @Description: Wheel rate control PD sum maximum. The maximum/minimum value that the sum of the P and D term can output
|
// @Description: Wheel rate control PD sum maximum. The maximum/minimum value that the sum of the P and D term can output
|
||||||
// @Range: 0.000 1.000
|
// @Range: 0.000 1.000
|
||||||
|
|
||||||
// @Param: 2_RATE_ADV
|
|
||||||
// @DisplayName: Wheel rate Advanced parameters enable
|
|
||||||
// @Description: Wheel rate Advanced parameters enable
|
|
||||||
// @Values: 0:Disabled,1:Enabled
|
|
||||||
// @User: Advanced
|
|
||||||
|
|
||||||
// @Param: 2_RATE_D_FF
|
// @Param: 2_RATE_D_FF
|
||||||
// @DisplayName: Wheel rate Derivative FeedForward Gain
|
// @DisplayName: Wheel rate Derivative FeedForward Gain
|
||||||
// @Description: FF D Gain which produces an output that is proportional to the rate of change of the target
|
// @Description: FF D Gain which produces an output that is proportional to the rate of change of the target
|
||||||
|
@ -221,31 +193,15 @@ const AP_Param::GroupInfo AP_WheelRateControl::var_info[] = {
|
||||||
// @User: Advanced
|
// @User: Advanced
|
||||||
|
|
||||||
// @Param: 2_RATE_NTF
|
// @Param: 2_RATE_NTF
|
||||||
// @DisplayName: Wheel rate Target notch Filter center frequency
|
// @DisplayName: Wheel rate Target notch filter index
|
||||||
// @Description: Wheel rate Target notch Filter center frequency in Hz.
|
// @Description: Wheel rate Target notch filter index
|
||||||
// @Range: 10 495
|
// @Range: 1 8
|
||||||
// @Units: Hz
|
|
||||||
// @User: Advanced
|
// @User: Advanced
|
||||||
|
|
||||||
// @Param: 2_RATE_NEF
|
// @Param: 2_RATE_NEF
|
||||||
// @DisplayName: Wheel rate Error notch Filter center frequency
|
// @DisplayName: Wheel rate Error notch filter index
|
||||||
// @Description: Wheel rate Error notch Filter center frequency in Hz.
|
// @Description: Wheel rate Error notch filter index
|
||||||
// @Range: 10 495
|
// @Range: 1 8
|
||||||
// @Units: Hz
|
|
||||||
// @User: Advanced
|
|
||||||
|
|
||||||
// @Param: 2_RATE_NBW
|
|
||||||
// @DisplayName: Wheel rate notch Filter bandwidth
|
|
||||||
// @Description: Wheel rate notch Filter bandwidth in Hz.
|
|
||||||
// @Range: 5 250
|
|
||||||
// @Units: Hz
|
|
||||||
// @User: Advanced
|
|
||||||
|
|
||||||
// @Param: 2_RATE_NATT
|
|
||||||
// @DisplayName: Wheel rate notch Filter attenuation
|
|
||||||
// @Description: Wheel rate notch Filter attenuation in dB.
|
|
||||||
// @Range: 5 50
|
|
||||||
// @Units: dB
|
|
||||||
// @User: Advanced
|
// @User: Advanced
|
||||||
|
|
||||||
AP_SUBGROUPINFO(_rate_pid1, "2_RATE_", 4, AP_WheelRateControl, AC_PID),
|
AP_SUBGROUPINFO(_rate_pid1, "2_RATE_", 4, AP_WheelRateControl, AC_PID),
|
||||||
|
@ -320,7 +276,7 @@ AC_PID& AP_WheelRateControl::get_pid(uint8_t instance)
|
||||||
|
|
||||||
void AP_WheelRateControl::set_notch_sample_rate(float sample_rate)
|
void AP_WheelRateControl::set_notch_sample_rate(float sample_rate)
|
||||||
{
|
{
|
||||||
#if AC_PID_ADVANCED_ENABLED
|
#if AP_FILTER_ENABLED
|
||||||
_rate_pid0.set_notch_sample_rate(sample_rate);
|
_rate_pid0.set_notch_sample_rate(sample_rate);
|
||||||
_rate_pid1.set_notch_sample_rate(sample_rate);
|
_rate_pid1.set_notch_sample_rate(sample_rate);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue