|
@@ -55,6 +55,13 @@ int trace2vectormap::convert()
|
|
|
double flon = QString(badata[1]).toDouble();
|
|
|
double flat = QString(badata[2]).toDouble();
|
|
|
double fheading = QString(badata[5]).toDouble();
|
|
|
+ int nspeedmode = QString(badata[7]).toInt();
|
|
|
+ double fspeed = xparam.fVelLim;
|
|
|
+ std::map<int,double>::iterator it = xparam.mapmodevel.find(nspeedmode);
|
|
|
+ if(it !=xparam.mapmodevel.end())
|
|
|
+ {
|
|
|
+ fspeed = it->second;
|
|
|
+ }
|
|
|
// std::cout<<"lat: "<<flat<<" lon:"<<flon<<" heading:"<<fheading<<std::endl;
|
|
|
double x,y,fyaw;
|
|
|
llh2xyy(flon,flat,fheading,x,y,fyaw,xparam.fLon0,xparam.fLat0);
|
|
@@ -64,6 +71,7 @@ int trace2vectormap::convert()
|
|
|
xpoint.ly = x;
|
|
|
xpoint.fyaw = fyaw;
|
|
|
xpoint.h = 0;
|
|
|
+ xpoint.fspeed = fspeed;
|
|
|
npid++;
|
|
|
xvectorpoint.push_back(xpoint);
|
|
|
}
|
|
@@ -75,6 +83,7 @@ int trace2vectormap::convert()
|
|
|
iv::vectormap::node xnode;
|
|
|
xnode.nid = i;
|
|
|
xnode.pid = xvectorpoint[i].pid;
|
|
|
+ xnode.fspeed = xvectorpoint[i].fspeed;
|
|
|
xvectornode.push_back(xnode);
|
|
|
}
|
|
|
|
|
@@ -91,6 +100,7 @@ int trace2vectormap::convert()
|
|
|
xlane.lno = xparam.Lno;
|
|
|
xlane.blid = 0;
|
|
|
xlane.flid = 0;
|
|
|
+ xlane.fspeed = xvectornode[i-1].fspeed;
|
|
|
xvectorlane.push_back(xlane);
|
|
|
iv::vectormap::dtlane xdtlane;
|
|
|
xdtlane.did = i;
|
|
@@ -267,13 +277,14 @@ int trace2vectormap::convert()
|
|
|
|
|
|
for(i=0;i<(int)xvectorlane.size();i++)
|
|
|
{
|
|
|
+// std::map<int,double>::iterator it = xparam.mapmodevel.find()
|
|
|
snprintf(strline,1000,"%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%f,%f,%d,%d\n",
|
|
|
xvectorlane[i].lnid,xvectorlane[i].did,xvectorlane[i].blid,
|
|
|
xvectorlane[i].flid,xvectorlane[i].bnid,xvectorlane[i].fnid,
|
|
|
0,0,0,0,
|
|
|
0,0,0,0,
|
|
|
1,xvectorlane[i].lcnt,xvectorlane[i].lno,0,
|
|
|
- xparam.fVelLim,xparam.fVelLim,0,0);
|
|
|
+ xvectorlane[i].fspeed/3.6,xvectorlane[i].fspeed/3.6,0,0);
|
|
|
xFileLane.write(strline);
|
|
|
}
|
|
|
xFileLane.close();
|
|
@@ -301,3 +312,5 @@ int trace2vectormap::convert()
|
|
|
|
|
|
return 0;
|
|
|
}
|
|
|
+
|
|
|
+
|