Means to sense or control vehicle position or attitude with respect to railway