Skip to content

Continuation of smarter routing Phase 1 - #106

Draft
AMacro wants to merge 9 commits into
Erabior:devfrom
AMacro:dev
Draft

Continuation of smarter routing Phase 1#106
AMacro wants to merge 9 commits into
Erabior:devfrom
AMacro:dev

Conversation

@AMacro

@AMacro AMacro commented Feb 12, 2024

Copy link
Copy Markdown

In this continuation of phase 1, I am attempting the following:

  • using the game's in built Track.RouteSearch.FindRoute() to find a valid path through a set of switches.
  • detecting if an upcomming switch is in the correct position e.g. if heading from Hemingway to Cochran via Alarka Jct, the route will know the switch state must be set to reversed. As the leading end of the locomotive approaches the switch (400m or less) it will check if the switch is set to reverse, and if not, it will stop the locomotive and issue a console message that the switch needs to be changed

Currently a draft PR as the code is still in development

Finds switches between current location and end of line/branch
Finds intersection of main line rout with second platform at next station
Need to determine distance without absolute
Factors in all switches within 400m
More testing required
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant