18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-20 18:35:00 +01:00

feat(physics): physical coupler model with slack, hysteresis and breaking

This commit is contained in:
2026-11-11 01:43:46 +01:00
parent 39e855d3a5
commit c85aab4f3f
8 changed files with 1168 additions and 41 deletions

View File

@@ -819,6 +819,12 @@ bool global_settings::ConfigParseSimulation(cParser& Parser, const std::string&
return true;
}
if (token == "couplerphysics")
{
ParseOne(Parser, coupler_physics, 1);
return true;
}
if (token == "controlcoupling.enginecheck")
{
ParseOne(Parser, control_coupling_engine_check, 1);
@@ -1707,6 +1713,7 @@ global_settings::export_as_text( std::ostream &Output ) const {
export_as_text( Output, "scenario.weather.temperature", AirTemperature );
export_as_text( Output, "ai.trainman", AITrainman );
export_as_text( Output, "controlcoupling.enginecheck", control_coupling_engine_check );
export_as_text( Output, "couplerphysics", coupler_physics );
export_as_text( Output, "scalespeculars", ScaleSpecularValues );
export_as_text( Output, "gfxrenderer", GfxRenderer );
export_as_text( Output, "shadows", RenderShadows );

View File

@@ -275,6 +275,9 @@ struct global_settings {
bool captureonstart = true;
bool render_cab = true;
bool crash_damage = true;
// the physical model of the couplings (McZapkie/couplerphysics.h): progressive buffers and draw gear with hysteresis,
// the play of the coupling, its yield and breaking; the legacy model of TMoverParameters::CouplerForce() without it
bool coupler_physics = false;
bool control_coupling_engine_check = true; // no multiple-unit control between electric and diesel traction vehicles (eu07/maszyna#520)
bool gui_defaultwindows = true;
bool gui_showtranscripts = true;