mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-12-02 07:22:42 +01:00
d0b8d689af
The blending of the electrodynamic and the electropneumatic brakes over a consist driven by induction motors (the MED of the .fiz) moves out of TDynamicObject into physics::ConsistBrakeBlending (physics/consistbraking.*). It works on the physics of the vehicles alone, given in the order of the consist; TDynamicObject::distributeInductionBraking() only lists them from the occupied cab, as its loops walked them, and hands the result (the most deceleration of the service braking) to the driver. The state of the blending (the ED demand of the step before, the log of MEDLOGS/, the figures of the debug screen) goes with it. The code moves as it was: its arithmetic, its float and double conversions and the order of its steps are kept. Nothing in the unit tests reached it before, as they don't run TDynamicObject; now that it stands on its own, tests of it are added (test_consist_braking.cpp): the full braking demand over the mass of an Elf, the electropneumatic brake of every car standing, no demand at neutral. The figures of the debug screen start at zero rather than uninitialised for a vehicle that never led a consist.