Changeset 6809 in ntrip


Ignore:
Timestamp:
Apr 30, 2015, 10:37:30 PM (9 years ago)
Author:
stuerze
Message:

I/NAV - F/NAV issue (hopefully:) solved in another way

Location:
trunk/BNC/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/bncephuser.cpp

    r6798 r6809  
    150150  }
    151151
    152   QString prn(newEph->prn().toString().c_str());
     152  QString prn(newEph->prn().toInternalString().c_str());
    153153
    154154  const t_eph* ephOld = ephLast(prn);
    155155
    156   if (ephOld == 0 ||
    157       newEph->isNewerThan(ephOld) ||
    158       newEph->hasOtherFlagsThan(ephOld)) {
     156  if (ephOld == 0 || newEph->isNewerThan(ephOld)) {
    159157    deque<t_eph*>& qq = _eph[prn];
    160158    qq.push_back(newEph);
     
    201199  // ----------------------------------------
    202200  const double MAXDIFF = 1000.0;
    203   QString      prn     = QString(eph->prn().toString().c_str());
     201  QString      prn     = QString(eph->prn().toInternalString().c_str());
    204202  t_eph*       ephL    = ephLast(prn);
    205203  if (ephL) {
     
    212210
    213211    if (diff < MAXDIFF) {
    214       if(dt != 0.0 || eph->hasOtherFlagsThan(ephL)) {
     212      if(dt != 0.0) {
    215213        eph->setCheckState(t_eph::ok);
    216214        ephL->setCheckState(t_eph::ok);
  • trunk/BNC/src/ephemeris.cpp

    r6803 r6809  
    2323  _orbCorr    = 0;
    2424  _clkCorr    = 0;
    25   _flags      = 0;
    2625}
    2726
     
    798797//////////////////////////////////////////////////////////////////////////////
    799798t_ephGal::t_ephGal(float rnxVersion, const QStringList& lines) {
    800 
     799  int       year, month, day, hour, min;
     800  double    sec;
     801  QString   prnStr;
    801802  const int nLines = 8;
    802 
    803803  if (lines.size() != nLines) {
    804804    _checkState = bad;
    805805    return;
    806806  }
     807  _flags = 0;
    807808
    808809  // RINEX Format
     
    826827      QTextStream in(line.left(pos[1]).toAscii());
    827828
    828       int    year, month, day, hour, min;
    829       double sec;
    830      
    831       QString prnStr;
    832829      in >> prnStr >> year >> month >> day >> hour >> min >> sec;
    833       if (prnStr.at(0) == 'E') {
    834         _prn.set('E', prnStr.mid(1).toInt());
    835       }
    836       else {
    837         _prn.set('E', prnStr.toInt());
    838       }
    839 
    840830      if      (year <  80) {
    841831        year += 2000;
     
    936926        // Bit 7-8
    937927        _E5bHS = double((int(SVhealth) >> 7) & 0x3);
     928
     929        if (prnStr.at(0) == 'E') {
     930          _prn.set('E', prnStr.mid(1,2).toInt(), _flags);
     931        }
     932        else {
     933          _prn.set('E', prnStr.mid(1,2).toInt(), _flags);
     934        }
    938935      }
    939936    }
     
    954951  _receptDateTime = currentDateAndTimeGPS();
    955952
    956   _prn.set('E', ee->satellite);
     953  _flags    = ee->flags;
     954  _prn.set('E', ee->satellite, _flags);
    957955
    958956  _TOC.set(ee->Week, ee->TOC);
     
    994992
    995993  _TOT      = 0.9999e9;
    996 
    997   _flags    = ee->flags;
    998994}
    999995
  • trunk/BNC/src/ephemeris.h

    r6798 r6809  
    3434  void    setCheckState(e_checkState checkState) {_checkState = checkState;}
    3535  t_prn   prn() const {return _prn;}
    36   int     flags() const {return _flags;}
    37   bool    hasOtherFlagsThan(const t_eph* eph) {return differentFlags(eph, this);}
    3836  t_irc   getCrd(const bncTime& tt, ColumnVector& xc, ColumnVector& vv, bool useCorr) const;
    3937  void    setOrbCorr(const t_orbCorr* orbCorr);
     
    4341  static QString rinexDateStr(const bncTime& tt, const QString& prnStr, double version);
    4442  static bool earlierTime(const t_eph* eph1, const t_eph* eph2) {return eph1->_TOC < eph2->_TOC;}
    45   static bool differentFlags(const t_eph* eph1, const t_eph* eph2) {return eph1->_flags != eph2->_flags;}
    4643
    4744 protected: 
     
    4946  t_prn        _prn;
    5047  bncTime      _TOC;
    51   int          _flags;
    5248  QDateTime    _receptDateTime;
    5349  e_checkState _checkState;
     
    155151 friend class t_ephEncoder;
    156152 public:
    157   t_ephGal() { }
     153  t_ephGal() : _flags(0) { };
    158154  t_ephGal(float rnxVersion, const QStringList& lines);
    159155  virtual ~t_ephGal() {}
     
    192188
    193189  double  _IDOT;             //  [rad/s]
    194   double _TOEweek;
     190  double  _TOEweek;
    195191  // spare
    196192
     
    202198  double  _BGD_1_5B;         //  group delay [s]
    203199
    204   double _TOT;               // [s]
     200  double  _TOT;              // [s]
     201
     202  int     _flags;            // GALEPHF_E5ADINVALID   E5aDVS set invalid
     203                             // GALEPHF_E5BDINVALID   E5bDVS set invalid
     204                             // GALEPHF_INAV          INAV data
     205                             // GALEPHF_FNAV          FNAV data
     206                             // GALEPHF_E1DINVALID    E1DVS set invalid
    205207};
    206208
  • trunk/BNC/src/rinex/reqcedit.cpp

    r6804 r6809  
    546546      const t_eph* ephOld = ephs[iOld];
    547547      if (ephOld->prn() == eph->prn() &&
    548           ephOld->TOC() == eph->TOC() &&
    549           ephOld->flags() == eph->flags()) {
     548          ephOld->TOC() == eph->TOC()) {
    550549        isNew = false;
    551550        break;
  • trunk/BNC/src/t_prn.cpp

    r6321 r6809  
    3636  stringstream ss;
    3737  ss << _system << setfill('0') << setw(2) << _number;
     38  return ss.str();
     39}
     40
     41//
     42//////////////////////////////////////////////////////////////////////////////
     43string t_prn::toInternalString() const {
     44  stringstream ss;
     45  ss << _system << setfill('0') << setw(2) << _number << '_' << _flags;
    3846  return ss.str();
    3947}
  • trunk/BNC/src/t_prn.h

    r6321 r6809  
    55
    66class t_prn {
    7  public:
    8   static const unsigned MAXPRN_GPS     = 32;
     7public:
     8  static const unsigned MAXPRN_GPS = 32;
    99  static const unsigned MAXPRN_GLONASS = 26;
    1010  static const unsigned MAXPRN_GALILEO = 36;
    11   static const unsigned MAXPRN_QZSS    = 10;
    12   static const unsigned MAXPRN_SBAS    = 38;
    13   static const unsigned MAXPRN_BDS     = 37;
    14   static const unsigned MAXPRN         = MAXPRN_GPS + MAXPRN_GLONASS + MAXPRN_GALILEO
    15                                                + MAXPRN_QZSS + MAXPRN_SBAS    + MAXPRN_BDS;
     11  static const unsigned MAXPRN_QZSS = 10;
     12  static const unsigned MAXPRN_SBAS = 38;
     13  static const unsigned MAXPRN_BDS = 37;
     14  static const unsigned MAXPRN = MAXPRN_GPS + MAXPRN_GLONASS + MAXPRN_GALILEO
     15      + MAXPRN_QZSS + MAXPRN_SBAS + MAXPRN_BDS;
    1616
    17   t_prn() : _system('G'), _number(0) {}
    18   t_prn(char system, int number) : _system(system), _number(number) {}
     17  t_prn() :
     18      _system('G'), _number(0), _flags(0) {
     19  }
     20  t_prn(char system, int number) :
     21      _system(system), _number(number), _flags(0) {
     22  }
    1923
    20   ~t_prn() {};
     24  t_prn(char system, int number, int flags) :
     25      _system(system), _number(number), _flags(flags) {
     26  }
    2127
    22   void        set(char system, int number) {_system = system; _number = number;}
    23   void        set(const std::string& str);
     28  ~t_prn() {
     29  }
    2430
    25   char        system() const {return _system;}
    26   int         number() const {return _number;}
    27   int         toInt() const;
     31  void set(char system, int number) {
     32    _system = system;
     33    _number = number;
     34    _flags  = 0;
     35  }
     36
     37  void set(char system, int number, int flags) {
     38    _system = system;
     39    _number = number;
     40    _flags  = flags;
     41  }
     42
     43  void set(const std::string& str);
     44
     45  char system() const {
     46    return _system;
     47  }
     48  int number() const {
     49    return _number;
     50  }
     51  int flags() const {
     52    return _flags;
     53  }
     54  int toInt() const;
    2855  std::string toString() const;
     56  std::string toInternalString() const;
    2957
    3058  bool operator==(const t_prn& prn2) const {
    31     if (_system == prn2._system && _number == prn2._number) {
     59    if (_system == prn2._system && _number == prn2._number
     60        && _flags == prn2._flags) {
    3261      return true;
    3362    }
     
    3968  operator unsigned() const;
    4069
    41   friend std::istream& operator >> (std::istream& in, t_prn& prn);
     70  friend std::istream& operator >>(std::istream& in, t_prn& prn);
    4271
    43  private:
     72private:
    4473  char _system;
    45   int  _number;
     74  int _number;
     75  int _flags;
    4676};
    4777
    48 std::istream& operator >> (std::istream& in, t_prn& prn);
     78std::istream& operator >>(std::istream& in, t_prn& prn);
    4979
    5080#endif
Note: See TracChangeset for help on using the changeset viewer.