Load engines from TOML and improve scenario audio and carb tuning
Migrate 32 engine definitions into validated startup-loaded TOML files and separate configuration and snapshots from scenario assembly. Add camera-based stereo propagation from shared pipe geometry, preserve exhaust character, tune carburetor mixtures and idle, use ignition cuts for carb engines, and support returning to the scenario menu. Validation: full Windows build and all 14 CTest checks passed.
This commit is contained in:
@@ -5,16 +5,19 @@
|
||||
namespace fluidsim::port {
|
||||
|
||||
// Longitudinal vehicle model and the friction clutch coupling it to the crank.
|
||||
class Vehicle {
|
||||
public:
|
||||
int current_gear{};
|
||||
struct VehicleConfig {
|
||||
std::vector<float> gear_ratios{4.1f, 2.7f, 2.0f, 1.55f, 1.25f, 0.98f};
|
||||
float final_drive_ratio{2.7f}, primary_reduction{1.8f};
|
||||
float clutch_input{1.0f}, clutch_capacity{80.0f}, clutch_engagement_rate{8.0f};
|
||||
float clutch_capacity{80.0f}, clutch_engagement_rate{8.0f};
|
||||
float mass{160.0f}, wheel_radius{0.32f}, rotational_inertia{1.2f};
|
||||
float rolling_resistance{0.015f}, drag_coefficient{0.7f}, frontal_area{0.65f};
|
||||
float air_density{1.225f}, gravity{9.80665f};
|
||||
float speed{}, engagement{};
|
||||
};
|
||||
|
||||
class Vehicle : public VehicleConfig {
|
||||
public:
|
||||
int current_gear{};
|
||||
float clutch_input{1.0f}, speed{}, engagement{};
|
||||
|
||||
float total_gear_ratio() const;
|
||||
float kinetic_energy() const;
|
||||
|
||||
Reference in New Issue
Block a user