Changeset 11002 in ntrip for trunk


Ignore:
Timestamp:
Sep 1, 2026, 2:51:30 PM (12 days ago)
Author:
stuerze
Message:

updates regarding RTCM-SSR

Location:
trunk/BNC/src/RTCM3
Files:
3 edited

Legend:

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

    r11000 r11002  
    117117//
    118118////////////////////////////////////////////////////////////////////////////
    119 void RTCM3coDecoder::reset() {
     119void RTCM3coDecoder::reset(bool resetPhaseBias) {
    120120  memset(&_clkOrb,    0, sizeof(_clkOrb));
    121121  memset(&_codeBias,  0, sizeof(_codeBias));
    122   memset(&_phaseBias, 0, sizeof(_phaseBias));
     122  if (resetPhaseBias) {
     123    memset(&_phaseBias, 0, sizeof(_phaseBias));
     124  }
    123125  memset(&_vTEC,      0, sizeof(_vTEC));
    124126}
     
    218220          retCode = failure;
    219221        }
    220         reset();
     222        // Keep _phaseBias intact: an Extended Phase Bias message (COBOFS_PBEXT)
     223        // arriving later needs to correlate against the satellite/signal list
     224        // just published by this Phase Bias message. clock_orbit_rtcm_new.cpp's
     225        // COBOFS_PBIAS handling resets pb->NumberOfSat[s] itself before decoding
     226        // a fresh message, so this doesn't cause stale data to accumulate.
     227        reset(false);
    221228      }
    222229    }
  • trunk/BNC/src/RTCM3/RTCM3coDecoder.h

    r10754 r11002  
    6767
    6868 private:
    69   void reset();
     69  void reset(bool resetPhaseBias = true);
    7070  void setEpochTime();
    7171  void sendResults();
  • trunk/BNC/src/RTCM3/clock_and_orbit/clock_orbit_rtcm_new.cpp

    r11001 r11002  
    566566          pb->messageType = type;
    567567          /* Header Part*/
     568          /* pb->NumberOfSat[s] is no longer cleared by the caller between
     569           * messages (kept intact so a subsequent Extended Phase Bias message
     570           * can correlate against it), so this decode must start each fresh
     571           * message with an empty satellite list itself rather than relying
     572           * on D_..._EPOCH_TIME_CHECK's stale-data check, which would
     573           * otherwise reject every message but the first with GCOBR_TIMEMISMATCH. */
     574          pb->NumberOfSat[s] = 0;
    568575          switch (s) {
    569576            case CLOCKORBIT_SATGPS:
     
    572579            case CLOCKORBIT_SATSBAS:
    573580            case CLOCKORBIT_SATBDS:
    574               D_GPS_EPOCH_TIME_CHECK(pb->EpochTime[s], pb->NumberOfSat[s])
     581              D_GPS_EPOCH_TIME(pb->EpochTime[s])
    575582              break;
    576583            case CLOCKORBIT_SATGLONASS:
    577               D_GLONASS_EPOCH_TIME_CHECK(pb->EpochTime[s], pb->NumberOfSat[s])
     584              D_GLONASS_EPOCH_TIME(pb->EpochTime[s])
    578585              break;
    579586          }
     
    665672            ExtendedPhaseBiasPropertyID == pb->ExtendedPhaseBiasPropertyID) {
    666673          for (i = 0; i < pb->NumberOfSat[s]; ++i) {
    667             for (pos = satoffset[s];
    668                 pos < satoffset[s] + pb->NumberOfSat[s];
    669                 ++pos)
    670               ;
     674            /* The wire format does not repeat the satellite ID here: entries
     675             * are implicitly in the same satellite/signal order as the
     676             * correlated Phase Bias message, so the i-th satellite is simply
     677             * the i-th one already recorded for this system. */
     678            pos = satoffset[s] + i;
    671679            if (pos >= satoffset[s + 1])
    672680              return GCOBR_DATAMISMATCH;
    673             else if (pos == pb->NumberOfSat[s] + satoffset[s])
    674               ++pb->NumberOfSat[s];
    675681#ifdef BNC_DEBUG_SSR
    676682            fprintf(stderr, "id %2d ", pb->Sat[pos].ID);
Note: See TracChangeset for help on using the changeset viewer.