the rear (from the rear axle view) part of the car.
*/
double orradi() const;
+ /*! \brief Return length of perfect parking slot.
+
+ The width of the slot is the same as the width of the
+ car.
+ */
+ double perfect_parking_slot_len() const;
/*! \brief Set maximum steering angle.
*/
void set_max_steer();
return sqrt(pow(this->mtr() + this->w() / 2, 2) + pow(this->dr(), 2));
}
+double BicycleCar::perfect_parking_slot_len() const
+{
+ // see Simon R. Blackburn *The Geometry of Perfect Parking*
+ // see https://www.ma.rhul.ac.uk/SRBparking
+ double r = this->ctc() / 2;
+ double l = this->wb();
+ double k = this->df() - this->wb();
+ double w = this->w();
+ return
+ this->l()
+ + sqrt(
+ (r*r - l*l)
+ + pow(l + k, 2)
+ - pow(sqrt(r*r - l*l) - w, 2)
+ )
+ - l
+ - k
+ ;
+}
+
void BicycleCar::set_max_steer()
{
this->st(asin(this->wb() / (10.82 / 2)));