Changeset 11194 in ntrip for trunk/BNC


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

IGS-SSR format checked and fixed

Location:
trunk/BNC
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/PPP/pppEphPool.cpp

    r11137 r11194  
    144144  for (unsigned ii = 0; ii < _ephs.size(); ii++) {
    145145    t_eph* eph = _ephs[ii];
    146     if (eph->IOD() == corr->_iod) {
     146    if (eph->matchesSsrIOD(corr->_iod)) {
    147147      eph->setOrbCorr(corr);
    148148    }
    … …  
    165165  for (unsigned ii = 0; ii < _ephs.size(); ii++) {
    166166    t_eph* eph = _ephs[ii];
    167     if (eph->IOD() == corr->_iod) {
     167    if (eph->matchesSsrIOD(corr->_iod)) {
    168168      eph->setClkCorr(corr);
    169169    }
  • 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,
  • trunk/BNC/src/RTCM3/RTCM3coDecoder.h

    r11185 r11194  
    8484  // range (t_prn::MAXPRN_*); such satellites map to the unused index 0.
    8585  void checkPrnRange(const t_prn& prn);
     86  int  satNumber(char sys, int id) const;
    8687  QSet<QString>                         _prnOutOfRangeLogged;
    8788  // IGS-SSR: latest GPS/Galileo/QZSS/SBAS epoch (GPS seconds of week) of
  • trunk/BNC/src/RTCM3/clock_and_orbit/clock_orbit.h

    r11130 r11194  
    2121enum IGS_NUMBERS {
    2222  RTCM_MESSAGE_NUMBER_IGS = 4076,
    23   IGS_SSR_VERSION = 3
     23  IGS_SSR_VERSION = 1   /* IDF001: 0 experimental, 1-6 version (IGS SSR v1.00) */
    2424};
    2525
  • trunk/BNC/src/bncephuser.h

    r11140 r11194  
    8383      const std::deque<t_eph*>& qq = _eph[prn];
    8484      for (int ii = int(qq.size()) - 1; ii >= 0; ii--) {
    85         if (qq[ii]->IOD() == iod) {
     85        if (qq[ii]->matchesSsrIOD(iod)) {
    8686          return qq[ii];
    8787        }
  • trunk/BNC/src/combination/bnccomb.cpp

    r11185 r11194  
    877877    }
    878878    else {
    879       if      (ephLast->IOD() == _newCorr->_iod) {
     879      if      (ephLast->matchesSsrIOD(_newCorr->_iod)) {
    880880        _newCorr->_eph = ephLast;
    881881      }
    … …  
    883883               !outDatedBcep(ephPrev, currentTime) &&  // if not updated in storage
    884884               ephPrev->checkState() == t_eph::ok  &&  // received
    885                ephPrev->IOD() == _newCorr->_iod) {
     885               ephPrev->matchesSsrIOD(_newCorr->_iod)) {
    886886        _newCorr->_eph = ephPrev;
    887887        switchToLastEph(ephLast, _newCorr);
  • trunk/BNC/src/ephemeris.h

    r11192 r11194  
    3030  bncTime TOC() const {return _TOC;}
    3131  bool    isNewerThan(const t_eph* eph) const;
     32  // IOD of an SSR orbit/clock correction refers to this data set. Galileo:
     33  // IGS-SSR carries the 8 LSBs of IODnav (IGS SSR v1.00 IDF012), RTCM-SSR
     34  // the full 10-bit IODnav (DF459) - compare the 8 LSBs (IODnav values 256
     35  // apart are some days apart, never in the pool at the same time)
     36  bool    matchesSsrIOD(unsigned int iod) const {
     37    return (system() == Galileo) ? ((IOD() & 0xFF) == (iod & 0xFF)) : (IOD() == iod);
     38  }
    3239  bool    sameDataSet(const t_eph* eph) const {return _TOC == eph->_TOC && IOD() == eph->IOD();}
    3340  void    setCheckState(e_checkState checkState) {_checkState = checkState;}
  • trunk/BNC/src/pppModel.cpp

    r11022 r11194  
    742742        sphAzi);
    743743    double vtec = vtecSingleLayerContribution(vTec->_layers[ii]);
    744     stec += vtec * sin(sphEle + _psiPP);
     744    // mapping to the slant: STEC = VTEC / sin(E + psi_PP) (IGS SSR v1.00
     745    // 4.5.1, RTCM 10403.3), E + psi_PP being the elevation at the pierce point
     746    stec += vtec / sin(sphEle + _psiPP);
    745747  }
    746748  return stec;
  • trunk/BNC/src/upload/bncrtnetuploadcaster.cpp

    r11185 r11194  
    783783
    784784            if (biasSat) {
    785                 biasSat->ID = prn.number();
     785                biasSat->ID = ssrSatId(prn.system(), prn.number());
    786786                biasSat->NumberOfCodeBiases = 0;
    787787                QMapIterator<QString, double> it(codeBiases);
    … …  
    845845                phasebias.DispersiveBiasConsistencyIndicator = dispersiveBiasConsistenyIndicator;
    846846                phasebias.MWConsistencyIndicator = mwConsistencyIndicator;
    847                 phasebiasSat->ID = prn.number();
     847                phasebiasSat->ID = ssrSatId(prn.system(), prn.number());
    848848                phasebiasSat->NumberOfPhaseBiases = 0;
    849849                phasebiasSat->YawAngle = pbSat.yawAngle;
    … …  
    11641164
    11651165    if (sd) {
    1166         sd->ID = prn.mid(1).toInt();
     1166        sd->ID = ssrSatId(prn[0].toLatin1(), prn.mid(1).toInt());
    11671167        sd->IOD = eph->IOD();
    11681168        sd->Clock.DeltaA0 = dClkA0;
  • trunk/BNC/src/upload/bncrtnetuploadcaster.h

    r11179 r11194  
    3737    virtual ~bncRtnetUploadCaster();
    3838private:
     39    // GNSS Satellite ID on the wire: IGS-SSR (IGS SSR v1.00 IDF011) SBAS ID 1
     40    // is PRN 120 (RINEX S20); the 6-bit field keeps 64 as 0 (masked)
     41    unsigned int ssrSatId(char sys, int number) const {
     42      return (_ssrFormat == "IGS-SSR" && sys == 'S') ? unsigned(number - 19) : unsigned(number);
     43    }
    3944    t_irc processSatellite(const t_eph* eph, int GPSweek,
    4045        double GPSweeks, const QString& prn,
Note: See TracChangeset for help on using the changeset viewer.