1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
| class DrivingSimulatorPlatform: """ 驾驶模拟器平台配置 """ def __init__(self, name: str, institution: str): self.name = name self.institution = institution def get_specs(self): """获取模拟器规格""" platforms = { "NADS-1": { "institution": "University of Iowa", "motion_system": "8 DOF (X, Y, Z, Roll, Pitch, Yaw + translation)", "motion_range": "20m x 20m bay", "visual_system": "360° dome, 13 projectors", "resolution": "7680 x 7680 total", "refresh_rate": "60 Hz", "vehicles": "Full cab (car, truck, bus)", "data_collection": ["CAN bus", "Video", "Eye tracking", "Physiological"], "cost_per_hour": "$2,000-5,000", }, "VTI Sim IV": { "institution": "Swedish National Road and Transport Research Institute", "motion_system": "6 DOF hexapod", "visual_system": "180° front + 60° rear", "resolution": "5760 x 2160", "refresh_rate": "60 Hz", "vehicles": "Car cab", "data_collection": ["CAN", "Video", "Eye tracking"], "cost_per_hour": "$1,500-3,000", } } return platforms.get(self.name, {}) def get_validation_scenarios(self): """获取验证场景""" return { "疲劳检测": [ {"场景": "高速公路长距离驾驶", "时长": "90分钟", "诱导方式": "夜间、单调路况"}, {"场景": "微睡眠检测", "时长": "60分钟", "诱导方式": "睡眠剥夺"}, ], "分心检测": [ {"场景": "手机使用", "时长": "15分钟", "诱导方式": "发短信、接电话"}, {"场景": "调节设备", "时长": "10分钟", "诱导方式": "调节收音机、导航"}, ], "酒驾检测": [ {"场景": "不同BAC水平", "时长": "30分钟", "诱导方式": "控制饮酒量"}, ] }
nads1 = DrivingSimulatorPlatform("NADS-1", "University of Iowa") specs = nads1.get_specs() scenarios = nads1.get_validation_scenarios()
print("NADS-1驾驶模拟器规格:") for key, value in specs.items(): print(f" {key}: {value}")
print("\nDMS验证场景:") for category, items in scenarios.items(): print(f"\n{category}:") for item in items: print(f" - {item['场景']}: {item['时长']}, {item['诱导方式']}")
|