Rev 1988 | Rev 1992 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1988 | Rev 1991 | ||
---|---|---|---|
Line 389... | Line 389... | ||
389 | 389 | ||
390 | // TODO: From which planet comes the 16000? |
390 | // TODO: From which planet comes the 16000? |
391 | CHECK_MIN_MAX(IPart[axis], -(CONTROL_SCALING * 16000L), (CONTROL_SCALING * 16000L)); |
391 | CHECK_MIN_MAX(IPart[axis], -(CONTROL_SCALING * 16000L), (CONTROL_SCALING * 16000L)); |
392 | // Add (P, D) parts minus stick pos. to the scaled-down I part. |
392 | // Add (P, D) parts minus stick pos. to the scaled-down I part. |
393 | term[axis] = PDPart[axis] - controls[axis] + IPart[axis] / Ki; // PID-controller for pitch |
- | |
- | 393 | term[axis] = PDPart[axis] - controls[axis] + IPart[axis] / Ki; // PID-controller for pitch |
|
394 | 394 | term[axis] += (dynamicParams.levelCorrection[axis] - 128); |
|
395 | /* |
395 | /* |
396 | * Apply "dynamic stability" - that is: Limit pitch and roll terms to a growing function of throttle and yaw(!). |
396 | * Apply "dynamic stability" - that is: Limit pitch and roll terms to a growing function of throttle and yaw(!). |
397 | * The higher the dynamic stability parameter, the wider the bounds. 64 seems to be a kind of unity |
397 | * The higher the dynamic stability parameter, the wider the bounds. 64 seems to be a kind of unity |
398 | * (max. pitch or roll term is the throttle value). |
398 | * (max. pitch or roll term is the throttle value). |