Changeset 9370 in ntrip
- Timestamp:
- Mar 11, 2021, 2:50:05 PM (4 years ago)
- Location:
- branches/BNC_2.12/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/BNC_2.12/src/ephemeris.cpp
r9291 r9370 153 153 // Constructor 154 154 ////////////////////////////////////////////////////////////////////////////// 155 t_ephGPS::t_ephGPS( floatrnxVersion, const QStringList& lines) {155 t_ephGPS::t_ephGPS(double rnxVersion, const QStringList& lines) { 156 156 157 157 const int nLines = 8; … … 511 511 // Constructor 512 512 ////////////////////////////////////////////////////////////////////////////// 513 t_ephGlo::t_ephGlo(float rnxVersion, const QStringList& lines) { 514 515 const int nLines = 4; 513 t_ephGlo::t_ephGlo(double rnxVersion, const QStringList& lines) { 514 515 int nLines = 4; 516 if (rnxVersion >= 3.05) { 517 nLines += 1; 518 _flags_unknown = false; 519 } 520 else { 521 _M_delta_tau = 0.9999e9; // unknown 522 _M_FT = 1.5e1; // unknown 523 _flags_unknown = true; 524 } 516 525 517 526 if (lines.size() != nLines) { … … 523 532 // ------------ 524 533 int fieldLen = 19; 534 double statusflags = 0.0; 535 double healthflags = 0.0; 525 536 526 537 int pos[4]; … … 604 615 _checkState = bad; 605 616 return; 617 } 618 } 619 620 else if ( iLine == 4 ) { 621 if ( readDbl(line, pos[0], fieldLen, statusflags ) || 622 readDbl(line, pos[1], fieldLen, _M_delta_tau ) || 623 readDbl(line, pos[2], fieldLen, _M_FT ) || 624 readDbl(line, pos[3], fieldLen, healthflags ) ) { 625 _checkState = bad; 626 return; 627 } 628 else { 629 // status flags 630 // ============ 631 // bit 0-1 632 _M_P = double(bitExtracted(statusflags, 2, 0)); 633 // bit 2-3 634 _P1 = double(bitExtracted(statusflags, 2, 2)); 635 // bit 4 636 _P2 = double(bitExtracted(statusflags, 1, 4)); 637 // bit 5 638 _P3 = double(bitExtracted(statusflags, 1, 5)); 639 // bit 6 640 _M_P4 = double(bitExtracted(statusflags, 1, 6)); 641 // bit 7-8 642 _M_M = double(bitExtracted(statusflags, 2, 7)); 643 /// GLO M/K exclusive flags/values only valid if flag M is set to '01' 644 if (!_M_M) { 645 _M_P4 = 0.0; 646 _M_P = 0.0; 647 } 648 // health flags 649 // ============ 650 // bit 0 (is to be ignored, if bit 1 is zero) 651 _almanac_health = double(bitExtracted(healthflags, 1, 0)); 652 // bit 1 653 _almanac_health_availablility_indicator = double(bitExtracted(healthflags, 1, 1)); 654 // bit 2 655 _M_l3 = double(bitExtracted(healthflags, 1, 2)); 606 656 } 607 657 } … … 702 752 .arg(_E, 19, 'e', 12); 703 753 754 if (version >= 3.05) { 755 // unknown (RINEX version < 3.05) 756 if (_flags_unknown) { 757 out << QString(fmt) 758 .arg("", 19, QChar(' ')) // statusflags blank if unknown 759 .arg(_M_delta_tau, 19, 'e', 12) 760 .arg(_M_FT, 19, 'e', 12) 761 .arg("", 19, QChar(' ')); // healthflags blank if unknown 762 } 763 else { 764 int statusflags = 0; 765 // bit 7-8 766 if (_M_M == 2.0) { 767 statusflags |= (1<<7); 768 } 769 // bit 6 770 if (_M_P4) { 771 statusflags |= (1<<6); 772 } 773 // bit 5 774 if (_P3) { 775 statusflags |= (1<<5); 776 } 777 // bit 4 778 if (_P2) { 779 statusflags |= (1<<4); 780 } 781 // bit 2-3 782 if (_P1 == 2.0) { 783 statusflags |= (1<<2); 784 } 785 else if (_P1 == 1.0) { 786 statusflags |= (1<<3); 787 } 788 else if (_P1 == 3.0) { 789 statusflags |= (1<<2); 790 statusflags |= (1<<3); 791 } 792 // bit 0-1 793 if (_M_P == 2.0) { 794 statusflags |= (1<<0); 795 } 796 else if (_M_P == 1.0) { 797 statusflags |= (1<<1); 798 } 799 else if (_M_P == 3.0) { 800 statusflags |= (1<<0); 801 statusflags |= (1<<1); 802 } 803 // health flags 804 // ============ 805 int healthflags = 0; 806 // bit 0 (is to be ignored, if bit 1 is zero) 807 if (_almanac_health) { 808 healthflags |= (1<<0); 809 } 810 // bit 1 811 if (_almanac_health_availablility_indicator) { 812 healthflags |= (1<<1); 813 } 814 // bit 2 815 if (_M_l3) { 816 healthflags |= (1<<2); 817 } 818 out << QString(fmt) 819 .arg(double(statusflags), 19, 'e', 12) 820 .arg(_M_delta_tau, 19, 'e', 12) 821 .arg(_M_FT, 19, 'e', 12) 822 .arg(double(healthflags), 19, 'e', 12); 823 } 824 } 825 704 826 return rnxStr; 705 827 } … … 770 892 // Constructor 771 893 ////////////////////////////////////////////////////////////////////////////// 772 t_ephGal::t_ephGal( floatrnxVersion, const QStringList& lines) {894 t_ephGal::t_ephGal(double rnxVersion, const QStringList& lines) { 773 895 int year, month, day, hour, min; 774 896 double sec; … … 890 1012 } else { 891 1013 // Bit 0 892 _e1DataInValid = (int(SVhealth) & (1<<0));1014 _e1DataInValid = (int(SVhealth) & (1<<0)); 893 1015 // Bit 1-2 894 _E1_bHS = double((int(SVhealth) >> 1) & 0x3);1016 _E1_bHS = double((int(SVhealth) >> 1) & 0x3); 895 1017 // Bit 3 896 1018 _e5aDataInValid = (int(SVhealth) & (1<<3)); 897 1019 // Bit 4-5 898 _E5aHS = double((int(SVhealth) >> 4) & 0x3);1020 _E5aHS = double((int(SVhealth) >> 4) & 0x3); 899 1021 // Bit 6 900 1022 _e5bDataInValid = (int(SVhealth) & (1<<6)); 901 1023 // Bit 7-8 902 _E5bHS = double((int(SVhealth) >> 7) & 0x3);1024 _E5bHS = double((int(SVhealth) >> 7) & 0x3); 903 1025 904 1026 if (prnStr.at(0) == 'E') { … … 1161 1283 // Constructor 1162 1284 ////////////////////////////////////////////////////////////////////////////// 1163 t_ephSBAS::t_ephSBAS( floatrnxVersion, const QStringList& lines) {1285 t_ephSBAS::t_ephSBAS(double rnxVersion, const QStringList& lines) { 1164 1286 1165 1287 const int nLines = 4; … … 1354 1476 // Constructor 1355 1477 ////////////////////////////////////////////////////////////////////////////// 1356 t_ephBDS::t_ephBDS( floatrnxVersion, const QStringList& lines) {1478 t_ephBDS::t_ephBDS(double rnxVersion, const QStringList& lines) { 1357 1479 1358 1480 const int nLines = 8; -
branches/BNC_2.12/src/ephemeris.h
r9321 r9370 91 91 _receptStaID = ""; 92 92 } 93 t_ephGPS( floatrnxVersion, const QStringList& lines);93 t_ephGPS(double rnxVersion, const QStringList& lines); 94 94 virtual ~t_ephGPS() {} 95 95 … … 190 190 _M_l5 = 0.0; 191 191 _receptStaID = ""; 192 _flags_unknown = true; 192 193 } 193 t_ephGlo( floatrnxVersion, const QStringList& lines);194 t_ephGlo(double rnxVersion, const QStringList& lines); 194 195 virtual ~t_ephGlo() {} 195 196 … … 241 242 double _M_delta_tau; // [sec] 242 243 double _M_P4; // flag to show that ephemeris parameters are present [-] 243 double _M_FT; // indicator for predicted satellite user range accuracy[-]244 double _M_FT; // Indicator for predicted satellite User Range Accuracy (URAI) [-] 244 245 double _M_NT; // current date, calendar number of day within 4-year interval [days] 245 246 double _M_M; // type of satellite transmitting navigation signal: 0 = GLONASS, 1 = GLONASS-M satellite [-] … … 247 248 double _M_tau_GPS; // correction to GPS time relative to GLONASS time [days] 248 249 double _M_l5; // health flag 250 bool _flags_unknown; // status and health flags are unknown (rnx version < 3.05) or known (rnx version >= 3.05) 249 251 }; 250 252 … … 284 286 _receptStaID = ""; 285 287 }; 286 t_ephGal( floatrnxVersion, const QStringList& lines);288 t_ephGal(double rnxVersion, const QStringList& lines); 287 289 virtual ~t_ephGal() {} 288 290 … … 365 367 _receptStaID = ""; 366 368 } 367 t_ephSBAS( floatrnxVersion, const QStringList& lines);369 t_ephSBAS(double rnxVersion, const QStringList& lines); 368 370 virtual ~t_ephSBAS() {} 369 371 … … 433 435 _receptStaID = ""; 434 436 } 435 t_ephBDS( floatrnxVersion, const QStringList& lines);437 t_ephBDS(double rnxVersion, const QStringList& lines); 436 438 virtual ~t_ephBDS() {} 437 439 -
branches/BNC_2.12/src/rinex/rnxnavfile.cpp
r8370 r9370 175 175 } 176 176 else if (prn[0] == 'R') { 177 for (int ii = 1; ii < 4; ii++) { 177 int num = 4; 178 if (version() >= 3.05) { 179 num += 1; 180 } 181 for (int ii = 1; ii < num; ii++) { 178 182 lines << stream->readLine(); 179 183 } … … 287 291 } 288 292 else { 289 293 QString fmt; 290 294 t_eph::e_type sys = satSystem(); 291 295 switch(sys) { -
branches/BNC_2.12/src/rinex/rnxnavfile.h
r8639 r9370 37 37 38 38 #define defaultRnxNavVersion2 2.11 39 #define defaultRnxNavVersion3 3.0 439 #define defaultRnxNavVersion3 3.05 40 40 41 41 class t_rnxNavFile {
Note:
See TracChangeset
for help on using the changeset viewer.