Changeset 6798 in ntrip


Ignore:
Timestamp:
Apr 27, 2015, 4:00:38 PM (9 years ago)
Author:
stuerze
Message:

considerationn of the aspect that Galileo navigation messages can be provided for the same epoch but with different flags, e.g.: I/NAV, F/NAV, changed DVS;
simplification for accuracy entries that can be provided as index or in meter

Location:
trunk/BNC/src
Files:
3 edited

Legend:

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

    r6598 r6798  
    154154  const t_eph* ephOld = ephLast(prn);
    155155
    156   if (ephOld == 0 || newEph->isNewerThan(ephOld)) {
     156  if (ephOld == 0 ||
     157      newEph->isNewerThan(ephOld) ||
     158      newEph->hasOtherFlagsThan(ephOld)) {
    157159    deque<t_eph*>& qq = _eph[prn];
    158160    qq.push_back(newEph);
     
    210212
    211213    if (diff < MAXDIFF) {
    212       if (dt != 0.0) {
     214      if(dt != 0.0 || eph->hasOtherFlagsThan(ephL)) {
    213215        eph->setCheckState(t_eph::ok);
    214216        ephL->setCheckState(t_eph::ok);
  • trunk/BNC/src/ephemeris.cpp

    r6793 r6798  
    2323  _orbCorr    = 0;
    2424  _clkCorr    = 0;
     25  _flags      = 0;
    2526}
    2627
     
    426427void t_ephGal::set(const galileoephemeris* ee) {
    427428
    428   _SISA     = -1.0; // set RINEX entry to invalid
    429 
    430429  _receptDateTime = currentDateAndTimeGPS();
    431430
     
    448447
    449448  _TOEsec   = _TOC.gpssec();
     449  //  _TOEsec   = ee->TOE;  // TODO:
    450450
    451451  _Cic      = ee->Cic;
     
    461461  _TOEweek  = ee->Week;
    462462 
    463   _SISAI    = ee->SISA; // index from RTCM
     463  if ((ee->SISA >= 0) && (ee->SISA <= 49)) {
     464    _SISA = ee->SISA / 100.0;
     465  }
     466  else if((ee->SISA >= 50) && (ee->SISA <= 74)) {
     467    _SISA = (50 + (ee->SISA - 50.0) * 2.0) / 100.0;
     468  }
     469  else if((ee->SISA >= 75) && (ee->SISA <= 99)) {
     470    _SISA = 1.0 + (ee->SISA - 75.0) * 0.04;
     471  }
     472  else if((ee->SISA >= 100) && (ee->SISA <= 125)) {
     473    _SISA = 2.0 + (ee->SISA - 100.0) * 0.16;
     474  }
     475  else if (ee->SISA >= 126 ) {
     476    _SISA = -1.0;
     477  }
    464478  _E5aHS    = ee->E5aHS;
    465479  _E5bHS    = ee->E5bHS;
     
    813827  double SVhealth = 0.0;
    814828  double datasource = 0.0;
     829
    815830  int pos[4];
    816   _SISAI = -1; // set index from RTCM invalid
    817831  pos[0] = (rnxVersion <= 2.12) ?  3 :  4;
    818832  pos[1] = pos[0] + fieldLen;
     
    11961210    .arg(0.0,                19, 'e', 12);
    11971211
    1198   // RINEX file input
    1199   double SISA = _SISA; // [m]
    1200   // RTCM stream input
    1201   if ((_SISAI >= 0) && (_SISAI <= 49)) {
    1202     SISA = _SISAI / 100.0;
    1203   }
    1204   if((_SISAI >= 50) && (_SISAI <= 74)) {
    1205     SISA = (50 + (_SISAI - 50.0) * 2.0) / 100.0;
    1206   }
    1207   if((_SISAI >= 75) && (_SISAI <= 99)) {
    1208     SISA = 1.0 + (_SISAI - 75.0) * 0.04;
    1209   }
    1210   if((_SISAI >= 100) && (_SISAI <= 125)) {
    1211     SISA = 2.0 + (_SISAI - 100.0) * 0.16;
    1212   }
    1213   if (_SISAI >= 126 ) {
    1214     SISA = -1.0;
    1215   }
    1216   out << QString(fmt)
    1217     .arg(SISA,             19, 'e', 12)
     1212  out << QString(fmt)
     1213    .arg(_SISA,            19, 'e', 12)
    12181214    .arg(double(SVhealth), 19, 'e', 12)
    12191215    .arg(BGD_1_5A,         19, 'e', 12)
     
    14361432  int fieldLen = 19;
    14371433  double TOEw;
    1438   _URAI = -1; // RINEX usage: set RTCM entry to be undefined
    14391434
    14401435  int pos[4];
     
    16181613  _TGD2     = ee->TGD_B2_B3;
    16191614
    1620   _URAI     = ee->URAI;
     1615  if ((ee->URAI <  6) && (ee->URAI >= 0)) {
     1616    _URA = ceil(10.0 * pow(2.0, ((double)ee->URAI/2.0) + 1.0)) / 10.0;
     1617  }
     1618  if ((ee->URAI >= 6) && (ee->URAI < 15)) {
     1619    _URA = ceil(10.0 * pow(2.0, ((double)ee->URAI/2.0)      )) / 10.0;
     1620  }
    16211621  _SatH1    = (ee->flags & BDSEPHF_SATH1) ? 1: 0;
    16221622
     
    17961796    .arg(_OMEGADOT, 19, 'e', 12);
    17971797
    1798 
    17991798  out << QString(fmt)
    18001799    .arg(_IDOT,                             19, 'e', 12)
     
    18031802    .arg(0.0,                               19, 'e', 12);
    18041803
    1805   // RINEX file input
    1806   double ura = _URA;
    1807   // RTCM stream input
    1808   if ((_URAI <  6) && (_URAI >= 0)) {
    1809     ura = ceil(10.0 * pow(2.0, ((double)_URAI/2.0) + 1.0)) / 10.0;
    1810   }
    1811   if ((_URAI >= 6) && (_URAI < 15)) {
    1812     ura = ceil(10.0 * pow(2.0, ((double)_URAI/2.0)      )) / 10.0;
    1813   }
    1814   out << QString(fmt)
    1815     .arg(ura,            19, 'e', 12)
     1804  out << QString(fmt)
     1805    .arg(_URA,           19, 'e', 12)
    18161806    .arg(double(_SatH1), 19, 'e', 12)
    18171807    .arg(_TGD1,          19, 'e', 12)
  • trunk/BNC/src/ephemeris.h

    r6794 r6798  
    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);}
    3638  t_irc   getCrd(const bncTime& tt, ColumnVector& xc, ColumnVector& vv, bool useCorr) const;
    3739  void    setOrbCorr(const t_orbCorr* orbCorr);
     
    4143  static QString rinexDateStr(const bncTime& tt, const QString& prnStr, double version);
    4244  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;}
    4346
    4447 protected: 
     
    4649  t_prn        _prn;
    4750  bncTime      _TOC;
     51  int          _flags;
    4852  QDateTime    _receptDateTime;
    4953  e_checkState _checkState;
     
    98102  double  _L2PFlag;         // L2 P data flag
    99103
    100   mutable double  _ura;             // SV accuracy
     104  mutable double  _ura;     // SV accuracy
    101105  double  _health;          // SV health
    102106  double  _TGD;             // [s]   
     
    191195  // spare
    192196
    193   int     _SISAI;            //  [0..255] Signal In Space Accuracy Index from RTCM stream
    194   double  _SISA;             //  [m]      Signal In Space Accuracy from RINEX file
    195   // Health Status
    196   //   0: signal OK, 1: signal out of service, 2: signal will be out of service
    197   //   3: signal component currently in test
     197  mutable double  _SISA;     // Signal In Space Accuracy
    198198  double  _E5aHS;            //  [0..3] E5a Health Status
    199199  double  _E5bHS;            //  [0..3] E5b Health Status
     
    203203
    204204  double _TOT;               // [s]
    205   int    _flags;
    206205};
    207206
     
    238237  double _z_acceleration; // [m/s^2]
    239238
    240   double _ura;
     239  mutable double _ura;
    241240  double _health;
    242241};
     
    263262  int     _AODE;
    264263  int     _AODC;
    265   int     _URAI;             //  [0..15] index from RTCM stream
    266   double  _URA;              //  [m]     from RINEX file
     264  mutable double  _URA;      //  user range accuracy
    267265  double  _clock_bias;       //  [s]   
    268266  double  _clock_drift;      //  [s/s] 
Note: See TracChangeset for help on using the changeset viewer.