|
@@ -479,6 +479,26 @@ void SetPlan(xodrobj xo)
|
|
|
int i;
|
|
|
int nSize = xPlan.size();
|
|
|
|
|
|
+ if(nSize<1)
|
|
|
+ {
|
|
|
+ qDebug("plan fail.");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ PlanPoint xLastPoint = xPlan[nSize -1];
|
|
|
+ for(i=0;i<600;i++)
|
|
|
+ {
|
|
|
+ PlanPoint pp = xLastPoint;
|
|
|
+ double fdis = 0.1*(i+1);
|
|
|
+ pp.mS = pp.mS + i*0.1;
|
|
|
+ pp.x = pp.x + fdis * cos(pp.hdg);
|
|
|
+ pp.y = pp.y + fdis * sin(pp.hdg);
|
|
|
+ pp.nSignal = 23;
|
|
|
+ xPlan.push_back(pp);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ nSize = xPlan.size();
|
|
|
+
|
|
|
std::vector<iv::GPSData> mapdata;
|
|
|
|
|
|
QFile xfile;
|