How do I calculate how far an object has travelled in a specific time?
Object distance between frames and total movement length can be done. Set frame_start and frame_end variables.
It calculates selected object distance.

import bpy

o = bpy.context.object
total = 0
frame_start = 0
frame_end = 10
bpy.context.scene.frame_set(frame_start)

for frame in range(frame_start+1,frame_end+1):

    loc1 = o.matrix_world.to_translation()
    bpy.context.scene.frame_set(frame)
    loc2 = o.matrix_world.to_translation()
    dist = (loc1-loc2).length
    print ("Frames:", frame-1,"-", frame,"distance:", dist)    
    total += dist

print ("Total distance:", total)