Updated calcVelocity method to handle max-speeds