Changeset 11057 in ntrip for trunk/BNC/src/RTCM3


Ignore:
Timestamp:
Sep 30, 2026, 11:30:26 AM (13 days ago)
Author:
stuerze
Message:

bug fixes resulting from overall tests

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

Legend:

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

    r11049 r11057  
    7171  _rawFile = rawFile;
    7272
    73   connect(this, SIGNAL(newGPSEph(t_ephGPS)),     BNC_CORE, SLOT(slotNewGPSEph(t_ephGPS)));
    74   connect(this, SIGNAL(newGlonassEph(t_ephGlo)), BNC_CORE, SLOT(slotNewGlonassEph(t_ephGlo)));
    75   connect(this, SIGNAL(newGalileoEph(t_ephGal)), BNC_CORE, SLOT(slotNewGalileoEph(t_ephGal)));
    76   connect(this, SIGNAL(newSBASEph(t_ephSBAS)),   BNC_CORE, SLOT(slotNewSBASEph(t_ephSBAS)));
    77   connect(this, SIGNAL(newBDSEph(t_ephBDS)),     BNC_CORE, SLOT(slotNewBDSEph(t_ephBDS)));
     73  Qt::ConnectionType conType = BNC_CORE->decoderConnectionType();
     74  connect(this, SIGNAL(newGPSEph(t_ephGPS)),     BNC_CORE, SLOT(slotNewGPSEph(t_ephGPS)), conType);
     75  connect(this, SIGNAL(newGlonassEph(t_ephGlo)), BNC_CORE, SLOT(slotNewGlonassEph(t_ephGlo)), conType);
     76  connect(this, SIGNAL(newGalileoEph(t_ephGal)), BNC_CORE, SLOT(slotNewGalileoEph(t_ephGal)), conType);
     77  connect(this, SIGNAL(newSBASEph(t_ephSBAS)),   BNC_CORE, SLOT(slotNewSBASEph(t_ephSBAS)), conType);
     78  connect(this, SIGNAL(newBDSEph(t_ephBDS)),     BNC_CORE, SLOT(slotNewBDSEph(t_ephBDS)), conType);
    7879
    7980  _MessageSize = _SkipBytes = _BlockSize = _NeedBytes = 0;
    … …  
    8990  }
    9091  _coDecoders.clear();
     92}
     93
     94// Pass on the corrections still held back by the SSR decoders
     95////////////////////////////////////////////////////////////////////////////
     96void RTCM3Decoder::flush() {
     97  QMapIterator<QByteArray, RTCM3coDecoder*> it(_coDecoders);
     98  while (it.hasNext()) {
     99    it.next();
     100    it.value()->flush();
     101  }
    91102}
    92103
  • trunk/BNC/src/RTCM3/RTCM3Decoder.h

    r11047 r11057  
    4343  virtual t_irc Decode(char* buffer, int bufLen, std::vector<std::string>& errmsg);
    4444  virtual int corrGPSEpochTime() const;
     45  virtual void flush();
    4546  /**
    4647   * CRC24Q checksum calculation function (only full bytes supported).
  • trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp

    r11047 r11057  
    7171  _out = 0;
    7272
     73  Qt::ConnectionType conType = BNC_CORE->decoderConnectionType();
    7374  connect(this, SIGNAL(newOrbCorrections(QList<t_orbCorr>)),
    74           BNC_CORE, SLOT(slotNewOrbCorrections(QList<t_orbCorr>)));
     75          BNC_CORE, SLOT(slotNewOrbCorrections(QList<t_orbCorr>)), conType);
    7576
    7677  connect(this, SIGNAL(newClkCorrections(QList<t_clkCorr>)),
    77           BNC_CORE, SLOT(slotNewClkCorrections(QList<t_clkCorr>)));
     78          BNC_CORE, SLOT(slotNewClkCorrections(QList<t_clkCorr>)), conType);
    7879
    7980  connect(this, SIGNAL(newCodeBiases(QList<t_satCodeBias>)),
    80           BNC_CORE, SLOT(slotNewCodeBiases(QList<t_satCodeBias>)));
     81          BNC_CORE, SLOT(slotNewCodeBiases(QList<t_satCodeBias>)), conType);
    8182
    8283  connect(this, SIGNAL(newPhaseBiases(QList<t_satPhaseBias>)),
    83           BNC_CORE, SLOT(slotNewPhaseBiases(QList<t_satPhaseBias>)));
     84          BNC_CORE, SLOT(slotNewPhaseBiases(QList<t_satPhaseBias>)), conType);
    8485
    8586  connect(this, SIGNAL(newTec(t_vTec)),
    86           BNC_CORE, SLOT(slotNewTec(t_vTec)));
     87          BNC_CORE, SLOT(slotNewTec(t_vTec)), conType);
    8788
    8889  connect(this, SIGNAL(newMetaData(t_metaData)),
    89           BNC_CORE, SLOT(slotNewMetaData(t_metaData)));
     90          BNC_CORE, SLOT(slotNewMetaData(t_metaData)), conType);
    9091
    9192  connect(this, SIGNAL(newSatAntennas(QList<t_satAntenna>)),
    92           BNC_CORE, SLOT(slotNewSatAntennas(QList<t_satAntenna>)));
     93          BNC_CORE, SLOT(slotNewSatAntennas(QList<t_satAntenna>)), conType);
    9394
    9495  connect(this, SIGNAL(providerIDChanged(QString)),
    95           BNC_CORE, SIGNAL(providerIDChanged(QString)));
     96          BNC_CORE, SIGNAL(providerIDChanged(QString)), conType);
    9697
    9798  connect(this, SIGNAL(newMessage(QByteArray,bool)),
    … …  
    784785  // Dump all older epochs
    785786  // ---------------------
     787  dumpEpochs(false);
     788}
     789
     790// Emit and write the collected corrections of all epochs older than
     791// _lastTime (all epochs if all is set, e.g. at the end of a replay)
     792////////////////////////////////////////////////////////////////////////////
     793void RTCM3coDecoder::dumpEpochs(bool all) {
    786794  QMutableMapIterator<bncTime, QList<t_orbCorr> > itOrb(_orbCorrections);
    787795  while (itOrb.hasNext()) {
    788796    itOrb.next();
    789     if (itOrb.key() < _lastTime) {
     797    if (all || itOrb.key() < _lastTime) {
    790798      emit newOrbCorrections(itOrb.value());
    791799      t_orbCorr::writeEpoch(_out, itOrb.value());
    … …  
    796804  while (itClk.hasNext()) {
    797805    itClk.next();
    798     if (itClk.key() < _lastTime) {
     806    if (all || itClk.key() < _lastTime) {
    799807      emit newClkCorrections(itClk.value());
    800808      t_clkCorr::writeEpoch(_out, itClk.value());
    … …  
    805813  while (itCB.hasNext()) {
    806814    itCB.next();
    807     if (itCB.key() < _lastTime) {
     815    if (all || itCB.key() < _lastTime) {
    808816      emit newCodeBiases(itCB.value());
    809817      t_satCodeBias::writeEpoch(_out, itCB.value());
    … …  
    814822  while (itPB.hasNext()) {
    815823    itPB.next();
    816     if (itPB.key() < _lastTime) {
     824    if (all || itPB.key() < _lastTime) {
    817825      emit newPhaseBiases(itPB.value());
    818826      t_satPhaseBias::writeEpoch(_out, itPB.value());
    … …  
    823831  while (itTec.hasNext()) {
    824832    itTec.next();
    825     if (itTec.key() < _lastTime) {
     833    if (all || itTec.key() < _lastTime) {
    826834      emit newTec(itTec.value());
    827835      t_vTec::write(_out, itTec.value());
    … …  
    832840  while (itMD.hasNext()) {
    833841    itMD.next();
    834     if (itMD.key() < _lastTime) {
     842    if (all || itMD.key() < _lastTime) {
    835843      emit newMetaData(itMD.value());
    836844      t_metaData::write(_out, itMD.value());
    … …  
    841849  while (itAnt.hasNext()) {
    842850    itAnt.next();
    843     if (itAnt.key() < _lastTime) {
     851    if (all || itAnt.key() < _lastTime) {
    844852      emit newSatAntennas(itAnt.value());
    845853      t_satAntenna::writeEpoch(_out, itAnt.value());
    846854      itAnt.remove();
    847855    }
     856  }
     857  if (all && _out) {
     858    _out->flush();
    848859  }
    849860}
    … …  
    11261137  else if (epoSecGlo != -1) {
    11271138    QDate date = dateAndTimeFromGPSweek(currentTime.gpsw(), currentTime.gpssec()).date();
    1128     if (_type == IGSssr) {
    1129       epoSecGlo = epoSecGlo + gnumleap(date.year(), date.month(), date.day());
    1130     }
     1139    // IGS-SSR: the SSR Epoch Time (IDF003, 20 bit) is given in one continuous
     1140    // time scale for all GNSS, i.e. GPS seconds of week also for GLONASS
     1141    // (IGS SSR v1.00) - no conversion
    11311142    if (_type == RTCMssr || _type == RTCMnewssr) {
    11321143      // Same GLONASS epoch wire convention (UTC+3h) as RTCMssr
    … …  
    11451156  }
    11461157  else if (epoSecBds != -1) {
    1147     epoSecBds += 14.0;
    1148     if (epoSecBds > 604800.0) {
    1149       epoSecBds -= 7.0*24.0*60.0*60.0;
     1158    // RTCM-SSR: BDT; IGS-SSR: GPS time scale for all GNSS (IDF003)
     1159    if (_type != IGSssr) {
     1160      epoSecBds += 14.0;
     1161      if (epoSecBds > 604800.0) {
     1162        epoSecBds -= 7.0*24.0*60.0*60.0;
     1163      }
    11501164    }
    11511165    _lastTime.set(currentWeek, epoSecBds);
  • trunk/BNC/src/RTCM3/RTCM3coDecoder.h

    r11047 r11057  
    4545  virtual t_irc Decode(char* buffer, int bufLen, std::vector<std::string>& errmsg);
    4646  virtual int corrGPSEpochTime() const {return int(_lastTime.gpssec());}
     47  virtual void flush() {dumpEpochs(true);}
    4748  virtual void initSsrFormatType(const e_type type) {
    4849    _type = type;
    … …  
    7374  void setEpochTime();
    7475  void sendResults();
     76  void dumpEpochs(bool all);
    7577  void reopen();
    7678  void checkProviderID();
Note: See TracChangeset for help on using the changeset viewer.