-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Description
It appears that the equation for the derivative error (line 62) uses the wrong operator to convert from milliseconds to seconds. The integral error (line 60) uses Seconds (_dT / 1000) as the time unit, but the derivative error uses Microseconds (_dT * 1000).
I think the correct formula would include a pair of brackets as follows in order to keep the units consistent with the integral error:
double _dError = (_error - _previousError) / (_dT / 1000.0); //derivative
In order to use multiplication instead of division, the formula could be rewritten as follows:
double _dError = (_error - _previousError) * 1000.0 / _dT; //derivative
genoptic-nic, hitech95 and PalantirWielder
Metadata
Metadata
Assignees
Labels
No labels