struct SamplingInfo ParallelSlot::getSamplingInfo()
{
struct SamplingInfo si;
- BicycleCar *CC = new BicycleCar(
- this->fposecenter()->x(),
- this->fposecenter()->y() - 0.01,
- this->slotHeading()
- );
+ BicycleCar *CC = this->getEPC();
si.x = this->slot().bnodes()[0]->x();
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 = CC->diag_radi();
+ si.sh = this->slotHeading();
si.h = this->slotHeading() - acos(EDIST( // TODO generalize
this->slot().bnodes()[0],
this->slot().bnodes()[1]