Magnets mounted on the track, which are used for the “train protection system” (PZB) and whose exact position is known, are detected during the measurement process to equalize inaccuracies in kilometer measurement. During measurement, vehicle-mounted optical sensors scan both sides of the rail tracks to detect elevated objects. They required a system that filtered out the PZB magnet from the field of observation. The information whether a PZB magnet is in close proximity needed to be available via a digital output. In addition, the status of the digital inputs and outputs had to be transmitted via a network interface to the control system.