Trajectory Optimisation for a Rail-based Ttrack Surveying System