ddiff function

Differentiation of tracks