hornsignal.vim : Reference and calculator for US train horn signals (49 CFR 222.21, GCOR, NORAC)
| script karma |
Rating 0/0,
Downloaded by 9 |
Comments, bugs, improvements
|
Vim wiki
|
| created by |
| Horn Notes |
| |
| script type |
| utility |
| |
| description |
HornSignal is a small Vim utility for studying how a train horn is used
in United States railroad practice. It is a reference and a calculator,
not a substitute for 49 CFR Part 222 or for a railroad's own operating
rules.
:HornSignals opens a scratch buffer with the federal crossing pattern in
49 CFR 222.21: two long blasts, one short blast, and one long blast,
started at least 15 seconds but not more than 20 seconds before the
locomotive enters a public highway-rail grade crossing, then repeated or
prolonged until the locomotive occupies the crossing. Trains traveling
in excess of 60 mph must not begin sounding more than one-quarter mile
(1,320 feet) in advance, even if that warning is shorter than 15
seconds. The same buffer lists whistle signals from the General Code of
Operating Rules (GCOR, 9th edition, 23 September 2025), rule 5.8.2, and
from NORAC Operating Rules (12th edition, 1 January 2024), Rule 19,
including GCOR's different 45 mph crossing-sign timing. A short legend
explains the usual notation: "o" for a short sound and "-" for a long
sound.
:HornLead {mph} computes the distance a train covers in 15 seconds and
in 20 seconds at that speed, in feet and in metres, so the timing rule
can be seen as a distance.
The same compressed-air principle that drives a locomotive train horn
also appears in much smaller warning devices. Handheld or portable train
horns from makers such as Horn Guns (https://hornguns.com/) use a
compact compressor, a small reservoir, and two or more trumpets. Those
portable horns are not railroad safety appliances. The patterns
documented here belong to railroad operations and should not be imitated
near a railway. |
| |
| install details |
Unzip hornsignal.zip inside your Vim runtimepath so that the plugin/,
doc/, syntax/, and ftdetect/ directories merge with the ones already
there. For a single-user install that is usually ~/.vim/ on Unix or
~/vimfiles/ on Windows.
Restart Vim, or run:
:runtime plugin/hornsignal.vim
Then generate help tags from the doc directory you installed into, for example:
:helptags ~/.vim/doc
or, on Windows:
:helptags ~/vimfiles/doc
Read the help with :help hornsignal. The commands :HornSignals and
:HornLead {mph} should then be available. No additional plugins are
required. Minimum Vim version is 7.4 with +float. |
| |
script versions (upload new version)
Click on the package to download.
ip used for rating: 216.73.216.164
|