Ignore:
Timestamp:
Nov 10, 2026, 2:21:34 PM (83 minutes ago)
Author:
stuerze
Message:

IGS-SSR format checked and fixed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp

    r11185 r11194  
    375375      continue;
    376376    }
     377    num = satNumber(sys, num);
    377378
    378379    // Orbit correction
    … …  
    429430
    430431      t_clkCorr clkCorr;
    431       clkCorr._prn.set(sys, _clkOrb.Sat[ii].ID, flag);
     432      clkCorr._prn.set(sys, num, flag);
    432433      checkPrnRange(clkCorr._prn);
    433434      clkCorr._staID      = _staID.toStdString();
    … …  
    454455         _clkOrb.messageType == _ssrCorr->COTYPE_SBASHR ||
    455456         _clkOrb.messageType == _ssrCorr->COTYPE_BDSHR) {
    456       t_prn prn(sys, _clkOrb.Sat[ii].ID, flag);
     457      t_prn prn(sys, num, flag);
    457458      if (_lastClkCorrections.contains(prn)) {
    458459        t_clkCorr clkCorr;
    459460        clkCorr            = _lastClkCorrections[prn];
     461        // The polynomial keeps the reference time t0 of its clock message
     462        // (IGS SSR v1.00 4.2, RTCM 10403.3): re-reference it to the t0 of
     463        // the High Rate Clock message, then add the High Rate correction.
     464        double t0Clk = (clkCorr._updateInt ? 0.5 * ssrUpdateInt[clkCorr._updateInt] : 0.0);
     465        double t0HR  = (_clkOrb.UpdateInterval ? 0.5 * ssrUpdateInt[_clkOrb.UpdateInterval] : 0.0);
     466        double dt    = (_lastTime + t0HR) - (clkCorr._time + t0Clk);
     467        clkCorr._dClk      += clkCorr._dotDClk * dt + clkCorr._dotDotDClk * dt * dt;
     468        clkCorr._dotDClk   += 2.0 * clkCorr._dotDotDClk * dt;
    460469        clkCorr._time      = _lastTime;
    461470        clkCorr._updateInt = _clkOrb.UpdateInterval;
    … …  
    521530      continue;
    522531    }
     532    num = satNumber(sys, num);
    523533    t_satCodeBias satCodeBias;
    524534    satCodeBias._prn.set(sys, num, flag);
    … …  
    614624      continue;
    615625    }
     626    num = satNumber(sys, num);
    616627    t_satPhaseBias satPhaseBias;
    617628    satPhaseBias._prn.set(sys, num, flag);
    … …  
    9921003        corrIsOutOfRange = true;
    9931004      }
    994       if (coSat.Clock.DeltaA2 < -1.3421772 ||
    995           coSat.Clock.DeltaA2 > +1.3421772) {
     1005      if (coSat.Clock.DeltaA2 < -1.34217726 ||
     1006          coSat.Clock.DeltaA2 > +1.34217726) {
    9961007        ssrParStr = "Clock::DeltaA2";
    997         ssrParValue = QString::number(coSat.Clock.DeltaA2, 'f', 7);
     1008        ssrParValue = QString::number(coSat.Clock.DeltaA2, 'f', 8);
    9981009        corrIsOutOfRange = true;
    9991010      }
    … …  
    13681379}
    13691380
     1381// Satellite number from the GNSS Satellite ID on the wire. IGS-SSR (IGS SSR
     1382// v1.00 IDF011): ID 0 means 64 for GPS, GLONASS and BDS; SBAS ID 1 is PRN 120
     1383// (RINEX S20). RTCM-SSR IDs are used as they are.
     1384////////////////////////////////////////////////////////////////////////////
     1385int RTCM3coDecoder::satNumber(char sys, int id) const {
     1386  if (_type == IGSssr) {
     1387    if (id == 0 && (sys == 'G' || sys == 'R' || sys == 'C')) {
     1388      return 64;
     1389    }
     1390    if (sys == 'S') {
     1391      return id + 19;
     1392    }
     1393  }
     1394  return id;
     1395}
     1396
    13701397// Satellite numbers on the wire can exceed BNC's supported range (e.g. 6-bit
    13711398// IDs up to 63, while t_prn supports G01-G32). They are passed on unchanged,
Note: See TracChangeset for help on using the changeset viewer.