Increased BrakeAccThreshold of DMUs, fix for AI using MHZ_K5P handle

This commit is contained in:
Królik Uszasty
2019-04-14 16:32:35 +02:00
parent 18b56c11ba
commit a0a9330734
2 changed files with 5 additions and 3 deletions

View File

@@ -2010,7 +2010,7 @@ void TController::AutoRewident()
fBrakeReaction = 0.25;
}
else if( mvOccupied->TrainType == dt_DMU ) {
fNominalAccThreshold = std::max( -0.45, -fBrake_a0[ BrakeAccTableSize ] - 8 * fBrake_a1[ BrakeAccTableSize ] );
fNominalAccThreshold = std::max( -0.65, -fBrake_a0[ BrakeAccTableSize ] - 8 * fBrake_a1[ BrakeAccTableSize ] );
fBrakeReaction = 0.25;
}
else if (ustaw > 16) {
@@ -2362,8 +2362,8 @@ double TController::BrakeAccFactor() const
|| ( mvOccupied->Vel > VelDesired + fVelPlus ) ) ) {
Factor += ( fBrakeReaction * ( /*mvOccupied->BrakeCtrlPosR*/BrakeCtrlPosition < 0.5 ? 1.5 : 1 ) ) * mvOccupied->Vel / ( std::max( 0.0, ActualProximityDist ) + 1 ) * ( ( AccDesired - AbsAccS_pub ) / fAccThreshold );
}
if (mvOccupied->TrainType == dt_DMU && mvOccupied->Vel > 40)
Factor *= 1 + (1600 / mvOccupied->Vel / mvOccupied->Vel);
if (mvOccupied->TrainType == dt_DMU && mvOccupied->Vel > 40 && VelNext<40)
Factor *= 1 + ( (1600 - VelNext * VelNext) / (mvOccupied->Vel * mvOccupied->Vel) );
return Factor;
}

View File

@@ -2773,6 +2773,8 @@ double TMHZ_K5P::GetPF(double i_bcp, double PP, double HP, double dt, double ep)
void TMHZ_K5P::Init(double Press)
{
CP = Press;
Time = true;
TimeEP = true;
}
void TMHZ_K5P::SetReductor(double nAdj)