Three use cases
Train protection lookup works by looking up the next signal on your route.
If you are right in front of a signal and can read its name, follow the instructions here You are in front of a signal.
In any other case we'll need to determine your location and travel direction in order to search for the next signal on your route. If You are looking at the back of a signal, we can use the name of the signal to determine your location and travel direction. If you are not near a signal, follow the instructions here You are not near a signal.