Text this: An optimal algorithm for estimating angular speed using incremental encoders