);
std::normal_distribution<float> hdist(
0,
- this->samplingInfo_.h / 3
+ this->samplingInfo_.h
);
if (!this->samplingInfo_.r) {
float dx = BCAR_WIDTH / 2 +
} else {
float dr = std::abs(xdist(this->gen_));
float dh = hdist(this->gen_);
- x += dr * cos(this->samplingInfo_.sh + M_PI / 2 + dh);
- y += dr * sin(this->samplingInfo_.sh + M_PI / 2 + dh);
+ x += dr * cos(
+ this->samplingInfo_.sh +
+ this->samplingInfo_.dh * M_PI / 2 +
+ dh
+ );
+ y += dr * sin(
+ this->samplingInfo_.sh +
+ this->samplingInfo_.dh * M_PI / 2 +
+ dh
+ );
h = -M_PI / 2 + dh;
}
return new RRTNode(
this->slot().bnodes()[1]
) / BCAR_LENGTH);
} else {
- si.h = M_PI /2;
+ si.h = M_PI / 2 / 3;
}
#else
si.x = this->slot().bnodes()[3]->x() - this->slot().bnodes()[0]->x();
si.r = EDIST(this->slot().bnodes()[0], this->slot().bnodes()[3]) / 2;
si.r *= 2;
si.sh = this->slotHeading();
- si.h = M_PI / 2;
+ si.h = M_PI / 4;
#endif
return si;
}