Changeset 6798 in ntrip
- Timestamp:
- Apr 27, 2015, 4:00:38 PM (10 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncephuser.cpp
r6598 r6798 154 154 const t_eph* ephOld = ephLast(prn); 155 155 156 if (ephOld == 0 || newEph->isNewerThan(ephOld)) { 156 if (ephOld == 0 || 157 newEph->isNewerThan(ephOld) || 158 newEph->hasOtherFlagsThan(ephOld)) { 157 159 deque<t_eph*>& qq = _eph[prn]; 158 160 qq.push_back(newEph); … … 210 212 211 213 if (diff < MAXDIFF) { 212 if 214 if(dt != 0.0 || eph->hasOtherFlagsThan(ephL)) { 213 215 eph->setCheckState(t_eph::ok); 214 216 ephL->setCheckState(t_eph::ok); -
trunk/BNC/src/ephemeris.cpp
r6793 r6798 23 23 _orbCorr = 0; 24 24 _clkCorr = 0; 25 _flags = 0; 25 26 } 26 27 … … 426 427 void t_ephGal::set(const galileoephemeris* ee) { 427 428 428 _SISA = -1.0; // set RINEX entry to invalid429 430 429 _receptDateTime = currentDateAndTimeGPS(); 431 430 … … 448 447 449 448 _TOEsec = _TOC.gpssec(); 449 // _TOEsec = ee->TOE; // TODO: 450 450 451 451 _Cic = ee->Cic; … … 461 461 _TOEweek = ee->Week; 462 462 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 } 464 478 _E5aHS = ee->E5aHS; 465 479 _E5bHS = ee->E5bHS; … … 813 827 double SVhealth = 0.0; 814 828 double datasource = 0.0; 829 815 830 int pos[4]; 816 _SISAI = -1; // set index from RTCM invalid817 831 pos[0] = (rnxVersion <= 2.12) ? 3 : 4; 818 832 pos[1] = pos[0] + fieldLen; … … 1196 1210 .arg(0.0, 19, 'e', 12); 1197 1211 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) 1218 1214 .arg(double(SVhealth), 19, 'e', 12) 1219 1215 .arg(BGD_1_5A, 19, 'e', 12) … … 1436 1432 int fieldLen = 19; 1437 1433 double TOEw; 1438 _URAI = -1; // RINEX usage: set RTCM entry to be undefined1439 1434 1440 1435 int pos[4]; … … 1618 1613 _TGD2 = ee->TGD_B2_B3; 1619 1614 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 } 1621 1621 _SatH1 = (ee->flags & BDSEPHF_SATH1) ? 1: 0; 1622 1622 … … 1796 1796 .arg(_OMEGADOT, 19, 'e', 12); 1797 1797 1798 1799 1798 out << QString(fmt) 1800 1799 .arg(_IDOT, 19, 'e', 12) … … 1803 1802 .arg(0.0, 19, 'e', 12); 1804 1803 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) 1816 1806 .arg(double(_SatH1), 19, 'e', 12) 1817 1807 .arg(_TGD1, 19, 'e', 12) -
trunk/BNC/src/ephemeris.h
r6794 r6798 34 34 void setCheckState(e_checkState checkState) {_checkState = checkState;} 35 35 t_prn prn() const {return _prn;} 36 int flags() const {return _flags;} 37 bool hasOtherFlagsThan(const t_eph* eph) {return differentFlags(eph, this);} 36 38 t_irc getCrd(const bncTime& tt, ColumnVector& xc, ColumnVector& vv, bool useCorr) const; 37 39 void setOrbCorr(const t_orbCorr* orbCorr); … … 41 43 static QString rinexDateStr(const bncTime& tt, const QString& prnStr, double version); 42 44 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;} 43 46 44 47 protected: … … 46 49 t_prn _prn; 47 50 bncTime _TOC; 51 int _flags; 48 52 QDateTime _receptDateTime; 49 53 e_checkState _checkState; … … 98 102 double _L2PFlag; // L2 P data flag 99 103 100 mutable double _ura; 104 mutable double _ura; // SV accuracy 101 105 double _health; // SV health 102 106 double _TGD; // [s] … … 191 195 // spare 192 196 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 198 198 double _E5aHS; // [0..3] E5a Health Status 199 199 double _E5bHS; // [0..3] E5b Health Status … … 203 203 204 204 double _TOT; // [s] 205 int _flags;206 205 }; 207 206 … … 238 237 double _z_acceleration; // [m/s^2] 239 238 240 double _ura; 239 mutable double _ura; 241 240 double _health; 242 241 }; … … 263 262 int _AODE; 264 263 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 267 265 double _clock_bias; // [s] 268 266 double _clock_drift; // [s/s]
Note:
See TracChangeset
for help on using the changeset viewer.