Index: trunk/BNC/src/bncwindow.cpp
===================================================================
--- trunk/BNC/src/bncwindow.cpp	(revision 10945)
+++ trunk/BNC/src/bncwindow.cpp	(revision 10955)
@@ -472,13 +472,14 @@
   // Combine Corrections
   // -------------------
-  _cmbTable = new QTableWidget(0, 4);
-  _cmbTable->setHorizontalHeaderLabels(QString("Mountpoint, AC Name, Weight Factor, Exclude Satellites").split(","));
+  _cmbTable = new QTableWidget(0, 5);
+  _cmbTable->setHorizontalHeaderLabels(QString("Mountpoint, AC Name, Weight Factor, Exclude Satellites, Attitude").split(","));
   _cmbTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
   _cmbTable->setSelectionBehavior(QAbstractItemView::SelectRows);
-  _cmbTable->setMaximumWidth(40 * ww);
+  _cmbTable->setMaximumWidth(50 * ww);
   _cmbTable->horizontalHeader()->resizeSection(0, 10 * ww);
   _cmbTable->horizontalHeader()->resizeSection(1, 6 * ww);
   _cmbTable->horizontalHeader()->resizeSection(2, 9 * ww);
   _cmbTable->horizontalHeader()->resizeSection(3, 9 * ww);
+  _cmbTable->horizontalHeader()->resizeSection(4, 8 * ww);
 #if QT_VERSION < 0x050000
   _cmbTable->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
@@ -1701,5 +1702,5 @@
   // WhatsThis, Combine Corrections
   // ------------------------------
-  _cmbTable->setWhatsThis(tr("<p>BNC allows to process several orbit and clock correction streams in real-time to produce, encode, upload and save a combination of correctors coming from different providers. </p><p>To add a line to the 'Combine Corrections' table hit the 'Add Row' button, double click on the 'Mountpoint' field to specify a Broadcast Ephemeris Correction mountpoint from the 'Streams' section below and hit Enter. Then double click on the 'AC Name' field to enter your choice of an abbreviation for the Analysis Center (AC) providing the stream. Double click on the 'Weight Factor' field to enter a weight factor to be applied for this stream in the combination. A Factor greater than 1 will enlarge the sigma of the clock pseudo-observations and with it down-weight its contribution. Finally, double click on the 'Exclude Satellites' field and specify satellites, to exclude them for an individual AC. An entry 'G04,G31,R' means to excludes GPS satellites PRN 4 and 31 as well as all GLONASS satellites from one individual AC. Default is an empty option field, meaning that no satellite is excluded from this individual AC.</p><p>Note that the orbit information in the resulting combination stream is just copied from one of the incoming streams. The stream used for providing the orbits may vary over time: if the orbit providing stream has an outage then BNC switches to the next remaining stream for getting hold of the orbit information.</p><p>The combination process requires Broadcast Ephemeris. Besides orbit and clock correction streams BNC should therefore pull a stream carrying Broadcast Ephemeris in the form of RTCM Version 3 messages.</p><p>It is possible to specify only one Broadcast Ephemeris Correction stream in the 'Combine Corrections' table. Instead of combining corrections BNC will then add the corrections to the Broadcast Ephemeris with the possibility to save final orbit and clock results in SP3 and/or Clock RINEX format. <i>[key: cmbStreams]</i></p>"));
+  _cmbTable->setWhatsThis(tr("<p>BNC allows to process several orbit and clock correction streams in real-time to produce, encode, upload and save a combination of correctors coming from different providers. </p><p>To add a line to the 'Combine Corrections' table hit the 'Add Row' button, double click on the 'Mountpoint' field to specify a Broadcast Ephemeris Correction mountpoint from the 'Streams' section below and hit Enter. Then double click on the 'AC Name' field to enter your choice of an abbreviation for the Analysis Center (AC) providing the stream. Double click on the 'Weight Factor' field to enter a weight factor to be applied for this stream in the combination. A Factor greater than 1 will enlarge the sigma of the clock pseudo-observations and with it down-weight its contribution. Finally, double click on the 'Exclude Satellites' field and specify satellites, to exclude them for an individual AC. An entry 'G04,G31,R' means to excludes GPS satellites PRN 4 and 31 as well as all GLONASS satellites from one individual AC. Default is an empty option field, meaning that no satellite is excluded from this individual AC.</p><p>Use the 'Attitude' field to select how satellite attitude is modelled when converting Antenna Phase Center (APC) corrections to Center-of-Mass (CoM) positions for SP3 output. 'Computed' (default) applies BNC's kinematic attitude model, including GPS noon/midnight turn manoeuvres, GLONASS yaw-fixed mode, and Galileo/BDS orbit-normal mode switching. 'Nominal' uses a simplified continuous Sun-pointing model without manoeuvre modelling. 'SSR' uses the yaw angle transmitted in the SSR phase bias message; select this option only if you trust the yaw values provided by the AC. If no yaw angle is available for a particular satellite in a given epoch, BNC falls back to 'Computed'. Note that the attitude model affects APC-referenced streams only; for CoM-referenced streams the AC has already applied attitude before encoding.</p><p>Note that the orbit information in the resulting combination stream is just copied from one of the incoming streams. The stream used for providing the orbits may vary over time: if the orbit providing stream has an outage then BNC switches to the next remaining stream for getting hold of the orbit information.</p><p>The combination process requires Broadcast Ephemeris. Besides orbit and clock correction streams BNC should therefore pull a stream carrying Broadcast Ephemeris in the form of RTCM Version 3 messages.</p><p>It is possible to specify only one Broadcast Ephemeris Correction stream in the 'Combine Corrections' table. Instead of combining corrections BNC will then add the corrections to the Broadcast Ephemeris with the possibility to save final orbit and clock results in SP3 and/or Clock RINEX format. <i>[key: cmbStreams]</i></p>"));
   addCmbRowButton->setWhatsThis(tr("<p>Hit 'Add Row' button to add another line to the 'Combine Corrections' table.</p>"));
   delCmbRowButton->setWhatsThis(tr("<p>Hit 'Delete' button to delete the highlighted line(s) from the 'Combine Corrections' table.</p>"));
