Level crossing safety: Radar used to detect obstacles
The Office of Rail Regulation has announced how it is going to spend £21 billion on the rail network over the next five years.
Targets include an improvement in punctuality and more money for upgrading dangerous level crossings.
One crossing which has already been upgraded, in Ormskirk, Lancashire, was the site of a near miss in 2012, when the crossing was manned.
Now a new obstacle detection system has been installed which uses radar.
The BBC's Jeremy Cooke spoke to Martin Gallagher, head of level crossings for Network Rail, to find out how it worked.