|
|
|
@ -47,12 +47,11 @@ void SlugsDataSensorView::loadParameters()
@@ -47,12 +47,11 @@ void SlugsDataSensorView::loadParameters()
|
|
|
|
|
Axb = 0; |
|
|
|
|
Ayb = 0; |
|
|
|
|
Azb = 0; |
|
|
|
|
TimeActualAcel = 0; |
|
|
|
|
//Gyro
|
|
|
|
|
Gxb = 0; |
|
|
|
|
Gyb = 0; |
|
|
|
|
Gzb = 0; |
|
|
|
|
TimeActualGyro = 0; |
|
|
|
|
TimeActualBias = 0; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -68,7 +67,7 @@ void SlugsDataSensorView::addUAS(UASInterface* uas)
@@ -68,7 +67,7 @@ void SlugsDataSensorView::addUAS(UASInterface* uas)
|
|
|
|
|
connect(uas, SIGNAL(localPositionChanged(UASInterface*,double,double,double,quint64)), this, SLOT(slugLocalPositionChange(UASInterface*,double,double,double,quint64))); |
|
|
|
|
connect(uas, SIGNAL(speedChanged(UASInterface*,double,double,double,quint64)), this, SLOT(slugSpeedLocalPositionChanged(UASInterface*,double,double,double,quint64))); |
|
|
|
|
connect(uas, SIGNAL(attitudeChanged(UASInterface*,double,double,double,quint64)), this, SLOT(slugAttitudeChanged(UASInterface*,double,double,double,quint64))); |
|
|
|
|
connect(uas, SIGNAL(sensorBiasAcelerometerChanged(UASInterface*,double,double,double,quint64)), this, SLOT(slugsSensorBiasAcelerometerChanged(UASInterface*,double,double,double,quint64))); |
|
|
|
|
connect(uas, SIGNAL(slugsSensorBias(UASInterface*,double,double,double,double,double,double,quint64)), this, SLOT(slugsSensorBiasAcelerometerChanged(UASInterface*,double,double,double,quint64))); |
|
|
|
|
|
|
|
|
|
// Set this UAS as active if it is the first one
|
|
|
|
|
if(activeUAS == 0) |
|
|
|
@ -81,35 +80,48 @@ void SlugsDataSensorView::addUAS(UASInterface* uas)
@@ -81,35 +80,48 @@ void SlugsDataSensorView::addUAS(UASInterface* uas)
|
|
|
|
|
void SlugsDataSensorView::setActiveUAS(UASInterface* uas) |
|
|
|
|
{ |
|
|
|
|
activeUAS = uas; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void SlugsDataSensorView::refresh() |
|
|
|
|
{ |
|
|
|
|
if(activeUAS) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
//refresh UI position data
|
|
|
|
|
ui->ed_x->setPlainText(QString::number(Xpos, 'f', 4)); |
|
|
|
|
ui->ed_y->setPlainText(QString::number(Ypos, 'f', 4)); |
|
|
|
|
ui->ed_z->setPlainText(QString::number(Zpos, 'f', 4)); |
|
|
|
|
|
|
|
|
|
//refresh UI speed position data
|
|
|
|
|
ui->ed_vx->setPlainText(QString::number(VXpos,'f',4)); |
|
|
|
|
ui->ed_vy->setPlainText(QString::number(VYpos,'f',4)); |
|
|
|
|
ui->ed_vz->setPlainText(QString::number(VZpos,'f',4)); |
|
|
|
|
|
|
|
|
|
//refresh UI attitude data
|
|
|
|
|
ui->m_SlugAttitudeRoll_plainTextEdit->setPlainText(QString::number(roll,'f',4)); |
|
|
|
|
ui->m_SlugAttitudePitch_plainTextEdit->setPlainText(QString::number(pitch,'f',4)); |
|
|
|
|
ui->m_SlugAttitudeYaw_plainTextEdit->setPlainText(QString::number(yaw,'f',4)); |
|
|
|
|
//refresh UI position data
|
|
|
|
|
ui->ed_x->setPlainText(QString::number(Xpos, 'f', 4)); |
|
|
|
|
ui->ed_y->setPlainText(QString::number(Ypos, 'f', 4)); |
|
|
|
|
ui->ed_z->setPlainText(QString::number(Zpos, 'f', 4)); |
|
|
|
|
|
|
|
|
|
//refresh UI speed position data
|
|
|
|
|
ui->ed_vx->setPlainText(QString::number(VXpos,'f',4)); |
|
|
|
|
ui->ed_vy->setPlainText(QString::number(VYpos,'f',4)); |
|
|
|
|
ui->ed_vz->setPlainText(QString::number(VZpos,'f',4)); |
|
|
|
|
|
|
|
|
|
//refresh UI attitude data
|
|
|
|
|
ui->m_SlugAttitudeRoll_plainTextEdit->setPlainText(QString::number(roll,'f',4)); |
|
|
|
|
ui->m_SlugAttitudePitch_plainTextEdit->setPlainText(QString::number(pitch,'f',4)); |
|
|
|
|
ui->m_SlugAttitudeYaw_plainTextEdit->setPlainText(QString::number(yaw,'f',4)); |
|
|
|
|
|
|
|
|
|
//refresh UI sensor bias acelerometer data
|
|
|
|
|
ui->m_SlugsAxBiases_textEdit->setText(QString::number(Axb, 'f', 4)); |
|
|
|
|
ui->m_SlugsAyBiases_textEdit->setText(QString::number(Ayb, 'f', 4)); |
|
|
|
|
ui->m_SlugsAzBiases_textEdit->setText(QString::number(Azb, 'f', 4)); |
|
|
|
|
ui->m_SlugsGxBiases_textEdit->setText(QString::number(Gxb, 'f', 4)); |
|
|
|
|
ui->m_SlugsGyBiases_textEdit->setText(QString::number(Gyb, 'f', 4)); |
|
|
|
|
ui->m_SlugsGzBiases_textEdit->setText(QString::number(Gzb, 'f', 4)); |
|
|
|
|
|
|
|
|
|
//refresh UI sensor bias acelerometer data
|
|
|
|
|
ui->m_SlugsAxBiases_textEdit->setText(QString::number(Axb, 'f', 4)); |
|
|
|
|
ui->m_SlugsAyBiases_textEdit->setText(QString::number(Ayb, 'f', 4)); |
|
|
|
|
ui->m_SlugsAzBiases_textEdit->setText(QString::number(Azb, 'f', 4)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void SlugsDataSensorView::slugLocalPositionChanged(UASInterface * uasTemp, double x, double y, double z, quint64 time) |
|
|
|
|
void SlugsDataSensorView::slugLocalPositionChanged(UASInterface * uasTemp, |
|
|
|
|
double x, |
|
|
|
|
double y, |
|
|
|
|
double z, |
|
|
|
|
quint64 time) |
|
|
|
|
{ |
|
|
|
|
Q_UNUSED( uasTemp); |
|
|
|
|
|
|
|
|
@ -120,7 +132,11 @@ void SlugsDataSensorView::slugLocalPositionChanged(UASInterface * uasTemp, doubl
@@ -120,7 +132,11 @@ void SlugsDataSensorView::slugLocalPositionChanged(UASInterface * uasTemp, doubl
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void SlugsDataSensorView::slugSpeedLocalPositionChanged(UASInterface *uasTemp, double vx, double vy, double vz, quint64 time) |
|
|
|
|
void SlugsDataSensorView::slugSpeedLocalPositionChanged(UASInterface *uasTemp, |
|
|
|
|
double vx, |
|
|
|
|
double vy, |
|
|
|
|
double vz, |
|
|
|
|
quint64 time) |
|
|
|
|
{ |
|
|
|
|
Q_UNUSED( uasTemp); |
|
|
|
|
|
|
|
|
@ -130,7 +146,11 @@ void SlugsDataSensorView::slugSpeedLocalPositionChanged(UASInterface *uasTemp, d
@@ -130,7 +146,11 @@ void SlugsDataSensorView::slugSpeedLocalPositionChanged(UASInterface *uasTemp, d
|
|
|
|
|
TimeActualSpeed = time; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void SlugsDataSensorView::slugAttitudeChanged(UASInterface *uasTemp, double slugroll, double slugpitch, double slugyaw, quint64 time) |
|
|
|
|
void SlugsDataSensorView::slugAttitudeChanged(UASInterface *uasTemp, |
|
|
|
|
double slugroll, |
|
|
|
|
double slugpitch, |
|
|
|
|
double slugyaw, |
|
|
|
|
quint64 time) |
|
|
|
|
{ |
|
|
|
|
Q_UNUSED( uasTemp); |
|
|
|
|
|
|
|
|
@ -140,14 +160,24 @@ void SlugsDataSensorView::slugAttitudeChanged(UASInterface *uasTemp, double slug
@@ -140,14 +160,24 @@ void SlugsDataSensorView::slugAttitudeChanged(UASInterface *uasTemp, double slug
|
|
|
|
|
TimeActualAttitude = time; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void SlugsDataSensorView::slugsSensorBiasAcelerometerChanged(UASInterface *uasTemp, double axb, double ayb, double azb, quint64 time) |
|
|
|
|
void SlugsDataSensorView::slugsSensorBiasChanged(UASInterface *uasTemp, |
|
|
|
|
double axb, |
|
|
|
|
double ayb, |
|
|
|
|
double azb, |
|
|
|
|
double gxb, |
|
|
|
|
double gyb, |
|
|
|
|
double gzb, |
|
|
|
|
quint64 time) |
|
|
|
|
{ |
|
|
|
|
Q_UNUSED( uasTemp); |
|
|
|
|
|
|
|
|
|
Axb = axb; |
|
|
|
|
Ayb = ayb; |
|
|
|
|
Azb = azb; |
|
|
|
|
TimeActualAcel = time; |
|
|
|
|
Gxb = gxb; |
|
|
|
|
Gyb = gyb; |
|
|
|
|
Gzb = gzb; |
|
|
|
|
TimeActualBias = time; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|