IO variables
gyroADC/8192*2000 = deg/s
gyroADC/4 ~ deg/s
rcCommand
- <-500 - 500>
nominal, but is scaled with rcRate/100
, max +-1250
inclination
- in 0.1 degree, roll and pitch deviation from horizontal position
max_angle_inclination
- in 0.1 degree, default 50 degrees (500)
axisPID
- output to mixer, will be added to throttle(<1000-2000>
), output range is <minthrottle, maxthrottle>
(default <1150 - 1850>
)
PID controller 0, “MultiWii” (default)
Leveling term
Gyro term
reset I term if - axis rotation rate > +-64deg/s - axis is YAW and rcCommand>+-100
Mode dependent mix(yaw is always from gyro)
- HORIZON - proportionally according to max deflection
deflection = MAX(ABS(rcCommand[PITCH]), ABS(rcCommand[ROLL])) / 500 ; limit to 0.0 .. 1.0 P = Pacc * (1-deflection) + Pgyro * deflection I = Iacc * (1-deflection) + Igyro * deflection
- gyro
P = Pgyro I = Igyro
- ANGLE
P = Pacc I = Iacc
#### Gyro stabilization
This can be seen as sum of
- PI controller (handles rcCommand, HORIZON/ANGLE); Igyro
is only output based on gyroADC
- PD controller(parameters dynP8/dynD8) with zero setpoint acting on gyroADC