neraly complete Model of Driving done, but needs tweaking

This commit is contained in:
2025-09-05 14:54:29 +02:00
parent 0276a3fb3c
commit 6108413d7e
12 changed files with 1469 additions and 726 deletions

100
default.json Normal file
View File

@@ -0,0 +1,100 @@
{
"app": {
"can": { "interface": "vcan0", "resp_id": "0x7E8", "timeout_ms": 200 },
"ui": {
"font_family": "DejaVu Sans",
"font_size": 10,
"window": { "width": 1100, "height": 720 }
},
"logging": { "level": "INFO", "file": "logs/app.log" }
},
"sim": {
"engine": {
"idle_rpm": 1200,
"max_rpm": 9000,
"rpm_rise_per_s": 4000,
"rpm_fall_per_s": 3000,
"throttle_curve": "linear",
"starter_rpm_nominal": 250.0,
"starter_voltage_min": 10.5,
"start_rpm_threshold": 210.0,
"stall_rpm": 500.0,
"coolant_ambient_c": 20.0,
"idle_cold_gain_per_deg": 3.0,
"idle_cold_gain_max": 500.0,
"oil_pressure_idle_bar": 1.2,
"oil_pressure_slope_bar_per_krpm": 0.8,
"oil_pressure_off_floor_bar": 0.2,
"engine_power_kw": 40.0,
"torque_peak_rpm": 5500.0,
"throttle_plate_idle_min_pct": 6.0,
"throttle_plate_overrun_pct": 2.0,
"throttle_plate_tau_s": 0.08,
"torque_ctrl_kp": 1.2,
"torque_ctrl_ki": 0.6,
"rpm_jitter_idle_amp_rpm": 12.0,
"rpm_jitter_high_amp_rpm": 4.0,
"rpm_jitter_tau_s": 0.2,
"rpm_jitter_off_threshold_rpm": 250.0,
"throttle_pedal_pct": 0.0
},
"cooling": {
"thermostat_open_c": 85.0,
"thermostat_full_c": 100.0,
"rad_base_u_w_per_k": 220.0,
"ram_air_gain_per_kmh": 7.0,
"fan1_on_c": 98.0,
"fan1_off_c": 95.0,
"fan1_power_w": 120.0,
"fan1_airflow_gain": 300.0,
"fan2_on_c": 104.0,
"fan2_off_c": 100.0,
"fan2_power_w": 180.0,
"fan2_airflow_gain": 500.0,
"coolant_thermal_cap_j_per_k": 120000.0,
"oil_thermal_cap_j_per_k": 150000.0,
"oil_coolant_u_w_per_k": 80.0,
"oil_to_amb_u_w_per_k": 25.0,
"engine_heat_frac_to_coolant": 0.8
},
"dtc": {
"P0300": false,
"P0130": false,
"C0035": false,
"U0121": false
},
"vehicle": {
"type": "motorcycle",
"mass_kg": 210.0,
"abs": true,
"tcs": false
},
"electrical": {
"battery_capacity_ah": 8.0,
"battery_r_int_ohm": 0.02,
"alternator_reg_v": 14.2,
"alternator_rated_a": 20.0,
"alt_cut_in_rpm": 1500,
"alt_full_rpm": 4000
},
"gearbox": {
"num_gears": 6,
"reverse": false,
"kmh_per_krpm": [0.0, 12.0, 19.0, 25.0, 32.0, 38.0, 45.0]
}
}
}