Any way to auto-move armature forward by length of character's stride?


I have just finished a walk cycle. The character now walks on-the-spot, so now I am coming to moving the character forward by the length of each stride by manually keying the distance the whole armature must move forward by.

However, some of the footsteps might only be half the distance (walking cautiously). Some might be double (sprinting) and some might even be backwards.

Wouldn’t it be great if, either by constraints or drivers or both, we could automatically move the armature by the amount and direction by which the armature moved, by referring to the movement of the foot control bones in relation to the starting positions. I think i could figure this out for the first step, but then how would I ‘add’ another distance when the other foot moves, and then ‘add’ the distance of the first foot moving for the second time, etc,etc we’d need to keep ‘adding’ but never ‘minusing’ when the foot comes forward again. Can anyone this of a way to do this additively?