I have noticed that curve.segments[0].velocity is a string and not a float. Is this wanted?
curve.segments[0].velocity