Changeset 10587 in ntrip for trunk/BNC/src/ephemeris.cpp
- Timestamp:
- Dec 10, 2024, 3:57:21 PM (3 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/ephemeris.cpp
r10580 r10587 22 22 t_eph::t_eph() { 23 23 _checkState = unchecked; 24 _ ephType = undefined;24 _type = undefined; 25 25 _orbCorr = 0; 26 26 _clkCorr = 0; … … 109 109 // 110 110 ////////////////////////////////////////////////////////////////////////////// 111 t_irc t_eph::setEphType(QString ephTypeStr) {112 113 if ( ephTypeStr == "LNAV") {114 _ ephType = t_eph::LNAV;115 } else if ( ephTypeStr == "FDMA") {116 _ ephType = t_eph::FDMA;117 } else if ( ephTypeStr == "FNAV") {118 _ ephType = t_eph::FNAV;119 } else if ( ephTypeStr == "INAV") {120 _ ephType = t_eph::INAF;121 } else if ( ephTypeStr == "D1") {122 _ ephType = t_eph::D1;123 } else if ( ephTypeStr == "D2") {124 _ ephType = t_eph::D2;125 } else if ( ephTypeStr == "SBAS") {126 _ ephType = t_eph::SBASL1;127 } else if ( ephTypeStr == "CNAV") {128 _ ephType = t_eph::CNAV;129 } else if ( ephTypeStr == "CNV1") {130 _ ephType = t_eph::CNV1;131 } else if ( ephTypeStr == "CNV2") {132 _ ephType = t_eph::CNV2;133 } else if ( ephTypeStr == "CNV3") {134 _ ephType = t_eph::CNV3;135 } else if ( ephTypeStr == "L1NV") {136 _ ephType = t_eph::L1NV;137 } else if ( ephTypeStr == "L1OC") {138 _ ephType = t_eph::L1OC;139 } else if ( ephTypeStr == "L3OC") {140 _ ephType = t_eph::L3OC;111 void t_eph::setType(QString typeStr) { 112 113 if (typeStr == "LNAV") { 114 _type = t_eph::LNAV; 115 } else if (typeStr == "FDMA") { 116 _type = t_eph::FDMA; 117 } else if (typeStr == "FNAV") { 118 _type = t_eph::FNAV; 119 } else if (typeStr == "INAV") { 120 _type = t_eph::INAV; 121 } else if (typeStr == "D1") { 122 _type = t_eph::D1; 123 } else if (typeStr == "D2") { 124 _type = t_eph::D2; 125 } else if (typeStr == "SBAS") { 126 _type = t_eph::SBASL1; 127 } else if (typeStr == "CNAV") { 128 _type = t_eph::CNAV; 129 } else if (typeStr == "CNV1") { 130 _type = t_eph::CNV1; 131 } else if (typeStr == "CNV2") { 132 _type = t_eph::CNV2; 133 } else if (typeStr == "CNV3") { 134 _type = t_eph::CNV3; 135 } else if (typeStr == "L1NV") { 136 _type = t_eph::L1NV; 137 } else if (typeStr == "L1OC") { 138 _type = t_eph::L1OC; 139 } else if (typeStr == "L3OC") { 140 _type = t_eph::L3OC; 141 141 } else { 142 _ephType = t_eph::undefined; 143 return failure; 144 } 145 146 return success; 142 _type = t_eph::undefined; 143 } 144 147 145 } 148 146 149 147 // 150 148 ////////////////////////////////////////////////////////////////////////////// 151 QString t_eph:: ephTypeStr(e_ephType ephType, const t_prn &prn, double version) {152 QString ephTypeStr = "";149 QString t_eph::typeStr(e_type type, const t_prn &prn, double version) { 150 QString typeStr = ""; 153 151 QString epochStart; 154 152 QString eolStr; 155 153 156 154 if (version < 4.0) { 157 return ephTypeStr;158 } 159 160 if (version == 99.0) { 155 return typeStr; 156 } 157 158 if (version == 99.0) { // log output for OUTDATED, WRONG or UNHEALTHY satellites 161 159 epochStart = ""; 162 160 eolStr = ""; … … 167 165 168 166 QString ephStr = QString("EPH %1 ").arg(prn.toString().c_str()); 169 switch ( ephType) {167 switch (type) { 170 168 case undefined: 171 ephTypeStr = epochStart + ephStr + "unknown" + eolStr;169 typeStr = epochStart + ephStr + "unknown" + eolStr; 172 170 break; 173 171 case LNAV: 174 ephTypeStr = epochStart + ephStr + "LNAV" + eolStr;172 typeStr = epochStart + ephStr + "LNAV" + eolStr; 175 173 break; 176 174 case FDMA: 177 ephTypeStr = epochStart + ephStr + "FDMA" + eolStr;175 typeStr = epochStart + ephStr + "FDMA" + eolStr; 178 176 break; 179 177 case FNAV: 180 ephTypeStr = epochStart + ephStr + "FNAV" + eolStr;178 typeStr = epochStart + ephStr + "FNAV" + eolStr; 181 179 break; 182 case INA F:183 ephTypeStr = epochStart + ephStr + "INAV" + eolStr;180 case INAV: 181 typeStr = epochStart + ephStr + "INAV" + eolStr; 184 182 break; 185 183 case D1: 186 ephTypeStr = epochStart + ephStr + "D1 " + eolStr;184 typeStr = epochStart + ephStr + "D1 " + eolStr; 187 185 break; 188 186 case D2: 189 ephTypeStr = epochStart + ephStr + "D2 " + eolStr;187 typeStr = epochStart + ephStr + "D2 " + eolStr; 190 188 break; 191 189 case SBASL1: 192 ephTypeStr = epochStart + ephStr + "SBAS" + eolStr;190 typeStr = epochStart + ephStr + "SBAS" + eolStr; 193 191 break; 194 192 case CNAV: 195 ephTypeStr = epochStart + ephStr + "CNAV" + eolStr;193 typeStr = epochStart + ephStr + "CNAV" + eolStr; 196 194 break; 197 195 case CNV1: 198 ephTypeStr = epochStart + ephStr + "CNV1" + eolStr;196 typeStr = epochStart + ephStr + "CNV1" + eolStr; 199 197 break; 200 198 case CNV2: 201 ephTypeStr = epochStart + ephStr + "CNV2" + eolStr;199 typeStr = epochStart + ephStr + "CNV2" + eolStr; 202 200 break; 203 201 case CNV3: 204 ephTypeStr = epochStart + ephStr + "CNV3" + eolStr;202 typeStr = epochStart + ephStr + "CNV3" + eolStr; 205 203 break; 206 204 case L1NV: 207 ephTypeStr = epochStart + ephStr + "L1NV" + eolStr;205 typeStr = epochStart + ephStr + "L1NV" + eolStr; 208 206 break; 209 207 case L1OC: 210 ephTypeStr = epochStart + ephStr + "L1OC" + eolStr;208 typeStr = epochStart + ephStr + "L1OC" + eolStr; 211 209 break; 212 210 case L3OC: 213 ephTypeStr = epochStart + ephStr + "L3OC" + eolStr;211 typeStr = epochStart + ephStr + "L3OC" + eolStr; 214 212 break; 215 213 } 216 return ephTypeStr;214 return typeStr; 217 215 } 218 216 … … 246 244 << QString(" %1 %2 %3 %4 %5%6").arg(year % 100, 2, 10, QChar('0')).arg( 247 245 month, 2).arg(day, 2).arg(hour, 2).arg(min, 2).arg(sec, 5, 'f', 1); 248 } else if (version == 99) { 246 } 247 else if (version == 99) { 249 248 out 250 249 << QString(" %1 %2 %3 %4 %5 %6").arg(year, 4).arg(month, 2, 10, 251 250 QChar('0')).arg(day, 2, 10, QChar('0')).arg(hour, 2, 10, QChar('0')).arg( 252 251 min, 2, 10, QChar('0')).arg(int(sec), 2, 10, QChar('0')); 253 } else { 252 } 253 else { 254 254 out << prnStr 255 255 << QString(" %1 %2 %3 %4 %5 %6").arg(year, 4).arg(month, 2, 10, … … 265 265 t_ephGPS::t_ephGPS(double rnxVersion, const QStringList &lines) { 266 266 267 int nLines = 8; // LNAV, 268 269 if (ephType() == t_eph::CNAV || 270 ephType() == t_eph::L1NV) { 267 int nLines = 8; // LNAV 268 269 // Source RINEX version < 4 270 if (type() == t_eph::undefined) { 271 _type = t_eph::LNAV; 272 } 273 274 if (type() == t_eph::CNAV || 275 type() == t_eph::L1NV) { 271 276 nLines += 1; 272 277 } 273 if ( ephType() == t_eph::CNV2) {278 if (type() == t_eph::CNV2) { 274 279 nLines += 2; 275 280 } … … 283 288 // ------------ 284 289 int fieldLen = 19; 290 double statusflags = 0.0; 285 291 286 292 int pos[4]; … … 290 296 pos[3] = pos[2] + fieldLen; 291 297 292 // Read eightlines293 // ---------------- 298 // Read nLines lines 299 // ------------------ 294 300 for (int iLine = 0; iLine < nLines; iLine++) { 295 301 QString line = lines[iLine]; … … 303 309 in >> prnStr; 304 310 305 if (prnStr.size() == 1 306 && (prnStr[0] == 'G' || prnStr[0] == 'J' || prnStr[0] == 'I')) { 311 if (prnStr.size() == 1 && 312 (prnStr[0] == 'G' || 313 prnStr[0] == 'J' || 314 prnStr[0] == 'I')) { 307 315 in >> n; 308 316 prnStr.append(n); … … 310 318 311 319 in >> year >> month >> day >> hour >> min >> sec; 312 if ( prnStr.at(0) == 'G') {320 if ( prnStr.at(0) == 'G') { 313 321 _prn.set('G', prnStr.mid(1).toInt()); 314 322 } else if (prnStr.at(0) == 'J') { … … 339 347 // ===================== 340 348 else if (iLine == 1) { 341 if ( ephType() == t_eph::CNAV ||342 ephType() == t_eph::CNV2 ||343 ephType() == t_eph::L1NV) {349 if (type() == t_eph::CNAV || 350 type() == t_eph::CNV2 || 351 type() == t_eph::L1NV) { 344 352 if ( readDbl(line, pos[0], fieldLen, _ADOT) 345 353 || readDbl(line, pos[1], fieldLen, _Crs) … … 349 357 return; 350 358 } 351 } else { // LNAV , undefined359 } else { // LNAV 352 360 if ( readDbl(line, pos[0], fieldLen, _IODE) 353 361 || readDbl(line, pos[1], fieldLen, _Crs) … … 375 383 // ===================== 376 384 else if (iLine == 3) { 377 if ( ephType() == t_eph::CNAV ||378 ephType() == t_eph::CNV2) {385 if (type() == t_eph::CNAV || 386 type() == t_eph::CNV2) { 379 387 if ( readDbl(line, pos[0], fieldLen, _top) 380 388 || readDbl(line, pos[1], fieldLen, _Cic) … … 384 392 return; 385 393 } 386 } else if ( ephType() == t_eph::L1NV) {394 } else if (type() == t_eph::L1NV) { 387 395 if ( readDbl(line, pos[0], fieldLen, _IODE) 388 396 || readDbl(line, pos[1], fieldLen, _Cic) … … 392 400 return; 393 401 } 394 } else { // LNAV , undefined402 } else { // LNAV 395 403 if ( readDbl(line, pos[0], fieldLen, _TOEsec) 396 404 || readDbl(line, pos[1], fieldLen, _Cic) … … 417 425 // BROADCAST ORBIT - 5 418 426 // ===================== 419 else if (iLine == 5 && type() != t_eph::IRNSS) {420 if ( ephType() == t_eph::CNAV ||421 ephType() == t_eph::CNV2) {427 else if (iLine == 5 && system() != t_eph::IRNSS) { 428 if (type() == t_eph::CNAV || 429 type() == t_eph::CNV2) { 422 430 if ( readDbl(line, pos[0], fieldLen, _IDOT) 423 431 || readDbl(line, pos[1], fieldLen, _Delta_n_dot) … … 428 436 } 429 437 } 430 else { // LNAV , undefined438 else { // LNAV 431 439 if ( readDbl(line, pos[0], fieldLen, _IDOT) 432 440 || readDbl(line, pos[1], fieldLen, _L2Codes) … … 437 445 } 438 446 } 439 } else if (iLine == 5 && type() == t_eph::IRNSS) { 440 if (ephType() == t_eph::LNAV || 441 ephType() == t_eph::undefined) { 447 } else if (iLine == 5 && system() == t_eph::IRNSS) { 448 if (type() == t_eph::LNAV) { 442 449 if ( readDbl(line, pos[0], fieldLen, _IDOT) 443 450 || readDbl(line, pos[2], fieldLen, _TOEweek)) { … … 446 453 } 447 454 } 448 else if ( ephType() == t_eph::L1NV) {455 else if (type() == t_eph::L1NV) { 449 456 if ( readDbl(line, pos[0], fieldLen, _IDOT) 450 457 || readDbl(line, pos[1], fieldLen, _Delta_n_dot) … … 458 465 // BROADCAST ORBIT - 6 459 466 // ===================== 460 else if (iLine == 6 && type() != t_eph::IRNSS) {461 if ( ephType() == t_eph::CNAV ||462 ephType() == t_eph::CNV2) {467 else if (iLine == 6 && system() != t_eph::IRNSS) { 468 if (type() == t_eph::CNAV || 469 type() == t_eph::CNV2) { 463 470 if ( readDbl(line, pos[0], fieldLen, _URAI_ED) 464 471 || readDbl(line, pos[1], fieldLen, _health) … … 468 475 return; 469 476 } 470 } else { // LNAV , undefined477 } else { // LNAV 471 478 if ( readDbl(line, pos[0], fieldLen, _ura) 472 479 || readDbl(line, pos[1], fieldLen, _health) … … 478 485 } 479 486 } 480 else if (iLine == 6 && type() == t_eph::IRNSS) { 481 if (ephType() == t_eph::LNAV || 482 ephType() == t_eph::undefined) { 487 else if (iLine == 6 && system() == t_eph::IRNSS) { 488 if (type() == t_eph::LNAV) { 483 489 if ( readDbl(line, pos[0], fieldLen, _ura) 484 490 || readDbl(line, pos[1], fieldLen, _health) … … 488 494 } 489 495 } 490 else if ( ephType() == t_eph::L1NV) {496 else if (type() == t_eph::L1NV) { 491 497 int i = 0; 492 498 (!_RSF) ? i = 2 : i = 3; … … 497 503 return; 498 504 } 499 _ura = accuracyFromIndex(int(_URAI), type());505 _ura = accuracyFromIndex(int(_URAI), system()); 500 506 } 501 507 } … … 504 510 // ===================== 505 511 else if (iLine == 7) { 506 if (ephType() == t_eph::LNAV || 507 ephType() == t_eph::undefined) { 512 if (type() == t_eph::LNAV) { 508 513 if (readDbl(line, pos[0], fieldLen, _TOT)) { 509 514 _checkState = bad; 510 515 return; 511 if (type() != t_eph::IRNSS) { 512 double fitIntervalRnx; 513 if (readDbl(line, pos[1], fieldLen, fitIntervalRnx)) { 514 _checkState = bad; 515 return; 516 } 517 if (type() == t_eph::GPS) { // in RINEX specified always as time period for GPS 516 } 517 if (system() != t_eph::IRNSS) { 518 double fitIntervalRnx; 519 if (readDbl(line, pos[1], fieldLen, fitIntervalRnx)) { 520 //fit interval BLK, do nothing 521 _flags_unknown = true; 522 } else { 523 _flags_unknown = false; 524 if (system() == t_eph::GPS) { // in RINEX specified always as time period for GPS 518 525 _fitInterval = fitIntervalRnx; 519 526 } 520 else if ( type() == t_eph::QZSS) { // specified as flag for QZSS527 else if (system() == t_eph::QZSS) { // specified as flag for QZSS 521 528 if (rnxVersion == 3.02) { 522 529 _fitInterval = fitIntervalRnx; // specified as time period … … 528 535 } 529 536 } 530 else if ( ephType() == t_eph::CNAV ||531 ephType() == t_eph::CNV2) {537 else if (type() == t_eph::CNAV || 538 type() == t_eph::CNV2) { 532 539 if ( readDbl(line, pos[0], fieldLen, _ISC_L1CA) 533 540 || readDbl(line, pos[1], fieldLen, _ISC_L2C) … … 538 545 } 539 546 } 540 else if ( ephType() == t_eph::L1NV) {547 else if (type() == t_eph::L1NV) { 541 548 if (!_RSF) { 542 549 if ( readDbl(line, pos[0], fieldLen, _ISC_S) … … 558 565 // ===================== 559 566 else if (iLine == 8) { 560 if (ephType() == t_eph::CNAV) { 561 double intFlags = -1.0; // optional; blank if not provided 567 if (type() == t_eph::CNAV) { 562 568 if ( readDbl(line, pos[0], fieldLen, _TOT) 563 || readDbl(line, pos[1], fieldLen, _wnop) 564 || readDbl(line, pos[2], fieldLen, intFlags)) { 565 _checkState = bad; 566 return; 567 } 568 if (intFlags > -1.0) { 569 || readDbl(line, pos[1], fieldLen, _wnop)) { 570 _checkState = bad; 571 return; 572 } 573 if (readDbl(line, pos[2], fieldLen, statusflags)) { 574 _flags_unknown = true; 575 } 576 else { 577 _flags_unknown = false; 569 578 // Bit 0: 570 _intSF = (int(intFlags) & (1 <<0));579 _intSF = double(bitExtracted(int(statusflags), 1, 0)); 571 580 // Bit 1: 572 _L2Cphasing = (int(intFlags) & (1 <<1));581 _L2Cphasing = double(bitExtracted(int(statusflags), 1, 1)); 573 582 // Bit 2: 574 _alert = (int(intFlags) & (1 <<2));575 } 576 } 577 else if ( ephType() == t_eph::CNV2) {583 _alert = double(bitExtracted(int(statusflags), 1, 2)); 584 } 585 } 586 else if (type() == t_eph::CNV2) { 578 587 if ( readDbl(line, pos[0], fieldLen, _ISC_L1Cd) 579 588 || readDbl(line, pos[1], fieldLen, _ISC_L1Cp)) { … … 582 591 } 583 592 } 584 else if ( ephType() == t_eph::L1NV) {593 else if (type() == t_eph::L1NV) { 585 594 if ( readDbl(line, pos[0], fieldLen, _TOT)) { 586 595 _checkState = bad; … … 593 602 // ===================== 594 603 else if (iLine == 9) { 595 if (ephType() == t_eph::CNV2) { 596 double intFlags = -1.0; 604 if (type() == t_eph::CNV2) { 597 605 if ( readDbl(line, pos[0], fieldLen, _TOT) 598 || readDbl(line, pos[1], fieldLen, _wnop) 599 || readDbl(line, pos[2], fieldLen, intFlags)) { 600 _checkState = bad; 601 return; 602 } 603 if (intFlags > -1.0) { 606 || readDbl(line, pos[1], fieldLen, _wnop)) { 607 _checkState = bad; 608 return; 609 } 610 if (readDbl(line, pos[2], fieldLen, statusflags)) { 611 _flags_unknown = true; 612 } 613 else { 614 _flags_unknown = false; 604 615 // Bit 0: 605 _intSF = (int(intFlags) & (1 <<0));606 if ( type() == t_eph::QZSS) {616 _intSF = double(bitExtracted(int(statusflags), 1, 0)); 617 if (system() == t_eph::QZSS) { 607 618 // Bit 1: 608 _ephSF = (int(intFlags) & (1 <<1));619 _ephSF = double(bitExtracted(int(statusflags), 1, 1)); 609 620 } 610 621 } … … 707 718 QString t_ephGPS::toString(double version) const { 708 719 709 QString ephStr = ephTypeStr(_ephType, _prn, version); 720 if (version < 4.0 && 721 (type() == t_eph::CNAV || 722 type() == t_eph::CNV2 || 723 type() == t_eph::L1NV )) { 724 return ""; 725 } 726 727 QString ephStr = typeStr(_type, _prn, version); 710 728 QString rnxStr = ephStr + rinexDateStr(_TOC, _prn, version); 711 729 … … 723 741 // BROADCAST ORBIT - 1 724 742 // ===================== 725 if ( ephType() == t_eph::CNAV ||726 ephType() == t_eph::CNV2 ||727 ephType() == t_eph::L1NV) {743 if (type() == t_eph::CNAV || 744 type() == t_eph::CNV2 || 745 type() == t_eph::L1NV) { 728 746 out 729 747 << QString(fmt) … … 752 770 // BROADCAST ORBIT - 3 753 771 // ===================== 754 if ( ephType() == t_eph::CNAV ||755 ephType() == t_eph::CNV2) {772 if (type() == t_eph::CNAV || 773 type() == t_eph::CNV2) { 756 774 out 757 775 << QString(fmt) … … 761 779 .arg(_Cis, 19, 'e', 12); 762 780 } 763 else if ( ephType() == t_eph::L1NV) {781 else if (type() == t_eph::L1NV) { 764 782 out 765 783 << QString(fmt) … … 789 807 // BROADCAST ORBIT - 5 790 808 // ===================== 791 if ( type() != t_eph::IRNSS) {792 if ( ephType() == t_eph::CNAV ||793 ephType() == t_eph::CNV2) {809 if (system() != t_eph::IRNSS) { 810 if (type() == t_eph::CNAV || 811 type() == t_eph::CNV2) { 794 812 out 795 813 << QString(fmt) … … 809 827 } 810 828 else { 811 if ( ephType() == t_eph::LNAV ||812 ephType() == t_eph::undefined) {829 if (type() == t_eph::LNAV || 830 type() == t_eph::undefined) { 813 831 out 814 832 << QString(fmt) … … 818 836 .arg("", 19, QChar(' ')); 819 837 } 820 else if ( ephType() == t_eph::L1NV) {838 else if (type() == t_eph::L1NV) { 821 839 out 822 840 << QString(fmt) … … 830 848 // BROADCAST ORBIT - 6 831 849 // ===================== 832 if ( type() != t_eph::IRNSS) {833 if ( ephType() == t_eph::CNAV ||834 ephType() == t_eph::CNV2) {850 if (system() != t_eph::IRNSS) { 851 if (type() == t_eph::CNAV || 852 type() == t_eph::CNV2) { 835 853 out 836 854 << QString(fmt) … … 850 868 } 851 869 else { 852 if ( ephType() == t_eph::LNAV ||853 ephType() == t_eph::undefined) {870 if (type() == t_eph::LNAV || 871 type() == t_eph::undefined) { 854 872 out 855 873 << QString(fmt) … … 858 876 .arg(_TGD, 19, 'e', 12); 859 877 } 860 else if ( ephType() == t_eph::L1NV) {878 else if (type() == t_eph::L1NV) { 861 879 int i = 0; (!_RSF) ? i = 2 : i = 3; 862 880 if (i == 2) { … … 881 899 // BROADCAST ORBIT - 7 882 900 // ===================== 883 /* 884 out 885 << QString(fmt) 886 .arg(, 19, 'e', 12) 887 .arg(, 19, 'e', 12) 888 .arg(, 19, 'e', 12) 889 .arg(, 19, 'e', 12); 890 891 */ 892 893 if (ephType() == t_eph::LNAV || 894 ephType() == t_eph::undefined) { 901 if (type() == t_eph::LNAV || 902 type() == t_eph::undefined) { 895 903 896 904 double tot = _TOT; … … 899 907 } 900 908 // fitInterval 901 if ( type() == t_eph::IRNSS) {909 if (system() == t_eph::IRNSS) { 902 910 out 903 911 << QString(fmt) … … 908 916 } 909 917 else { 910 // for GPS and QZSS in version 3.02 specified in hours 911 double fitIntervalRnx = _fitInterval; 912 // otherwise specified as flag 913 if (type() == t_eph::QZSS && version != 3.02) { 914 (_fitInterval == 2.0) ? fitIntervalRnx = 0.0 : fitIntervalRnx = 1.0; 915 } 916 out 917 << QString(fmt) 918 .arg(tot, 19, 'e', 12) 919 .arg(fitIntervalRnx, 19, 'e', 12) 920 .arg("", 19, QChar(' ')) 921 .arg("", 19, QChar(' ')); 922 } 923 } 924 else if (ephType() == t_eph::CNAV || 925 ephType() == t_eph::CNV2) { 918 if (_flags_unknown) { 919 out 920 << QString(fmt) 921 .arg(tot, 19, 'e', 12) 922 .arg("", 19, QChar(' ')) 923 .arg("", 19, QChar(' ')) 924 .arg("", 19, QChar(' ')); 925 } 926 else { 927 // for GPS and QZSS in version 3.02 specified in hours 928 double fitIntervalRnx = _fitInterval; 929 // otherwise specified as flag 930 if (system() == t_eph::QZSS && version != 3.02) { 931 (_fitInterval == 2.0) ? fitIntervalRnx = 0.0 : fitIntervalRnx = 1.0; 932 } 933 out 934 << QString(fmt) 935 .arg(tot, 19, 'e', 12) 936 .arg(fitIntervalRnx, 19, 'e', 12) 937 .arg("", 19, QChar(' ')) 938 .arg("", 19, QChar(' ')); 939 } 940 } 941 } 942 else if (type() == t_eph::CNAV || 943 type() == t_eph::CNV2) { 926 944 out 927 945 << QString(fmt) … … 931 949 .arg(_ISC_L5Q5, 19, 'e', 12); 932 950 } 933 else if ( ephType() == t_eph::L1NV) {951 else if (type() == t_eph::L1NV) { 934 952 if (_RSF) { 935 953 out … … 952 970 // BROADCAST ORBIT - 8 953 971 // ===================== 954 if (ephType() == t_eph::CNAV) { 955 int intFlags; 956 if (_intSF !=-1 ) { 957 intFlags |= (1 << 0); 958 intFlags |= (1 << 1); 959 intFlags |= (1 << 2); 972 if (type() == t_eph::CNAV) { 973 int intFlags = 0; 974 if (!_flags_unknown) { 975 // Bit 0: 976 if (_intSF) {intFlags |= (1 << 0);} 977 // Bit 1: 978 if (_L2Cphasing) {intFlags |= (1 << 1);} 979 // Bit 2: 980 if (_alert) {intFlags |= (1 << 2);} 960 981 out 961 982 << QString(fmt) 962 .arg(_TOT, 19, 'e', 12)963 .arg(_wnop, 19, 'e', 12)964 .arg( intFlags, 19, 'e', 12)965 .arg("", 19, QChar(' '));983 .arg(_TOT, 19, 'e', 12) 984 .arg(_wnop, 19, 'e', 12) 985 .arg(double(intFlags), 19, 'e', 12) 986 .arg("", 19, QChar(' ')); 966 987 } 967 988 else { … … 974 995 } 975 996 } 976 else if ( ephType() == t_eph::CNV2) {997 else if (type() == t_eph::CNV2) { 977 998 out 978 999 << QString(fmt) … … 982 1003 .arg("", 19, QChar(' ')); 983 1004 } 984 else if ( ephType() == t_eph::L1NV) {1005 else if (type() == t_eph::L1NV) { 985 1006 out 986 1007 << QString(fmt) … … 993 1014 // BROADCAST ORBIT - 9 994 1015 // ===================== 995 if (ephType() == t_eph::CNV2) { 996 int intFlags; 997 if (_intSF != -1 ) { 998 intFlags |= (1 << 0); 1016 if (type() == t_eph::CNV2) { 1017 int intFlags = 0; 1018 if (!_flags_unknown) { 1019 // Bit 0: 1020 if (_intSF) {intFlags |= (1 << 0);} 1021 if (system() == t_eph::QZSS) { 1022 // Bit 1: 1023 if (_ephSF) {intFlags |= (1 << 1);} 1024 } 999 1025 out 1000 1026 << QString(fmt) 1001 .arg(_TOT, 19, 'e', 12)1002 .arg(_wnop, 19, 'e', 12)1003 .arg( intFlags, 19, 'e', 12)1004 .arg("", 19, QChar(' '));1027 .arg(_TOT, 19, 'e', 12) 1028 .arg(_wnop, 19, 'e', 12) 1029 .arg(double(intFlags), 19, 'e', 12) 1030 .arg("", 19, QChar(' ')); 1005 1031 } 1006 1032 else { … … 1013 1039 } 1014 1040 } 1015 1016 1041 return rnxStr; 1017 1042 } … … 1022 1047 1023 1048 int nLines = 4; 1049 1050 // Source RINEX version < 4 1051 if (type() == t_eph::undefined) { 1052 _type = t_eph::FDMA; 1053 } 1054 1024 1055 if (rnxVersion >= 3.05) { 1025 1056 nLines += 1; 1026 1057 } else { 1027 1058 _M_delta_tau = 0.9999e9; // unknown 1028 _M_FT = 1.5e1;// unknown1059 _M_FT = 1.5e1; // unknown 1029 1060 } 1030 1061 … … 1039 1070 double statusflags = 0.0; 1040 1071 double healthflags = 0.0; 1072 double sourceflags = 0.0; 1073 _tauC = 0.0; 1074 _tau1 = 0.0; 1075 _tau2 = 0.0; 1076 _additional_data_availability = 0.0; 1041 1077 1042 1078 int pos[4]; … … 1081 1117 _TOC = _TOC + _gps_utc; 1082 1118 int nd = int((_TOC.gpssec())) / (24.0 * 60.0 * 60.0); 1083 if ( readDbl(line, pos[1], fieldLen, _tau)1119 if ( readDbl(line, pos[1], fieldLen, _tau) 1084 1120 || readDbl(line, pos[2], fieldLen, _gamma) 1085 1121 || readDbl(line, pos[3], fieldLen, _tki)) { … … 1094 1130 // ===================== 1095 1131 else if (iLine == 1) { 1096 if ( readDbl(line, pos[0], fieldLen, _x_pos)1097 || readDbl(line, pos[1], fieldLen, _x_vel ocity)1098 || readDbl(line, pos[2], fieldLen, _x_acc eleration)1132 if ( readDbl(line, pos[0], fieldLen, _x_pos) 1133 || readDbl(line, pos[1], fieldLen, _x_vel) 1134 || readDbl(line, pos[2], fieldLen, _x_acc) 1099 1135 || readDbl(line, pos[3], fieldLen, _health)) { 1100 1136 _checkState = bad; … … 1106 1142 // ===================== 1107 1143 else if (iLine == 2) { 1108 if (readDbl(line, pos[0], fieldLen, _y_pos) 1109 || readDbl(line, pos[1], fieldLen, _y_velocity) 1110 || readDbl(line, pos[2], fieldLen, _y_acceleration) 1111 || readDbl(line, pos[3], fieldLen, _frequency_number)) { 1112 _checkState = bad; 1113 return; 1144 if (type() == t_eph::FDMA || 1145 type() == t_eph::undefined) { 1146 if ( readDbl(line, pos[0], fieldLen, _y_pos) 1147 || readDbl(line, pos[1], fieldLen, _y_vel) 1148 || readDbl(line, pos[2], fieldLen, _y_acc) 1149 || readDbl(line, pos[3], fieldLen, _frq_num)) { 1150 _checkState = bad; 1151 return; 1152 } 1153 } 1154 else { //L1OC, L3OC 1155 if ( readDbl(line, pos[0], fieldLen, _y_pos) 1156 || readDbl(line, pos[1], fieldLen, _y_vel) 1157 || readDbl(line, pos[2], fieldLen, _y_acc) 1158 || readDbl(line, pos[3], fieldLen, statusflags)) { 1159 _checkState = bad; 1160 return; 1161 } 1162 _data_validity = int(statusflags); 1114 1163 } 1115 1164 } … … 1118 1167 // ===================== 1119 1168 else if (iLine == 3) { 1120 if (readDbl(line, pos[0], fieldLen, _z_pos) 1121 || readDbl(line, pos[1], fieldLen, _z_velocity) 1122 || readDbl(line, pos[2], fieldLen, _z_acceleration) 1123 || readDbl(line, pos[3], fieldLen, _E)) { 1124 _checkState = bad; 1125 return; 1169 if (type() == t_eph::FDMA || 1170 type() == t_eph::undefined) { 1171 if ( readDbl(line, pos[0], fieldLen, _z_pos) 1172 || readDbl(line, pos[1], fieldLen, _z_vel) 1173 || readDbl(line, pos[2], fieldLen, _z_acc) 1174 || readDbl(line, pos[3], fieldLen, _E)) { 1175 _checkState = bad; 1176 return; 1177 } 1178 } 1179 else if (type() == t_eph::L1OC) { 1180 if ( readDbl(line, pos[0], fieldLen, _z_pos) 1181 || readDbl(line, pos[1], fieldLen, _z_vel) 1182 || readDbl(line, pos[2], fieldLen, _z_acc) 1183 || readDbl(line, pos[3], fieldLen, _TGD_L2OCp)) { 1184 _checkState = bad; 1185 return; 1186 } 1187 } 1188 else if (type() == t_eph::L3OC) { 1189 if ( readDbl(line, pos[0], fieldLen, _z_pos) 1190 || readDbl(line, pos[1], fieldLen, _z_vel) 1191 || readDbl(line, pos[2], fieldLen, _z_acc) 1192 || readDbl(line, pos[3], fieldLen, _TGD_L3OCp)) { 1193 _checkState = bad; 1194 return; 1195 } 1126 1196 } 1127 1197 } … … 1130 1200 // ===================== 1131 1201 else if (iLine == 4) { 1132 if (readDbl(line, pos[0], fieldLen, statusflags)) { 1133 //statusflags BLK, do nothing 1134 _flags_unknown = true; 1135 } else { 1136 _flags_unknown = false; 1137 // status flags 1202 if (type() == t_eph::FDMA || 1203 type() == t_eph::undefined){ 1204 if (readDbl(line, pos[0], fieldLen, statusflags)) { 1205 //status flags BLK, do nothing 1206 _statusflags_unknown = true; 1207 } else { 1208 _statusflags_unknown = false; 1209 // status flags 1210 // ============ 1211 // bit 0-1 1212 _M_P = double(bitExtracted(int(statusflags), 2, 0)); 1213 // bit 2-3 1214 _P1 = double(bitExtracted(int(statusflags), 2, 2)); 1215 // bit 4 1216 _P2 = double(bitExtracted(int(statusflags), 1, 4)); 1217 // bit 5 1218 _P3 = double(bitExtracted(int(statusflags), 1, 5)); 1219 // bit 6 1220 _M_P4 = double(bitExtracted(int(statusflags), 1, 6)); 1221 // bit 7-8 1222 _M_M = double(bitExtracted(int(statusflags), 2, 7)); 1223 /// GLO M/K exclusive flags/values only valid if flag M is set to '01' 1224 if (!_M_M) { 1225 _M_P = 0.0; 1226 _M_l3 = 0.0; 1227 _M_P4 = 0.0; 1228 _M_FE = 0.0; 1229 _M_FT = 0.0; 1230 _M_NA = 0.0; 1231 _M_NT = 0.0; 1232 _M_N4 = 0.0; 1233 _M_l5 = 0.0; 1234 _M_tau_GPS = 0.0; 1235 _M_delta_tau = 0.0; 1236 } 1237 } 1238 if ( readDbl(line, pos[1], fieldLen, _M_delta_tau) 1239 || readDbl(line, pos[2], fieldLen, _M_FT)) { 1240 _checkState = bad; 1241 return; 1242 } 1243 if (readDbl(line, pos[3], fieldLen, healthflags)) { 1244 // health flags BLK 1245 _healthflags_unknown = true; 1246 } else { 1247 _healthflags_unknown = false; 1248 // health flags 1249 // ============ 1250 // bit 0 (is to be ignored, if bit 1 is zero) 1251 _almanac_health = double(bitExtracted(int(healthflags), 1, 0)); 1252 // bit 1 1253 _almanac_health_availablility_indicator = 1254 double(bitExtracted(int(healthflags), 1, 1)); 1255 // bit 2; GLO-M/K only, health bit of string 3 1256 _M_l3 = double(bitExtracted(int(healthflags), 1, 2)); 1257 } 1258 } 1259 else if (type() == t_eph::L1OC || 1260 type() == t_eph::L3OC) { 1261 if ( readDbl(line, pos[0], fieldLen, _sat_type) 1262 || readDbl(line, pos[1], fieldLen, sourceflags) 1263 || readDbl(line, pos[2], fieldLen, _EE) 1264 || readDbl(line, pos[3], fieldLen, _ET)) { 1265 _checkState = bad; 1266 return; 1267 } 1268 // sourceflags: 1138 1269 // ============ 1139 1270 // bit 0-1 1140 _M_P = double(bitExtracted(statusflags, 2, 0)); 1141 // bit 2-3 1142 _P1 = double(bitExtracted(statusflags, 2, 2)); 1143 // bit 4 1144 _P2 = double(bitExtracted(statusflags, 1, 4)); 1145 // bit 5 1146 _P3 = double(bitExtracted(statusflags, 1, 5)); 1147 // bit 6 1148 _M_P4 = double(bitExtracted(statusflags, 1, 6)); 1149 // bit 7-8 1150 _M_M = double(bitExtracted(statusflags, 2, 7)); 1151 /// GLO M/K exclusive flags/values only valid if flag M is set to '01' 1152 if (!_M_M) { 1153 _M_P4 = 0.0; 1154 _M_P = 0.0; 1155 } 1156 } 1157 if (readDbl(line, pos[1], fieldLen, _M_delta_tau) 1158 || readDbl(line, pos[2], fieldLen, _M_FT)) { 1159 _checkState = bad; 1160 return; 1161 } 1162 if (readDbl(line, pos[3], fieldLen, healthflags)) { 1163 // healthflags BLK 1164 _flags_unknown = true; 1165 } else { 1166 _flags_unknown = false; 1167 // health flags 1168 // ============ 1169 // bit 0 (is to be ignored, if bit 1 is zero) 1170 _almanac_health = double(bitExtracted(healthflags, 1, 0)); 1171 // bit 1 1172 _almanac_health_availablility_indicator = double( 1173 bitExtracted(healthflags, 1, 1)); 1174 // bit 2 1175 _M_l3 = double(bitExtracted(healthflags, 1, 2)); 1271 _RT = double(bitExtracted(int(sourceflags), 2, 0)); 1272 // bit 2-3: 1273 _RE = double(bitExtracted(int(sourceflags), 2, 2)); 1274 } 1275 } 1276 // ===================== 1277 // BROADCAST ORBIT - 5 1278 // ===================== 1279 else if (iLine == 5) { 1280 if (type() == t_eph::L1OC || 1281 type() == t_eph::L3OC) { 1282 if ( readDbl(line, pos[0], fieldLen, _attitude_P2) 1283 || readDbl(line, pos[1], fieldLen, _Tin) 1284 || readDbl(line, pos[2], fieldLen, _tau1) 1285 || readDbl(line, pos[3], fieldLen, _tau2)) { 1286 _checkState = bad; 1287 return; 1288 } 1289 } 1290 } 1291 // ===================== 1292 // BROADCAST ORBIT - 6 1293 // ===================== 1294 else if (iLine == 6) { 1295 if (type() == t_eph::L1OC || 1296 type() == t_eph::L3OC) { 1297 if ( readDbl(line, pos[0], fieldLen, _yaw) 1298 || readDbl(line, pos[1], fieldLen, _sn) 1299 || readDbl(line, pos[2], fieldLen, _angular_rate) 1300 || readDbl(line, pos[3], fieldLen, _angular_acc)) { 1301 _checkState = bad; 1302 return; 1303 } 1304 } 1305 } 1306 // ===================== 1307 // BROADCAST ORBIT - 7 1308 // ===================== 1309 else if (iLine == 7) { 1310 if (type() == t_eph::L1OC || 1311 type() == t_eph::L3OC) { 1312 if ( readDbl(line, pos[0], fieldLen, _angular_rate_max) 1313 || readDbl(line, pos[1], fieldLen, _X_PC) 1314 || readDbl(line, pos[2], fieldLen, _Y_PC) 1315 || readDbl(line, pos[3], fieldLen, _Z_PC)) { 1316 _checkState = bad; 1317 return; 1318 } 1319 } 1320 } 1321 // ===================== 1322 // BROADCAST ORBIT - 8 1323 // ===================== 1324 else if (iLine == 8) { 1325 if (type() == t_eph::L1OC || 1326 type() == t_eph::L3OC) { 1327 if ( readDbl(line, pos[0], fieldLen, _M_FE) 1328 || readDbl(line, pos[1], fieldLen, _M_FT) 1329 || readDbl(line, pos[3], fieldLen, _TOT)) { 1330 _checkState = bad; 1331 return; 1332 } 1176 1333 } 1177 1334 } … … 1186 1343 _xv(2) = _y_pos * 1.e3; 1187 1344 _xv(3) = _z_pos * 1.e3; 1188 _xv(4) = _x_vel ocity* 1.e3;1189 _xv(5) = _y_vel ocity* 1.e3;1190 _xv(6) = _z_vel ocity* 1.e3;1345 _xv(4) = _x_vel * 1.e3; 1346 _xv(5) = _y_vel * 1.e3; 1347 _xv(6) = _z_vel * 1.e3; 1191 1348 } 1192 1349 … … 1211 1368 1212 1369 double acc[3]; 1213 acc[0] = _x_acc eleration* 1.e3;1214 acc[1] = _y_acc eleration* 1.e3;1215 acc[2] = _z_acc eleration* 1.e3;1370 acc[0] = _x_acc * 1.e3; 1371 acc[1] = _y_acc * 1.e3; 1372 acc[2] = _z_acc * 1.e3; 1216 1373 1217 1374 for (int ii = 1; ii <= nSteps; ii++) { … … 1245 1402 QString t_ephGlo::toString(double version) const { 1246 1403 1247 QString ephStr = ephTypeStr(_ephType, _prn, version); 1404 if (version < 4.0 && 1405 (type() == t_eph::L1OC || 1406 type() == t_eph::L3OC )) { 1407 return ""; 1408 } 1409 1410 QString ephStr = typeStr(_type, _prn, version); 1248 1411 QString rnxStr = ephStr + rinexDateStr(_TOC - _gps_utc, _prn, version); 1249 1412 int nd = int((_TOC - _gps_utc).gpssec()) / (24.0 * 60.0 * 60.0); … … 1251 1414 1252 1415 out 1253 << QString("%1%2%3\n").arg(-_tau, 19, 'e', 12).arg(_gamma, 19, 'e', 12).arg( 1254 _tki + nd * 86400.0, 19, 'e', 12); 1416 << QString("%1%2%3\n") 1417 .arg(-_tau, 19, 'e', 12) 1418 .arg(_gamma, 19, 'e', 12) 1419 .arg(_tki + nd * 86400.0, 19, 'e', 12); 1255 1420 1256 1421 QString fmt = version < 3.0 ? " %1%2%3%4\n" : " %1%2%3%4\n"; … … 1259 1424 // ===================== 1260 1425 out 1261 << QString(fmt).arg(_x_pos, 19, 'e', 12).arg(_x_velocity, 19, 'e', 12).arg( 1262 _x_acceleration, 19, 'e', 12).arg(_health, 19, 'e', 12); 1426 << QString(fmt) 1427 .arg(_x_pos, 19, 'e', 12) 1428 .arg(_x_vel, 19, 'e', 12) 1429 .arg(_x_acc, 19, 'e', 12) 1430 .arg(_health, 19, 'e', 12); 1431 1263 1432 // ===================== 1264 1433 // BROADCAST ORBIT - 2 1265 1434 // ===================== 1266 out 1267 << QString(fmt).arg(_y_pos, 19, 'e', 12).arg(_y_velocity, 19, 'e', 12).arg( 1268 _y_acceleration, 19, 'e', 12).arg(_frequency_number, 19, 'e', 12); 1435 if (type() == t_eph::FDMA) { 1436 out 1437 << QString(fmt) 1438 .arg(_y_pos, 19, 'e', 12) 1439 .arg(_y_vel, 19, 'e', 12) 1440 .arg(_y_acc, 19, 'e', 12) 1441 .arg(_frq_num, 19, 'e', 12); 1442 } 1443 else { //L1OC, L3OC 1444 out 1445 << QString(fmt) 1446 .arg(_y_pos, 19, 'e', 12) 1447 .arg(_y_vel, 19, 'e', 12) 1448 .arg(_y_acc, 19, 'e', 12) 1449 .arg(double(_data_validity), 19, 'e', 12); 1450 } 1269 1451 // ===================== 1270 1452 // BROADCAST ORBIT - 3 1271 1453 // ===================== 1272 out 1273 << QString(fmt).arg(_z_pos, 19, 'e', 12).arg(_z_velocity, 19, 'e', 12).arg( 1274 _z_acceleration, 19, 'e', 12).arg(_E, 19, 'e', 12); 1275 // ===================== 1276 // BROADCAST ORBIT - 4 1277 // ===================== 1454 if (type() == t_eph::FDMA) { 1455 out 1456 << QString(fmt) 1457 .arg(_z_pos, 19, 'e', 12) 1458 .arg(_z_vel, 19, 'e', 12) 1459 .arg(_z_acc, 19, 'e', 12) 1460 .arg(_E, 19, 'e', 12); 1461 } 1462 else if (type() == t_eph::L1OC) { 1463 out 1464 << QString(fmt) 1465 .arg(_z_pos, 19, 'e', 12) 1466 .arg(_z_vel, 19, 'e', 12) 1467 .arg(_z_acc, 19, 'e', 12) 1468 .arg(_TGD_L2OCp, 19, 'e', 12); 1469 } 1470 else if (type() == t_eph::L3OC) { 1471 out 1472 << QString(fmt) 1473 .arg(_z_pos, 19, 'e', 12) 1474 .arg(_z_vel, 19, 'e', 12) 1475 .arg(_z_acc, 19, 'e', 12) 1476 .arg(_TGD_L3OCp, 19, 'e', 12); 1477 } 1278 1478 if (version >= 3.05) { 1279 // unknown (RINEX version < 3.05) 1280 if (_flags_unknown) { 1479 // ===================== 1480 // BROADCAST ORBIT - 4 1481 // ===================== 1482 if (type() == t_eph::FDMA){ 1483 int statusflags = 0; 1484 int healthflags = 0; 1485 if (!_statusflags_unknown ) { 1486 // bit 0-1 1487 if (_M_P == 1.0) {statusflags |= (1 << 0);} 1488 else if (_M_P == 2.0) {statusflags |= (1 << 1);} 1489 else if (_M_P == 3.0) {statusflags |= (1 << 0); statusflags |= (1 << 1);} 1490 // bit 2-3 1491 if (_P1 == 1.0) {statusflags |= (1 << 2);} 1492 else if (_P1 == 2.0) {statusflags |= (1 << 3);} 1493 else if (_P1 == 3.0) {statusflags |= (1 << 2); statusflags |= (1 << 3);} 1494 // bit 4 1495 if (_P2) {statusflags |= (1 << 4);} 1496 // bit 5 1497 if (_P3) {statusflags |= (1 << 5);} 1498 // bit 6 1499 if (_M_P4) {statusflags |= (1 << 6);} 1500 // bit 7-8 1501 if (_M_M == 1.0) {statusflags |= (1 << 7);} 1502 } 1503 if (!_healthflags_unknown) { 1504 // bit 0 (is to be ignored, if bit 1 is zero) 1505 if (_almanac_health) {healthflags |= (1 << 0);} 1506 // bit 1 1507 if (_almanac_health_availablility_indicator) {healthflags |= (1 << 1);} 1508 // bit 2 1509 if (_M_l3) {healthflags |= (1 << 2);} 1510 } 1511 1512 if (_statusflags_unknown && _healthflags_unknown) { 1513 out 1514 << QString(fmt) 1515 .arg("", 19, QChar(' ')) // status-flags BNK (unknown) 1516 .arg(_M_delta_tau, 19, 'e', 12) 1517 .arg(_M_FT, 19, 'e', 12) 1518 .arg("", 19, QChar(' '));// health-flags BNK (unknown) 1519 } 1520 else if (!_statusflags_unknown && _healthflags_unknown) { 1521 out 1522 << QString(fmt) 1523 .arg(double(statusflags), 19, 'e', 12) 1524 .arg(_M_delta_tau, 19, 'e', 12) 1525 .arg(_M_FT, 19, 'e', 12) 1526 .arg("", 19, QChar(' '));// health-flags BNK (unknown) 1527 } 1528 else if (_statusflags_unknown && !_healthflags_unknown) { 1529 out 1530 << QString(fmt) 1531 .arg("", 19, QChar(' ')) // status-flags BNK (unknown) 1532 .arg(_M_delta_tau, 19, 'e', 12) 1533 .arg(_M_FT, 19, 'e', 12) 1534 .arg(double(healthflags), 19, 'e', 12); 1535 } 1536 else if (!_statusflags_unknown && !_healthflags_unknown) { 1537 out 1538 << QString(fmt) 1539 .arg(double(statusflags), 19, 'e', 12) 1540 .arg(_M_delta_tau, 19, 'e', 12) 1541 .arg(_M_FT, 19, 'e', 12) 1542 .arg(double(healthflags), 19, 'e', 12); 1543 } 1544 } 1545 else if (type() == t_eph::L1OC || 1546 type() == t_eph::L3OC) { 1547 int sourceflags = 0; 1548 // bit 0-1 1549 if (_RT == 1.0) {sourceflags |= (1 << 0);} 1550 else if (_RT == 2.0) {sourceflags |= (1 << 1);} 1551 else if (_RT == 3.0) {sourceflags |= (1 << 0); sourceflags |= (1 << 1);} 1552 // bit 2-3 1553 if (_RE == 1.0) {sourceflags |= (1 << 2);} 1554 else if (_RE == 2.0) {sourceflags |= (1 << 3);} 1555 else if (_RE == 3.0) {sourceflags |= (1 << 2); sourceflags |= (1 << 3);} 1281 1556 out 1282 << QString(fmt).arg("", 19, QChar(' ')) // statusflags blank if unknown 1283 .arg(_M_delta_tau, 19, 'e', 12).arg(_M_FT, 19, 'e', 12).arg("", 19, 1284 QChar(' ')); // healthflags blank if unknown 1285 } else { 1286 int statusflags = 0; 1287 // bit 7-8 1288 if (_M_M == 2.0) { 1289 statusflags |= (1 << 7); 1290 } 1291 // bit 6 1292 if (_M_P4) { 1293 statusflags |= (1 << 6); 1294 } 1295 // bit 5 1296 if (_P3) { 1297 statusflags |= (1 << 5); 1298 } 1299 // bit 4 1300 if (_P2) { 1301 statusflags |= (1 << 4); 1302 } 1303 // bit 2-3 1304 if (_P1 == 2.0) { 1305 statusflags |= (1 << 2); 1306 } else if (_P1 == 1.0) { 1307 statusflags |= (1 << 3); 1308 } else if (_P1 == 3.0) { 1309 statusflags |= (1 << 2); 1310 statusflags |= (1 << 3); 1311 } 1312 // bit 0-1 1313 if (_M_P == 2.0) { 1314 statusflags |= (1 << 0); 1315 } else if (_M_P == 1.0) { 1316 statusflags |= (1 << 1); 1317 } else if (_M_P == 3.0) { 1318 statusflags |= (1 << 0); 1319 statusflags |= (1 << 1); 1320 } 1321 // health flags 1322 // ============ 1323 int healthflags = 0; 1324 // bit 0 (is to be ignored, if bit 1 is zero) 1325 if (_almanac_health) { 1326 healthflags |= (1 << 0); 1327 } 1328 // bit 1 1329 if (_almanac_health_availablility_indicator) { 1330 healthflags |= (1 << 1); 1331 } 1332 // bit 2 1333 if (_M_l3) { 1334 healthflags |= (1 << 2); 1335 } 1557 << QString(fmt) 1558 .arg(_sat_type , 19, 'e', 12) 1559 .arg(double(sourceflags), 19, 'e', 12) 1560 .arg(_ET, 19, 'e', 12) 1561 .arg(_EE, 19, 'e', 12); 1562 } 1563 // ===================== 1564 // BROADCAST ORBIT - 5 1565 // ===================== 1566 if (type() == t_eph::L1OC || 1567 type() == t_eph::L3OC) { 1336 1568 out 1337 << QString(fmt).arg(double(statusflags), 19, 'e', 12).arg( 1338 _M_delta_tau, 19, 'e', 12).arg(_M_FT, 19, 'e', 12).arg( 1339 double(healthflags), 19, 'e', 12); 1340 } 1341 } 1342 1569 << QString(fmt) 1570 .arg(_attitude_P2, 19, 'e', 12) 1571 .arg(_Tin, 19, 'e', 12) 1572 .arg(_tau1, 19, 'e', 12) 1573 .arg(_tau2, 19, 'e', 12); 1574 } 1575 // ===================== 1576 // BROADCAST ORBIT - 6 1577 // ===================== 1578 if (type() == t_eph::L1OC || 1579 type() == t_eph::L3OC) { 1580 out 1581 << QString(fmt) 1582 .arg(_yaw, 19, 'e', 12) 1583 .arg(_sn, 19, 'e', 12) 1584 .arg(_angular_rate, 19, 'e', 12) 1585 .arg(_angular_acc, 19, 'e', 12); 1586 } 1587 // ===================== 1588 // BROADCAST ORBIT - 7 1589 // ===================== 1590 if (type() == t_eph::L1OC || 1591 type() == t_eph::L3OC) { 1592 out 1593 << QString(fmt) 1594 .arg(_angular_rate_max, 19, 'e', 12) 1595 .arg(_X_PC, 19, 'e', 12) 1596 .arg(_Y_PC, 19, 'e', 12) 1597 .arg(_Z_PC, 19, 'e', 12); 1598 } 1599 // ===================== 1600 // BROADCAST ORBIT - 8 1601 // ===================== 1602 if (type() == t_eph::L1OC || 1603 type() == t_eph::L3OC) { 1604 out 1605 << QString(fmt) 1606 .arg(_M_FE, 19, 'e', 12) 1607 .arg(_M_FT, 19, 'e', 12) 1608 .arg("", 19, QChar(' ')) 1609 .arg(_TOT, 19, 'e', 12); 1610 } 1611 } 1343 1612 return rnxStr; 1344 1613 } … … 1455 1724 _TOC.set(year, month, day, hour, min, sec); 1456 1725 1457 if ( readDbl(line, pos[1], fieldLen, _clock_bias)1726 if ( readDbl(line, pos[1], fieldLen, _clock_bias) 1458 1727 || readDbl(line, pos[2], fieldLen, _clock_drift) 1459 1728 || readDbl(line, pos[3], fieldLen, _clock_driftrate)) { … … 1466 1735 // ===================== 1467 1736 else if (iLine == 1) { 1468 if ( readDbl(line, pos[0], fieldLen, _IODnav)1737 if ( readDbl(line, pos[0], fieldLen, _IODnav) 1469 1738 || readDbl(line, pos[1], fieldLen, _Crs) 1470 1739 || readDbl(line, pos[2], fieldLen, _Delta_n) … … 1478 1747 // ===================== 1479 1748 else if (iLine == 2) { 1480 if ( readDbl(line, pos[0], fieldLen, _Cuc)1749 if ( readDbl(line, pos[0], fieldLen, _Cuc) 1481 1750 || readDbl(line, pos[1], fieldLen, _e) 1482 1751 || readDbl(line, pos[2], fieldLen, _Cus) … … 1490 1759 // ===================== 1491 1760 else if (iLine == 3) { 1492 if ( readDbl(line, pos[0], fieldLen, _TOEsec)1761 if ( readDbl(line, pos[0], fieldLen, _TOEsec) 1493 1762 || readDbl(line, pos[1], fieldLen, _Cic) 1494 1763 || readDbl(line, pos[2], fieldLen, _OMEGA0) … … 1502 1771 // ===================== 1503 1772 else if (iLine == 4) { 1504 if ( readDbl(line, pos[0], fieldLen, _i0)1773 if ( readDbl(line, pos[0], fieldLen, _i0) 1505 1774 || readDbl(line, pos[1], fieldLen, _Crc) 1506 1775 || readDbl(line, pos[2], fieldLen, _omega) … … 1514 1783 // ===================== 1515 1784 else if (iLine == 5) { 1516 if ( readDbl(line, pos[0], fieldLen, _IDOT)1785 if ( readDbl(line, pos[0], fieldLen, _IDOT) 1517 1786 || readDbl(line, pos[1], fieldLen, datasource) 1518 1787 || readDbl(line, pos[2], fieldLen, _TOEweek)) { 1519 1788 _checkState = bad; 1520 1789 return; 1521 } else { 1522 if (int(datasource) & (1 << 8)) { 1790 } 1791 else { 1792 if (bitExtracted(int(datasource), 1, 8)) { 1523 1793 _fnav = true; 1524 1794 _inav = false; 1525 } else if (int(datasource) & (1 << 9)) { 1795 /* set unused I/NAV values */ 1796 _E5b_HS = 0.0; 1797 _E1B_HS = 0.0; 1798 _E1B_DataInvalid = false; 1799 _E5b_DataInvalid = false; 1800 // Source RINEX version < 4 1801 if (type() == t_eph::undefined) { 1802 _type = t_eph::FNAV; 1803 } 1804 } 1805 if (bitExtracted(int(datasource), 1, 9)) { 1526 1806 _fnav = false; 1527 1807 _inav = true; 1528 } 1808 /* set unused F/NAV values */ 1809 _E5a_HS = 0.0; 1810 _E5a_DataInvalid = false; 1811 // Source RINEX version < 4 1812 if (type() == t_eph::undefined) { 1813 _type = t_eph::INAV; 1814 } 1815 } 1816 // GAL week # in RINEX is aligned/identical to continuous GPS week # used in RINEX 1817 // but GST week # started at the first GPS roll-over (continuous GPS week 1024) 1529 1818 _TOEweek -= 1024.0; 1530 1819 } … … 1534 1823 // ===================== 1535 1824 else if (iLine == 6) { 1536 if ( readDbl(line, pos[0], fieldLen, _SISA)1825 if ( readDbl(line, pos[0], fieldLen, _SISA) 1537 1826 || readDbl(line, pos[1], fieldLen, SVhealth) 1538 1827 || readDbl(line, pos[2], fieldLen, _BGD_1_5A) … … 1542 1831 } else { 1543 1832 // Bit 0 1544 _ e1DataInvalid = (int(SVhealth) & (1 << 0));1833 _E1B_DataInvalid = bitExtracted(int(SVhealth), 1, 0); 1545 1834 // Bit 1-2 1546 _E1 _bHS = double((int(SVhealth) >> 1) & 0x3);1835 _E1B_HS = double(bitExtracted(int(SVhealth), 2, 1)); 1547 1836 // Bit 3 1548 _ e5aDataInvalid = (int(SVhealth) & (1 << 3));1837 _E5a_DataInvalid = bitExtracted(int(SVhealth), 1, 3); 1549 1838 // Bit 4-5 1550 _E5a HS = double((int(SVhealth) >> 4) & 0x3);1839 _E5a_HS = double(bitExtracted(int(SVhealth), 2, 4)); 1551 1840 // Bit 6 1552 _ e5bDataInvalid = (int(SVhealth) & (1 << 6));1841 _E5b_DataInvalid = bitExtracted(int(SVhealth), 1, 6); 1553 1842 // Bit 7-8 1554 _E5bHS = double((int(SVhealth) >> 7) & 0x3); 1555 1843 _E5b_HS = double(bitExtracted(int(SVhealth), 2, 7)); 1844 if (_fnav) { 1845 _BGD_1_5B = 0.0; 1846 } 1556 1847 if (prnStr.at(0) == 'E') { 1557 1848 _prn.set('E', prnStr.mid(1).toInt(), _inav ? 1 : 0); … … 1663 1954 //////////////////////////////////////////////////////////////////////////// 1664 1955 unsigned int t_ephGal::isUnhealthy() const { 1665 if (_E5aHS == 1 || _E5aHS == 3 || _E5bHS == 1 || _E5bHS == 3 || _E1_bHS == 1 1666 || _E1_bHS == 3) { 1956 // SHS; 1 = Out of Service, 3 = In Test, 0 = Signal Ok, 2 = Extended Operations Mode 1957 if (_E5a_HS == 1 || _E5a_HS == 3 || 1958 _E5b_HS == 1 || _E5b_HS == 3 || 1959 _E1B_HS == 1 || _E1B_HS == 3) { 1667 1960 return 1; 1668 1961 } 1669 if (_e5aDataInvalid || _e5bDataInvalid || _e1DataInvalid) { 1962 if (_E5a_DataInvalid || 1963 _E5b_DataInvalid || 1964 _E1B_DataInvalid) { 1670 1965 return 1; 1671 1966 } 1672 if (_SISA == 255.0) { 1967 if (_SISA == 255.0) { // NAPA: No Accuracy Prediction Available 1673 1968 return 1; 1674 1969 } … … 1677 1972 * It also means that the satellite signal may be used for PNT. 1678 1973 if (_E5aHS == 2 || 1679 _E5bHS == 2 ||1680 _E1_bHS == 2 ) {1681 return 1;1974 _E5bHS == 2 || 1975 _E1_bHS == 2 ) { 1976 return 1; 1682 1977 } 1683 1978 */ 1684 1979 return 0; 1980 1685 1981 } 1686 1982 … … 1689 1985 QString t_ephGal::toString(double version) const { 1690 1986 1691 QString ephStr = ephTypeStr(_ephType, _prn, version);1987 QString ephStr = typeStr(_type, _prn, version); 1692 1988 QString rnxStr = ephStr + rinexDateStr(_TOC, _prn, version); 1693 1989 … … 1703 1999 // ===================== 1704 2000 out 1705 << QString(fmt).arg(_IODnav, 19, 'e', 12).arg(_Crs, 19, 'e', 12).arg( 1706 _Delta_n, 19, 'e', 12).arg(_M0, 19, 'e', 12); 2001 << QString(fmt) 2002 .arg(_IODnav, 19, 'e', 12) 2003 .arg(_Crs, 19, 'e', 12) 2004 .arg(_Delta_n, 19, 'e', 12) 2005 .arg(_M0, 19, 'e', 12); 1707 2006 // ===================== 1708 2007 // BROADCAST ORBIT - 2 1709 2008 // ===================== 1710 2009 out 1711 << QString(fmt).arg(_Cuc, 19, 'e', 12).arg(_e, 19, 'e', 12).arg(_Cus, 19, 1712 'e', 12).arg(_sqrt_A, 19, 'e', 12); 2010 << QString(fmt) 2011 .arg(_Cuc, 19, 'e', 12). 2012 arg(_e, 19, 'e', 12) 2013 .arg(_Cus, 19, 'e', 12) 2014 .arg(_sqrt_A, 19, 'e', 12); 1713 2015 // ===================== 1714 2016 // BROADCAST ORBIT - 3 1715 2017 // ===================== 1716 2018 out 1717 << QString(fmt).arg(_TOEsec, 19, 'e', 12).arg(_Cic, 19, 'e', 12).arg( 1718 _OMEGA0, 19, 'e', 12).arg(_Cis, 19, 'e', 12); 2019 << QString(fmt). 2020 arg(_TOEsec, 19, 'e', 12) 2021 .arg(_Cic, 19, 'e', 12) 2022 .arg(_OMEGA0, 19, 'e', 12) 2023 .arg(_Cis, 19, 'e', 12); 1719 2024 // ===================== 1720 2025 // BROADCAST ORBIT - 4 1721 2026 // ===================== 1722 2027 out 1723 << QString(fmt).arg(_i0, 19, 'e', 12).arg(_Crc, 19, 'e', 12).arg(_omega, 1724 19, 'e', 12).arg(_OMEGADOT, 19, 'e', 12); 1725 // ===================== 1726 // BROADCAST ORBIT - 5 2028 << QString(fmt) 2029 .arg(_i0, 19, 'e', 12) 2030 .arg(_Crc, 19, 'e', 12) 2031 .arg(_omega, 19, 'e', 12) 2032 .arg(_OMEGADOT, 19, 'e', 12); 2033 // ===================== 2034 // BROADCAST ORBIT - 5/6 1727 2035 // ===================== 1728 2036 int dataSource = 0; … … 1736 2044 // SVhealth 1737 2045 // Bit 3 : E5a DVS 1738 if (_ e5aDataInvalid) {2046 if (_E5a_DataInvalid) { 1739 2047 SVhealth |= (1 << 3); 1740 2048 } 1741 2049 // Bit 4-5: E5a HS 1742 if (_E5aHS == 1.0) {2050 if (_E5a_HS == 1.0) { 1743 2051 SVhealth |= (1 << 4); 1744 } else if (_E5aHS == 2.0) { 2052 } 2053 else if (_E5a_HS == 2.0) { 1745 2054 SVhealth |= (1 << 5); 1746 } else if (_E5aHS == 3.0) { 2055 } 2056 else if (_E5a_HS == 3.0) { 1747 2057 SVhealth |= (1 << 4); 1748 2058 SVhealth |= (1 << 5); … … 1756 2066 // SVhealth 1757 2067 // Bit 0 : E1-B DVS 1758 if (_ e1DataInvalid) {2068 if (_E1B_DataInvalid) { 1759 2069 SVhealth |= (1 << 0); 1760 2070 } 1761 2071 // Bit 1-2: E1-B HS 1762 if (_E1_bHS == 1.0) {2072 if (_E1B_HS == 1.0) { 1763 2073 SVhealth |= (1 << 1); 1764 } else if (_E1_bHS == 2.0) { 2074 } 2075 else if (_E1B_HS == 2.0) { 1765 2076 SVhealth |= (1 << 2); 1766 } else if (_E1_bHS == 3.0) { 2077 } 2078 else if (_E1B_HS == 3.0) { 1767 2079 SVhealth |= (1 << 1); 1768 2080 SVhealth |= (1 << 2); 1769 2081 } 1770 // Bit 3 : E5a DVS1771 if (_e5aDataInvalid) {1772 SVhealth |= (1 << 3);1773 }1774 // Bit 4-5: E5a HS1775 if (_E5aHS == 1.0) {1776 SVhealth |= (1 << 4);1777 } else if (_E5aHS == 2.0) {1778 SVhealth |= (1 << 5);1779 } else if (_E5aHS == 3.0) {1780 SVhealth |= (1 << 4);1781 SVhealth |= (1 << 5);1782 }1783 2082 // Bit 6 : E5b DVS 1784 if (_ e5bDataInvalid) {2083 if (_E5b_DataInvalid) { 1785 2084 SVhealth |= (1 << 6); 1786 2085 } 1787 2086 // Bit 7-8: E5b HS 1788 if (_E5b HS == 1.0) {2087 if (_E5b_HS == 1.0) { 1789 2088 SVhealth |= (1 << 7); 1790 } else if (_E5bHS == 2.0) { 2089 } 2090 else if (_E5b_HS == 2.0) { 1791 2091 SVhealth |= (1 << 8); 1792 } else if (_E5bHS == 3.0) { 2092 } 2093 else if (_E5b_HS == 3.0) { 1793 2094 SVhealth |= (1 << 7); 1794 2095 SVhealth |= (1 << 8); 1795 2096 } 1796 2097 } 1797 2098 // ===================== 2099 // BROADCAST ORBIT - 5 2100 // ===================== 1798 2101 out 1799 << QString(fmt).arg(_IDOT, 19, 'e', 12).arg(double(dataSource), 19, 'e', 1800 12).arg(_TOEweek + 1024.0, 19, 'e', 12).arg(0.0, 19, 'e', 12); 2102 << QString(fmt) 2103 .arg(_IDOT, 19, 'e', 12) 2104 .arg(double(dataSource), 19, 'e', 12) 2105 .arg(_TOEweek + 1024.0, 19, 'e', 12) 2106 .arg(0.0, 19, 'e', 12); 1801 2107 // ===================== 1802 2108 // BROADCAST ORBIT - 6 1803 2109 // ===================== 1804 2110 out 1805 << QString(fmt).arg(_SISA, 19, 'e', 12).arg(double(SVhealth), 19, 'e', 12).arg( 1806 BGD_1_5A, 19, 'e', 12).arg(BGD_1_5B, 19, 'e', 12); 2111 << QString(fmt) 2112 .arg(_SISA, 19, 'e', 12) 2113 .arg(double(SVhealth), 19, 'e', 12) 2114 .arg(BGD_1_5A, 19, 'e', 12) 2115 .arg(BGD_1_5B, 19, 'e', 12); 1807 2116 // ===================== 1808 2117 // BROADCAST ORBIT - 7 … … 1813 2122 } 1814 2123 out 1815 << QString(fmt).arg(tot, 19, 'e', 12).arg("", 19, QChar(' ')).arg("", 19, 1816 QChar(' ')).arg("", 19, QChar(' ')); 2124 << QString(fmt) 2125 .arg(tot, 19, 'e', 12) 2126 .arg("", 19, QChar(' ')) 2127 .arg("", 19, QChar(' ')) 2128 .arg("", 19, QChar(' ')); 1817 2129 1818 2130 return rnxStr; … … 1824 2136 1825 2137 const int nLines = 4; 2138 2139 // Source RINEX version < 4 2140 if (type() == t_eph::undefined) { 2141 _type = t_eph::SBASL1; 2142 } 1826 2143 1827 2144 if (lines.size() != nLines) { … … 1872 2189 _TOC.set(year, month, day, hour, min, sec); 1873 2190 1874 if ( readDbl(line, pos[1], fieldLen, _agf0)2191 if ( readDbl(line, pos[1], fieldLen, _agf0) 1875 2192 || readDbl(line, pos[2], fieldLen, _agf1) 1876 2193 || readDbl(line, pos[3], fieldLen, _TOT)) { … … 1883 2200 // ===================== 1884 2201 else if (iLine == 1) { 1885 if ( readDbl(line, pos[0], fieldLen, _x_pos)1886 || readDbl(line, pos[1], fieldLen, _x_vel ocity)1887 || readDbl(line, pos[2], fieldLen, _x_acc eleration)2202 if ( readDbl(line, pos[0], fieldLen, _x_pos) 2203 || readDbl(line, pos[1], fieldLen, _x_vel) 2204 || readDbl(line, pos[2], fieldLen, _x_acc) 1888 2205 || readDbl(line, pos[3], fieldLen, _health)) { 1889 2206 _checkState = bad; … … 1895 2212 // ===================== 1896 2213 else if (iLine == 2) { 1897 if ( readDbl(line, pos[0], fieldLen, _y_pos)1898 || readDbl(line, pos[1], fieldLen, _y_vel ocity)1899 || readDbl(line, pos[2], fieldLen, _y_acc eleration)2214 if ( readDbl(line, pos[0], fieldLen, _y_pos) 2215 || readDbl(line, pos[1], fieldLen, _y_vel) 2216 || readDbl(line, pos[2], fieldLen, _y_acc) 1900 2217 || readDbl(line, pos[3], fieldLen, _ura)) { 1901 2218 _checkState = bad; … … 1908 2225 else if (iLine == 3) { 1909 2226 double iodn; 1910 if ( readDbl(line, pos[0], fieldLen, _z_pos)1911 || readDbl(line, pos[1], fieldLen, _z_vel ocity)1912 || readDbl(line, pos[2], fieldLen, _z_acc eleration)2227 if ( readDbl(line, pos[0], fieldLen, _z_pos) 2228 || readDbl(line, pos[1], fieldLen, _z_vel) 2229 || readDbl(line, pos[2], fieldLen, _z_acc) 1913 2230 || readDbl(line, pos[3], fieldLen, iodn)) { 1914 2231 _checkState = bad; … … 1919 2236 } 1920 2237 } 1921 1922 2238 _x_pos *= 1.e3; 1923 2239 _y_pos *= 1.e3; 1924 2240 _z_pos *= 1.e3; 1925 _x_vel ocity*= 1.e3;1926 _y_vel ocity*= 1.e3;1927 _z_vel ocity*= 1.e3;1928 _x_acc eleration*= 1.e3;1929 _y_acc eleration*= 1.e3;1930 _z_acc eleration*= 1.e3;2241 _x_vel *= 1.e3; 2242 _y_vel *= 1.e3; 2243 _z_vel *= 1.e3; 2244 _x_acc *= 1.e3; 2245 _y_acc *= 1.e3; 2246 _z_acc *= 1.e3; 1931 2247 } 1932 2248 … … 1944 2260 SBASADDBITSFLOAT(30, this->_y_pos, 0.08) 1945 2261 SBASADDBITSFLOAT(25, this->_z_pos, 0.4) 1946 SBASADDBITSFLOAT(17, this->_x_vel ocity, 0.000625)1947 SBASADDBITSFLOAT(17, this->_y_vel ocity, 0.000625)1948 SBASADDBITSFLOAT(18, this->_z_vel ocity, 0.004)1949 SBASADDBITSFLOAT(10, this->_x_acc eleration, 0.0000125)1950 SBASADDBITSFLOAT(10, this->_y_acc eleration, 0.0000125)1951 SBASADDBITSFLOAT(10, this->_z_acc eleration, 0.0000625)2262 SBASADDBITSFLOAT(17, this->_x_vel, 0.000625) 2263 SBASADDBITSFLOAT(17, this->_y_vel, 0.000625) 2264 SBASADDBITSFLOAT(18, this->_z_vel, 0.004) 2265 SBASADDBITSFLOAT(10, this->_x_acc, 0.0000125) 2266 SBASADDBITSFLOAT(10, this->_y_acc, 0.0000125) 2267 SBASADDBITSFLOAT(10, this->_z_acc, 0.0000625) 1952 2268 SBASADDBITSFLOAT(12, this->_agf0, 1953 2269 1.0 / static_cast<double>(1 << 30) / static_cast<double>(1 << 1)) … … 1967 2283 double dt = tt - _TOC; 1968 2284 1969 xc[0] = _x_pos + _x_vel ocity * dt + _x_acceleration* dt * dt / 2.0;1970 xc[1] = _y_pos + _y_vel ocity * dt + _y_acceleration* dt * dt / 2.0;1971 xc[2] = _z_pos + _z_vel ocity * dt + _z_acceleration* dt * dt / 2.0;1972 1973 vv[0] = _x_vel ocity + _x_acceleration* dt;1974 vv[1] = _y_vel ocity + _y_acceleration* dt;1975 vv[2] = _z_vel ocity + _z_acceleration* dt;2285 xc[0] = _x_pos + _x_vel * dt + _x_acc * dt * dt / 2.0; 2286 xc[1] = _y_pos + _y_vel * dt + _y_acc * dt * dt / 2.0; 2287 xc[2] = _z_pos + _z_vel * dt + _z_acc * dt * dt / 2.0; 2288 2289 vv[0] = _x_vel + _x_acc * dt; 2290 vv[1] = _y_vel + _y_acc * dt; 2291 vv[2] = _z_vel + _z_acc * dt; 1976 2292 1977 2293 xc[3] = _agf0 + _agf1 * dt; … … 2012 2328 QString t_ephSBAS::toString(double version) const { 2013 2329 2014 QString ephStr = ephTypeStr(_ephType, _prn, version);2330 QString ephStr = typeStr(_type, _prn, version); 2015 2331 QString rnxStr = ephStr + rinexDateStr(_TOC, _prn, version); 2016 2332 … … 2018 2334 2019 2335 out 2020 << QString("%1%2%3\n").arg(_agf0, 19, 'e', 12).arg(_agf1, 19, 'e', 12).arg( 2021 _TOT, 19, 'e', 12); 2336 << QString("%1%2%3\n") 2337 .arg(_agf0, 19, 'e', 12) 2338 .arg(_agf1, 19, 'e', 12) 2339 .arg(_TOT, 19, 'e', 12); 2022 2340 2023 2341 QString fmt = version < 3.0 ? " %1%2%3%4\n" : " %1%2%3%4\n"; … … 2026 2344 // ===================== 2027 2345 out 2028 << QString(fmt).arg(1.e-3 * _x_pos, 19, 'e', 12).arg(1.e-3 * _x_velocity, 2029 19, 'e', 12).arg(1.e-3 * _x_acceleration, 19, 'e', 12).arg(_health, 2030 19, 'e', 12); 2346 << QString(fmt) 2347 .arg(1.e-3 * _x_pos, 19, 'e', 12) 2348 .arg(1.e-3 * _x_vel, 19, 'e', 12) 2349 .arg(1.e-3 * _x_acc, 19, 'e', 12) 2350 .arg(_health, 19, 'e', 12); 2031 2351 // ===================== 2032 2352 // BROADCAST ORBIT - 2 2033 2353 // ===================== 2034 2354 out 2035 << QString(fmt).arg(1.e-3 * _y_pos, 19, 'e', 12).arg(1.e-3 * _y_velocity, 2036 19, 'e', 12).arg(1.e-3 * _y_acceleration, 19, 'e', 12).arg(_ura, 19, 2037 'e', 12); 2355 << QString(fmt) 2356 .arg(1.e-3 * _y_pos, 19, 'e', 12) 2357 .arg(1.e-3 * _y_vel, 19, 'e', 12) 2358 .arg(1.e-3 * _y_acc, 19, 'e', 12) 2359 .arg(_ura, 19, 'e', 12); 2038 2360 // ===================== 2039 2361 // BROADCAST ORBIT - 3 2040 2362 // ===================== 2041 2363 out 2042 << QString(fmt).arg(1.e-3 * _z_pos, 19, 'e', 12).arg(1.e-3 * _z_velocity, 2043 19, 'e', 12).arg(1.e-3 * _z_acceleration, 19, 'e', 12).arg( 2044 double(_IODN), 19, 'e', 12); 2364 << QString(fmt) 2365 .arg(1.e-3 * _z_pos, 19, 'e', 12) 2366 .arg(1.e-3 * _z_vel, 19, 'e', 12) 2367 .arg(1.e-3 * _z_acc, 19, 'e', 12) 2368 .arg(double(_IODN), 19, 'e', 12); 2045 2369 2046 2370 return rnxStr; … … 2053 2377 int nLines = 8; 2054 2378 2055 if (ephType() == t_eph::CNV1 || ephType() == t_eph::CNV2) { 2379 if (type() == t_eph::CNV1 || 2380 type() == t_eph::CNV2) { 2056 2381 nLines += 2; 2057 2382 } 2058 if ( ephType() == t_eph::CNV3) {2383 if (type() == t_eph::CNV3) { 2059 2384 nLines += 1; 2060 2385 } … … 2107 2432 _TOC.setBDS(year, month, day, hour, min, sec); 2108 2433 2109 if ( readDbl(line, pos[1], fieldLen, _clock_bias)2434 if ( readDbl(line, pos[1], fieldLen, _clock_bias) 2110 2435 || readDbl(line, pos[2], fieldLen, _clock_drift) 2111 2436 || readDbl(line, pos[3], fieldLen, _clock_driftrate)) { … … 2118 2443 // ===================== 2119 2444 else if (iLine == 1) { 2120 double aode; 2121 if (readDbl(line, pos[0], fieldLen, aode) 2122 || readDbl(line, pos[1], fieldLen, _Crs) 2123 || readDbl(line, pos[2], fieldLen, _Delta_n) 2124 || readDbl(line, pos[3], fieldLen, _M0)) { 2125 _checkState = bad; 2126 return; 2127 } 2128 _AODE = int(aode); 2445 if (type() == t_eph::D1 || 2446 type() == t_eph::D2 || 2447 type() == t_eph::undefined) { 2448 double aode; 2449 if ( readDbl(line, pos[0], fieldLen, aode) 2450 || readDbl(line, pos[1], fieldLen, _Crs) 2451 || readDbl(line, pos[2], fieldLen, _Delta_n) 2452 || readDbl(line, pos[3], fieldLen, _M0)) { 2453 _checkState = bad; 2454 return; 2455 } 2456 _AODE = int(aode); 2457 } 2458 else { //CNV1, CNV2, CNV3 2459 if ( readDbl(line, pos[0], fieldLen, _ADOT) 2460 || readDbl(line, pos[1], fieldLen, _Crs) 2461 || readDbl(line, pos[2], fieldLen, _Delta_n) 2462 || readDbl(line, pos[3], fieldLen, _M0)) { 2463 _checkState = bad; 2464 return; 2465 } 2466 } 2129 2467 } 2130 2468 // ===================== … … 2132 2470 // ===================== 2133 2471 else if (iLine == 2) { 2134 if ( readDbl(line, pos[0], fieldLen, _Cuc)2472 if ( readDbl(line, pos[0], fieldLen, _Cuc) 2135 2473 || readDbl(line, pos[1], fieldLen, _e) 2136 2474 || readDbl(line, pos[2], fieldLen, _Cus) … … 2144 2482 // ===================== 2145 2483 else if (iLine == 3) { 2146 if ( readDbl(line, pos[0], fieldLen, _TOEsec)2484 if ( readDbl(line, pos[0], fieldLen, _TOEsec) 2147 2485 || readDbl(line, pos[1], fieldLen, _Cic) 2148 2486 || readDbl(line, pos[2], fieldLen, _OMEGA0) … … 2156 2494 // ===================== 2157 2495 else if (iLine == 4) { 2158 if ( readDbl(line, pos[0], fieldLen, _i0)2496 if ( readDbl(line, pos[0], fieldLen, _i0) 2159 2497 || readDbl(line, pos[1], fieldLen, _Crc) 2160 2498 || readDbl(line, pos[2], fieldLen, _omega) … … 2163 2501 return; 2164 2502 } 2503 else { 2504 // Source RINEX version < 4 2505 if (type() == t_eph::undefined) { 2506 const double iMaxGEO = 10.0 / 180.0 * M_PI; 2507 if (_i0 > iMaxGEO) { 2508 _type = t_eph::D1; 2509 } 2510 else { 2511 _type = t_eph::D2; 2512 } 2513 } 2514 } 2165 2515 } 2166 2516 // ===================== … … 2168 2518 // ===================== 2169 2519 else if (iLine == 5) { 2170 2171 if (ephType() == t_eph::CNV1 || ephType() == t_eph::CNV22172 || ephType() == t_eph::CNV3) {2173 if ( readDbl(line, pos[0], fieldLen, _IDOT)2520 if (type() == t_eph::CNV1 || 2521 type() == t_eph::CNV2 || 2522 type() == t_eph::CNV3) { 2523 if ( readDbl(line, pos[0], fieldLen, _IDOT) 2174 2524 || readDbl(line, pos[1], fieldLen, _Delta_n_dot) 2175 2525 || readDbl(line, pos[2], fieldLen, _satType) … … 2178 2528 return; 2179 2529 } 2180 } else { // D1, D2, undefined 2181 if (readDbl(line, pos[0], fieldLen, _IDOT) 2530 } 2531 else { // D1, D2 2532 if ( readDbl(line, pos[0], fieldLen, _IDOT) 2182 2533 || readDbl(line, pos[2], fieldLen, _BDTweek)) { 2183 2534 _checkState = bad; … … 2190 2541 // ===================== 2191 2542 else if (iLine == 6) { 2192 if (ephType() == t_eph::CNV1 || ephType() == t_eph::CNV2 2193 || ephType() == t_eph::CNV3) { 2194 if (readDbl(line, pos[0], fieldLen, _SISAI_oe) 2543 if (type() == t_eph::CNV1 || 2544 type() == t_eph::CNV2 || 2545 type() == t_eph::CNV3) { 2546 if ( readDbl(line, pos[0], fieldLen, _SISAI_oe) 2195 2547 || readDbl(line, pos[1], fieldLen, _SISAI_ocb) 2196 2548 || readDbl(line, pos[2], fieldLen, _SISAI_oc1) … … 2199 2551 return; 2200 2552 } 2201 } else { // D1, D2, undefined 2553 } 2554 else { // D1, D2 2202 2555 double SatH1; 2203 if ( readDbl(line, pos[0], fieldLen, _URA)2556 if ( readDbl(line, pos[0], fieldLen, _ura) 2204 2557 || readDbl(line, pos[1], fieldLen, SatH1) 2205 2558 || readDbl(line, pos[2], fieldLen, _TGD1) … … 2215 2568 // ===================== 2216 2569 else if (iLine == 7) { 2217 if ( ephType() == t_eph::CNV1) {2218 if ( readDbl(line, pos[0], fieldLen, _ISC_B1Cd)2570 if (type() == t_eph::CNV1) { 2571 if ( readDbl(line, pos[0], fieldLen, _ISC_B1Cd) 2219 2572 || readDbl(line, pos[2], fieldLen, _TGD_B1Cp) 2220 2573 || readDbl(line, pos[3], fieldLen, _TGD_B2ap)) { … … 2222 2575 return; 2223 2576 } 2224 } else if (ephType() == t_eph::CNV2) { 2225 if (readDbl(line, pos[1], fieldLen, _ISC_B2ad) 2577 } 2578 else if (type() == t_eph::CNV2) { 2579 if ( readDbl(line, pos[1], fieldLen, _ISC_B2ad) 2226 2580 || readDbl(line, pos[2], fieldLen, _TGD_B1Cp) 2227 2581 || readDbl(line, pos[3], fieldLen, _TGD_B2ap)) { … … 2229 2583 return; 2230 2584 } 2231 } else if (ephType() == t_eph::CNV3) { 2585 } 2586 else if (type() == t_eph::CNV3) { 2232 2587 double health; 2233 if ( readDbl(line, pos[0], fieldLen, _SISMAI)2588 if ( readDbl(line, pos[0], fieldLen, _SISMAI) 2234 2589 || readDbl(line, pos[1], fieldLen, health) 2235 2590 || readDbl(line, pos[2], fieldLen, _INTEGRITYF_B2b) … … 2239 2594 } 2240 2595 _health = int(health); 2241 } else { // D1, D2 or undefined 2596 } 2597 else { // D1, D2 2242 2598 double aodc; 2243 if ( readDbl(line, pos[0], fieldLen, _TOT)2599 if ( readDbl(line, pos[0], fieldLen, _TOT) 2244 2600 || readDbl(line, pos[1], fieldLen, aodc)) { 2245 2601 _checkState = bad; … … 2257 2613 else if (iLine == 8) { 2258 2614 double health; 2259 if ( ephType() == t_eph::CNV1) {2260 if ( readDbl(line, pos[0], fieldLen, _SISMAI)2615 if (type() == t_eph::CNV1) { 2616 if ( readDbl(line, pos[0], fieldLen, _SISMAI) 2261 2617 || readDbl(line, pos[1], fieldLen, health) 2262 2618 || readDbl(line, pos[2], fieldLen, _INTEGRITYF_B1C) … … 2266 2622 } 2267 2623 _health = int(health); 2268 } else if (ephType() == t_eph::CNV2) { 2269 if (readDbl(line, pos[0], fieldLen, _SISMAI) 2624 } 2625 else if (type() == t_eph::CNV2) { 2626 if ( readDbl(line, pos[0], fieldLen, _SISMAI) 2270 2627 || readDbl(line, pos[1], fieldLen, health) 2271 2628 || readDbl(line, pos[2], fieldLen, _INTEGRITYF_B2aB1C) … … 2275 2632 } 2276 2633 _health = int(health); 2277 } else if (ephType() == t_eph::CNV3) { 2634 } 2635 else if (type() == t_eph::CNV3) { 2278 2636 if (readDbl(line, pos[0], fieldLen, _TOT)) { 2279 2637 _checkState = bad; … … 2281 2639 } 2282 2640 } 2283 2284 2641 } 2285 2642 // ===================== … … 2287 2644 // ===================== 2288 2645 else if (iLine == 9) { 2289 2290 if (ephType() == t_eph::CNV1 || ephType() == t_eph::CNV2) {2291 if ( readDbl(line, pos[0], fieldLen, _TOT)2646 if (type() == t_eph::CNV1 || 2647 type() == t_eph::CNV2) { 2648 if ( readDbl(line, pos[0], fieldLen, _TOT) 2292 2649 || readDbl(line, pos[3], fieldLen, _IODE)) { 2293 2650 _checkState = bad; … … 2295 2652 } 2296 2653 } 2297 2298 2654 } 2299 2655 } … … 2488 2844 unsigned int t_ephBDS::isUnhealthy() const { 2489 2845 2490 if ( ephType() == t_eph::CNV1 || ephType() == t_eph::CNV22491 || ephType() == t_eph::CNV3) {2846 if (type() == t_eph::CNV1 || type() == t_eph::CNV2 2847 || type() == t_eph::CNV3) { 2492 2848 return static_cast<unsigned int>(_health); 2493 2849 } … … 2501 2857 QString t_ephBDS::toString(double version) const { 2502 2858 2503 QString ephStr = ephTypeStr(_ephType, _prn, version); 2859 if (version < 4.0 && 2860 (type() == t_eph::CNV1 || 2861 type() == t_eph::CNV2 || 2862 type() == t_eph::CNV3 )) { 2863 return ""; 2864 } 2865 2866 QString ephStr = typeStr(_type, _prn, version); 2504 2867 QString rnxStr = ephStr + rinexDateStr(_TOC - 14.0, _prn, version); 2505 2868 … … 2507 2870 2508 2871 out 2509 << QString("%1%2%3\n").arg(_clock_bias, 19, 'e', 12).arg(_clock_drift, 19, 2510 'e', 12).arg(_clock_driftrate, 19, 'e', 12); 2872 << QString("%1%2%3\n") 2873 .arg(_clock_bias, 19, 'e', 12) 2874 .arg(_clock_drift, 19, 'e', 12) 2875 .arg(_clock_driftrate, 19, 'e', 12); 2511 2876 2512 2877 QString fmt = version < 3.0 ? " %1%2%3%4\n" : " %1%2%3%4\n"; … … 2514 2879 // BROADCAST ORBIT - 1 2515 2880 // ===================== 2881 if (type() == t_eph::D1 || 2882 type() == t_eph::D2 || 2883 type() == t_eph::undefined) { 2884 out 2885 << QString(fmt) 2886 .arg(double(_AODE), 19, 'e', 12) 2887 .arg(_Crs, 19, 'e', 12) 2888 .arg(_Delta_n, 19, 'e', 12) 2889 .arg(_M0, 19, 'e', 12); 2890 } 2891 else { //CNV1, CNV2, CNV3 2892 out 2893 << QString(fmt) 2894 .arg(_ADOT, 19, 'e', 12) 2895 .arg(_Crs, 19, 'e', 12) 2896 .arg(_Delta_n, 19, 'e', 12) 2897 .arg(_M0, 19, 'e', 12); 2898 } 2899 2900 // ===================== 2901 // BROADCAST ORBIT - 2 2902 // ===================== 2516 2903 out 2517 << QString(fmt).arg(double(_AODE), 19, 'e', 12).arg(_Crs, 19, 'e', 12).arg( 2518 _Delta_n, 19, 'e', 12).arg(_M0, 19, 'e', 12); 2519 // ===================== 2520 // BROADCAST ORBIT - 2 2904 << QString(fmt) 2905 .arg(_Cuc, 19, 'e', 12) 2906 .arg(_e, 19, 'e', 12) 2907 .arg(_Cus, 19, 'e', 12) 2908 .arg(_sqrt_A, 19, 'e', 12); 2909 2910 // ===================== 2911 // BROADCAST ORBIT - 3 2521 2912 // ===================== 2522 2913 out 2523 << QString(fmt).arg(_Cuc, 19, 'e', 12).arg(_e, 19, 'e', 12).arg(_Cus, 19, 2524 'e', 12).arg(_sqrt_A, 19, 'e', 12); 2525 // ===================== 2526 // BROADCAST ORBIT - 3 2914 << QString(fmt) 2915 .arg(_TOEsec, 19, 'e', 12) 2916 .arg(_Cic, 19, 'e', 12) 2917 .arg(_OMEGA0, 19, 'e', 12) 2918 .arg(_Cis, 19, 'e', 12); 2919 // ===================== 2920 // BROADCAST ORBIT - 4 2527 2921 // ===================== 2528 2922 out 2529 << QString(fmt).arg(_TOEsec, 19, 'e', 12).arg(_Cic, 19, 'e', 12).arg( 2530 _OMEGA0, 19, 'e', 12).arg(_Cis, 19, 'e', 12); 2531 // ===================== 2532 // BROADCAST ORBIT - 4 2533 // ===================== 2534 out 2535 << QString(fmt).arg(_i0, 19, 'e', 12).arg(_Crc, 19, 'e', 12).arg(_omega, 2536 19, 'e', 12).arg(_OMEGADOT, 19, 'e', 12); 2923 << QString(fmt) 2924 .arg(_i0, 19, 'e', 12) 2925 .arg(_Crc, 19, 'e', 12) 2926 .arg(_omega, 19, 'e', 12) 2927 .arg(_OMEGADOT, 19, 'e', 12); 2537 2928 // ===================== 2538 2929 // BROADCAST ORBIT - 5 2539 2930 // ===================== 2540 if (ephType() == t_eph::CNV1 || ephType() == t_eph::CNV2 2541 || ephType() == t_eph::CNV3) { 2931 if (type() == t_eph::CNV1 || 2932 type() == t_eph::CNV2 || 2933 type() == t_eph::CNV3) { 2542 2934 out 2543 << QString(fmt).arg(_IDOT, 19, 'e', 12).arg(_Delta_n_dot, 19, 'e', 12).arg( 2544 _satType, 19, 'e', 12).arg(_top, 19, 'e', 12); 2545 } else { // D1, D2, undefined 2935 << QString(fmt) 2936 .arg(_IDOT, 19, 'e', 12) 2937 .arg(_Delta_n_dot, 19, 'e', 12) 2938 .arg(_satType, 19, 'e', 12) 2939 .arg(_top, 19, 'e', 12); 2940 } 2941 else { // D1, D2, 2546 2942 out 2547 << QString(fmt).arg(_IDOT, 19, 'e', 12).arg("", 19, QChar(' ')).arg( 2548 _BDTweek, 19, 'e', 12).arg("", 19, QChar(' ')); 2943 << QString(fmt) 2944 .arg(_IDOT, 19, 'e', 12) 2945 .arg("", 19, QChar(' ')) 2946 .arg(_BDTweek, 19, 'e', 12) 2947 .arg("", 19, QChar(' ')); 2549 2948 } 2550 2949 // ===================== 2551 2950 // BROADCAST ORBIT - 6 2552 2951 // ===================== 2553 if (ephType() == t_eph::CNV1 || ephType() == t_eph::CNV2 2554 || ephType() == t_eph::CNV3) { 2952 if (type() == t_eph::CNV1 || 2953 type() == t_eph::CNV2 || 2954 type() == t_eph::CNV3) { 2555 2955 out 2556 << QString(fmt).arg(_SISAI_oe, 19, 'e', 12).arg(_SISAI_ocb, 19, 'e', 12).arg( 2557 _SISAI_oc1, 19, 'e', 12).arg(_SISAI_oc2, 19, 'e', 12); 2558 } else { // D1, D2, undefined 2956 << QString(fmt) 2957 .arg(_SISAI_oe, 19, 'e', 12) 2958 .arg(_SISAI_ocb, 19, 'e', 12) 2959 .arg(_SISAI_oc1, 19, 'e', 12) 2960 .arg(_SISAI_oc2, 19, 'e', 12); 2961 } 2962 else { // D1, D2, undefined 2559 2963 out 2560 << QString(fmt).arg(_URA, 19, 'e', 12).arg(double(_SatH1), 19, 'e', 12).arg( 2561 _TGD1, 19, 'e', 12).arg(_TGD2, 19, 'e', 12); 2964 << QString(fmt) 2965 .arg(_ura, 19, 'e', 12) 2966 .arg(double(_SatH1), 19, 'e', 12) 2967 .arg(_TGD1, 19, 'e', 12) 2968 .arg(_TGD2, 19, 'e', 12); 2562 2969 } 2563 2970 // ===================== 2564 2971 // BROADCAST ORBIT - 7 2565 2972 // ===================== 2566 if ( ephType() == t_eph::CNV1) {2973 if (type() == t_eph::CNV1) { 2567 2974 out 2568 << QString(fmt).arg(_ISC_B1Cd, 19, 'e', 12).arg("", 19, QChar(' ')).arg( 2569 _TGD_B1Cp, 19, 'e', 12).arg(_TGD_B2ap, 19, 'e', 12); 2570 } else if (ephType() == t_eph::CNV2) { 2975 << QString(fmt) 2976 .arg(_ISC_B1Cd, 19, 'e', 12) 2977 .arg("", 19, QChar(' ')) 2978 .arg(_TGD_B1Cp, 19, 'e', 12) 2979 .arg(_TGD_B2ap, 19, 'e', 12); 2980 } 2981 else if (type() == t_eph::CNV2) { 2571 2982 out 2572 << QString(fmt).arg("", 19, QChar(' ')).arg(_ISC_B2ad, 19, 'e', 12).arg( 2573 _TGD_B1Cp, 19, 'e', 12).arg(_TGD_B2ap, 19, 'e', 12); 2574 } else if (ephType() == t_eph::CNV3) { 2983 << QString(fmt) 2984 .arg("", 19, QChar(' ')) 2985 .arg(_ISC_B2ad, 19, 'e', 12) 2986 .arg(_TGD_B1Cp, 19, 'e', 12) 2987 .arg(_TGD_B2ap, 19, 'e', 12); 2988 } 2989 else if (type() == t_eph::CNV3) { 2575 2990 out 2576 << QString(fmt).arg(_SISMAI, 19, 'e', 12).arg(double(_health), 19, 'e', 2577 12).arg(_INTEGRITYF_B2b, 19, 'e', 12).arg(_TGD_B2bI, 19, 'e', 12); 2578 } else { // D1, D2, undefined 2991 << QString(fmt) 2992 .arg(_SISMAI, 19, 'e', 12) 2993 .arg(double(_health), 19, 'e', 12) 2994 .arg(_INTEGRITYF_B2b, 19, 'e', 12) 2995 .arg(_TGD_B2bI, 19, 'e', 12); 2996 } 2997 else { // D1, D2, undefined 2579 2998 double tots = 0.0; 2580 2999 if (_receptDateTime.isValid()) { // RTCM stream input … … 2584 3003 } 2585 3004 out 2586 << QString(fmt).arg(tots, 19, 'e', 12).arg(double(_AODC), 19, 'e', 12).arg( 2587 "", 19, QChar(' ')).arg("", 19, QChar(' ')); 3005 << QString(fmt) 3006 .arg(tots, 19, 'e', 12) 3007 .arg(double(_AODC), 19, 'e', 12) 3008 .arg("", 19, QChar(' ')) 3009 .arg("", 19, QChar(' ')); 2588 3010 } 2589 3011 … … 2591 3013 // BROADCAST ORBIT - 8 2592 3014 // ===================== 2593 if ( ephType() == t_eph::CNV1) {3015 if (type() == t_eph::CNV1) { 2594 3016 out 2595 << QString(fmt).arg(_SISMAI, 19, 'e', 12).arg(double(_health), 19, 'e', 2596 12).arg(_INTEGRITYF_B1C, 19, 'e', 12).arg(_IODC, 19, 'e', 12); 2597 } else if (ephType() == t_eph::CNV2) { 3017 << QString(fmt) 3018 .arg(_SISMAI, 19, 'e', 12) 3019 .arg(double(_health), 19, 'e', 12) 3020 .arg(_INTEGRITYF_B1C, 19, 'e', 12) 3021 .arg(_IODC, 19, 'e', 12); 3022 } 3023 else if (type() == t_eph::CNV2) { 2598 3024 out 2599 << QString(fmt).arg(_SISMAI, 19, 'e', 12).arg(double(_health), 19, 'e', 2600 12).arg(_INTEGRITYF_B2aB1C, 19, 'e', 12).arg(_IODC, 19, 'e', 12); 2601 } else if (ephType() == t_eph::CNV3) { 3025 << QString(fmt) 3026 .arg(_SISMAI, 19, 'e', 12) 3027 .arg(double(_health), 19, 'e', 12) 3028 .arg(_INTEGRITYF_B2aB1C, 19, 'e', 12) 3029 .arg(_IODC, 19, 'e', 12); 3030 } 3031 else if (type() == t_eph::CNV3) { 2602 3032 out 2603 << QString(fmt).arg(_TOT, 19, 'e', 12).arg("", 19, QChar(' ')).arg("", 2604 19, QChar(' ')).arg("", 19, QChar(' ')); 3033 << QString(fmt) 3034 .arg(_TOT, 19, 'e', 12) 3035 .arg("", 19, QChar(' ')) 3036 .arg("", 19, QChar(' ')) 3037 .arg("", 19, QChar(' ')); 2605 3038 } 2606 3039 … … 2608 3041 // BROADCAST ORBIT - 9 2609 3042 // ===================== 2610 if (ephType() == t_eph::CNV1 || ephType() == t_eph::CNV2) { 3043 if (type() == t_eph::CNV1 || 3044 type() == t_eph::CNV2) { 2611 3045 out 2612 << QString(fmt).arg(_TOT, 19, 'e', 12).arg("", 19, QChar(' ')).arg("", 2613 19, QChar(' ')).arg(_IODE, 19, 'e', 12); 3046 << QString(fmt) 3047 .arg(_TOT, 19, 'e', 12) 3048 .arg("", 19, QChar(' ')) 3049 .arg("", 19, QChar(' ')) 3050 .arg(_IODE, 19, 'e', 12); 2614 3051 } 2615 3052
Note:
See TracChangeset
for help on using the changeset viewer.