I needed this feature for my lathe control panel project. The goal is to drive the jog steps size by the rotation speed of the jog wheels.
The algorithm has been validated from 5 Hz to 100 kHz.
Maximum measurement error is 1%. See curves below.
The patch is available here: https://github.com/f1oat/machinekit