Index: trunk/BNC/src/bncantex.cpp
===================================================================
--- trunk/BNC/src/bncantex.cpp	(revision 10946)
+++ trunk/BNC/src/bncantex.cpp	(revision 10947)
@@ -349,9 +349,19 @@
 // independently-known attitude/orbit residuals if high accuracy matters.
 ////////////////////////////////////////////////////////////////////////////
-double bncAntex::glonassYawAngle(const QString& prn, const ColumnVector& xSat,
+double bncAntex::glonassYawAngle(const QString& prn, double Mjd,
+                                  const ColumnVector& xSat,
                                   const ColumnVector& vSat,
                                   const ColumnVector& xSun) {
 
   const double MAX_YAW_RATE = 0.25 * M_PI / 180.0; // [rad/s], approximate
+
+  // A genuine yaw-fixed window (gapless data) only ever lasts a few
+  // minutes around the orbit noon/midnight point - see the width
+  // estimate in the comment above. If the stored frozen value is much
+  // older than that, it is more likely stale (e.g. a stream outage, a
+  // maneuver-flagged-unhealthy period, or a brief eclipse passage spanned
+  // the gap) than a still-valid freeze, so fall back to the current
+  // nominal value instead of trusting it indefinitely.
+  const double MAX_FREEZE_AGE = 1800.0 / 86400.0; // 30 minutes, in days
 
   // Inertial-consistent velocity (xSat, vSat are Earth-fixed; remove the
@@ -398,13 +408,16 @@
   double psiEff;
   if (psiRate > MAX_YAW_RATE) {
-    if (!st.valid) {
-      st.yaw = psiNom; // no prior history - best available estimate
+    if (!st.valid || (Mjd - st.lastMjd) > MAX_FREEZE_AGE) {
+      st.yaw     = psiNom; // no prior history, or it is too old to trust
+      st.lastMjd = Mjd;
+      st.valid   = true;
     }
     psiEff = st.yaw;    // hold the frozen yaw angle
   }
   else {
-    st.yaw   = psiNom;
-    st.valid = true;
-    psiEff   = psiNom;
+    st.yaw     = psiNom;
+    st.lastMjd = Mjd;
+    st.valid   = true;
+    psiEff     = psiNom;
   }
 
@@ -466,5 +479,5 @@
       // -----------------------------------------------------------------
       if (prn[0] == 'R' && vSat.size() == 3) {
-        double psi = glonassYawAngle(prn, xSat, vSat, xSun);
+        double psi = glonassYawAngle(prn, Mjd, xSat, vSat, xSun);
 
         ColumnVector vInert = vSat;
