1. An end-of-train device positioned at about a rear end of a train, the end-of-train device comprising:at least one transceiver configured to:
wirelessly communicate with a rail vehicle that is moving towards the rear end of the train, and
receive signals from a wayside device; and
a processor configured to:
detect, based on the communication with the rail vehicle, a presence of the rail vehicle to prevent a potential collision between the train and the rail vehicle, and
determine, based on the received signals, a location of the rear end of the train relative to the wayside device.