|
@@ -84,7 +84,7 @@ static int getmnfac(OpenDrive & mxodr,double & fmovex,double & fmovey)
|
|
|
fymin = std::numeric_limits<double>::max() *(1.0);
|
|
|
fymax = std::numeric_limits<double>::max()*(-1.0);
|
|
|
bool bHaveRealRoad = false;
|
|
|
- for(i=0;i<mxodr.GetRoadCount();i++)
|
|
|
+ for(i=0;i<static_cast<int>( mxodr.GetRoadCount());i++)
|
|
|
{
|
|
|
int j;
|
|
|
|
|
@@ -94,7 +94,7 @@ static int getmnfac(OpenDrive & mxodr,double & fmovex,double & fmovey)
|
|
|
continue;
|
|
|
}
|
|
|
bHaveRealRoad = true;
|
|
|
- for(j=0;j<mxodr.GetRoad(i)->GetGeometryBlockCount();j++)
|
|
|
+ for(j=0; j<static_cast<int>(mxodr.GetRoad(i)->GetGeometryBlockCount());j++)
|
|
|
{
|
|
|
GeometryBlock * pgeob = pRoad->GetGeometryBlock(j);
|
|
|
double x,y;
|
|
@@ -193,6 +193,8 @@ MainWindow::MainWindow(QWidget *parent) :
|
|
|
|
|
|
|
|
|
double fmovex,fmovey;
|
|
|
+ fmovex = 0;
|
|
|
+ fmovey = 0;
|
|
|
mnfac = getmnfac(mxodr,fmovex,fmovey);
|
|
|
|
|
|
mfViewMoveX = mfViewMoveX - fmovex;
|
|
@@ -283,6 +285,7 @@ MainWindow::~MainWindow()
|
|
|
|
|
|
void MainWindow::resizeEvent(QResizeEvent *event)
|
|
|
{
|
|
|
+ (void)event;
|
|
|
qDebug("resize");
|
|
|
QSize sizemain = ui->centralWidget->size();
|
|
|
qDebug("size x = %d y=%d",sizemain.width(),sizemain.height());
|
|
@@ -301,10 +304,10 @@ void MainWindow::AdjustWPos(QSize sizemain)
|
|
|
|
|
|
void MainWindow::ExecPainter()
|
|
|
{
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
QTime x;
|
|
|
+
|
|
|
+
|
|
|
x.start();
|
|
|
// qDebug("painter.");
|
|
|
|
|
@@ -331,11 +334,12 @@ void MainWindow::ExecPainter()
|
|
|
|
|
|
painter->setPen(Qt::blue);
|
|
|
int nfac = mnfac;
|
|
|
- for(i=0;i<mxodr.GetRoadCount();i++)
|
|
|
+ (void)nfac;
|
|
|
+ for(i=0;i<static_cast<int>( mxodr.GetRoadCount());i++)
|
|
|
{
|
|
|
int j;
|
|
|
Road * pRoad = mxodr.GetRoad(i);
|
|
|
- for(j=0;j<mxodr.GetRoad(i)->GetGeometryBlockCount();j++)
|
|
|
+ for(j=0;j<static_cast<int>( mxodr.GetRoad(i)->GetGeometryBlockCount());j++)
|
|
|
{
|
|
|
GeometryBlock * pgeob = pRoad->GetGeometryBlock(j);
|
|
|
double x,y;
|
|
@@ -367,10 +371,15 @@ void MainWindow::ExecPainter()
|
|
|
double sstep = pSpiral->GetLength()/((double)ncount);
|
|
|
int k;
|
|
|
double x0,y0,hdg0,s0;
|
|
|
+ (void)x0;
|
|
|
+ (void)y0;
|
|
|
+ (void)hdg0;
|
|
|
+ (void)s0;
|
|
|
x0 = pSpiral->GetX();
|
|
|
y0 = pSpiral->GetY();
|
|
|
s0 = pSpiral->GetS();
|
|
|
hdg0 = pSpiral->GetHdg() ;
|
|
|
+ (void)x0; (void)y0; (void)hdg0;
|
|
|
painter->setPen(Qt::red);
|
|
|
for(k=0;k<ncount;k++)
|
|
|
{
|
|
@@ -409,6 +418,7 @@ void MainWindow::ExecPainter()
|
|
|
double hdgstep;
|
|
|
double hdg0 = parc->GetHdg();
|
|
|
double hdgnow = parc->GetHdg();
|
|
|
+ (void)hdgnow;
|
|
|
if(ncount > 0) hdgstep= (parc->GetLength()/R)/ncount;
|
|
|
for(k=0;k<ncount;k++)
|
|
|
{
|
|
@@ -443,17 +453,23 @@ void MainWindow::ExecPainter()
|
|
|
B = ppoly->GetB();
|
|
|
C = ppoly->GetC();
|
|
|
D = ppoly->GetD();
|
|
|
+ (void)A;(void)B;(void)C;(void)D;
|
|
|
const double steplim = 0.1;
|
|
|
double du = steplim;
|
|
|
double u = 0;
|
|
|
double v = 0;
|
|
|
double oldx,oldy;
|
|
|
+ (void)du;(void)u;(void)v;(void)oldx;(void)oldy;
|
|
|
oldx = x;
|
|
|
oldy = y;
|
|
|
+ (void)oldx; (void)oldy;
|
|
|
double xstart,ystart;
|
|
|
+ (void)xstart;(void)ystart;
|
|
|
xstart = x;
|
|
|
ystart = y;
|
|
|
+ (void)xstart; (void)ystart;
|
|
|
double hdgstart = ppoly->GetHdg();
|
|
|
+ (void)hdgstart;
|
|
|
double flen = 0;
|
|
|
while(flen < ppoly->GetLength())
|
|
|
{
|
|
@@ -662,6 +678,7 @@ void MainWindow::CreateTab1View(QTabWidget * p)
|
|
|
int nYPos = 30;
|
|
|
|
|
|
int i;
|
|
|
+ (void)i;
|
|
|
|
|
|
int nSpace = mnFontHeight * 65/10;
|
|
|
int nLEWidth = mnFontHeight * 6;
|
|
@@ -681,6 +698,7 @@ void MainWindow::CreateTab1View(QTabWidget * p)
|
|
|
pLabel->setText("Head0");
|
|
|
pLabel->setGeometry(nXPos,nYPos,nLEWidth,nLEHeight);
|
|
|
nXPos = nXPos + nSpace;
|
|
|
+ (void )nXPos;
|
|
|
|
|
|
nXPos = 10;
|
|
|
nYPos = nYPos + mnFontHeight * 2;
|
|
@@ -702,6 +720,7 @@ void MainWindow::CreateTab1View(QTabWidget * p)
|
|
|
pLE->setGeometry(nXPos,nYPos,nLEWidth,nLEHeight);
|
|
|
mpLEHead0 = pLE;
|
|
|
nXPos = nXPos + nSpace;
|
|
|
+ (void)nXPos;
|
|
|
|
|
|
nXPos = 10;
|
|
|
nYPos = nYPos + mnFontHeight * 4;
|
|
@@ -817,6 +836,7 @@ void MainWindow::CreateTab1View(QTabWidget * p)
|
|
|
pLabel->setText("SelLat");
|
|
|
pLabel->setGeometry(nXPos,nYPos,nLEWidth,nLEHeight);
|
|
|
nXPos = nXPos + nSpace;
|
|
|
+ (void)nXPos;
|
|
|
|
|
|
nXPos = 10;
|
|
|
nYPos = nYPos + mnFontHeight * 2;
|
|
@@ -832,6 +852,7 @@ void MainWindow::CreateTab1View(QTabWidget * p)
|
|
|
pLE->setGeometry(nXPos,nYPos,nLEWidth,nLEHeight);
|
|
|
mpLE_SelY = pLE;
|
|
|
nXPos = nXPos + nSpace;
|
|
|
+ (void)nXPos;
|
|
|
|
|
|
|
|
|
|
|
@@ -882,11 +903,13 @@ void MainWindow::CreateTab1View(QTabWidget * p)
|
|
|
pLabel->setText("Cur Lat");
|
|
|
pLabel->setGeometry(nXPos,nYPos,nLEWidth,nLEHeight);
|
|
|
nXPos = nXPos + nSpace;
|
|
|
+ (void)nXPos;
|
|
|
|
|
|
pLabel = new QLabel(pGroup);
|
|
|
pLabel->setText("Cur Heading");
|
|
|
pLabel->setGeometry(nXPos,nYPos,nLEWidth,nLEHeight);
|
|
|
nXPos = nXPos + nSpace;
|
|
|
+ (void)nXPos;
|
|
|
|
|
|
nXPos = 10;
|
|
|
nYPos = nYPos + mnFontHeight * 2;
|
|
@@ -908,6 +931,7 @@ void MainWindow::CreateTab1View(QTabWidget * p)
|
|
|
pLE->setGeometry(nXPos,nYPos,nLEWidth,nLEHeight);
|
|
|
mpLE_CurHeading = pLE;
|
|
|
nXPos = nXPos + nSpace;
|
|
|
+ (void)nXPos;
|
|
|
|
|
|
|
|
|
nXPos = 10;
|
|
@@ -922,6 +946,7 @@ void MainWindow::CreateTab1View(QTabWidget * p)
|
|
|
pLabel->setText("Dst Lat");
|
|
|
pLabel->setGeometry(nXPos,nYPos,nLEWidth,nLEHeight);
|
|
|
nXPos = nXPos + nSpace;
|
|
|
+ (void)nXPos;
|
|
|
|
|
|
|
|
|
nXPos = 10;
|
|
@@ -938,6 +963,7 @@ void MainWindow::CreateTab1View(QTabWidget * p)
|
|
|
pLE->setGeometry(nXPos,nYPos,nLEWidth,nLEHeight);
|
|
|
mpLE_DstLat = pLE;
|
|
|
nXPos = nXPos + nSpace;
|
|
|
+ (void)nXPos;
|
|
|
|
|
|
nXPos = 10;
|
|
|
nYPos = nYPos + mnFontHeight * 2;
|
|
@@ -1483,6 +1509,7 @@ void MainWindow::onClickSetStart()
|
|
|
*/
|
|
|
void MainWindow::UpdateMap(const char * strdata,const unsigned int nSize,const unsigned int index,const QDateTime * dt,const char * strmemname)
|
|
|
{
|
|
|
+ (void)index; (void)dt; (void)strmemname;
|
|
|
|
|
|
// std::cout<<"update map "<<std::endl;
|
|
|
int gpsunitsize = sizeof(iv::GPS_INS);
|
|
@@ -1523,7 +1550,7 @@ void MainWindow::UpdateMap(const char * strdata,const unsigned int nSize,const u
|
|
|
|
|
|
void MainWindow::UpdateGPSIMU(const char * strdata,const unsigned int nSize,const unsigned int index,const QDateTime * dt,const char * strmemname)
|
|
|
{
|
|
|
-
|
|
|
+ (void)index; (void)dt; (void)strmemname;
|
|
|
static int64_t nlastfusionupdate = 0;// std::chrono::system_clock::now().time_since_epoch().count()/1000000 ;
|
|
|
iv::gps::gpsimu xgpsimu;
|
|
|
if(!xgpsimu.ParseFromArray(strdata,nSize))
|