My system is :
A step by step wheel returns its position each 150ms. I want to pilot an horizontal infinite scroll bar with the wheel. The scroll bar needs velocity as input to move. Moreover the faster the wheel rotates the farthest the scroll must move. That means that if I turn the wheel one turn quickly, the bar must go further if I had turned the wheel one turn slowly.
How can I compute the right velocity to give as input to the scroll bar with sampled position of the wheel ?