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


Ignore:
Timestamp:
Dec 27, 2014, 3:58:55 PM (10 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src/RTCM3
Files:
2 edited

Legend:

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

    r6454 r6455  
    262262void RTCM3coDecoder::sendResults() {
    263263
    264   QList<t_orbCorr> orbCorrections;
    265   QList<t_clkCorr> clkCorrections;
    266 
    267   // Loop over all satellites (GPS and Glonass)
    268   // ------------------------------------------
     264  QList<t_orbCorr>& orbCorrections = _orbCorrections[_lastTime];
     265  QList<t_clkCorr>& clkCorrections = _clkCorrections[_lastTime];
     266
     267  // Orbit and clock corrections of all satellites
     268  // ---------------------------------------------
    269269  for (unsigned ii = 0; ii < CLOCKORBIT_NUMGPS + _clkOrb.NumberOfSat[CLOCKORBIT_SATGLONASS]; ii++) {
    270270    char sysCh = ' ';
     
    304304    }
    305305
     306    // Clock Corrections
     307    // -----------------
    306308    if ( _clkOrb.messageType == COTYPE_GPSCOMBINED     ||
    307309         _clkOrb.messageType == COTYPE_GLONASSCOMBINED ||
     
    331333  }
    332334
    333   // Loop over all satellites (GPS and Glonass)
    334   // ------------------------------------------
     335  // Code Biases
     336  // -----------
    335337  QList<t_satBias> satBiases;
    336338  for (unsigned ii = 0; ii < CLOCKORBIT_NUMGPS + _codeBias.NumberOfSat[CLOCKORBIT_SATGLONASS]; ii++) {
     
    354356  }
    355357
    356   if (orbCorrections.size() > 0) {
    357     emit newOrbCorrections(orbCorrections);
    358   }
    359   if (clkCorrections.size() > 0) {
    360     emit newClkCorrections(clkCorrections);
    361   }
     358  // Dump all older epochs
     359  // ---------------------
     360  QMutableMapIterator<bncTime, QList<t_orbCorr> > itOrb(_orbCorrections);
     361  while (itOrb.hasNext()) {
     362    itOrb.next();
     363    if (itOrb.key() < _lastTime) {
     364      emit newOrbCorrections(itOrb.value());
     365      if (_out) {
     366        t_orbCorr::writeEpoch(_out, itOrb.value());
     367      }
     368      itOrb.remove();
     369    }
     370  }
     371  QMutableMapIterator<bncTime, QList<t_clkCorr> > itClk(_clkCorrections);
     372  while (itClk.hasNext()) {
     373    itClk.next();
     374    if (itClk.key() < _lastTime) {
     375      emit newClkCorrections(itClk.value());
     376      if (_out) {
     377        t_clkCorr::writeEpoch(_out, itClk.value());
     378      }
     379      itClk.remove();
     380    }
     381  }
     382
    362383  if (_out) {
    363     QListIterator<t_orbCorr> itOrb(orbCorrections);
    364     while (itOrb.hasNext()) {
    365       const t_orbCorr& orbCorr = itOrb.next();
    366       *_out << orbCorr.toLine();
    367     }
    368     QListIterator<t_clkCorr> itClk(clkCorrections);
    369     while (itClk.hasNext()) {
    370       const t_clkCorr& clkCorr = itClk.next();
    371       *_out << clkCorr.toLine();
    372     }
    373384    _out->flush();
    374385  }
  • trunk/BNC/src/RTCM3/RTCM3coDecoder.h

    r6454 r6455  
    4444
    4545 signals:
    46   void newOrbCorrections(QList<t_orbCorr> orbCorr);
    47   void newClkCorrections(QList<t_clkCorr> clkCorr);
    48   void newBiases(QList<t_satBias> biases);
     46  void newOrbCorrections(QList<t_orbCorr>);
     47  void newClkCorrections(QList<t_clkCorr>);
    4948  void newMessage(QByteArray msg, bool showOnScreen);
    5049  void providerIDChanged(QString staID);
     
    6665  bncTime        _lastTime;
    6766  QMap<std::string, unsigned short> _IODs;
     67  QMap<bncTime, QList<t_orbCorr> >  _orbCorrections;
     68  QMap<bncTime, QList<t_clkCorr> >  _clkCorrections;
    6869};
    6970
Note: See TracChangeset for help on using the changeset viewer.