A quadrature encoder uses two output channels offset in phase to detect both direction and position with greater precision.
If you want to know when the train is coming, you could pull up a webpage on your phone, or walk all the way to the station ...