struct SamplingInfo ParallelSlot::getSamplingInfo()
{
struct SamplingInfo si;
+#ifdef USE_SLOTPLANNER
BicycleCar *CC = this->getEPC();
si.x = this->slot().bnodes()[0]->x();
si.y = this->slot().bnodes()[0]->y();
si.dy = -1;
si.dh = -1;
}
- si.r = CC->diag_radi();
si.sh = this->slotHeading();
if (this->slotType() == PARALLEL) {
si.h = this->slotHeading() - acos(EDIST(
} else {
si.h = M_PI /2;
}
+#else
+ si.x = this->slot().bnodes()[3]->x() - this->slot().bnodes()[0]->x();
+ si.x /= 2;
+ si.x += this->slot().bnodes()[0]->x();
+ si.y = this->slot().bnodes()[3]->y() - this->slot().bnodes()[0]->y();
+ si.y /= 2;
+ si.y += this->slot().bnodes()[0]->y();
+ if (this->slotSide() == RIGHT) {
+ si.dx = 1;
+ si.dy = 1;
+ si.dh = 1;
+ } else {
+ si.dx = -1;
+ si.dy = -1;
+ si.dh = -1;
+ }
+ si.r = EDIST(this->slot().bnodes()[0], this->slot().bnodes()[3]) / 2;
+ si.r *= 2;
+ si.sh = this->slotHeading();
+ si.h = M_PI / 2;
+#endif
return si;
}