Changeset 3748 in ntrip


Ignore:
Timestamp:
Mar 30, 2012, 11:21:04 AM (12 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/rinex
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/rinex/bncpostprocess.cpp

    r3721 r3748  
    124124  }
    125125
    126   // Read Ephemerides
    127   // ----------------
    128   t_eph* eph = 0;
    129   while ( (eph = _rnxNavFile->getNextEph()) != 0 ) {
    130     if (_pppClient->putNewEph(eph) != success) {
    131       delete eph; eph = 0;
    132     }
    133   }
    134 
    135126  // Read/Process Observations
    136127  // -------------------------
     
    140131    ++nEpo;
    141132
     133    // Get Corrections
     134    // ---------------
    142135    if (_corrFile) {
    143136      _corrFile->syncRead(epo->tt);
     137    }
     138
     139    // Get Ephemerides
     140    // ----------------
     141    t_eph* eph = 0;
     142    while ( (eph = _rnxNavFile->getNextEph(epo->tt)) != 0 ) {
     143      if (_pppClient->putNewEph(eph) != success) {
     144        delete eph; eph = 0;
     145      }
    144146    }
    145147
  • trunk/BNC/rinex/rnxnavfile.cpp

    r3747 r3748  
    161161// Read Next Ephemeris
    162162////////////////////////////////////////////////////////////////////////////
    163 t_eph* t_rnxNavFile::getNextEph() {
    164   if (!_ephs.empty()) {
     163t_eph* t_rnxNavFile::getNextEph(const bncTime& tt) {
     164  while (!_ephs.empty()) {
    165165    t_eph* eph = _ephs.front();
    166     _ephs.pop();
    167     return eph;
     166    bncTime ephTime(eph->GPSweek(), eph->GPSweeks());
     167    double dt = ephTime - tt;
     168    if (dt < 4*3600.0) {
     169      _ephs.pop();
     170      return eph;
     171    }
     172    else {
     173      return 0;
     174    }
    168175  }
    169176  return 0;
  • trunk/BNC/rinex/rnxnavfile.h

    r3746 r3748  
    2929#include <QtCore>
    3030#include "bncconst.h"
     31#include "bnctime.h"
    3132
    3233class t_pppOpt;
     
    5152  t_rnxNavFile(QString fileName);
    5253  ~t_rnxNavFile();
    53   t_eph* getNextEph();
     54  t_eph* getNextEph(const bncTime& tt);
    5455  float version() const {return _header.version();}
    5556  bool  glonass() const {return _header.glonass();}
Note: See TracChangeset for help on using the changeset viewer.