Showing the changes to interface/src/SerialInterface.cpp (1 of 6 files). Show all
Unified · Split
| @@ -296,8 +296,8 @@ void SerialInterface::readData(float deltaTime) { · 295 unmodified lines | |||
| 296 | _estimatedAcceleration = estimatedRotation * _estimatedAcceleration; | 296 | _estimatedAcceleration = estimatedRotation * _estimatedAcceleration; |
| 297 | 297 | ||
| 298 | // Update estimated position and velocity | 298 | // Update estimated position and velocity |
| 299 | float const DECAY_VELOCITY = 0.95f; | 299 | float const DECAY_VELOCITY = 0.975f; |
| 300 | float const DECAY_POSITION = 0.95f; | 300 | float const DECAY_POSITION = 0.975f; |
| 301 | _estimatedVelocity += deltaTime * _estimatedAcceleration; | 301 | _estimatedVelocity += deltaTime * _estimatedAcceleration; |
| 302 | _estimatedPosition += deltaTime * _estimatedVelocity; | 302 | _estimatedPosition += deltaTime * _estimatedVelocity; |
| 303 | _estimatedVelocity *= DECAY_VELOCITY; | 303 | _estimatedVelocity *= DECAY_VELOCITY; |