U.S. operating rules generally require an engineer to begin blowing for the crossing at least 12 seconds before reaching it. A reasonable setting for crossing gates/lights is 15-20 seconds (depending on how fast the gates operate). Use the posted speed restriction for the spacing: 60 MPH = 88 FPS so 30 is 44 FPS and 15 is 22 FPS. Thus an engineer doing 60 should begin whistling at or before 88X12 or 1056 feet/346 meters/352 yards. If you set the whistle post at the calculated distance it will trigger the whistle 20 meters before.
:B~)