Trajectory generation for automatic emersion/immersion manoeuvers of first generation TEC