*/
double orradi() const;
+ /*! \brief Return inner mirror radius.
+ *
+ * The inner mirror radius is the distance from minimum turning radius
+ * circle center to the farther mirror (from the rear axle view).
+ */
+ double imradi() const;
+
+ /*! \brief Return outer mirror radius.
+ *
+ * The outer mirror radius is the distance from minimum turning radius
+ * circle center to the farther mirror (from the rear axle view).
+ */
+ double omradi() const;
+
/*! \brief Return length of perfect parking slot.
*
* The width of the slot is the same as the width of the car.
return sqrt(mtrw2 + dr2);
}
+double
+CarSize::imradi() const
+{
+ auto mtrw2 = pow(this->mtr() - this->wwm() / 2.0, 2.0);
+ auto df2 = pow(this->wb(), 2.0);
+ return sqrt(mtrw2 + df2);
+}
+
+double
+CarSize::omradi() const
+{
+ auto mtrw2 = pow(this->mtr() + this->wwm() / 2.0, 2.0);
+ auto df2 = pow(this->wb(), 2.0);
+ return sqrt(mtrw2 + df2);
+}
+
double
CarSize::perfect_parking_slot_len() const
{
WVPASSEQ_DOUBLE(3.327076, bc.iradi(), 0.00001);
WVPASSEQ_DOUBLE(4.997358, bc.ofradi(), 0.00001);
WVPASSEQ_DOUBLE(4.355868, bc.orradi(), 0.00001);
+ WVPASSEQ_DOUBLE(3.485485, bc.imradi(), 0.00001);
+ WVPASSEQ_DOUBLE(5.199608, bc.omradi(), 0.00001);
bc.h(M_PI / 2.0);
// moving