A safety system for zero velocity detection and operator alertness monitoring in rolling stock