mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-12-02 23:35:28 +01:00
refactor(physics): the demand of the integrated controller is private to the vehicle
eimic_real, the demand of the integrated controller the vehicle goes by with
the speed control counted, which TDynamicObject and the consist braking set
for the vehicle that leads, is private: EimicReal() and SetEimicReal(). The
field of the same name of drivingaid::input stays as it is.
No change in behaviour: the golden traces recorded on dfb43c4f match bit for bit.
This commit is contained in:
@@ -120,7 +120,7 @@ TEST_CASE("6Dg: the shipped definition sets the controller's power demand in ste
|
||||
CAPTURE(i);
|
||||
CHECK(loco->eimic == doctest::Approx(std::min(top, before + 0.05)));
|
||||
CHECK(loco->eimic <= top + 1e-9);
|
||||
CHECK(loco->eimic_real == doctest::Approx(loco->eimic)); // the demand reaching the drive
|
||||
CHECK(loco->EimicReal() == doctest::Approx(loco->eimic)); // the demand reaching the drive
|
||||
changed += std::abs(loco->eimic - before) > 1e-9 ? 1 : 0;
|
||||
}
|
||||
CHECK(changed == steps);
|
||||
@@ -178,9 +178,9 @@ TEST_CASE("6Dg: the diesel-electric drive follows the stepped demand") {
|
||||
loco.step(line);
|
||||
}
|
||||
REQUIRE(loco->eimic == doctest::Approx(0.05 * taps));
|
||||
REQUIRE(loco->eimic_real == doctest::Approx(0.05 * taps));
|
||||
REQUIRE(loco->EimicReal() == doctest::Approx(0.05 * taps));
|
||||
test::drive(test::driving(loco), line, 10.0);
|
||||
readings.emplace_back(loco->eimic_real, loco->enrot, std::abs(loco->Ft()), loco->EnginePower, std::abs(loco.speed()));
|
||||
readings.emplace_back(loco->EimicReal(), loco->enrot, std::abs(loco->Ft()), loco->EnginePower, std::abs(loco.speed()));
|
||||
}
|
||||
// at 0.25, 0.5, 0.75 and 1: the engine at 897, 1198, 1499 and (still running up to) 1800 rpm as the WWList table
|
||||
// gives, about 28, 37, 48 and 59 kN, 87, 261, 445 and 663 kW, 14, 24, 28 and 30 km/h
|
||||
|
||||
Reference in New Issue
Block a user