Index: trunk/BNC/src/combination/bnccomb.cpp
===================================================================
--- trunk/BNC/src/combination/bnccomb.cpp	(revision 11107)
+++ trunk/BNC/src/combination/bnccomb.cpp	(revision 11110)
@@ -1698,15 +1698,12 @@
         continue;
       }
-      QString glonassYawLog = _antex->takeGlonassYawLog();
-      if (!glonassYawLog.isEmpty()) {
-        emit newMessage(("bncComb: " + glonassYawLog.trimmed()).toLatin1(), false);
-      }
-      QString gpsYawLog = _antex->takeGpsYawLog();
-      if (!gpsYawLog.isEmpty()) {
-        emit newMessage(("bncComb: " + gpsYawLog.trimmed()).toLatin1(), false);
-      }
-      QString onYawLog = _antex->takeOnYawLog();
-      if (!onYawLog.isEmpty()) {
-        emit newMessage(("bncComb: " + onYawLog.trimmed()).toLatin1(), false);
+      // transitions of the output attitude only, not of the AC attitudes
+      // used for the clock consistency (state keys "<AC>:att")
+      QStringList yawLogs = (_antex->takeGlonassYawLog() + _antex->takeGpsYawLog() +
+                             _antex->takeOnYawLog()).split('\n', Qt::SkipEmptyParts);
+      for (const QString& line : yawLogs) {
+        if (!line.contains(":att:")) {
+          emit newMessage(("bncComb: " + line.trimmed()).toLatin1(), false);
+        }
       }
     }
@@ -1885,7 +1882,22 @@
     double dC_att = 0.0;
     if (corr->_attYawValid && masterCorr[prn]->_attYawValid) {
-      double dPsi = remainder(corr->_attYaw - masterCorr[prn]->_attYaw, 2.0 * M_PI);
+      // unwrapped over time: a turn in opposite directions accumulates a
+      // full cycle of wind-up, which stays in the clock (reset after 30 min);
+      // sign confirmed with the clocks of an AC turning opposite to the master;
+      // a yaw rotation +dpsi (right-handed about the antenna boresight) shifts
+      // the carrier phase by -dpsi/2pi cycles; an AC modelling its yaw larger by
+      // dpsi gets its clock (IGS sense) smaller by lambda_IF * dpsi / 2pi:
+      // dClk_AC - dClk_master = lambda_IF * (psi_master - psi_AC) / 2pi.
+      // Chen et al. (2022, EPS 74:142, Eq. 4) give the opposite
+      // sign, but did not apply the correction (no attitude products).
+      double  dPsi = remainder(masterCorr[prn]->_attYaw - corr->_attYaw, 2.0 * M_PI);
+      QString key  = corr->_acName + ' ' + masterCorr[prn]->_acName + ' ' + prn;
+      if (_dPsiLast.contains(key) && corr->_time - _dPsiLast[key].second <= 1800.0) {
+        double last = _dPsiLast[key].first;
+        dPsi = last + remainder(dPsi - last, 2.0 * M_PI);
+      }
+      _dPsiLast[key] = QPair<double, bncTime>(dPsi, corr->_time);
       dC_att = corr->_lambdaIF * dPsi / (2.0 * M_PI);
-      if (fabs(dC_att) > 1.e-6) fprintf(stderr, "DCATT %s %s %s %s %.4f %.2f\n", corr->_time.timestr().c_str(), corr->_acName.toLatin1().data(), masterCorr[prn]->_acName.toLatin1().data(), prn.toLatin1().data(), dC_att, dPsi*180/M_PI);
+      if (getenv("DCATT") && prn.startsWith(getenv("DCATT"))) fprintf(stderr, "DCATT %s %s %s %s %.4f %.2f %.2f %.2f\n", corr->_time.timestr().c_str(), corr->_acName.toLatin1().data(), masterCorr[prn]->_acName.toLatin1().data(), prn.toLatin1().data(), dC_att, dPsi*180/M_PI, corr->_attYaw*180/M_PI, masterCorr[prn]->_attYaw*180/M_PI); // TEMPORARY
     }
     double dC_apriori_corr = dC_orb + dC_att;
Index: trunk/BNC/src/combination/bnccomb.h
===================================================================
--- trunk/BNC/src/combination/bnccomb.h	(revision 11107)
+++ trunk/BNC/src/combination/bnccomb.h	(revision 11110)
@@ -297,4 +297,5 @@
   QMap<char, QVector<cmbParam*>>              _params;
   QMap<QString, QMap<t_prn, t_orbCorr> >     _orbCorrections;
+  QMap<QString, QPair<double, bncTime> >      _dPsiLast; // yaw difference to the master orbit AC per AC, master and satellite, unwrapped over time
   QMap<QString, QMap<t_prn, t_orbCorr> >     _orbCorrectionsPrev; // latest orbit of the previous IOD per AC and satellite
   QMap<QString, QMap<t_prn, t_satCodeBias>>  _satCodeBiases;
