mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 12:49:18 +02:00
Merge remote-tracking branch 'refs/remotes/youby/mover_in_c++'
This commit is contained in:
@@ -1109,6 +1109,8 @@ public:
|
||||
double Adhesive(double staticfriction);
|
||||
double TractionForce(double dt);
|
||||
double FrictionForce(double R, int TDamage);
|
||||
double BrakeForceR(double ratio, double velocity);
|
||||
double BrakeForceP(double press, double velocity);
|
||||
double BrakeForce(const TTrackParam &Track);
|
||||
double CouplerForce(int CouplerN, double dt);
|
||||
void CollisionDetect(int CouplerN, double dt);
|
||||
|
||||
@@ -3766,6 +3766,41 @@ void TMoverParameters::ComputeTotalForce(double dt, double dt1, bool FullVer)
|
||||
//};
|
||||
}
|
||||
|
||||
double TMoverParameters::BrakeForceR(double ratio, double velocity)
|
||||
{
|
||||
double press = 0;
|
||||
if (MBPM>2)
|
||||
{
|
||||
press = MaxBrakePress[1] + (MaxBrakePress[3] - MaxBrakePress[1]) * std::min(1.0, (TotalMass - Mass) / (MBPM - Mass));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (MaxBrakePress[1] > 0.1)
|
||||
{
|
||||
press = MaxBrakePress[LoadFlag];
|
||||
}
|
||||
else
|
||||
{
|
||||
press = MaxBrakePress[3];
|
||||
if (DynamicBrakeType == dbrake_automatic)
|
||||
ratio = ratio + (1.5 - ratio)*std::min(1.0, Vel*0.02);
|
||||
if ((BrakeDelayFlag&bdelay_R) && (BrakeMethod%128 != bp_Cosid) && (BrakeMethod % 128 != bp_D1) && (BrakeMethod % 128 != bp_D2) && (Power<1) && (velocity<40))
|
||||
ratio = ratio / 2;
|
||||
}
|
||||
|
||||
}
|
||||
return BrakeForceP(press*ratio, velocity);
|
||||
}
|
||||
|
||||
double TMoverParameters::BrakeForceP(double press, double velocity)
|
||||
{
|
||||
double BFP = 0;
|
||||
double K = (((press * P2FTrans) - BrakeCylSpring) * BrakeCylMult[0] - BrakeSlckAdj) * BrakeRigEff;
|
||||
K *= static_cast<double>(BrakeCylNo) / (NAxles * std::max(1, NBpA));
|
||||
BFP = Hamulec->GetFC(velocity, K)*K*(NAxles * std::max(1, NBpA)) * 1000;
|
||||
return BFP;
|
||||
}
|
||||
|
||||
// *************************************************************************************************
|
||||
// Q: 20160713
|
||||
// oblicza siłę na styku koła i szyny
|
||||
@@ -3809,7 +3844,7 @@ double TMoverParameters::BrakeForce(const TTrackParam &Track)
|
||||
Ntotal = u * BrakeRigEff;
|
||||
else
|
||||
{
|
||||
u = (BrakePress * P2FTrans) * BrakeCylMult[0] - BrakeSlckAdj;
|
||||
u = ((BrakePress * P2FTrans) - BrakeCylSpring) * BrakeCylMult[0] - BrakeSlckAdj;
|
||||
if (u * (2.0 - BrakeRigEff) < Ntotal) // histereza na nacisku klockow
|
||||
Ntotal = u * (2.0 - BrakeRigEff);
|
||||
}
|
||||
@@ -3863,6 +3898,9 @@ double TMoverParameters::FrictionForce(double R, int TDamage)
|
||||
return FF;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// *************************************************************************************************
|
||||
// Q: 20160713
|
||||
// Oblicza przyczepność
|
||||
|
||||
@@ -2372,6 +2372,11 @@ double TFV4aM::GetPos(int i)
|
||||
return pos_table[i];
|
||||
}
|
||||
|
||||
double TFV4aM::GetCP()
|
||||
{
|
||||
return TP;
|
||||
}
|
||||
|
||||
double TFV4aM::LPP_RP(double pos) // cisnienie z zaokraglonej pozycji;
|
||||
{
|
||||
int const i_pos = 2 + std::floor( pos ); // zaokraglone w dol
|
||||
|
||||
@@ -551,7 +551,7 @@ class TFV4aM : public TDriverHandle {
|
||||
void SetReductor(double nAdj)/*override*/;
|
||||
double GetSound(int i)/*override*/;
|
||||
double GetPos(int i)/*override*/;
|
||||
|
||||
double GetCP();
|
||||
inline TFV4aM() :
|
||||
TDriverHandle()
|
||||
{}
|
||||
|
||||
Reference in New Issue
Block a user