瀏覽代碼

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 年之前
父節點
當前提交
39eeb856df
共有 1 個文件被更改,包括 4 次插入2 次删除
  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);