Version 2. Updated speed measurement and added skip horn if going very slow through the intersection. This is a visable whistle marker with a horn sequence in AI mode. Long, long, short, extra long. I have added a computational section that adds a delay in the sequencer based on train speed verses speed limit. The trigger radius should be set to 0.5m for precision timing. These distances are based on my configuration. Your actual distances may vary depending on type of computer, speed, etc:
The script has been modified for timing and horn sounds by Chili46.
Thanks to Joe McGuire for the original work and nysvrwx for the script template. Thanks to BNSF50 for the X image. This trigger will appear on the left side of the track.