Selaa lähdekoodia

change tool/map_lanetoxodr. fix a bug use bezier geofit,change xc1 = x2 * uratio to xc1 = c2base * uratio, now bezier geofit is ok.

yuchuli 3 vuotta sitten
vanhempi
commit
39eeb856df
1 muutettua tiedostoa jossa 4 lisäystä ja 2 poistoa
  1. 4 2
      src/tool/map_lanetoxodr/geofit.cpp

+ 4 - 2
src/tool/map_lanetoxodr/geofit.cpp

@@ -891,9 +891,11 @@ int geofit::CreateBezier(double xstart, double ystart, double hdg_start, double
     if(vratio > 1)vratio = 1;
     if(vratio < 0)vratio = 0;
 
-    yc1 = 0; xc1 = x2 * uratio;
-
     double c2base = sqrt(pow(x2,2) + pow(y2,2));
+//    yc1 = 0; xc1 = x2 * uratio;
+    yc1 = 0; xc1 = c2base * uratio;
+
+
     double xoff = c2base * vratio * cos(hdg2) *(-1);
     double yoff = c2base * vratio * sin(hdg2)* (-1);