Use number of pulses per 1km instead of diameter and pulses per 1 revolution for speed sensor. Speed sensor has been tested, it is working correctly