fit_tracks function

Integrate track with reference positions