mirror of
https://github.com/jankae/LibreVNA.git
synced 2025-12-06 07:12:10 +01:00
Add calibrated parameters table
Some checks failed
Build / PC_Application_Ubuntu (push) Has been cancelled
Build / PC_Application_RPi5 (push) Has been cancelled
Build / PC_Application_Windows (push) Has been cancelled
Build / PC_Application_OSX (push) Has been cancelled
Build / PC_Application_OSX_13 (push) Has been cancelled
Build / Embedded_Firmware (push) Has been cancelled
HIL_Tests / Get_Repository (push) Has been cancelled
Unit_Tests / Tests (push) Has been cancelled
HIL_Tests / PC_Application_RPi5 (push) Has been cancelled
HIL_Tests / Embedded_Firmware (push) Has been cancelled
HIL_Tests / HIL (push) Has been cancelled
Some checks failed
Build / PC_Application_Ubuntu (push) Has been cancelled
Build / PC_Application_RPi5 (push) Has been cancelled
Build / PC_Application_Windows (push) Has been cancelled
Build / PC_Application_OSX (push) Has been cancelled
Build / PC_Application_OSX_13 (push) Has been cancelled
Build / Embedded_Firmware (push) Has been cancelled
HIL_Tests / Get_Repository (push) Has been cancelled
Unit_Tests / Tests (push) Has been cancelled
HIL_Tests / PC_Application_RPi5 (push) Has been cancelled
HIL_Tests / Embedded_Firmware (push) Has been cancelled
HIL_Tests / HIL (push) Has been cancelled
This commit is contained in:
parent
10ba138104
commit
66d5bdd91b
|
|
@ -254,6 +254,61 @@ void CalibrationViewDialog::populateScene()
|
|||
drawText(marginLeft - portSize/2, marginTop + i*portHeight - portHeight/2 + portReverseYOffset, "b"+QString::number(i), colorF, Qt::AlignRight, Qt::AlignCenter);
|
||||
}
|
||||
|
||||
// create the ports of the VNA
|
||||
|
||||
// Fill the measurement correction table
|
||||
ui->table->clear();
|
||||
ui->table->setRowCount(ports*ports);
|
||||
ui->table->setColumnCount(2);
|
||||
ui->table->setHorizontalHeaderLabels({"Parameter", "Calibration Status"});
|
||||
for(unsigned int i=1;i<=ports;i++) {
|
||||
for(unsigned int j=1;j<=ports;j++) {
|
||||
auto row = (i-1)*ports+j-1;
|
||||
// add parameter
|
||||
ui->table->setItem(row, 0, new QTableWidgetItem("S"+QString::number(j)+QString::number(i)));
|
||||
// check the calibration status
|
||||
QString status = "Uncalibrated";
|
||||
if(i == j) {
|
||||
// check reflection parameters
|
||||
if(cal->hasSourceMatch(i) && cal->hasDirectivity(i) && cal->hasReflectionTracking(i)) {
|
||||
// we are calibrated
|
||||
status = "Calibrated";
|
||||
// check if we have enhanced responses
|
||||
QList<int> enhanced;
|
||||
for(unsigned int k=1;k<=ports;k++) {
|
||||
if(k==i) {
|
||||
continue;
|
||||
}
|
||||
if(cal->hasReceiverMatch(i, k)) {
|
||||
enhanced.append(k);
|
||||
}
|
||||
}
|
||||
if(enhanced.size() == 1) {
|
||||
status += " with enhanced response from port "+QString::number(enhanced[0]);
|
||||
} else if(enhanced.size() > 1) {
|
||||
status += " with enhanced response from ports ";
|
||||
for(unsigned int k=0;k<enhanced.size();k++) {
|
||||
if(k == enhanced.size() - 1) {
|
||||
status += " and "+QString::number(enhanced[k]);
|
||||
} else if(k > 0) {
|
||||
status += ", ";
|
||||
}
|
||||
status += QString::number(enhanced[k]);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// check transmission calibration
|
||||
if(cal->hasTransmissionTracking(i, j)) {
|
||||
// we are calibrated
|
||||
status = "Calibrated";
|
||||
// check if we have isolation terms
|
||||
if(cal->hasIsolation(i, j)) {
|
||||
status += " with isolation measurement";
|
||||
}
|
||||
}
|
||||
}
|
||||
// add calibration status
|
||||
ui->table->setItem(row, 1, new QTableWidgetItem(status));
|
||||
}
|
||||
}
|
||||
ui->table->resizeColumnsToContents();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,13 +6,20 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>818</width>
|
||||
<height>623</height>
|
||||
<width>1106</width>
|
||||
<height>665</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Calibration Error Term Model</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QSplitter" name="splitter">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<widget class="QWidget" name="">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
|
|
@ -72,6 +79,40 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Which measurements are being corrected?</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTableWidget" name="table">
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::EditTrigger::NoEditTriggers</set>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::SelectionMode::NoSelection</enum>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderStretchLastSection">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="standardButtons">
|
||||
|
|
|
|||
Loading…
Reference in a new issue