Train Length Detection

hidden Gathering votes

Dilemma
I have a series of stations, and one of them is a kind of station bypass/transfer track, but it really isn't a large area meant for long trains. I could put up signs and warn others to not bring a train into that area if they exceed X-length of blocks/cars, but nothing can really stop them if they aren't paying attention or decide to ignore the warning.

Proposed Solution
What I'd like to see is a way to detect the current length of a train in some kind of fashion. I understand that Diesel Engines are capable of pulling 30 cars whilst Steam Engines only 15, and that this would put the Comparator in a stinky position of outputting a signal proportional to the Engine's max capacity instead of a flat number as the output signal strength.

Suggested Implementation method
Add a block that is placed under a track (like the speed adjuster or Station Blocks), and this block will output a redstone signal if any non-engine rolling stock is detected as being on that rail. Let's call it a Car Detector.

Why this would work
Let's say I want to reroute all trains longer than 16 blocks in total length (About 3 cars and an engine, no tenders). Just before the reroute switch track (maybe 3-5 blocks before), I place a Station Block, set to zero, with an observer attached to output a pulse when the engine first rolls over it, and 16 blocks earlier than that would be a Car Detector. Whenever a train longer than 16 blocks rolls over this track, both the Station block and the Car Detector will output a pulse that can be fed into an AND circuit, which in turn would power the track switch to force the train onto the bypass track for being too long.

Other uses
There are other ways this kind of block could be used when coupled with Station/Observers hooked up to other Circuits, such as:

  • detecting when a train has fully cleared a specific part of the track, thereby auto-switching signal boxes when the train has passed the switch intersection (Long pulse Station past the intersection held by Car detector just before/after intersection; once last car stops causing signal, signal pulser stops and can be used in RS/Memory Latch to switch Signal Box(s) to Green on other tracks);
  • detecting train direction in the event the train should be directed to a different line to avoid head-on collisions with other trains (Station followed by Car detection in sequence, separated by 2-3 blocks, sequence detector circuit will determine output in A or B cases, use output as needed to switch track ahead)
  • to detect when a train is running in reverse (similar to direction detection, but sequence detector circuit inputs are reversed in logic).

I'm sure there are many other ingenious uses for such a detector block... I believe it would make a great addition to the Automated use of this Add-on.

kmatsumari

4 days ago

One vote
Categories
TRAINS