Index: trunk/BNC/src/bncantex.h
===================================================================
--- trunk/BNC/src/bncantex.h	(revision 10951)
+++ trunk/BNC/src/bncantex.h	(revision 10955)
@@ -46,10 +46,19 @@
   double  rcvCorr(const std::string& antName, t_frequency::type frqType,
                   double eleSat, double azSat, bool& found) const;
+
+  // Attitude model selection for satCoMcorrection().
+  enum e_attMode {
+    ATT_COMPUTED = 0,  // full model: GLONASS yaw-fixed + GPS noon/midnight turn
+    ATT_NOMINAL  = 1,  // simple nominal Sun-pointing only (no maneuver model)
+    ATT_EXTERNAL = 2,  // use caller-supplied externalYaw angle [rad]
+  };
+
   t_irc   satCoMcorrection(const QString& prn, double Mjd,
                            const ColumnVector& xSat, const ColumnVector& vSat,
-                           ColumnVector& dx);
+                           ColumnVector& dx,
+                           e_attMode mode = ATT_COMPUTED,
+                           double externalYaw = 0.0);
 
-  // Drains and returns the diagnostic log accumulated by the GLONASS
-  // yaw-fixed model (mode transitions, with beta/mu/rate at the time).
+  // Drain and return diagnostic logs accumulated by the yaw models.
   // Empty most of the time; only non-empty right after a transition.
   QString takeGlonassYawLog() {
@@ -58,9 +67,18 @@
     return s;
   }
+  QString takeGpsYawLog() {
+    QString s = _gpsYawLog;
+    _gpsYawLog.clear();
+    return s;
+  }
+  QString takeOnYawLog() {
+    QString s = _onYawLog;
+    _onYawLog.clear();
+    return s;
+  }
 
  private:
-  // Per-satellite GLONASS yaw state, used to freeze the yaw angle while
-  // the satellite cannot follow the nominal Sun-pointing attitude law
-  // (see glonassYawAngle() below).
+  // Per-satellite GLONASS yaw state: freezes the yaw angle while the
+  // satellite cannot follow the nominal Sun-pointing law (Dilssner 2011).
   class t_glonassYaw {
    public:
@@ -77,10 +95,64 @@
   };
 
+  // Per-satellite GPS yaw state: rate-limits the yaw during noon/midnight
+  // turns when the required yaw rate exceeds the block's mechanical maximum
+  // (Kouba 2009/2015, Bar-Sever 1996).
+  class t_gpsYaw {
+   public:
+    t_gpsYaw() {
+      yaw         = 0.0;
+      lastCallMjd = 0.0;
+      valid       = false;
+      inTurn      = false;
+    }
+    double yaw;
+    double lastCallMjd;
+    bool   valid;
+    bool   inTurn;  // true while in a constrained noon/midnight turn
+  };
+
+  // Per-satellite Galileo/BDS yaw state: tracks rate-limited rotation between
+  // yaw-steering (psiNom) and orbit-normal mode (psi=0) when |beta| crosses
+  // the constellation-specific threshold (Kouba 2017, Dai et al. 2015).
+  class t_onYaw {
+   public:
+    t_onYaw() {
+      yaw         = 0.0;
+      lastCallMjd = 0.0;
+      valid       = false;
+      inON        = false;
+    }
+    double yaw;
+    double lastCallMjd;
+    bool   valid;
+    bool   inON;  // true while satellite is in (or transitioning to) orbit-normal mode
+  };
+
   QString _glonassYawLog;
+  QString _gpsYawLog;
+  QString _onYawLog;
 
   double glonassYawAngle(const QString& prn, double Mjd, const ColumnVector& xSat,
                           const ColumnVector& vSat, const ColumnVector& xSun);
 
+  double gpsYawAngle(const QString& prn, const QString& blockType, double Mjd,
+                     const ColumnVector& xSat, const ColumnVector& vSat,
+                     const ColumnVector& xSun);
+
+  double onModeYawAngle(const QString& prn, double betaThr, double psiDotMax,
+                        double Mjd, const ColumnVector& xSat,
+                        const ColumnVector& vSat, const ColumnVector& xSun);
+
+  double galileoYawAngle(const QString& prn, const QString& blockType, double Mjd,
+                         const ColumnVector& xSat, const ColumnVector& vSat,
+                         const ColumnVector& xSun);
+
+  double bdsYawAngle(const QString& prn, const QString& blockType, double Mjd,
+                     const ColumnVector& xSat, const ColumnVector& vSat,
+                     const ColumnVector& xSun);
+
   QMap<QString, t_glonassYaw> _glonassYaw;
+  QMap<QString, t_gpsYaw>     _gpsYaw;
+  QMap<QString, t_onYaw>      _onYaw;
 
   class t_frqMap {
@@ -111,4 +183,5 @@
     }
     QString                            antName;
+    QString                            blockType;  // e.g. "IIF", "IIR-M", "IIA", "IIIA" (GPS only)
     double                             zen1;
     double                             zen2;
