Changeset 6876 in ntrip
- Timestamp:
- Jun 2, 2015, 6:21:50 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/upload/bncrtnetuploadcaster.cpp
r6860 r6876 356 356 for (int ii = 1; ii < lines.size(); ii++) { 357 357 358 QString prn; // prn or key VTEC, IND (phase bias indicators)358 QString key; // prn or key VTEC, IND (phase bias indicators) 359 359 ColumnVector rtnAPC; 360 360 ColumnVector rtnVel; 361 361 ColumnVector rtnCoM; 362 362 double rtnClk; 363 t_prn prn; 363 364 364 365 QTextStream in(lines[ii].toAscii()); 365 366 366 in >> prn;367 in >> key; 367 368 368 369 // non-satellite specific parameters 369 if ( prn.contains("IND", Qt::CaseSensitive)) {370 if (key.contains("IND", Qt::CaseSensitive)) { 370 371 in >> dispInd >> mwInd; 371 372 continue; 372 373 } 373 if ( prn.contains("VTEC", Qt::CaseSensitive)) {374 if (key.contains("VTEC", Qt::CaseSensitive)) { 374 375 in >> vtec.UpdateInterval >> vtec.NumLayers; 375 376 for (unsigned ll = 0; ll < vtec.NumLayers; ll++) { … … 393 394 continue; 394 395 } 395 396 const t_eph* ephLast = _ephUser->ephLast(prn); 397 const t_eph* ephPrev = _ephUser->ephPrev(prn); 396 char sys = key.mid(0,1).at(0).toAscii(); 397 int number = key.mid(1,2).toInt(); 398 int flags = 0; 399 if (sys == 'E') { flags = 1;} // I/NAV 400 prn.set(sys, number, flags); 401 QString prnInternalStr = QString::fromStdString(prn.toInternalString()); 402 QString prnStr = QString::fromStdString(prn.toString()); 403 const t_eph* ephLast = _ephUser->ephLast(prnInternalStr); 404 const t_eph* ephPrev = _ephUser->ephPrev(prnInternalStr); 398 405 const t_eph* eph = ephLast; 399 406 … … 412 419 if (_usedEph) { 413 420 if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) { 414 (*_usedEph)[prn ] = eph;421 (*_usedEph)[prnInternalStr] = eph; 415 422 } 416 423 else { 417 424 eph = 0; 418 if (_usedEph->contains(prn )) {419 const t_eph* usedEph = _usedEph->value(prn );425 if (_usedEph->contains(prnInternalStr)) { 426 const t_eph* usedEph = _usedEph->value(prnInternalStr); 420 427 if (usedEph == ephLast) { 421 428 eph = ephLast; … … 501 508 502 509 struct ClockOrbit::SatData* sd = 0; 503 if (prn [0]== 'G') {510 if (prn.system() == 'G') { 504 511 sd = co.Sat + co.NumberOfSat[CLOCKORBIT_SATGPS]; 505 512 ++co.NumberOfSat[CLOCKORBIT_SATGPS]; 506 513 } 507 else if (prn [0]== 'R') {514 else if (prn.system() == 'R') { 508 515 sd = co.Sat + CLOCKORBIT_NUMGPS 509 516 + co.NumberOfSat[CLOCKORBIT_SATGLONASS]; 510 517 ++co.NumberOfSat[CLOCKORBIT_SATGLONASS]; 511 518 } 512 else if (prn [0]== 'E') {519 else if (prn.system() == 'E') { 513 520 sd = co.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS 514 521 + co.NumberOfSat[CLOCKORBIT_SATGALILEO]; 515 522 ++co.NumberOfSat[CLOCKORBIT_SATGALILEO]; 516 523 } 517 else if (prn [0]== 'J') {524 else if (prn.system() == 'J') { 518 525 sd = co.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO 519 526 + co.NumberOfSat[CLOCKORBIT_SATQZSS]; 520 527 ++co.NumberOfSat[CLOCKORBIT_SATQZSS]; 521 528 } 522 else if (prn [0]== 'S') {529 else if (prn.system() == 'S') { 523 530 sd = co.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO 524 531 + CLOCKORBIT_NUMQZSS … … 526 533 ++co.NumberOfSat[CLOCKORBIT_SATSBAS]; 527 534 } 528 else if (prn [0]== 'C') {535 else if (prn.system() == 'C') { 529 536 sd = co.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO 530 537 + CLOCKORBIT_NUMQZSS + CLOCKORBIT_NUMSBAS … … 534 541 if (sd) { 535 542 QString outLine; 536 processSatellite(eph, epoTime.gpsw(), epoTime.gpssec(), prn ,543 processSatellite(eph, epoTime.gpsw(), epoTime.gpssec(), prnStr, 537 544 rtnAPC, rtnClk, rtnVel, rtnCoM, sd, outLine); 538 545 } … … 541 548 // ----------- 542 549 struct CodeBias::BiasSat* biasSat = 0; 543 if (prn [0]== 'G') {550 if (prn.system() == 'G') { 544 551 biasSat = bias.Sat + bias.NumberOfSat[CLOCKORBIT_SATGPS]; 545 552 ++bias.NumberOfSat[CLOCKORBIT_SATGPS]; 546 553 } 547 else if (prn [0]== 'R') {554 else if (prn.system() == 'R') { 548 555 biasSat = bias.Sat + CLOCKORBIT_NUMGPS 549 556 + bias.NumberOfSat[CLOCKORBIT_SATGLONASS]; 550 557 ++bias.NumberOfSat[CLOCKORBIT_SATGLONASS]; 551 558 } 552 else if (prn [0]== 'E') {559 else if (prn.system() == 'E') { 553 560 biasSat = bias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS 554 561 + bias.NumberOfSat[CLOCKORBIT_SATGALILEO]; 555 562 ++bias.NumberOfSat[CLOCKORBIT_SATGALILEO]; 556 563 } 557 else if (prn [0]== 'J') {564 else if (prn.system() == 'J') { 558 565 biasSat = bias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO 559 566 + bias.NumberOfSat[CLOCKORBIT_SATQZSS]; 560 567 ++bias.NumberOfSat[CLOCKORBIT_SATQZSS]; 561 568 } 562 else if (prn [0]== 'S') {569 else if (prn.system() == 'S') { 563 570 biasSat = bias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO 564 571 + CLOCKORBIT_NUMQZSS … … 566 573 ++bias.NumberOfSat[CLOCKORBIT_SATSBAS]; 567 574 } 568 else if (prn [0]== 'C') {575 else if (prn.system() == 'C') { 569 576 biasSat = bias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO 570 577 + CLOCKORBIT_NUMQZSS + CLOCKORBIT_NUMSBAS … … 574 581 575 582 if (biasSat) { 576 biasSat->ID = prn. mid(1).toInt();583 biasSat->ID = prn.number(); 577 584 biasSat->NumberOfCodeBiases = 0; 578 if (prn [0]== 'G') {585 if (prn.system() == 'G') { 579 586 QMapIterator<QString, double> it(codeBiases); 580 587 while (it.hasNext()) { … … 660 667 } 661 668 } 662 else if (prn [0]== 'R') {669 else if (prn.system() == 'R') { 663 670 QMapIterator<QString, double> it(codeBiases); 664 671 while (it.hasNext()) { … … 690 697 } 691 698 } 692 else if (prn [0]== 'E') {699 else if (prn.system() == 'E') { 693 700 QMapIterator<QString, double> it(codeBiases); 694 701 while (it.hasNext()) { … … 768 775 } 769 776 } 770 else if (prn [0]== 'J') {777 else if (prn.system() == 'J') { 771 778 QMapIterator<QString, double> it(codeBiases); 772 779 while (it.hasNext()) { … … 852 859 } 853 860 } 854 else if (prn [0]== 'S') {861 else if (prn.system() == 'S') { 855 862 QMapIterator<QString, double> it(codeBiases); 856 863 while (it.hasNext()) { … … 882 889 } 883 890 } 884 else if (prn [0]== 'C') {891 else if (prn.system() == 'C') { 885 892 QMapIterator<QString, double> it(codeBiases); 886 893 while (it.hasNext()) { … … 946 953 // ------------ 947 954 struct PhaseBias::PhaseBiasSat* phasebiasSat = 0; 948 if (prn [0]== 'G') {955 if (prn.system() == 'G') { 949 956 phasebiasSat = phasebias.Sat + phasebias.NumberOfSat[CLOCKORBIT_SATGPS]; 950 957 ++phasebias.NumberOfSat[CLOCKORBIT_SATGPS]; 951 958 } 952 else if (prn [0]== 'R') {959 else if (prn.system() == 'R') { 953 960 phasebiasSat = phasebias.Sat + CLOCKORBIT_NUMGPS 954 961 + phasebias.NumberOfSat[CLOCKORBIT_SATGLONASS]; 955 962 ++phasebias.NumberOfSat[CLOCKORBIT_SATGLONASS]; 956 963 } 957 else if (prn [0]== 'E') {964 else if (prn.system() == 'E') { 958 965 phasebiasSat = phasebias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS 959 966 + phasebias.NumberOfSat[CLOCKORBIT_SATGALILEO]; 960 967 ++phasebias.NumberOfSat[CLOCKORBIT_SATGALILEO]; 961 968 } 962 else if (prn [0]== 'J') {969 else if (prn.system() == 'J') { 963 970 phasebiasSat = phasebias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO 964 971 + phasebias.NumberOfSat[CLOCKORBIT_SATQZSS]; 965 972 ++phasebias.NumberOfSat[CLOCKORBIT_SATQZSS]; 966 973 } 967 else if (prn [0]== 'S') {974 else if (prn.system() == 'S') { 968 975 phasebiasSat = phasebias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO 969 976 + CLOCKORBIT_NUMQZSS … … 971 978 ++phasebias.NumberOfSat[CLOCKORBIT_SATSBAS]; 972 979 } 973 else if (prn [0]== 'C') {980 else if (prn.system() == 'C') { 974 981 phasebiasSat = phasebias.Sat + CLOCKORBIT_NUMGPS + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO 975 982 + CLOCKORBIT_NUMQZSS + CLOCKORBIT_NUMSBAS … … 981 988 phasebias.DispersiveBiasConsistencyIndicator = dispInd; 982 989 phasebias.MWConsistencyIndicator = mwInd; 983 phasebiasSat->ID = prn. mid(1).toInt();990 phasebiasSat->ID = prn.number(); 984 991 phasebiasSat->NumberOfPhaseBiases = 0; 985 992 phasebiasSat->YawAngle = pbSat.yA; 986 993 phasebiasSat->YawRate = pbSat.yR; 987 if (prn [0]== 'G') {994 if (prn.system() == 'G') { 988 995 QListIterator<phaseBiasSignal> it(phaseBiasList); 989 996 while (it.hasNext()) { … … 1108 1115 } 1109 1116 } 1110 if (prn [0]== 'R') {1117 if (prn.system() == 'R') { 1111 1118 QListIterator<phaseBiasSignal> it(phaseBiasList); 1112 1119 while (it.hasNext()) { … … 1150 1157 } 1151 1158 } 1152 if (prn [0]== 'E') {1159 if (prn.system() == 'E') { 1153 1160 QListIterator<phaseBiasSignal> it(phaseBiasList); 1154 1161 while (it.hasNext()) { … … 1264 1271 } 1265 1272 } 1266 if (prn [0]== 'J') {1273 if (prn.system() == 'J') { 1267 1274 QListIterator<phaseBiasSignal> it(phaseBiasList); 1268 1275 while (it.hasNext()) { … … 1387 1394 } 1388 1395 } 1389 if (prn [0]== 'S') {1396 if (prn.system() == 'S') { 1390 1397 QListIterator<phaseBiasSignal> it(phaseBiasList); 1391 1398 while (it.hasNext()) { … … 1429 1436 } 1430 1437 } 1431 if (prn [0]== 'C') {1438 if (prn.system() == 'C') { 1432 1439 QListIterator<phaseBiasSignal> it(phaseBiasList); 1433 1440 while (it.hasNext()) {
Note:
See TracChangeset
for help on using the changeset viewer.