@@ -2218,5 +2219,9 @@
     QString hlp;
     for (int iCol = 0; iCol < _cmbTable->columnCount(); iCol++) {
-      if (_cmbTable->item(iRow, iCol)) {
+      if (iCol == 4) {
+        QComboBox* attCombo = qobject_cast<QComboBox*>(_cmbTable->cellWidget(iRow, iCol));
+        hlp += (attCombo ? attCombo->currentText() : "Computed") + " ";
+      }
+      else if (_cmbTable->item(iRow, iCol)) {
         hlp += _cmbTable->item(iRow, iCol)->text() + " ";
       }
@@ -3056,5 +3061,14 @@
   _cmbTable->insertRow(iRow);
   for (int iCol = 0; iCol < _cmbTable->columnCount(); iCol++) {
-    _cmbTable->setItem(iRow, iCol, new QTableWidgetItem(""));
+    if (iCol == 4) {
+      QComboBox* attCombo = new QComboBox();
+      attCombo->setEditable(false);
+      attCombo->addItems(QString("Computed,SSR,Nominal").split(","));
+      attCombo->setFrame(false);
+      _cmbTable->setCellWidget(iRow, iCol, attCombo);
+    }
+    else {
+      _cmbTable->setItem(iRow, iCol, new QTableWidgetItem(""));
+    }
   }
 }
@@ -3110,6 +3124,26 @@
       _cmbTable->insertRow(iRow);
     }
-    for (int iCol = 0; iCol < hlp.size(); iCol++) {
-      _cmbTable->setItem(iRow, iCol, new QTableWidgetItem(hlp[iCol]));
+    for (int iCol = 0; iCol < hlp.size() && iCol < _cmbTable->columnCount(); iCol++) {
+      if (iCol == 4) {
+        QComboBox* attCombo = new QComboBox();
+        attCombo->setEditable(false);
+        attCombo->addItems(QString("Computed,SSR,Nominal").split(","));
+        attCombo->setFrame(false);
+        int idx = attCombo->findText(hlp[iCol]);
+        if (idx != -1) attCombo->setCurrentIndex(idx);
+        _cmbTable->setCellWidget(iRow, iCol, attCombo);
+      }
+      else {
+        _cmbTable->setItem(iRow, iCol, new QTableWidgetItem(hlp[iCol]));
+      }
+    }
+    // Ensure the Attitude combo exists even for old configs without column 4
+    if (hlp.size() <= 4 && _cmbTable->columnCount() > 4 && iRow >= 0
+        && !_cmbTable->cellWidget(iRow, 4)) {
+      QComboBox* attCombo = new QComboBox();
+      attCombo->setEditable(false);
+      attCombo->addItems(QString("Computed,SSR,Nominal").split(","));
+      attCombo->setFrame(false);
+      _cmbTable->setCellWidget(iRow, 4, attCombo);
     }
   }
