Index: trunk/BNC/src/PPP/pppEphPool.cpp
===================================================================
--- trunk/BNC/src/PPP/pppEphPool.cpp	(revision 11193)
+++ trunk/BNC/src/PPP/pppEphPool.cpp	(revision 11194)
@@ -144,5 +144,5 @@
   for (unsigned ii = 0; ii < _ephs.size(); ii++) {
     t_eph* eph = _ephs[ii];
-    if (eph->IOD() == corr->_iod) {
+    if (eph->matchesSsrIOD(corr->_iod)) {
       eph->setOrbCorr(corr);
     }
@@ -165,5 +165,5 @@
   for (unsigned ii = 0; ii < _ephs.size(); ii++) {
     t_eph* eph = _ephs[ii];
-    if (eph->IOD() == corr->_iod) {
+    if (eph->matchesSsrIOD(corr->_iod)) {
       eph->setClkCorr(corr);
     }
Index: trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp
===================================================================
--- trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp	(revision 11193)
+++ trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp	(revision 11194)
@@ -375,4 +375,5 @@
       continue;
     }
+    num = satNumber(sys, num);
 
     // Orbit correction
@@ -429,5 +430,5 @@
 
       t_clkCorr clkCorr;
-      clkCorr._prn.set(sys, _clkOrb.Sat[ii].ID, flag);
+      clkCorr._prn.set(sys, num, flag);
       checkPrnRange(clkCorr._prn);
       clkCorr._staID      = _staID.toStdString();
@@ -454,8 +455,16 @@
          _clkOrb.messageType == _ssrCorr->COTYPE_SBASHR ||
          _clkOrb.messageType == _ssrCorr->COTYPE_BDSHR) {
-      t_prn prn(sys, _clkOrb.Sat[ii].ID, flag);
+      t_prn prn(sys, num, flag);
       if (_lastClkCorrections.contains(prn)) {
         t_clkCorr clkCorr;
         clkCorr            = _lastClkCorrections[prn];
+        // The polynomial keeps the reference time t0 of its clock message
+        // (IGS SSR v1.00 4.2, RTCM 10403.3): re-reference it to the t0 of
+        // the High Rate Clock message, then add the High Rate correction.
+        double t0Clk = (clkCorr._updateInt ? 0.5 * ssrUpdateInt[clkCorr._updateInt] : 0.0);
+        double t0HR  = (_clkOrb.UpdateInterval ? 0.5 * ssrUpdateInt[_clkOrb.UpdateInterval] : 0.0);
+        double dt    = (_lastTime + t0HR) - (clkCorr._time + t0Clk);
+        clkCorr._dClk      += clkCorr._dotDClk * dt + clkCorr._dotDotDClk * dt * dt;
+        clkCorr._dotDClk   += 2.0 * clkCorr._dotDotDClk * dt;
         clkCorr._time      = _lastTime;
         clkCorr._updateInt = _clkOrb.UpdateInterval;
@@ -521,4 +530,5 @@
       continue;
     }
+    num = satNumber(sys, num);
     t_satCodeBias satCodeBias;
     satCodeBias._prn.set(sys, num, flag);
@@ -614,4 +624,5 @@
       continue;
     }
+    num = satNumber(sys, num);
     t_satPhaseBias satPhaseBias;
     satPhaseBias._prn.set(sys, num, flag);
@@ -992,8 +1003,8 @@
         corrIsOutOfRange = true;
       }
-      if (coSat.Clock.DeltaA2 < -1.3421772 ||
-          coSat.Clock.DeltaA2 > +1.3421772) {
+      if (coSat.Clock.DeltaA2 < -1.34217726 ||
+          coSat.Clock.DeltaA2 > +1.34217726) {
         ssrParStr = "Clock::DeltaA2";
-        ssrParValue = QString::number(coSat.Clock.DeltaA2, 'f', 7);
+        ssrParValue = QString::number(coSat.Clock.DeltaA2, 'f', 8);
         corrIsOutOfRange = true;
       }
@@ -1368,4 +1379,20 @@
 }
 
+// Satellite number from the GNSS Satellite ID on the wire. IGS-SSR (IGS SSR
+// v1.00 IDF011): ID 0 means 64 for GPS, GLONASS and BDS; SBAS ID 1 is PRN 120
+// (RINEX S20). RTCM-SSR IDs are used as they are.
+////////////////////////////////////////////////////////////////////////////
+int RTCM3coDecoder::satNumber(char sys, int id) const {
+  if (_type == IGSssr) {
+    if (id == 0 && (sys == 'G' || sys == 'R' || sys == 'C')) {
+      return 64;
+    }
+    if (sys == 'S') {
+      return id + 19;
+    }
+  }
+  return id;
+}
+
 // Satellite numbers on the wire can exceed BNC's supported range (e.g. 6-bit
 // IDs up to 63, while t_prn supports G01-G32). They are passed on unchanged,
Index: trunk/BNC/src/RTCM3/RTCM3coDecoder.h
===================================================================
--- trunk/BNC/src/RTCM3/RTCM3coDecoder.h	(revision 11193)
+++ trunk/BNC/src/RTCM3/RTCM3coDecoder.h	(revision 11194)
@@ -84,4 +84,5 @@
   // range (t_prn::MAXPRN_*); such satellites map to the unused index 0.
   void checkPrnRange(const t_prn& prn);
+  int  satNumber(char sys, int id) const;
   QSet<QString>                         _prnOutOfRangeLogged;
   // IGS-SSR: latest GPS/Galileo/QZSS/SBAS epoch (GPS seconds of week) of
Index: trunk/BNC/src/RTCM3/clock_and_orbit/clock_orbit.h
===================================================================
--- trunk/BNC/src/RTCM3/clock_and_orbit/clock_orbit.h	(revision 11193)
+++ trunk/BNC/src/RTCM3/clock_and_orbit/clock_orbit.h	(revision 11194)
@@ -21,5 +21,5 @@
 enum IGS_NUMBERS {
   RTCM_MESSAGE_NUMBER_IGS = 4076,
-  IGS_SSR_VERSION = 3
+  IGS_SSR_VERSION = 1   /* IDF001: 0 experimental, 1-6 version (IGS SSR v1.00) */
 };
 
Index: trunk/BNC/src/bncephuser.h
===================================================================
--- trunk/BNC/src/bncephuser.h	(revision 11193)
+++ trunk/BNC/src/bncephuser.h	(revision 11194)
@@ -83,5 +83,5 @@
       const std::deque<t_eph*>& qq = _eph[prn];
       for (int ii = int(qq.size()) - 1; ii >= 0; ii--) {
-        if (qq[ii]->IOD() == iod) {
+        if (qq[ii]->matchesSsrIOD(iod)) {
           return qq[ii];
         }
Index: trunk/BNC/src/combination/bnccomb.cpp
===================================================================
--- trunk/BNC/src/combination/bnccomb.cpp	(revision 11193)
+++ trunk/BNC/src/combination/bnccomb.cpp	(revision 11194)
@@ -877,5 +877,5 @@
     }
     else {
-      if      (ephLast->IOD() == _newCorr->_iod) {
+      if      (ephLast->matchesSsrIOD(_newCorr->_iod)) {
         _newCorr->_eph = ephLast;
       }
@@ -883,5 +883,5 @@
                !outDatedBcep(ephPrev, currentTime) &&  // if not updated in storage
                ephPrev->checkState() == t_eph::ok  &&  // received
-               ephPrev->IOD() == _newCorr->_iod) {
+               ephPrev->matchesSsrIOD(_newCorr->_iod)) {
         _newCorr->_eph = ephPrev;
         switchToLastEph(ephLast, _newCorr);
Index: trunk/BNC/src/ephemeris.h
===================================================================
--- trunk/BNC/src/ephemeris.h	(revision 11193)
+++ trunk/BNC/src/ephemeris.h	(revision 11194)
@@ -30,4 +30,11 @@
   bncTime TOC() const {return _TOC;}
   bool    isNewerThan(const t_eph* eph) const;
+  // IOD of an SSR orbit/clock correction refers to this data set. Galileo:
+  // IGS-SSR carries the 8 LSBs of IODnav (IGS SSR v1.00 IDF012), RTCM-SSR
+  // the full 10-bit IODnav (DF459) - compare the 8 LSBs (IODnav values 256
+  // apart are some days apart, never in the pool at the same time)
+  bool    matchesSsrIOD(unsigned int iod) const {
+    return (system() == Galileo) ? ((IOD() & 0xFF) == (iod & 0xFF)) : (IOD() == iod);
+  }
   bool    sameDataSet(const t_eph* eph) const {return _TOC == eph->_TOC && IOD() == eph->IOD();}
   void    setCheckState(e_checkState checkState) {_checkState = checkState;}
Index: trunk/BNC/src/pppModel.cpp
===================================================================
--- trunk/BNC/src/pppModel.cpp	(revision 11193)
+++ trunk/BNC/src/pppModel.cpp	(revision 11194)
@@ -742,5 +742,7 @@
         sphAzi);
     double vtec = vtecSingleLayerContribution(vTec->_layers[ii]);
-    stec += vtec * sin(sphEle + _psiPP);
+    // mapping to the slant: STEC = VTEC / sin(E + psi_PP) (IGS SSR v1.00
+    // 4.5.1, RTCM 10403.3), E + psi_PP being the elevation at the pierce point
+    stec += vtec / sin(sphEle + _psiPP);
   }
   return stec;
Index: trunk/BNC/src/upload/bncrtnetuploadcaster.cpp
===================================================================
--- trunk/BNC/src/upload/bncrtnetuploadcaster.cpp	(revision 11193)
+++ trunk/BNC/src/upload/bncrtnetuploadcaster.cpp	(revision 11194)
@@ -783,5 +783,5 @@
 
             if (biasSat) {
-                biasSat->ID = prn.number();
+                biasSat->ID = ssrSatId(prn.system(), prn.number());
                 biasSat->NumberOfCodeBiases = 0;
                 QMapIterator<QString, double> it(codeBiases);
@@ -845,5 +845,5 @@
                 phasebias.DispersiveBiasConsistencyIndicator = dispersiveBiasConsistenyIndicator;
                 phasebias.MWConsistencyIndicator = mwConsistencyIndicator;
-                phasebiasSat->ID = prn.number();
+                phasebiasSat->ID = ssrSatId(prn.system(), prn.number());
                 phasebiasSat->NumberOfPhaseBiases = 0;
                 phasebiasSat->YawAngle = pbSat.yawAngle;
@@ -1164,5 +1164,5 @@
 
     if (sd) {
-        sd->ID = prn.mid(1).toInt();
+        sd->ID = ssrSatId(prn[0].toLatin1(), prn.mid(1).toInt());
         sd->IOD = eph->IOD();
         sd->Clock.DeltaA0 = dClkA0;
Index: trunk/BNC/src/upload/bncrtnetuploadcaster.h
===================================================================
--- trunk/BNC/src/upload/bncrtnetuploadcaster.h	(revision 11193)
+++ trunk/BNC/src/upload/bncrtnetuploadcaster.h	(revision 11194)
@@ -37,4 +37,9 @@
     virtual ~bncRtnetUploadCaster();
 private:
+    // GNSS Satellite ID on the wire: IGS-SSR (IGS SSR v1.00 IDF011) SBAS ID 1
+    // is PRN 120 (RINEX S20); the 6-bit field keeps 64 as 0 (masked)
+    unsigned int ssrSatId(char sys, int number) const {
+      return (_ssrFormat == "IGS-SSR" && sys == 'S') ? unsigned(number - 19) : unsigned(number);
+    }
     t_irc processSatellite(const t_eph* eph, int GPSweek,
         double GPSweeks, const QString& prn,
