29/10/2019
Dependencies: Encoder_Nucleo_16_bits
Diff: PID.cpp
- Revision:
- 13:0227a21c181a
- Parent:
- 12:13f42fe66fb1
- Child:
- 15:5dfa92698884
--- a/PID.cpp Fri Oct 25 08:05:11 2019 +0000 +++ b/PID.cpp Fri Oct 25 08:12:41 2019 +0000 @@ -75,8 +75,8 @@ // As we use mm/s for speed unit and we convert all mesure to this unit // Converting step to millimeters - _measDistG = ((double)PositionG - (double)oldPositionG) / 63.662; - _measDistD = ((double)PositionD - (double)oldPositionD) / 63.662; + _measDistG = 20.0*(((double)PositionG - (double)oldPositionG) / 63.662)/23.0; + _measDistD = 20.0*(((double)PositionD - (double)oldPositionD) / 63.662)/23.0; // Converting position to speed _measSpeedG = 1000.0 * _measDistG;