mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-24 03:09:18 +02:00
Adding more parameters for blendingE P and ED brakes
This commit is contained in:
committed by
tmj-fstate
parent
64ffdbf690
commit
139b49734e
10
DynObj.cpp
10
DynObj.cpp
@@ -2955,7 +2955,7 @@ bool TDynamicObject::Update(double dt, double dt1)
|
|||||||
p->MoverParameters->BrakeCylNo * p->MoverParameters->BrakeRigEff;
|
p->MoverParameters->BrakeCylNo * p->MoverParameters->BrakeRigEff;
|
||||||
FmaxPN += Nmax * p->MoverParameters->Hamulec->GetFC(
|
FmaxPN += Nmax * p->MoverParameters->Hamulec->GetFC(
|
||||||
Nmax / (p->MoverParameters->NAxles * p->MoverParameters->NBpA),
|
Nmax / (p->MoverParameters->NAxles * p->MoverParameters->NBpA),
|
||||||
p->MoverParameters->Vmax) *
|
p->MoverParameters->MED_Vref) *
|
||||||
1000; // sila hamowania pn
|
1000; // sila hamowania pn
|
||||||
FmaxED += ((p->MoverParameters->Mains) && (p->MoverParameters->ActiveDir != 0) &&
|
FmaxED += ((p->MoverParameters->Mains) && (p->MoverParameters->ActiveDir != 0) &&
|
||||||
(p->MoverParameters->eimc[eimc_p_Fh] * p->MoverParameters->NPoweredAxles >
|
(p->MoverParameters->eimc[eimc_p_Fh] * p->MoverParameters->NPoweredAxles >
|
||||||
@@ -2974,7 +2974,7 @@ bool TDynamicObject::Update(double dt, double dt1)
|
|||||||
osie += p->MoverParameters->NAxles;
|
osie += p->MoverParameters->NAxles;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto const amax = FmaxPN / masamax;
|
auto const amax = std::min(FmaxPN / masamax, MoverParameters->MED_amax);
|
||||||
if ((MoverParameters->Vel < 0.5) && (MoverParameters->BrakePress > 0.2) ||
|
if ((MoverParameters->Vel < 0.5) && (MoverParameters->BrakePress > 0.2) ||
|
||||||
(dDoorMoveL > 0.001) || (dDoorMoveR > 0.001))
|
(dDoorMoveL > 0.001) || (dDoorMoveR > 0.001))
|
||||||
{
|
{
|
||||||
@@ -3044,7 +3044,7 @@ bool TDynamicObject::Update(double dt, double dt1)
|
|||||||
FmaxEP[i] = Nmax *
|
FmaxEP[i] = Nmax *
|
||||||
p->MoverParameters->Hamulec->GetFC(
|
p->MoverParameters->Hamulec->GetFC(
|
||||||
Nmax / (p->MoverParameters->NAxles * p->MoverParameters->NBpA),
|
Nmax / (p->MoverParameters->NAxles * p->MoverParameters->NBpA),
|
||||||
p->MoverParameters->Vmax) *
|
p->MoverParameters->MED_Vref) *
|
||||||
1000; // sila hamowania pn
|
1000; // sila hamowania pn
|
||||||
|
|
||||||
PrzekrF[i] = false;
|
PrzekrF[i] = false;
|
||||||
@@ -3106,10 +3106,10 @@ bool TDynamicObject::Update(double dt, double dt1)
|
|||||||
p->MoverParameters->BrakeCylMult[0] -
|
p->MoverParameters->BrakeCylMult[0] -
|
||||||
p->MoverParameters->BrakeSlckAdj) *
|
p->MoverParameters->BrakeSlckAdj) *
|
||||||
p->MoverParameters->BrakeCylNo * p->MoverParameters->BrakeRigEff;
|
p->MoverParameters->BrakeCylNo * p->MoverParameters->BrakeRigEff;
|
||||||
|
float VelC = ((FrED > 0.1) || p->MoverParameters->MED_EPVC ? clamp(p->MoverParameters->Vel, p->MoverParameters->MED_Vmin, p->MoverParameters->MED_Vmax) : p->MoverParameters->MED_Vref);//korekcja EP po prędkości
|
||||||
float FmaxPoj = Nmax *
|
float FmaxPoj = Nmax *
|
||||||
p->MoverParameters->Hamulec->GetFC(
|
p->MoverParameters->Hamulec->GetFC(
|
||||||
Nmax / (p->MoverParameters->NAxles * p->MoverParameters->NBpA),
|
Nmax / (p->MoverParameters->NAxles * p->MoverParameters->NBpA), VelC) *
|
||||||
p->MoverParameters->Vel) *
|
|
||||||
1000; // sila hamowania pn
|
1000; // sila hamowania pn
|
||||||
p->MoverParameters->LocalBrakePosA = (p->MoverParameters->SlippingWheels ? 0 : FzEP[i] / FmaxPoj);
|
p->MoverParameters->LocalBrakePosA = (p->MoverParameters->SlippingWheels ? 0 : FzEP[i] / FmaxPoj);
|
||||||
if (p->MoverParameters->LocalBrakePosA>0.009)
|
if (p->MoverParameters->LocalBrakePosA>0.009)
|
||||||
|
|||||||
@@ -922,9 +922,16 @@ public:
|
|||||||
double Ftmax = 0.0;
|
double Ftmax = 0.0;
|
||||||
/*- dla lokomotyw z silnikami indukcyjnymi -*/
|
/*- dla lokomotyw z silnikami indukcyjnymi -*/
|
||||||
double eimc[26];
|
double eimc[26];
|
||||||
bool EIMCLogForce; //
|
bool EIMCLogForce = false; //
|
||||||
static std::vector<std::string> const eimc_labels;
|
static std::vector<std::string> const eimc_labels;
|
||||||
double InverterFrequency { 0.0 }; // current frequency of power inverters
|
double InverterFrequency { 0.0 }; // current frequency of power inverters
|
||||||
|
/* -dla pojazdów z blendingiem EP/ED (MED) */
|
||||||
|
double MED_Vmax = 0; // predkosc maksymalna dla obliczen chwilowej sily hamowania EP w MED
|
||||||
|
double MED_Vmin = 0; // predkosc minimalna dla obliczen chwilowej sily hamowania EP w MED
|
||||||
|
double MED_Vref = 0; // predkosc referencyjna dla obliczen dostepnej sily hamowania EP w MED
|
||||||
|
double MED_amax = 9.81; // maksymalne opoznienie hamowania sluzbowego MED
|
||||||
|
bool MED_EPVC = 0; // czy korekcja sily hamowania EP, gdy nie ma dostepnego ED
|
||||||
|
bool MED_Ncor = 0; // czy korekcja sily hamowania z uwzglednieniem nacisku
|
||||||
/*-dla wagonow*/
|
/*-dla wagonow*/
|
||||||
float MaxLoad = 0.f; /*masa w T lub ilosc w sztukach - ladownosc*/
|
float MaxLoad = 0.f; /*masa w T lub ilosc w sztukach - ladownosc*/
|
||||||
std::string LoadAccepted; std::string LoadQuantity; /*co moze byc zaladowane, jednostki miary*/
|
std::string LoadAccepted; std::string LoadQuantity; /*co moze byc zaladowane, jednostki miary*/
|
||||||
@@ -1375,6 +1382,7 @@ private:
|
|||||||
void LoadFIZ_BuffCoupl( std::string const &line, int const Index );
|
void LoadFIZ_BuffCoupl( std::string const &line, int const Index );
|
||||||
void LoadFIZ_TurboPos( std::string const &line );
|
void LoadFIZ_TurboPos( std::string const &line );
|
||||||
void LoadFIZ_Cntrl( std::string const &line );
|
void LoadFIZ_Cntrl( std::string const &line );
|
||||||
|
void LoadFIZ_Blending(std::string const &line);
|
||||||
void LoadFIZ_Light( std::string const &line );
|
void LoadFIZ_Light( std::string const &line );
|
||||||
void LoadFIZ_Security( std::string const &line );
|
void LoadFIZ_Security( std::string const &line );
|
||||||
void LoadFIZ_Clima( std::string const &line );
|
void LoadFIZ_Clima( std::string const &line );
|
||||||
|
|||||||
@@ -7432,6 +7432,14 @@ bool TMoverParameters::LoadFIZ(std::string chkpath)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (issection("Blending:", inputline)) {
|
||||||
|
|
||||||
|
startBPT = true; LISTLINE = 0;
|
||||||
|
fizlines.emplace( "Blending", inputline);
|
||||||
|
LoadFIZ_Blending( inputline );
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if( issection( "Light:", inputline ) ) {
|
if( issection( "Light:", inputline ) ) {
|
||||||
|
|
||||||
startBPT = false;
|
startBPT = false;
|
||||||
@@ -8195,6 +8203,16 @@ void TMoverParameters::LoadFIZ_Cntrl( std::string const &line ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TMoverParameters::LoadFIZ_Blending(std::string const &line) {
|
||||||
|
|
||||||
|
extract_value(MED_Vmax, "MED_Vmax", line, to_string(Vmax));
|
||||||
|
extract_value(MED_Vmin, "MED_Vmin", line, "0");
|
||||||
|
extract_value(MED_Vref, "MED_Vref", line, to_string(Vmax));
|
||||||
|
extract_value(MED_amax, "MED_amax", line, "9.81");
|
||||||
|
MED_EPVC = (extract_value("MED_EPVC", line).find("Yes") != std::string::npos);
|
||||||
|
MED_Ncor = (extract_value("MED_Ncor", line).find("Yes") != std::string::npos);
|
||||||
|
|
||||||
|
}
|
||||||
void TMoverParameters::LoadFIZ_Light( std::string const &line ) {
|
void TMoverParameters::LoadFIZ_Light( std::string const &line ) {
|
||||||
|
|
||||||
LightPowerSource.SourceType = LoadFIZ_SourceDecode( extract_value( "Light", line ) );
|
LightPowerSource.SourceType = LoadFIZ_SourceDecode( extract_value( "Light", line ) );
|
||||||
|
|||||||
Reference in New Issue
Block a user