mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-30 15:52:12 +01:00
Stabilization: Add configuration terms for the derivative calculation to the UAVO and pass
them in to the PID system.
This commit is contained in:
parent
42bbd52d68
commit
11b099b1ef
@ -448,6 +448,9 @@ static void SettingsUpdatedCb(UAVObjEvent * ev)
|
||||
settings.YawPI[STABILIZATIONSETTINGS_YAWPI_KI], 0,
|
||||
settings.YawPI[STABILIZATIONSETTINGS_YAWPI_ILIMIT]);
|
||||
|
||||
// Set up the derivative term
|
||||
pid_configure_derivative(settings.DerivativeCutoff, settings.DerivativeGamma);
|
||||
|
||||
// Maximum deviation to accumulate for axis lock
|
||||
max_axis_lock = settings.MaxAxisLock;
|
||||
max_axislock_rate = settings.MaxAxisLockRate;
|
||||
|
@ -24,6 +24,8 @@
|
||||
<field name="VbarMaxAngle" units="deg" type="uint8" elements="1" defaultvalue="10"/>
|
||||
|
||||
<field name="GyroTau" units="" type="float" elements="1" defaultvalue="0.005"/>
|
||||
<field name="DerivativeCutoff" units="Hz" type="uint8" elements="1" defaultvalue="20"/>
|
||||
<field name="DerivativeGamma" units="" type="float" elements="1" defaultvalue="1"/>
|
||||
|
||||
<field name="MaxAxisLock" units="deg" type="uint8" elements="1" defaultvalue="15"/>
|
||||
<field name="MaxAxisLockRate" units="deg/s" type="uint8" elements="1" defaultvalue="2"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user