mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 19:49:19 +02:00
Better sound of retarder
This commit is contained in:
@@ -1277,6 +1277,9 @@ public:
|
||||
double hydro_R_FillRateDec = 1.0; /*szybkosc oprozniania sprzegla*/
|
||||
double hydro_R_MinVel = 1.0; /*minimalna predkosc, przy ktorej retarder dziala*/
|
||||
double hydro_R_EngageVel = 1.0; /*minimalna predkosc hamowania, przy ktorej sprzeglo jest wciaz wlaczone*/
|
||||
bool hydro_R_Clutch = false; /*czy retarder ma rozłączalne sprzęgło*/
|
||||
double hydro_R_ClutchSpeed = 10.0; /*szybkość narastania obrotów po włączeniu sprzęgła retardera*/
|
||||
bool hydro_R_WithIndividual = false; /*czy dla autobusów jest to łączone*/
|
||||
/*- dla lokomotyw spalinowo-elektrycznych -*/
|
||||
double AnPos = 0.0; // pozycja sterowania dokladnego (analogowego)
|
||||
bool AnalogCtrl = false; //
|
||||
@@ -1576,6 +1579,7 @@ public:
|
||||
double hydro_R_Torque = 0.0; /*moment*/
|
||||
double hydro_R_Request = 0.0; /*zadanie sily hamowania*/
|
||||
double hydro_R_n = 0.0; /*predkosc obrotowa retardera*/
|
||||
bool hydro_R_ClutchActive = false; /*czy retarder jest napędzany*/
|
||||
|
||||
/*- zmienne dla lokomotyw z silnikami indukcyjnymi -*/
|
||||
double eimic = 0; /*aktualna pozycja zintegrowanego sterowania jazda i hamowaniem*/
|
||||
|
||||
@@ -7822,6 +7822,7 @@ double TMoverParameters::dizel_Momentum(double dizel_fill, double n, double dt)
|
||||
double TMoverParameters::dizel_MomentumRetarder(double n, double dt)
|
||||
{
|
||||
double RetarderRequest = (Mains ? std::max(0.0, -eimic_real) : 0);
|
||||
if (hydro_R_WithIndividual) RetarderRequest = LocalBrakeRatio();
|
||||
if (Vel < hydro_R_MinVel)
|
||||
RetarderRequest = 0;
|
||||
if ((hydro_R_Placement == 2) && (enrot < dizel_nmin))
|
||||
@@ -7829,7 +7830,21 @@ double TMoverParameters::dizel_MomentumRetarder(double n, double dt)
|
||||
RetarderRequest = 0;
|
||||
}
|
||||
|
||||
hydro_R_n = n * 60;
|
||||
hydro_R_ClutchActive = (!hydro_R_Clutch) || (RetarderRequest > 0);
|
||||
if ((!hydro_R_Clutch)
|
||||
|| ((hydro_R_ClutchActive) && (hydro_R_ClutchSpeed == 0)))
|
||||
{
|
||||
hydro_R_n = n * 60;
|
||||
}
|
||||
else if (hydro_R_ClutchActive)
|
||||
{
|
||||
hydro_R_n = sign(n)*std::min(std::abs(hydro_R_n + hydro_R_ClutchSpeed * dt), std::abs(n * 60));
|
||||
}
|
||||
else
|
||||
{
|
||||
hydro_R_n = 0;
|
||||
}
|
||||
n = hydro_R_n / 60.f;
|
||||
|
||||
if (hydro_R_Fill < RetarderRequest) //gdy zadane hamowanie
|
||||
{
|
||||
@@ -7841,7 +7856,7 @@ double TMoverParameters::dizel_MomentumRetarder(double n, double dt)
|
||||
}
|
||||
|
||||
double Moment = hydro_R_MaxTorque;
|
||||
double pwr = Moment * n * M_PI * 2 * 0.001;
|
||||
double pwr = Moment * std::abs(n) * M_PI * 2 * 0.001;
|
||||
if (pwr > hydro_R_MaxPower)
|
||||
Moment = Moment * hydro_R_MaxPower / pwr;
|
||||
double moment_in = n*n*hydro_R_TorqueInIn;
|
||||
@@ -10630,6 +10645,9 @@ void TMoverParameters::LoadFIZ_Engine( std::string const &Input ) {
|
||||
extract_value(hydro_R_FillRateDec, "R_FRD", Input, "");
|
||||
extract_value(hydro_R_MinVel, "R_MinVel", Input, "");
|
||||
extract_value(hydro_R_EngageVel, "R_EngageVel", Input, "");
|
||||
extract_value(hydro_R_Clutch, "R_IsClutch", Input, "");
|
||||
extract_value(hydro_R_ClutchSpeed, "R_ClutchSpeed", Input, "");
|
||||
extract_value(hydro_R_WithIndividual, "R_WithIndividual", Input, "");
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user