Range-based rail gauge and rail fasteners detection using