]> rtime.felk.cvut.cz Git - hubacji1/bcar.git/blobdiff - incl/bcar.hh
Add inner/outer mirror radius computation
[hubacji1/bcar.git] / incl / bcar.hh
index cf2020fbce5c1d5123a42e6245b2ca14b8024543..d6b764cb64e9814d43e8183e13874f44f0f0e6cb 100644 (file)
@@ -86,6 +86,9 @@ public:
        /*! Return Euclidean distance to `p`. */
        double edist(Point const& p) const;
 
+       /*! Generate output for plotting with gnuplot. */
+       void gen_gnuplot_to(std::ostream& out);
+
        bool operator==(Point const& p);
        friend std::ostream& operator<<(std::ostream& out, Point const& p);
 };
@@ -290,6 +293,20 @@ public:
         */
        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.
@@ -459,6 +476,26 @@ public:
 
        /*! Next car position based on speed `sp` and steer `st`. */
        void next();
+
+       /*! Options for generating output for gnuplot. */
+       class GenPlotOpts {
+       public:
+               static bool LEFT;
+               static bool RIGHT;
+               static bool REAR;
+               static bool FRONT;
+               static bool FRAME;
+               static bool ARROW;
+               static bool CROSS;
+               static bool CAR;
+               static bool LEFT_MIRROR;
+               static bool RIGHT_MIRROR;
+               static bool MIRRORS;
+               static bool ALL;
+       };
+
+       /*! Generate output for plotting with gnuplot. */
+       void gen_gnuplot_to(std::ostream& out, GenPlotOpts const& opts);
 };
 
 } // namespace bcar