Additional pit position calculations to make it more stable

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@4669 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: e6fa8132acf0c8c188679c83cae3cc92386403a6
Former-commit-id: bf96d9fea88abac73fcd38d84a7d3d1765ab4d23
This commit is contained in:
wdbee 2012-04-07 12:48:22 +00:00
parent 8cf77c900b
commit 8cd4111939

View file

@ -45,8 +45,10 @@ Pit::Pit(const tSituation * s, KDriver * driver, const double pitoffset) {
// Compute pit spline points along the track.
points_[3].x = mypit_->pos.seg->lgfromstart + mypit_->pos.toStart;
points_[2].x = points_[3].x - pitinfo_->len;
points_[4].x = points_[3].x + pitinfo_->len;
// points_[2].x = points_[3].x - pitinfo_->len;
points_[2].x = points_[3].x - 1.5 * pitinfo_->len;
// points_[4].x = points_[3].x + pitinfo_->len;
points_[4].x = points_[3].x + 0.75 * pitinfo_->len;
points_[0].x = pitinfo_->pitEntry->lgfromstart + pitoffset;
points_[1].x = pitinfo_->pitStart->lgfromstart;
// Use nPitSeg to respect the pit speed limit on Migrants e.a.
@ -85,7 +87,7 @@ Pit::Pit(const tSituation * s, KDriver * driver, const double pitoffset) {
} // for i
// points_[3].y = fabs(pitinfo_->driversPits->pos.toMiddle + 1.0) * sign;
points_[3].y = fabs(pitinfo_->driversPits->pos.toMiddle + 2.0) * sign;
points_[3].y = fabs(pitinfo_->driversPits->pos.toMiddle + MIN(3.0,fabs(pitinfo_->width - 0.5))) * sign;
spline_ = new Spline(NPOINTS, points_);
} // if pit not null
} // Pit::Pit