Time to stay at this position before advancing</string>
@ -505,6 +535,12 @@ Time to stay at this position before advancing</string>
@@ -505,6 +535,12 @@ Time to stay at this position before advancing</string>
@ -581,6 +617,12 @@ Time to stay at this position before advancing</string>
@@ -581,6 +617,12 @@ Time to stay at this position before advancing</string>
//create a popup notifying the user about the limitations of offline editing
if(showOfflineWarning==true)
{
QMessageBoxmsgBox;
msgBox.setIcon(QMessageBox::Warning);
msgBox.setText("Offline editor!");
msgBox.setInformativeText("You are using the offline mission editor. Please don't forget to save your mission plan before connecting the UAV, otherwise it will be lost.");
//create a popup notifying the user about the limitations of offline editing
if(showOfflineWarning==true)
{
QMessageBoxmsgBox;
msgBox.setIcon(QMessageBox::Warning);
msgBox.setText("Offline editor!");
msgBox.setInformativeText("You are using the offline mission editor. Please don't forget to save your mission plan before connecting the UAV, otherwise it will be lost.");
m_ui->displayBar->setText(QString("Go to <b>(%1, %2, %3)</b> and wait there for %4 sec; yaw: %5; rad: %6").arg(wp->getX()).arg(wp->getY()).arg(wp->getZ()).arg(wp->getParam1()).arg(wp->getParam4()).arg(wp->getParam2()));
caseMAV_FRAME_GLOBAL_RELATIVE_ALT:
caseMAV_FRAME_GLOBAL:
{
if(wp->getParam1()>0)
{
m_ui->displayBar->setText(QString("Go to <b>(</b>lat <b>%1<sup>o</sup></b>, lon <b>%2<sup>o</sup></b>, alt <b>%3)</b> and wait there for %4 sec; yaw: %5; rad: %6").arg(wp->getX(),0,'f',7).arg(wp->getY(),0,'f',7).arg(wp->getZ(),0,'f',2).arg(wp->getParam1()).arg(wp->getParam4()).arg(wp->getParam2()));
}
else
{
m_ui->displayBar->setText(QString("Go to <b>(</b>lat <b>%1<sup>o</sup></b>,lon <b>%2<sup>o</sup></b>,alt <b>%3)</b>; yaw: %4; rad: %5").arg(wp->getX(),0,'f',7).arg(wp->getY(),0,'f',7).arg(wp->getZ(),0,'f',2).arg(wp->getParam4()).arg(wp->getParam2()));
}
break;
}
else
caseMAV_FRAME_LOCAL_NED:
default:
{
m_ui->displayBar->setText(QString("Go to <b>(%1, %2, %3)</b>; yaw: %4; rad: %5").arg(wp->getX()).arg(wp->getY()).arg(wp->getZ()).arg(wp->getParam4()).arg(wp->getParam2()));
if(wp->getParam1()>0)
{
m_ui->displayBar->setText(QString("Go to <b>(%1, %2, %3)</b> and wait there for %4 sec; yaw: %5; rad: %6").arg(wp->getX(),0,'f',2).arg(wp->getY(),0,'f',2).arg(wp->getZ(),0,'f',2).arg(wp->getParam1()).arg(wp->getParam4()).arg(wp->getParam2()));
}
else
{
m_ui->displayBar->setText(QString("Go to <b>(%1, %2, %3)</b>; yaw: %4; rad: %5").arg(wp->getX(),0,'f',2).arg(wp->getY(),0,'f',2).arg(wp->getZ(),0,'f',2).arg(wp->getParam4()).arg(wp->getParam2()));
}
break;
}
}//end Frame switch
break;
}
caseMAV_CMD_NAV_LAND:
{
m_ui->displayBar->setText(QString("LAND. Go to (%1, %2, %3) and descent; yaw: %4").arg(wp->getX()).arg(wp->getY()).arg(wp->getZ()).arg(wp->getParam4()));
{
switch(wp->getFrame())
{
caseMAV_FRAME_GLOBAL_RELATIVE_ALT:
caseMAV_FRAME_GLOBAL:
{
m_ui->displayBar->setText(QString("LAND. Go to <b>(</b>lat <b>%1<sup>o</sup></b>, lon <b>%2<sup>o</sup></b>, alt <b>%3)</b> and descent; yaw: %4").arg(wp->getX(),0,'f',7).arg(wp->getY(),0,'f',7).arg(wp->getZ(),0,'f',2).arg(wp->getParam4()));
break;
}
caseMAV_FRAME_LOCAL_NED:
default:
{
m_ui->displayBar->setText(QString("LAND. Go to <b>(%1, %2, %3)</b> and descent; yaw: %4").arg(wp->getX(),0,'f',2).arg(wp->getY(),0,'f',2).arg(wp->getZ(),0,'f',2).arg(wp->getParam4()));
break;
}
}//end Frame switch
break;
}
caseMAV_CMD_NAV_TAKEOFF:
{
m_ui->displayBar->setText(QString("TAKEOFF. Go to (%1, %2, %3); yaw: %4").arg(wp->getX()).arg(wp->getY()).arg(wp->getZ()).arg(wp->getParam4()));
{
switch(wp->getFrame())
{
caseMAV_FRAME_GLOBAL_RELATIVE_ALT:
caseMAV_FRAME_GLOBAL:
{
m_ui->displayBar->setText(QString("TAKEOFF. Go to <b>(</b>lat <b>%1<sup>o</sup></b>, lon <b>%2<sup>o</sup></b>, alt <b>%3)</b>; yaw: %4").arg(wp->getX(),0,'f',7).arg(wp->getY(),0,'f',7).arg(wp->getZ(),0,'f',2).arg(wp->getParam4()));
break;
}
caseMAV_FRAME_LOCAL_NED:
default:
{
m_ui->displayBar->setText(QString("TAKEOFF. Go to <b>(%1, %2, %3)</b>; yaw: %4").arg(wp->getX(),0,'f',2).arg(wp->getY(),0,'f',2).arg(wp->getZ(),0,'f',2).arg(wp->getParam4()));