Changeset 6518 in ntrip
- Timestamp:
- Dec 30, 2014, 2:36:15 PM (10 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppEphPool.cpp
r6465 r6518 26 26 ///////////////////////////////////////////////////////////////////////////// 27 27 void t_pppEphPool::putEphemeris(t_eph* eph) { 28 if (eph && eph-> ok()) {28 if (eph && eph->checkState() != t_eph::bad) { 29 29 _satEphPool[eph->prn().toInt()].putEphemeris(_maxQueueSize, eph); 30 30 } -
trunk/BNC/src/bncephuser.cpp
r6444 r6518 111 111 } 112 112 113 if (check) { 114 checkEphemeris(eph); 115 } 116 113 117 const t_ephGPS* ephGPS = dynamic_cast<const t_ephGPS*>(eph); 114 118 const t_ephGlo* ephGlo = dynamic_cast<const t_ephGlo*>(eph); … … 157 161 } 158 162 163 // 164 //////////////////////////////////////////////////////////////////////////// 165 void bncEphUser::checkEphemeris(const t_eph* eph) { 166 167 } -
trunk/BNC/src/bncephuser.h
r6445 r6518 72 72 73 73 private: 74 void checkEphemeris(const t_eph* eph); 74 75 QMutex _mutex; 75 76 static const unsigned _maxQueueSize = 5; -
trunk/BNC/src/ephemeris.cpp
r6400 r6518 21 21 //////////////////////////////////////////////////////////////////////////// 22 22 t_eph::t_eph() { 23 _ ok = false;24 _orbCorr = 0;25 _clkCorr = 0;23 _checkState = unchecked; 24 _orbCorr = 0; 25 _clkCorr = 0; 26 26 } 27 27 … … 43 43 //////////////////////////////////////////////////////////////////////////// 44 44 t_irc t_eph::getCrd(const bncTime& tt, ColumnVector& xc, ColumnVector& vv, bool useCorr) const { 45 46 if (_checkState == bad) { 47 return failure; 48 } 49 45 50 xc.ReSize(4); 46 51 vv.ReSize(3); … … 88 93 } 89 94 else { 90 _ ok = false;95 _checkState = bad; 91 96 return; 92 97 } … … 134 139 _TOT = 0.9999e9; 135 140 _fitInterval = 0.0; 136 137 _ok = true;138 141 } 139 142 … … 141 144 //////////////////////////////////////////////////////////////////////////// 142 145 t_irc t_ephGPS::position(int GPSweek, double GPSweeks, double* xc, double* vv) const { 146 147 if (_checkState == bad) { 148 return failure; 149 } 143 150 144 151 static const double omegaEarth = 7292115.1467e-11; … … 261 268 t_irc t_ephGlo::position(int GPSweek, double GPSweeks, double* xc, double* vv) const { 262 269 270 if (_checkState == bad) { 271 return failure; 272 } 273 263 274 static const double nominalStep = 10.0; 264 275 … … 402 413 _xv(5) = _y_velocity * 1.e3; 403 414 _xv(6) = _z_velocity * 1.e3; 404 405 _ok = true;406 415 } 407 416 … … 452 461 453 462 _flags = ee->flags; 454 455 _ok = true;456 463 } 457 464 … … 459 466 //////////////////////////////////////////////////////////////////////////// 460 467 t_irc t_ephGal::position(int GPSweek, double GPSweeks, double* xc, double* vv) const { 468 469 if (_checkState == bad) { 470 return failure; 471 } 461 472 462 473 static const double omegaEarth = 7292115.1467e-11; … … 545 556 const int nLines = 8; 546 557 547 _ok = false;548 549 558 if (lines.size() != nLines) { 559 _checkState = bad; 550 560 return; 551 561 } … … 596 606 readDbl(line, pos[2], fieldLen, _clock_drift ) || 597 607 readDbl(line, pos[3], fieldLen, _clock_driftrate) ) { 608 _checkState = bad; 598 609 return; 599 610 } … … 605 616 readDbl(line, pos[2], fieldLen, _Delta_n) || 606 617 readDbl(line, pos[3], fieldLen, _M0 ) ) { 618 _checkState = bad; 607 619 return; 608 620 } … … 614 626 readDbl(line, pos[2], fieldLen, _Cus ) || 615 627 readDbl(line, pos[3], fieldLen, _sqrt_A) ) { 628 _checkState = bad; 616 629 return; 617 630 } … … 623 636 readDbl(line, pos[2], fieldLen, _OMEGA0) || 624 637 readDbl(line, pos[3], fieldLen, _Cis ) ) { 638 _checkState = bad; 625 639 return; 626 640 } … … 632 646 readDbl(line, pos[2], fieldLen, _omega ) || 633 647 readDbl(line, pos[3], fieldLen, _OMEGADOT) ) { 648 _checkState = bad; 634 649 return; 635 650 } … … 641 656 readDbl(line, pos[2], fieldLen, _TOEweek ) || 642 657 readDbl(line, pos[3], fieldLen, _L2PFlag) ) { 658 _checkState = bad; 643 659 return; 644 660 } … … 650 666 readDbl(line, pos[2], fieldLen, _TGD ) || 651 667 readDbl(line, pos[3], fieldLen, _IODC ) ) { 668 _checkState = bad; 652 669 return; 653 670 } … … 656 673 else if ( iLine == 7 ) { 657 674 if ( readDbl(line, pos[0], fieldLen, _TOT) ) { 675 _checkState = bad; 658 676 return; 659 677 } … … 661 679 } 662 680 } 663 664 _ok = true;665 681 } 666 682 … … 671 687 const int nLines = 4; 672 688 673 _ok = false;674 675 689 if (lines.size() != nLines) { 690 _checkState = bad; 676 691 return; 677 692 } … … 722 737 readDbl(line, pos[2], fieldLen, _gamma) || 723 738 readDbl(line, pos[3], fieldLen, _tki ) ) { 739 _checkState = bad; 724 740 return; 725 741 } … … 733 749 readDbl(line, pos[2], fieldLen, _x_acceleration) || 734 750 readDbl(line, pos[3], fieldLen, _health ) ) { 751 _checkState = bad; 735 752 return; 736 753 } … … 742 759 readDbl(line, pos[2], fieldLen, _y_acceleration ) || 743 760 readDbl(line, pos[3], fieldLen, _frequency_number) ) { 761 _checkState = bad; 744 762 return; 745 763 } … … 751 769 readDbl(line, pos[2], fieldLen, _z_acceleration) || 752 770 readDbl(line, pos[3], fieldLen, _E ) ) { 771 _checkState = bad; 753 772 return; 754 773 } … … 766 785 _xv(5) = _y_velocity * 1.e3; 767 786 _xv(6) = _z_velocity * 1.e3; 768 769 _ok = true;770 787 } 771 788 … … 776 793 const int nLines = 8; 777 794 778 _ok = false;779 780 795 if (lines.size() != nLines) { 796 _checkState = bad; 781 797 return; 782 798 } … … 824 840 readDbl(line, pos[2], fieldLen, _clock_drift ) || 825 841 readDbl(line, pos[3], fieldLen, _clock_driftrate) ) { 842 _checkState = bad; 826 843 return; 827 844 } … … 833 850 readDbl(line, pos[2], fieldLen, _Delta_n) || 834 851 readDbl(line, pos[3], fieldLen, _M0 ) ) { 852 _checkState = bad; 835 853 return; 836 854 } … … 842 860 readDbl(line, pos[2], fieldLen, _Cus ) || 843 861 readDbl(line, pos[3], fieldLen, _sqrt_A) ) { 862 _checkState = bad; 844 863 return; 845 864 } … … 851 870 readDbl(line, pos[2], fieldLen, _OMEGA0) || 852 871 readDbl(line, pos[3], fieldLen, _Cis ) ) { 872 _checkState = bad; 853 873 return; 854 874 } … … 860 880 readDbl(line, pos[2], fieldLen, _omega ) || 861 881 readDbl(line, pos[3], fieldLen, _OMEGADOT) ) { 882 _checkState = bad; 862 883 return; 863 884 } … … 867 888 if ( readDbl(line, pos[0], fieldLen, _IDOT ) || 868 889 readDbl(line, pos[2], fieldLen, _TOEweek) ) { 890 _checkState = bad; 869 891 return; 870 892 } … … 876 898 readDbl(line, pos[2], fieldLen, _BGD_1_5A) || 877 899 readDbl(line, pos[3], fieldLen, _BGD_1_5B) ) { 900 _checkState = bad; 878 901 return; 879 902 } … … 882 905 else if ( iLine == 7 ) { 883 906 if ( readDbl(line, pos[0], fieldLen, _TOT) ) { 884 return; 885 } 886 } 887 } 888 889 _ok = true; 907 _checkState = bad; 908 return; 909 } 910 } 911 } 890 912 } 891 913 … … 1107 1129 const int nLines = 4; 1108 1130 1109 _ok = false;1110 1111 1131 if (lines.size() != nLines) { 1132 _checkState = bad; 1112 1133 return; 1113 1134 } … … 1155 1176 readDbl(line, pos[2], fieldLen, _agf1 ) || 1156 1177 readDbl(line, pos[3], fieldLen, _TOW ) ) { 1178 _checkState = bad; 1157 1179 return; 1158 1180 } … … 1164 1186 readDbl(line, pos[2], fieldLen, _x_acceleration) || 1165 1187 readDbl(line, pos[3], fieldLen, _health ) ) { 1188 _checkState = bad; 1166 1189 return; 1167 1190 } … … 1173 1196 readDbl(line, pos[2], fieldLen, _y_acceleration ) || 1174 1197 readDbl(line, pos[3], fieldLen, _ura ) ) { 1198 _checkState = bad; 1175 1199 return; 1176 1200 } … … 1182 1206 readDbl(line, pos[2], fieldLen, _z_acceleration) || 1183 1207 readDbl(line, pos[3], fieldLen, _IODN ) ) { 1208 _checkState = bad; 1184 1209 return; 1185 1210 } … … 1196 1221 _y_acceleration *= 1.e3; 1197 1222 _z_acceleration *= 1.e3; 1198 1199 _ok = true;1200 1223 } 1201 1224 … … 1227 1250 _ura = ee->URA; 1228 1251 1229 _ok = true;1230 1252 _health = 0; 1231 1253 } … … 1234 1256 //////////////////////////////////////////////////////////////////////////// 1235 1257 t_irc t_ephSBAS::position(int GPSweek, double GPSweeks, double* xc, double* vv) const { 1258 1259 if (_checkState == bad) { 1260 return failure; 1261 } 1236 1262 1237 1263 bncTime tt(GPSweek, GPSweeks); … … 1293 1319 const int nLines = 8; 1294 1320 1295 _ok = false;1296 1297 1321 if (lines.size() != nLines) { 1322 _checkState = bad; 1298 1323 return; 1299 1324 } … … 1345 1370 readDbl(line, pos[2], fieldLen, _clock_drift ) || 1346 1371 readDbl(line, pos[3], fieldLen, _clock_driftrate) ) { 1372 _checkState = bad; 1347 1373 return; 1348 1374 } … … 1355 1381 readDbl(line, pos[2], fieldLen, _Delta_n) || 1356 1382 readDbl(line, pos[3], fieldLen, _M0 ) ) { 1383 _checkState = bad; 1357 1384 return; 1358 1385 } … … 1365 1392 readDbl(line, pos[2], fieldLen, _Cus ) || 1366 1393 readDbl(line, pos[3], fieldLen, _sqrt_A) ) { 1394 _checkState = bad; 1367 1395 return; 1368 1396 } … … 1374 1402 readDbl(line, pos[2], fieldLen, _OMEGA0) || 1375 1403 readDbl(line, pos[3], fieldLen, _Cis ) ) { 1404 _checkState = bad; 1376 1405 return; 1377 1406 } … … 1383 1412 readDbl(line, pos[2], fieldLen, _omega ) || 1384 1413 readDbl(line, pos[3], fieldLen, _OMEGADOT) ) { 1414 _checkState = bad; 1385 1415 return; 1386 1416 } … … 1390 1420 if ( readDbl(line, pos[0], fieldLen, _IDOT ) || 1391 1421 readDbl(line, pos[2], fieldLen, TOEw) ) { 1422 _checkState = bad; 1392 1423 return; 1393 1424 } … … 1399 1430 readDbl(line, pos[2], fieldLen, _TGD1) || 1400 1431 readDbl(line, pos[3], fieldLen, _TGD2) ) { 1432 _checkState = bad; 1401 1433 return; 1402 1434 } … … 1408 1440 if ( readDbl(line, pos[0], fieldLen, TOTs) || 1409 1441 readDbl(line, pos[1], fieldLen, aodc) ) { 1442 _checkState = bad; 1410 1443 return; 1411 1444 } … … 1428 1461 // but it seems to be unreliable in RINEX files 1429 1462 _TOT = _TOC; 1430 1431 _ok = true;1432 1463 } 1433 1464 … … 1435 1466 ////////////////////////////////////////////////////////////////////////////// 1436 1467 t_irc t_ephCompass::position(int GPSweek, double GPSweeks, double* xc, double* vv) const { 1468 1469 if (_checkState == bad) { 1470 return failure; 1471 } 1437 1472 1438 1473 static const double gmCompass = 398.6004418e12; -
trunk/BNC/src/ephemeris.h
r6400 r6518 20 20 public: 21 21 enum e_type {unknown, GPS, QZSS, GLONASS, Galileo, SBAS, Compass}; 22 enum e_checkState {unchecked, ok, suspicious, bad}; 22 23 23 24 t_eph(); … … 28 29 virtual int IOD() const = 0; 29 30 virtual int slotNum() const {return 0;} 30 bool ok() const {return _ok;}31 31 bncTime TOC() const {return _TOC;} 32 32 bool isNewerThan(const t_eph* eph) const {return earlierTime(eph, this);} 33 e_checkState checkState() const {return _checkState;} 33 34 t_prn prn() const {return _prn;} 34 35 t_irc getCrd(const bncTime& tt, ColumnVector& xc, ColumnVector& vv, bool useCorr) const; … … 42 43 protected: 43 44 virtual t_irc position(int GPSweek, double GPSweeks, double* xc, double* vv) const = 0; 44 t_prn _prn;45 bncTime _TOC;46 QDateTime _receptDateTime;47 bool _ok;48 t_orbCorr* _orbCorr;49 t_clkCorr* _clkCorr;45 t_prn _prn; 46 bncTime _TOC; 47 QDateTime _receptDateTime; 48 e_checkState _checkState; 49 t_orbCorr* _orbCorr; 50 t_clkCorr* _clkCorr; 50 51 }; 51 52 -
trunk/BNC/src/rinex/rnxnavfile.cpp
r6401 r6518 200 200 eph = new t_ephCompass(version(), lines); 201 201 } 202 if (eph && eph-> ok()) {202 if (eph && eph->checkState() != t_eph::bad) { 203 203 _ephs.push_back(eph); 204 204 }
Note:
See TracChangeset
for help on using the changeset viewer.