Changeset 9367 in ntrip
- Timestamp:
- Mar 11, 2021, 2:11:20 PM (4 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/ephemeris.cpp
r9290 r9367 150 150 // Constructor 151 151 ////////////////////////////////////////////////////////////////////////////// 152 t_ephGPS::t_ephGPS( floatrnxVersion, const QStringList& lines) {152 t_ephGPS::t_ephGPS(double rnxVersion, const QStringList& lines) { 153 153 154 154 const int nLines = 8; … … 508 508 // Constructor 509 509 ////////////////////////////////////////////////////////////////////////////// 510 t_ephGlo::t_ephGlo(float rnxVersion, const QStringList& lines) { 511 512 const int nLines = 4; 510 t_ephGlo::t_ephGlo(double rnxVersion, const QStringList& lines) { 511 512 int nLines = 4; 513 if (rnxVersion >= 3.05) { 514 nLines += 1; 515 _flags_unknown = false; 516 } 517 else { 518 _M_delta_tau = 0.9999e9; // unknown 519 _M_FT = 1.5e1; // unknown 520 _flags_unknown = true; 521 } 513 522 514 523 if (lines.size() != nLines) { … … 520 529 // ------------ 521 530 int fieldLen = 19; 531 double statusflags = 0.0; 532 double healthflags = 0.0; 522 533 523 534 int pos[4]; … … 601 612 _checkState = bad; 602 613 return; 614 } 615 } 616 617 else if ( iLine == 4 ) { 618 if ( readDbl(line, pos[0], fieldLen, statusflags ) || 619 readDbl(line, pos[1], fieldLen, _M_delta_tau ) || 620 readDbl(line, pos[2], fieldLen, _M_FT ) || 621 readDbl(line, pos[3], fieldLen, healthflags ) ) { 622 _checkState = bad; 623 return; 624 } 625 else { 626 // status flags 627 // ============ 628 // bit 0-1 629 _M_P = double(bitExtracted(statusflags, 2, 0)); 630 // bit 2-3 631 _P1 = double(bitExtracted(statusflags, 2, 2)); 632 // bit 4 633 _P2 = double(bitExtracted(statusflags, 1, 4)); 634 // bit 5 635 _P3 = double(bitExtracted(statusflags, 1, 5)); 636 // bit 6 637 _M_P4 = double(bitExtracted(statusflags, 1, 6)); 638 // bit 7-8 639 _M_M = double(bitExtracted(statusflags, 2, 7)); 640 /// GLO M/K exclusive flags/values only valid if flag M is set to '01' 641 if (!_M_M) { 642 _M_P4 = 0.0; 643 _M_P = 0.0; 644 } 645 // health flags 646 // ============ 647 // bit 0 (is to be ignored, if bit 1 is zero) 648 _almanac_health = double(bitExtracted(healthflags, 1, 0)); 649 // bit 1 650 _almanac_health_availablility_indicator = double(bitExtracted(healthflags, 1, 1)); 651 // bit 2 652 _M_l3 = double(bitExtracted(healthflags, 1, 2)); 603 653 } 604 654 } … … 699 749 .arg(_E, 19, 'e', 12); 700 750 751 if (version >= 3.05) { 752 // unknown (RINEX version < 3.05) 753 if (_flags_unknown) { 754 out << QString(fmt) 755 .arg("", 19, QChar(' ')) // statusflags blank if unknown 756 .arg(_M_delta_tau, 19, 'e', 12) 757 .arg(_M_FT, 19, 'e', 12) 758 .arg("", 19, QChar(' ')); // healthflags blank if unknown 759 } 760 else { 761 int statusflags = 0; 762 // bit 7-8 763 if (_M_M == 2.0) { 764 statusflags |= (1<<7); 765 } 766 // bit 6 767 if (_M_P4) { 768 statusflags |= (1<<6); 769 } 770 // bit 5 771 if (_P3) { 772 statusflags |= (1<<5); 773 } 774 // bit 4 775 if (_P2) { 776 statusflags |= (1<<4); 777 } 778 // bit 2-3 779 if (_P1 == 2.0) { 780 statusflags |= (1<<2); 781 } 782 else if (_P1 == 1.0) { 783 statusflags |= (1<<3); 784 } 785 else if (_P1 == 3.0) { 786 statusflags |= (1<<2); 787 statusflags |= (1<<3); 788 } 789 // bit 0-1 790 if (_M_P == 2.0) { 791 statusflags |= (1<<0); 792 } 793 else if (_M_P == 1.0) { 794 statusflags |= (1<<1); 795 } 796 else if (_M_P == 3.0) { 797 statusflags |= (1<<0); 798 statusflags |= (1<<1); 799 } 800 // health flags 801 // ============ 802 int healthflags = 0; 803 // bit 0 (is to be ignored, if bit 1 is zero) 804 if (_almanac_health) { 805 healthflags |= (1<<0); 806 } 807 // bit 1 808 if (_almanac_health_availablility_indicator) { 809 healthflags |= (1<<1); 810 } 811 // bit 2 812 if (_M_l3) { 813 healthflags |= (1<<2); 814 } 815 out << QString(fmt) 816 .arg(double(statusflags), 19, 'e', 12) 817 .arg(_M_delta_tau, 19, 'e', 12) 818 .arg(_M_FT, 19, 'e', 12) 819 .arg(double(healthflags), 19, 'e', 12); 820 } 821 } 822 701 823 return rnxStr; 702 824 } … … 767 889 // Constructor 768 890 ////////////////////////////////////////////////////////////////////////////// 769 t_ephGal::t_ephGal( floatrnxVersion, const QStringList& lines) {891 t_ephGal::t_ephGal(double rnxVersion, const QStringList& lines) { 770 892 int year, month, day, hour, min; 771 893 double sec; … … 887 1009 } else { 888 1010 // Bit 0 889 _e1DataInValid = (int(SVhealth) & (1<<0));1011 _e1DataInValid = (int(SVhealth) & (1<<0)); 890 1012 // Bit 1-2 891 _E1_bHS = double((int(SVhealth) >> 1) & 0x3);1013 _E1_bHS = double((int(SVhealth) >> 1) & 0x3); 892 1014 // Bit 3 893 1015 _e5aDataInValid = (int(SVhealth) & (1<<3)); 894 1016 // Bit 4-5 895 _E5aHS = double((int(SVhealth) >> 4) & 0x3);1017 _E5aHS = double((int(SVhealth) >> 4) & 0x3); 896 1018 // Bit 6 897 1019 _e5bDataInValid = (int(SVhealth) & (1<<6)); 898 1020 // Bit 7-8 899 _E5bHS = double((int(SVhealth) >> 7) & 0x3);1021 _E5bHS = double((int(SVhealth) >> 7) & 0x3); 900 1022 901 1023 if (prnStr.at(0) == 'E') { … … 1158 1280 // Constructor 1159 1281 ////////////////////////////////////////////////////////////////////////////// 1160 t_ephSBAS::t_ephSBAS( floatrnxVersion, const QStringList& lines) {1282 t_ephSBAS::t_ephSBAS(double rnxVersion, const QStringList& lines) { 1161 1283 1162 1284 const int nLines = 4; … … 1351 1473 // Constructor 1352 1474 ////////////////////////////////////////////////////////////////////////////// 1353 t_ephBDS::t_ephBDS( floatrnxVersion, const QStringList& lines) {1475 t_ephBDS::t_ephBDS(double rnxVersion, const QStringList& lines) { 1354 1476 1355 1477 const int nLines = 8; -
trunk/BNC/src/ephemeris.h
r9316 r9367 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
Note:
See TracChangeset
for help on using the changeset viewer.