From 8cd4111939dd3a1540926b3d71c84cd4c65c5524 Mon Sep 17 00:00:00 2001 From: wdbee Date: Sat, 7 Apr 2012 12:48:22 +0000 Subject: [PATCH] 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 --- src/drivers/kilo2008/pit.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/drivers/kilo2008/pit.cpp b/src/drivers/kilo2008/pit.cpp index 81e5b747..04be6abd 100644 --- a/src/drivers/kilo2008/pit.cpp +++ b/src/drivers/kilo2008/pit.cpp @@ -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