]> rtime.felk.cvut.cz Git - hubacji1/iamcar2.git/blobdiff - bcar/src/bcar.cc
Add more car dimensions, remove unused comments
[hubacji1/iamcar2.git] / bcar / src / bcar.cc
index 44763d7c5a64fe7d89ee56f67f31e1e7c5f0e75a..a06aeef952755bd30df4efb87ea5cde16978102b 100644 (file)
@@ -145,6 +145,12 @@ Point::edist(Point const& p) const
        return sqrt(pow(p.x() - this->_x, 2.0) + pow(p.y() - this->_y, 2.0));
 }
 
+double
+Point::arc_len(Point const& p, double r)
+{
+       return 2 * r * asin(this->edist(p) / 2 / r);
+}
+
 void
 Point::gen_gnuplot_to(std::ostream& out)
 {
@@ -622,7 +628,7 @@ CarSize::become(std::string const what)
                this->df(this->wb() + 0.936);
                this->len(4.918);
                this->ft(1.680);
-       } else if (what == "chrysler pacifica") {
+       } else if (what == "chrysler pacifica" || what == "jhang2020") {
                this->ctc(9.557619159602458);
                this->wwm(2.297);
                this->w(2.022);
@@ -630,6 +636,22 @@ CarSize::become(std::string const what)
                this->df(4.236);
                this->len(5.171);
                this->ft(1.748);
+       } else if (what == "wang2017") {
+               this->ctc(8.411896337925237);
+               this->wwm(1.81);
+               this->w(1.81);
+               this->wb(2.7); // this is guess
+               this->df(3.7); // this is guess
+               this->len(4.85);
+               this->ft(1.6); // this is guess
+       } else if (what == "opel corsa") {
+               this->ctc(9.900);
+               this->wwm(1.944);
+               this->w(1.532);
+               this->wb(2.343);
+               this->df(3.212);
+               this->len(3.622);
+               this->ft(1.320);
        } else { // renault zoe
                this->ctc(10.802166641822163);
                this->wwm(1.945);