I'm a bit of a safe rail crossing fanatic: I want to be able to run over a rail junction without getting run over. ^^
Normal signals already output their status; presignals currently don't seem to be able to be connected. On a four-way junction with 8 tracks (4 in, 4 out) I can find out where the train is going by looking at the last (normal) signals, but I don't see where the train is coming from or which path it will take, since I can't connect those presignals. (Which path is relevant if there are multiple trains on the crossing, they might be both turning left or both turning right, only looking at the two ingoing signals and the two outgoing signals doesn't make those two situations distinct.)
Turning presignals red by wire could probably have the same behaviour as with normal signals.
To get as much Information as possible, the output might be a bit different from just passing green/yellow/red/blue to the wire. Or offering two radio buttons to select the desired simple/advanced behavior?
Somewhat advanced and not necessarily intuitive behavior: Look up the status of all paths to any exit (normal) signal, and output the sum of those data signals. (Ignore the configuration of other signals, only the signal status -> data signal mapping of the currently calculated presignal should be used. This avoids changing the presignal output when another signal is reconfigured, or not configured, because it's not attached to any network. Otherwise we could use train tracks as really long wires...)
Every path from an presignal is also included in the path of an earlier presignal, thus we could subtract the output values of two different signals to get the information whether a path is safe.
- Three exit paths, all free, presignal is green:
Output {green: 3}
- - One exit path get's blocked, presignal turns blue:
Output {green: 2, red: 1}
- - A train reserves one of the free paths, blue presignal turns yellow:
Output {green: 1, yellow: 1, red: 1}
- - The train passes the reserved presignal, presignal turns red:
Output {red: 3}
List items as images
This might not work in a roundabout; they sometimes already seem to have difficulties when a presignal-path runs through the same section twice, as in a q-turn on a sailing boat. This case might be difficult to define without knowing the actual implementation.EDIT: "Q-Turn" doesn't seem to be used in English that much, that's what I mean: