Refactor auto-pilot code to work per-vessel