Git Product home page Git Product logo

Comments (4)

eyip002 avatar eyip002 commented on September 27, 2024

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!

from libbidib.

timvanoostrom avatar timvanoostrom commented on September 27, 2024

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.

from libbidib.

eyip002 avatar eyip002 commented on September 27, 2024

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 😄

from libbidib.

timvanoostrom avatar timvanoostrom commented on September 27, 2024

Indeed.

from libbidib.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.