If the car heading points towards parking slot, it should not continue.
Instead, the next iteration should be considered.
} else {
continue;
}
- // TODO if cc.h < ps.h --> continue
+ if (::right_side_of_line(
+ this->cc().x(), this->cc().y(),
+ this->cc().x() + cos(this->ps().heading()),
+ this->cc().y() + sin(this->ps().heading()),
+ this->cc().x() + cos(this->cc().h()),
+ this->cc().y() + sin(this->cc().h())
+ ))
+ continue;
} else if (this->ps().right() && this->cc().sp() > 0) {
double ccrx = this->cc().ccr().x();
double ccry = this->cc().ccr().y();