mt_derivatives function

Calculate distance, velocity, and acceleration.