The present invention meets the aforementioned need to a great extent by providing a method and system for automatically activating a train warning device that uses a positioning system such as a, global positioning system (GPS) receiver or an inertial navigation system (INS) to determine the train's position.