mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-19 14:23:57 -04:00
git-svn-id: https://arducopter.googlecode.com/svn/trunk@859 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
parent
f622222f4a
commit
391e4268c4
@ -21,11 +21,7 @@ PID::get_pid(long err, long dt, float scaler)
|
||||
if(_kd != 0){
|
||||
// Compute derivative component
|
||||
//derivative = (error - previous_error)/dt
|
||||
float derivative = (error - _last_error) / dt;
|
||||
|
||||
//Serial.print("d: ");
|
||||
//Serial.println(derivative,DEC);
|
||||
|
||||
float derivative = 1000 * (error - _last_error) / dt;
|
||||
_last_error = error;
|
||||
output += _kd * derivative; // Sum the derivative component
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user