getTrackSegments function

An helper function to extract trajectory segments for wind estimation from a track