18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-02 21:15:20 +01:00
Commit Graph

3 Commits

Author SHA1 Message Date
Hirek 5a537e69f2 refactor(physics): McZapkie/ becomes physics/, its files get English names
The folder of the vehicle physics was named after the author of its first
version (2001). Its name now says what it holds, and so do its files:

  McZapkie/MOVER.h, Mover.cpp       -> physics/mover.h, mover.cpp
  McZapkie/hamulce.h, hamulce.cpp   -> physics/brakes.h, brakes.cpp
  McZapkie/Oerlikon_ESt.h, .cpp     -> physics/oerlikonest.h, .cpp
  friction, collision, couplerphysics, derailment: same names in physics/

Every include names the folder ("physics/mover.h"); the McZapkie include
directory is gone from CMakeLists.txt. The comments and documents that
named the old paths name the new ones. The credits to McZapkie stay.

Renames only: git sees every file as renamed (98-100%). 1142/1142 tests,
golden traces exact against staging 62f7a29b.
2026-11-27 17:11:46 +01:00
jerrrrycho edc961486f fix(physics): the diesel-electric dynamic brake lets the vehicle come to rest without a fade
With EDBrakeV0 = EDBrakeV1 = 0 the whole force acted down to the stop and turned round each time
the speed crossed zero; in FTrain it never let the stop of ComputeMovement() catch it, so the
speed swung round zero. Near the stop the force is now no more than what stops the vehicle within
the step.
2026-11-17 09:52:07 +01:00
jerrrrycho 88383c0903 feat: dynamic brake of the diesel-electric vehicles (#82)
The drive of a diesel-electric vehicle is computed from the power of its
generator, not from a circuit, so neither the EP09's resistor brake
(Current()) nor the inverter model of the induction motors has anything to
work on, and a negative setting of the integrated controller did nothing:
the BR285's TRAXX controller has its braking range (EB+, EB, EB-) and brakes
nothing.

A vehicle opts in with keys of its Engine section, read only for the
diesel-electric ones; without EDBrake nothing changes:

- EDBrake=Controller: the negative range of the integrated controller
  (EIMCtrlType > 0) sets the effort, which goes to the vehicles in multiple
  with the EIMIC command; EDBrake=Lever: a lever of its own, the one of
  SplitEDPneumaticBrake (DBPN steps, the dynamicbrakecontroller commands),
  working with the master controller at zero.
- EDBrakeFmax [kN], EDBrakePmax [kW]: the force at the wheels, limited by
  the power of the resistors at speed; EDBrakeV0, EDBrakeV1 [km/h]: no force
  below V0, the whole above V1. An inverter's brake fades only at the stop,
  a resistor brake of direct current motors grows with the speed from 0.
- EDBrakeRate [1/s]: how fast the effort follows (0.5).
- EDBrakeBlending=Yes: the locomotive's train brake lets off by the share of
  the force (Hamulec->SetED, LSt and EStED valves).

The brake works while the engine runs, with the direction set, the
overload relay closed, the wheels rolling and no power asked for. Its force
takes the place of the drive's in TractionForce(), the ammeter shows the
motors' current, DynamicBrakeFlag lights the dynamic brake lamp.

The traces of all 615 test cases recorded before the change compare bit for
bit after it (EU07_UNIT_TESTS_GOLDEN_EXACT=1).
2026-11-16 22:45:06 +01:00