Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 1988 → Rev 1991

/branches/dongfang_FC_rewrite/flight.c
391,7 → 391,7
CHECK_MIN_MAX(IPart[axis], -(CONTROL_SCALING * 16000L), (CONTROL_SCALING * 16000L));
// Add (P, D) parts minus stick pos. to the scaled-down I part.
term[axis] = PDPart[axis] - controls[axis] + IPart[axis] / Ki; // PID-controller for pitch
 
term[axis] += (dynamicParams.levelCorrection[axis] - 128);
/*
* Apply "dynamic stability" - that is: Limit pitch and roll terms to a growing function of throttle and yaw(!).
* The higher the dynamic stability parameter, the wider the bounds. 64 seems to be a kind of unity