Changeset 160 in ntrip for trunk/BNC/bncrinex.cpp


Ignore:
Timestamp:
Sep 12, 2006, 8:39:13 PM (18 years ago)
Author:
mervart
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncrinex.cpp

    r159 r160  
    260260// Write One Epoch into the RINEX File
    261261////////////////////////////////////////////////////////////////////////////
    262 void bncRinex::dumpEpoch() {
     262void bncRinex::dumpEpoch(long maxTime) {
     263
     264  // Select observations older than maxTime
     265  // --------------------------------------
     266  QList<Observation*> dumpList;
     267  QMutableListIterator<Observation*> mIt(_obs);
     268  while (mIt.hasNext()) {
     269    Observation* ob = mIt.next();
     270    if (ob->GPSWeek * 7*24*3600 + ob->GPSWeeks < maxTime) {
     271      dumpList.push_back(ob);
     272      mIt.remove();
     273    }
     274  }
    263275
    264276  // Easy Return
    265277  // -----------
    266   if (_obs.isEmpty()) {
     278  if (dumpList.isEmpty()) {
    267279    return;
    268280  }
     
    270282  // Time of Epoch
    271283  // -------------
    272   Observation* firstObs = *_obs.begin();
     284  Observation* firstObs = *dumpList.begin();
    273285
    274286  QDateTime datTim = dateAndTimeFromGPSweek( firstObs->GPSWeek,
     
    290302
    291303  _out << datTim.toString(" yy MM dd hh mm ss.zzz0000").toAscii().data()
    292        << "  " << 0 << setw(3)  << _obs.size();
    293 
    294   QListIterator<Observation*> it(_obs); int iSat = 0;
     304       << "  " << 0 << setw(3)  << dumpList.size();
     305
     306  QListIterator<Observation*> it(dumpList); int iSat = 0;
    295307  while (it.hasNext()) {
    296308    iSat++;
     
    320332
    321333  _out.flush();
    322   _obs.clear();
    323334}
    324335
Note: See TracChangeset for help on using the changeset viewer.