Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about orientation vs direction #9

Open
timvanoostrom opened this issue Sep 20, 2021 · 4 comments
Open

Question about orientation vs direction #9

timvanoostrom opened this issue Sep 20, 2021 · 4 comments

Comments

@timvanoostrom
Copy link

timvanoostrom commented Sep 20, 2021

Hello, I was looking at this commit d2ed8ca#diff-50d858e0985ecc7f60418aaf0cc5ab587f42c2570a884095a9e8ccacd0f6545c and was wondering, what is the reason this was renamed? A loco is more likely to be recognized and addressed by it's driving direction than it's left/right orientation.

@eyip002
Copy link
Member

eyip002 commented Sep 20, 2021

Hi @timvanoostrom, good question. You are right, the BiDiB protocol for MSG_CS_DRIVE messages says that it should be direction with forward and reverse as the possible values.

When we were developing an automatic train driving algorithm, the notion of a train being "forward" or "reverse" seemed ambiguous because it depends on the polarity of the track rails and on the orientation of the train. For example, if the train is "forward", would the train drive forwards to the left or to the right? This was the rationale behind using left and right.

However, now that we've had more experience with our model railway (track plan), we can define forward as the anti-clockwise direction and reverse as the clockwise direction without ambiguity. I will probably revert the name change at some point in the future!

@timvanoostrom
Copy link
Author

Or to avoid ambiguity (a bit), THAT_WAY or THE_OTHER_WAY. Though humans controlling the trains will probably want to use terms like forward, back, reverse, left, right for comprehension and real-world orientation. I think that some loco decoders can broadcast their own direction as source of truth.

@eyip002
Copy link
Member

eyip002 commented Sep 20, 2021

Forward, backward, and reverse aren't always suitable when a train has gone through a reversing loop. In the image below, the train begins in the forward direction, but exits in the reverse direction which can be confusing because the train is physically going "forward". Note that the track polarity gets swapped as the train drives through the reversing loop:

image

Left and right aren't always suitable when people do not realise that a collection of tracks are on opposite sides of a loop:

image

I don't know whether there is a suitable solution to this problem 😄

@timvanoostrom
Copy link
Author

Indeed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants