|
@@ -22,6 +22,7 @@ NDSDataProc::NDSDataProc()
|
|
|
//-4 no valid vehicle data.
|
|
|
int NDSDataProc::ProcNDSData(std::string strlinepath,std::string strvehiclepath,OpenDrive * mpxodr,int nleftlanecount,int nrightlanecount)
|
|
|
{
|
|
|
+ double fExtend = 100;
|
|
|
mnProc = 0;
|
|
|
mstrState = "Loading Data.";
|
|
|
QFile xFileline;
|
|
@@ -568,6 +569,8 @@ int NDSDataProc::ProcNDSData(std::string strlinepath,std::string strvehiclepath,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
std::vector<iv::eleabcd> xvectoreleabcd;
|
|
|
bComplete = false;
|
|
|
ncurpos = 0;
|
|
@@ -638,6 +641,7 @@ int NDSDataProc::ProcNDSData(std::string strlinepath,std::string strvehiclepath,
|
|
|
mpxodr->AddRoad("",xvectorvehicle[xvectorvl[nvlsize-1].mvehindex].s, QString::number(gw->CreateRoadID()).toStdString(),"-1");
|
|
|
Road * p = mpxodr->GetRoad(mpxodr->GetRoadCount() - 1);
|
|
|
|
|
|
+
|
|
|
// p->AddElevation(0,xlaneheightcoff.A,xlaneheightcoff.B,xlaneheightcoff.C,xlaneheightcoff.D);
|
|
|
|
|
|
double s = 0;
|
|
@@ -787,6 +791,16 @@ int NDSDataProc::ProcNDSData(std::string strlinepath,std::string strvehiclepath,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if(fExtend>0.1)
|
|
|
+ {
|
|
|
+ double endx,endy,endhdg;
|
|
|
+ p->GetGeometryCoords(p->GetRoadLength()-0.001,endx,endy,endhdg);
|
|
|
+ p->AddGeometryBlock();
|
|
|
+ GeometryBlock * pgeob = p->GetLastAddedGeometryBlock();
|
|
|
+ pgeob->AddGeometryLine(p->GetRoadLength(),endx,endy,endhdg,fExtend);
|
|
|
+ p->SetRoadLength(p->GetRoadLength()+ fExtend);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
mnProc = 100;
|
|
|
mstrState = " Complete. ";
|