- Timestamp:
- Apr 21, 2023, 11:48:24 AM (20 months ago)
- Location:
- trunk/BNC
- Files:
-
- 19 edited
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/scripts/Bnc.pm
r10007 r10034 627 627 if ( @OFF_BDSs && scalar @EPOCHs_OFF_BDS != scalar @OFF_BDSs ) { LOGDIE "number of epochs and OFF_BDSs not equal\n" } 628 628 629 629 630 my %data = ( 630 631 EPOCHS => \@EPOCHs, … … 634 635 SATNUM => \%SATNUM, 635 636 TRPs => \@TRPs, 636 CLKs 637 CLKs => \@CLKs, 637 638 OFF_GLOs => \@OFF_GLOs, 638 639 OFF_GALs => \@OFF_GALs, -
trunk/BNC/scripts/cmbPlot.pl
r9830 r10034 431 431 $pdf->save(); 432 432 $pdf->end(); 433 system ("rm $inputDir/*png");433 #system ("rm $inputDir/*png"); 434 434 system("evince $inputDir/$pdf_name&"); 435 435 -
trunk/BNC/scripts/pppPlot.pl
r10010 r10034 228 228 title => "Receiver clock", 229 229 timefmt => '%s', 230 style => " points",230 style => "linespoints", 231 231 ); 232 232 $chartCLK->plot2d($dataset); … … 261 261 title => "Receiver Offset GLONASS", 262 262 timefmt => '%s', 263 style => " points",263 style => "linespoints", 264 264 ); 265 265 $chartOFF_GLO->plot2d($dataset); #system ("display $pngName&"); … … 294 294 title => "Receiver Offset Galileo", 295 295 timefmt => '%s', 296 style => " points",296 style => "linespoints", 297 297 ); 298 298 $chartOFF_GAL->plot2d($dataset); #system ("display $pngName&"); … … 327 327 title => "Receiver Offset Beidou", 328 328 timefmt => '%s', 329 style => " points",329 style => "linespoints", 330 330 ); 331 331 $chartOFF_BDS->plot2d($dataset); #system ("display $pngName&"); … … 624 624 625 625 if ( $key_resType =~ /^c/ ) { 626 $chartRES->set( yrange => [ " - 10.0 ", " 10.0 " ] );626 $chartRES->set( yrange => [ " -6.0 ", " 6.0 " ] ); 627 627 } 628 628 elsif ( $key_resType =~ /^l/ ) { 629 $chartRES->set( yrange => [ " -0. 10 ", " 0.10" ] );629 $chartRES->set( yrange => [ " -0.06 ", " 0.06 " ] ); 630 630 } 631 631 … … 666 666 system ("rm *.png"); 667 667 if (Common::amInteractiv ) { 668 #system ("evince $inputDir/$pdf_name");668 system ("evince $inputDir/$pdf_name"); 669 669 } 670 670 } # ----- next logfile ----- -
trunk/BNC/src/PPP/pppClient.cpp
r10031 r10034 20 20 #include <iomanip> 21 21 #include <cmath> 22 #include <stdlib.h> 22 23 #include <string.h> 23 24 #include <stdexcept> … … 54 55 _obsPool = new t_pppObsPool(); 55 56 _staRover = new t_pppStation(); 56 _filter = new t_pppFilter( _obsPool);57 _filter = new t_pppFilter(); 57 58 _tides = new t_tides(); 58 59 _antex = 0; … … 65 66 } 66 67 } 67 68 if (_opt->_refSatRequired) { 69 for (unsigned iSys = 0; iSys < _opt->systems().size(); iSys++) { 70 char sys = _opt->systems()[iSys]; 71 _refSatMap[sys] = new t_pppRefSat(); 72 } 73 } 74 68 _offGlo = 0.0; 69 _offGal = 0.0; 70 _offBds = 0.0; 75 71 CLIENTS.setLocalData(this); // CLIENTS takes ownership over "this" 76 72 } … … 81 77 delete _log; 82 78 delete _opt; 83 delete _filter;84 79 delete _ephPool; 85 80 delete _obsPool; … … 88 83 delete _antex; 89 84 } 85 delete _filter; 90 86 delete _tides; 91 87 clearObs(); 92 QMapIterator<char, t_pppRefSat*> it(_refSatMap);93 while (it.hasNext()) {94 it.next();95 delete it.value();96 }97 _refSatMap.clear();98 88 } 99 89 … … 165 155 // ------- 166 156 epoTime.reset(); 167 clearObs();157 //clearObs(); 168 158 169 159 // Create vector of valid observations … … 218 208 while (it != obsVector.end()) { 219 209 t_pppSatObs* satObs = *it; 220 char sys = satObs->prn().system(); 221 t_pppRefSat* refSat = _refSatMap[sys]; 222 double stecRef = refSat->stecValue(); 223 if (stecRef && !satObs->isReference()) { 224 pseudoObsIono = true; 225 satObs->setPseudoObsIono(t_frequency::G1, stecRef); 226 } 210 pseudoObsIono = satObs->setPseudoObsIono(t_frequency::G1); 227 211 it++; 228 212 } 229 213 } 230 231 /* 232 vector<t_pppSatObs*>::iterator it = obsVector.begin(); 214 /*vector<t_pppSatObs*>::iterator it = obsVector.begin(); 233 215 while (it != obsVector.end()) { 234 216 t_pppSatObs* satObs = *it; 235 217 satObs->printObsMinusComputed(); 236 218 it++; 237 } 238 */ 219 }*/ 220 239 221 return pseudoObsIono; 240 222 } … … 330 312 } 331 313 if (maxRes < BLUNDER) { 332 if (print && _numEpoProcessing == 1) {314 if (print) { 333 315 LOG.setf(ios::fixed); 334 316 LOG << "\nPPP of Epoch "; … … 354 336 return success; 355 337 } 356 338 // Compute A Priori Glonass Receiver Clock Offset 339 ////////////////////////////////////////////////////////////////////////////// 340 double t_pppClient::cmpOffGlo(vector<t_pppSatObs*>& obsVector) { 341 342 t_lc::type tLC = t_lc::dummy; 343 double offGlo = 0.0; 344 345 if (OPT->useSystem('R')) { 346 347 while (obsVector.size() > 0) { 348 offGlo = 0.0; 349 double maxRes = 0.0; 350 int maxResIndex = -1; 351 t_prn maxResPrn; 352 unsigned nObs = 0; 353 for (unsigned ii = 0; ii < obsVector.size(); ii++) { 354 t_pppSatObs* satObs = obsVector.at(ii); 355 if (satObs->prn().system() == 'R') { 356 if (tLC == t_lc::dummy) { 357 tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1; 358 } 359 if (satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= OPT->_minEle)) { 360 double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC); 361 ++nObs; 362 offGlo += ll; 363 if (fabs(ll) > fabs(maxRes)) { 364 maxRes = ll; 365 maxResIndex = ii; 366 maxResPrn = satObs->prn(); 367 } 368 } 369 } 370 } 371 372 if (nObs > 0) { 373 offGlo = offGlo / nObs; 374 } 375 else { 376 offGlo = 0.0; 377 } 378 379 if (fabs(maxRes) > 1000.0) { 380 LOG << "t_pppClient::cmpOffGlo outlier " << maxResPrn.toString() << " " << maxRes << endl; 381 obsVector.erase(obsVector.begin() + maxResIndex); 382 } 383 else { 384 break; 385 } 386 } 387 } 388 389 return offGlo; 390 } 391 392 // Compute A Priori Galileo Receiver Clock Offset 393 ////////////////////////////////////////////////////////////////////////////// 394 double t_pppClient::cmpOffGal(vector<t_pppSatObs*>& obsVector) { 395 396 t_lc::type tLC = t_lc::dummy; 397 double offGal = 0.0; 398 399 if (OPT->useSystem('E')) { 400 401 while (obsVector.size() > 0) { 402 offGal = 0.0; 403 double maxRes = 0.0; 404 int maxResIndex = -1; 405 t_prn maxResPrn; 406 unsigned nObs = 0; 407 for (unsigned ii = 0; ii < obsVector.size(); ii++) { 408 t_pppSatObs* satObs = obsVector.at(ii); 409 if (satObs->prn().system() == 'E') { 410 if (tLC == t_lc::dummy) { 411 tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1; 412 } 413 if (satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= OPT->_minEle)) { 414 double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC); 415 ++nObs; 416 offGal += ll; 417 if (fabs(ll) > fabs(maxRes)) { 418 maxRes = ll; 419 maxResIndex = ii; 420 maxResPrn = satObs->prn(); 421 } 422 } 423 } 424 } 425 426 if (nObs > 0) { 427 offGal = offGal / nObs; 428 } 429 else { 430 offGal = 0.0; 431 } 432 433 if (fabs(maxRes) > 1000.0) { 434 LOG << "t_pppClient::cmpOffGal outlier " << maxResPrn.toString() << " " << maxRes << endl; 435 obsVector.erase(obsVector.begin() + maxResIndex); 436 } 437 else { 438 break; 439 } 440 } 441 } 442 443 return offGal; 444 } 445 446 447 // Compute A Priori BDS Receiver Clock Offset 448 ////////////////////////////////////////////////////////////////////////////// 449 double t_pppClient::cmpOffBds(vector<t_pppSatObs*>& obsVector) { 450 451 t_lc::type tLC = t_lc::dummy; 452 double offBds = 0.0; 453 454 if (_opt->useSystem('C')) { 455 while (obsVector.size() > 0) { 456 offBds = 0.0; 457 double maxRes = 0.0; 458 int maxResIndex = -1; 459 t_prn maxResPrn; 460 unsigned nObs = 0; 461 for (unsigned ii = 0; ii < obsVector.size(); ii++) { 462 const t_pppSatObs* satObs = obsVector.at(ii); 463 if (satObs->prn().system() == 'C') { 464 if (tLC == t_lc::dummy) { 465 tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1; 466 } 467 if (satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle)) { 468 double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC); 469 ++nObs; 470 offBds += ll; 471 if (fabs(ll) > fabs(maxRes)) { 472 maxRes = ll; 473 maxResIndex = ii; 474 maxResPrn = satObs->prn(); 475 } 476 } 477 } 478 } 479 480 if (nObs > 0) { 481 offBds = offBds / nObs; 482 } 483 else { 484 offBds = 0.0; 485 } 486 487 if (fabs(maxRes) > 1000.0) { 488 LOG << "t_pppClient::cmpOffBds outlier " << maxResPrn.toString() << " " << maxRes << endl; 489 delete obsVector.at(maxResIndex); 490 obsVector.erase(obsVector.begin() + maxResIndex); 491 } 492 else { 493 break; 494 } 495 } 496 } 497 return offBds; 498 } 357 499 // 358 500 ////////////////////////////////////////////////////////////////////////////// … … 403 545 else { 404 546 _output->_error = true; 405 if (OPT->_obsModelType == OPT->DCMcodeBias || 406 OPT->_obsModelType == OPT->DCMphaseBias) { 407 if (ind == 1 || ind == 6 || ind > 7) { 408 reset(); 409 } 410 //else {_filter->restoreState(ind);} 411 } 412 } 547 } 548 413 549 _output->_log = _log->str(); 414 550 delete _log; _log = new ostringstream(); … … 426 562 station->setAntName(_opt->_antNameRover); 427 563 station->setEpochTime(time); 564 428 565 if (_opt->xyzAprRoverSet()) { 429 566 station->setXyzApr(_opt->_xyzAprRover); … … 472 609 try { 473 610 initOutput(output); 474 bool epochReProcessing = false; 475 _numEpoProcessing = 0; 476 if (!_historicalRefSats.isEmpty()) { 477 _historicalRefSats.clear(); 478 } 479 480 do { 481 if ((_numEpoProcessing++) > 30) { 482 LOG << "t_pppClient::processEpoch: _numEpoProcessing > 30" << endl; 483 return finish(failure,12); 484 } 485 486 if (_obsPool->refSatChanged()) { 487 if(_filter->datumTransformation(_refSatMap) != success) { 488 LOG << "t_pppFilter::datumTransformation() != success" << endl; 489 return finish(failure,1); 490 } 491 else { 492 LOG << "t_pppFilter::datumTransformation() == success" << endl; 493 _filter->rememberState(1); 494 } 495 } 496 497 // Prepare Observations of the Rover 498 // --------------------------------- 499 if (prepareObs(satObs, _obsRover, _epoTimeRover) != success) { 500 return finish(failure,2); 501 } 502 503 for (int iter = 1; iter <= 2; iter++) { 504 ColumnVector xyzc(4); xyzc = 0.0; 505 bool print = (iter == 2); 506 if (cmpBancroft(_epoTimeRover, _obsRover, xyzc, print) != success) { 507 return finish(failure,3); 508 } 509 510 if (cmpModel(_staRover, xyzc, _obsRover) != success) { 511 return finish(failure,4); 512 } 513 } 514 // use observations only if satellite code biases are available 515 // ------------------------------------------------------------ 516 if (!_opt->_corrMount.empty() && 517 (OPT->_obsModelType == OPT->DCMcodeBias || 518 OPT->_obsModelType == OPT->DCMphaseBias)) { 611 612 // Prepare Observations of the Rover 613 // --------------------------------- 614 if (prepareObs(satObs, _obsRover, _epoTimeRover) != success) { 615 return finish(failure, 1); 616 } 617 618 for (int iter = 1; iter <= 2; iter++) { 619 ColumnVector xyzc(4); xyzc = 0.0; 620 bool print = (iter == 2); 621 if (cmpBancroft(_epoTimeRover, _obsRover, xyzc, print) != success) { 622 return finish(failure, 2); 623 } 624 if (cmpModel(_staRover, xyzc, _obsRover) != success) { 625 return finish(failure, 3); 626 } 627 } 628 // use observations only if satellite code biases are available 629 /* ------------------------------------------------------------ 630 if (!_opt->_corrMount.empty() { 519 631 useObsWithCodeBiasesOnly(_obsRover); 520 } 521 522 if (int(_obsRover.size()) < _opt->_minObs) { 523 LOG << "t_pppClient::processEpoch not enough observations" << endl; 524 return finish(failure,5); 525 } 526 527 if (_opt->_refSatRequired) { 528 if (handleRefSatellites(_obsRover) != success) { 529 return finish(failure,6); 530 } 531 if (_obsPool->refSatChanged()) { 532 epochReProcessing = true; 533 continue; 534 } 535 } 536 537 // Prepare Pseudo Observations of the Rover 538 // ---------------------------------------- 539 _pseudoObsIono = preparePseudoObs(_obsRover); 540 541 // Store last epoch of data 542 // ------------------------ 543 _obsPool->putEpoch(_epoTimeRover, _obsRover, _pseudoObsIono, _refSatMap); 544 #ifdef BNC_DEBUG_PPP 545 LOG << "PUT EPOCH t_pppClient::processEpoch " << _epoTimeRover.timestr().c_str() << endl; 546 #endif 547 548 // Process Epoch in Filter 549 // ----------------------- 550 if (_filter->processEpoch(_numEpoProcessing) != success) { 551 LOG << "filter->processEpoch() != success" << endl; 552 return finish(failure,7); 553 } 554 555 // Epoch re-processing required? 556 // ----------------------------- 557 if (_obsPool->refSatChangeRequired() && //SLIP 558 _opt->_obsModelType != t_pppOptions::UncombPPP) { 559 LOG << "pppClient: _obsPool->refSatChangeRequired() " << endl; 560 epochReProcessing = true; 561 #ifdef BNC_DEBUG_PPP 562 LOG << "DELETE EPOCH" << endl; 563 #endif 564 _obsPool->deleteLastEpoch(); 565 _filter->restoreState(0); 566 setHistoricalRefSats(); 567 } 568 else { 569 epochReProcessing = false; 570 if (OPT->_obsModelType == OPT->DCMcodeBias || 571 OPT->_obsModelType == OPT->DCMphaseBias) { 572 _filter->rememberState(0); 573 } 574 } 575 } while (epochReProcessing); 576 632 }*/ 633 634 if (int(_obsRover.size()) < _opt->_minObs) { 635 LOG << "t_pppClient::processEpoch not enough observations" << endl; 636 return finish(failure, 4); 637 } 638 639 _offGlo = cmpOffGlo(_obsRover); 640 _offGal = cmpOffGal(_obsRover); 641 _offBds = cmpOffBds(_obsRover); 642 643 // Prepare Pseudo Observations of the Rover 644 // ---------------------------------------- 645 _pseudoObsIono = preparePseudoObs(_obsRover); 646 647 // Store last epoch of data 648 // ------------------------ 649 _obsPool->putEpoch(_epoTimeRover, _obsRover, _pseudoObsIono); 650 651 // Process Epoch in Filter 652 // ----------------------- 653 if (_filter->processEpoch(_obsPool) != success) { 654 LOG << "filter->processEpoch() != success" << endl; 655 return finish(failure, 5); 656 } 577 657 } 578 658 catch (Exception& exc) { 579 659 LOG << exc.what() << endl; 580 return finish(failure, 8);660 return finish(failure, 6); 581 661 } 582 662 catch (t_except msg) { 583 663 LOG << msg.what() << endl; 584 return finish(failure, 9);664 return finish(failure, 7); 585 665 } 586 666 catch (const char* msg) { 587 667 LOG << msg << endl; 588 return finish(failure, 10);668 return finish(failure, 8); 589 669 } 590 670 catch (...) { 591 671 LOG << "unknown exception" << endl; 592 return finish(failure, 11);593 } 594 return finish(success, 0);672 return finish(failure, 9); 673 } 674 return finish(success, 0); 595 675 } 596 676 … … 684 764 // 685 765 ////////////////////////////////////////////////////////////////////////////// 686 void t_pppClient::setRefSatellites(std::vector<t_pppSatObs*>& obsVector) { 687 // reference satellite definition per system 688 for (unsigned iSys = 0; iSys < _opt->systems().size(); iSys++) { 689 t_irc refSatReDefinition = success; 690 char sys = _opt->systems()[iSys]; 691 bool refSatDefined = false; 692 t_pppRefSat* refSat = _refSatMap[sys]; 693 for (unsigned ii = 0; ii < obsVector.size(); ii++) { 694 t_pppSatObs* satObs = obsVector.at(ii); 695 if (satObs->eleSat() < _opt->_minEle) { 696 continue; 697 } 698 // reference satellite is unchanged 699 // ================================ 700 if ( !_obsPool->refSatChangeRequired(sys) && refSat->prn() == satObs->prn()) { 701 refSatDefined = true; 702 obsVector[ii]->setAsReference(); 703 } 704 // reference satellite has changed 705 // =============================== 706 else if ( _obsPool->refSatChangeRequired(sys) && refSat->prn() != satObs->prn()) { 707 if (satObs->prn().system() == sys) { 708 if (!_historicalRefSats[sys].contains(satObs->prn())) { 709 refSatDefined = true; 710 obsVector[ii]->setAsReference(); 711 refSat->setPrn(satObs->prn()); 712 } 713 else if ( _historicalRefSats[sys].contains(satObs->prn())) { 714 refSatReDefinition = failure; 715 } 716 } 717 } 718 if (refSatDefined) { 719 if (OPT->_pseudoObsIono) { 720 refSat->setStecValue(satObs->getIonoCodeDelay(t_frequency::G1)); 721 } 722 break; 723 } 724 } 725 726 // all available satellites were already tried to use 727 if ((!refSatDefined) && (refSatReDefinition == failure)) { 728 refSat->setPrn(t_prn(sys, 99)); 729 _obsPool->setRefSatChangeRequired(sys, false); 730 return; 731 } 732 733 // reference satellite has to be initialized 734 // ========================================= 735 if (!refSatDefined) { 736 for (unsigned ii = 0; ii < obsVector.size(); ii++) { 737 t_pppSatObs* satObs = obsVector.at(ii); 738 if (satObs->eleSat() < _opt->_minEle) { 739 continue; 740 } 741 if (satObs->prn().system() == sys && 742 !_historicalRefSats[sys].contains(satObs->prn())) { 743 obsVector[ii]->setAsReference(); 744 refSat->setPrn(satObs->prn()); 745 if (OPT->_pseudoObsIono) { 746 refSat->setStecValue(satObs->getIonoCodeDelay(t_frequency::G1)); 747 } 748 refSatDefined = true; 749 break; 750 } 751 } 752 } 753 754 // no observations for that system 755 // =============================== 756 if (!refSatDefined) { 757 refSat->setPrn(t_prn()); 758 } 759 _obsPool->setRefSatChangeRequired(sys, false); // done or impossible 760 } 761 762 return; 763 } 764 765 // 766 ////////////////////////////////////////////////////////////////////////////// 767 t_irc t_pppClient::handleRefSatellites(std::vector<t_pppSatObs*>& obsVector) { 768 769 // set refSats in current epoch 770 // ============================ 771 setRefSatellites(obsVector); // current epoch 772 LOG.setf(ios::fixed); 773 t_pppObsPool::t_epoch* epoch = _obsPool->lastEpoch(); 774 const QMap<char, t_pppRefSat*>& refSatMapLastEpoch = epoch->refSatMap(); 775 776 QMapIterator<char, t_pppRefSat*> it(_refSatMap); 777 while (it.hasNext()) { 778 it.next(); 779 char sys = it.key(); 780 t_prn prn = it.value()->prn(); 781 t_prn refSatLastEpochPrn = t_prn(); 782 if (epoch) { 783 refSatLastEpochPrn = refSatMapLastEpoch[sys]->prn(); 784 } 785 if (prn.number() == 0) { // no obs for that system available 786 continue; 787 } 788 else if (prn.number() == 99) { // refSat re-definition not possible 789 LOG << " => refSat re-definition impossible: " << sys << endl; 790 return failure; 791 } 792 QString str; 793 if (prn == refSatLastEpochPrn || refSatLastEpochPrn == t_prn() ) { 794 _obsPool->setRefSatChanged(sys, false); 795 str = " SET "; 796 } 797 else { 798 _obsPool->setRefSatChanged(sys, true); 799 str = " RESET "; 800 } 801 LOG << string(_epoTimeRover) << str.toStdString() << " REFSAT " << sys << ": " << prn.toString() << endl; 802 } 803 return success; 804 } 805 806 void t_pppClient::setHistoricalRefSats() { 807 QMapIterator<char, t_pppRefSat*> it(_refSatMap); 808 while (it.hasNext()) { 809 it.next(); 810 t_prn prn = it.value()->prn(); 811 char sys = prn.system(); 812 if (_obsPool->refSatChangeRequired(sys)) { 813 _historicalRefSats[sys].append(prn); 814 } 815 } 816 } 817 818 // 819 ////////////////////////////////////////////////////////////////////////////// 820 void t_pppClient::reset() {LOG << "t_pppClient::reset()" << endl; 766 void t_pppClient::reset() {cout << "t_pppClient::reset()" << endl; 821 767 822 768 // to delete old orbit and clock corrections … … 830 776 // to delete all parameters 831 777 delete _filter; 832 _filter = new t_pppFilter( _obsPool);833 834 } 778 _filter = new t_pppFilter(); 779 780 } -
trunk/BNC/src/PPP/pppClient.h
r10031 r10034 4 4 #include <sstream> 5 5 #include <vector> 6 #include <QMap>7 6 #include "pppInclude.h" 8 7 #include "ephemeris.h" 9 8 #include "pppOptions.h" 10 9 #include "pppModel.h" 11 #include "pppRefSat.h"12 10 13 11 class bncAntex; … … 38 36 const bncAntex* antex() const {return _antex;} 39 37 const t_pppStation* staRover() const {return _staRover;} 38 double offGlo() const {return _offGlo;} 39 double offGal() const {return _offGal;} 40 double offBds() const {return _offBds;} 40 41 41 42 std::ostringstream& log() {return *_log;} … … 63 64 double cmpOffGal(std::vector<t_pppSatObs*>& obsVector); 64 65 double cmpOffBds(std::vector<t_pppSatObs*>& obsVector); 65 t_irc handleRefSatellites(std::vector<t_pppSatObs*>& obsVector); 66 void setRefSatellites(std::vector<t_pppSatObs*>& obsVector); 67 void setHistoricalRefSats(); 68 66 69 67 t_output* _output; 70 68 t_pppEphPool* _ephPool; … … 74 72 bncAntex* _antex; 75 73 t_pppFilter* _filter; 74 double _offGlo; 75 double _offGal; 76 double _offBds; 76 77 std::vector<t_pppSatObs*> _obsRover; 77 QMap<char, t_pppRefSat*> _refSatMap;78 78 std::ostringstream* _log; 79 79 t_pppOptions* _opt; 80 80 t_tides* _tides; 81 81 bool _pseudoObsIono; 82 int _numEpoProcessing;83 QMap<char, QList<t_prn>> _historicalRefSats;84 82 }; 85 83 -
trunk/BNC/src/PPP/pppFilter.cpp
r10033 r10034 27 27 #include "pppObsPool.h" 28 28 #include "pppStation.h" 29 #include "pppClient.h" 29 30 30 31 using namespace BNC_PPP; … … 33 34 // Constructor 34 35 //////////////////////////////////////////////////////////////////////////// 35 t_pppFilter::t_pppFilter(t_pppObsPool *obsPool) { 36 _numSat = 0; 37 _obsPool = obsPool; 38 _refPrn = t_prn(); 39 _datumTrafo = new t_datumTrafo(); 36 t_pppFilter::t_pppFilter() { 37 _parlist = 0; 40 38 } 41 39 … … 43 41 //////////////////////////////////////////////////////////////////////////// 44 42 t_pppFilter::~t_pppFilter() { 45 delete _ datumTrafo;43 delete _parlist; 46 44 } 47 45 48 46 // Process Single Epoch 49 47 //////////////////////////////////////////////////////////////////////////// 50 t_irc t_pppFilter::processEpoch(int num) { 48 t_irc t_pppFilter::processEpoch(t_pppObsPool* obsPool) { 49 51 50 _numSat = 0; 52 51 const double maxSolGap = 60.0; 53 52 bool setNeuNoiseToZero = false; 54 53 55 if ( num > 1) {56 setNeuNoiseToZero = true;54 if (!_parlist) { 55 _parlist = new t_pppParlist(); 57 56 } 58 57 59 58 // Vector of all Observations 60 59 // -------------------------- 61 t_pppObsPool::t_epoch *epoch = _obsPool->lastEpoch();60 t_pppObsPool::t_epoch *epoch = obsPool->lastEpoch(); 62 61 if (!epoch) { 63 62 return failure; … … 77 76 string epoTimeStr = string(_epoTime); 78 77 79 const QMap<char, t_pppRefSat*> &refSatMap = epoch->refSatMap(); 80 81 const QList<char> &usedSystems = _parlist.usedSystems(); 82 //-- 78 const QList<char> &usedSystems = _parlist->usedSystems(); 79 83 80 // Set Parameters 84 if (_parlist.set(_epoTime, allObs, refSatMap) != success) { 81 // -------------- 82 if (_parlist->set(_epoTime, allObs) != success) { 85 83 return failure; 86 84 } 87 88 #ifdef BNC_DEBUG_PPP89 if (OPT->_obsModelType == OPT->DCMcodeBias ||90 OPT->_obsModelType == OPT->DCMphaseBias) {91 // _parlist.printParams(_epoTime);92 }93 #endif94 85 95 86 // Status Vector, Variance-Covariance Matrix … … 99 90 setStateVectorAndVarCovMatrix(xFltOld, QFltOld, setNeuNoiseToZero); 100 91 101 // Pre-Process Satellite Systems separately102 // ----------------------------------------103 bool preProcessing = false;104 if (OPT->_obsModelType == OPT->DCMcodeBias ||105 OPT->_obsModelType == OPT->DCMphaseBias) {106 preProcessing = true;107 for (int iSys = 0; iSys < usedSystems.size(); iSys++) {108 char sys = usedSystems[iSys];109 _refPrn.set(sys, 0);110 if (OPT->_refSatRequired) {111 _refPrn = refSatMap[sys]->prn();112 }113 vector<t_pppSatObs*> obsVector;114 for (unsigned jj = 0; jj < allObs.size(); jj++) {115 if (allObs[jj]->prn().system() == sys) {116 obsVector.push_back(allObs[jj]);117 }118 }119 if (iSys == 0) {120 _datumTrafo->setFirstSystem(sys);121 }122 if (processSystem(OPT->LCs(sys), obsVector, _refPrn,123 epoch->pseudoObsIono(), preProcessing) != success) {124 LOG << sys << ": processSystem != success (pre-processing)" << endl;125 _xFlt = xFltOld;126 _QFlt = QFltOld;127 restoreState(1);128 return failure;129 }130 }131 // refSat change required?132 // -----------------------133 if (_obsPool->refSatChangeRequired()) {134 _xFlt = xFltOld;135 _QFlt = QFltOld;136 return success;137 } else if (!_obsPool->refSatChangeRequired()) {138 initDatumTransformation(allObs, epoch->pseudoObsIono());139 }140 }141 142 92 // Process Satellite Systems separately 143 93 // ------------------------------------ 144 preProcessing = false;145 94 for (int iSys = 0; iSys < usedSystems.size(); iSys++) { 146 95 char sys = usedSystems[iSys]; 147 _refPrn.set(sys, 0);148 if (OPT->_refSatRequired) {149 _refPrn = refSatMap[sys]->prn();150 }151 96 unsigned int num = 0; 152 97 vector<t_pppSatObs*> obsVector; … … 154 99 if (allObs[jj]->prn().system() == sys) { 155 100 obsVector.push_back(allObs[jj]); 156 ++num; 157 } 158 } 159 if (iSys == 0 && OPT->_obsModelType == OPT->UncombPPP) { 160 _datumTrafo->setFirstSystem(sys); 161 } 162 LOG << epoTimeStr << " SATNUM " << sys << ' ' << right << setw(2) << num 163 << endl; 164 if (processSystem(OPT->LCs(sys), obsVector, _refPrn, 165 epoch->pseudoObsIono(), preProcessing) != success) { 166 LOG << "processSystem != success (fin-processing)" << endl; 167 if (OPT->_obsModelType == OPT->DCMcodeBias || 168 OPT->_obsModelType == OPT->DCMphaseBias) { 169 _xFlt = xFltOld; 170 _QFlt = QFltOld; 171 restoreState(2); 172 } 101 num++; 102 } 103 } 104 LOG << epoTimeStr << " SATNUM " << sys << ' ' << right << setw(2) << num << endl; 105 if (processSystem(OPT->LCs(sys), obsVector, epoch->pseudoObsIono()) != success) { 106 LOG << "processSystem != success: " << sys << endl; 173 107 return failure; 174 108 } … … 177 111 // close epoch processing 178 112 // ---------------------- 179 cmpDOP(allObs , refSatMap);180 _parlist .printResult(_epoTime, _QFlt, _xFlt);113 cmpDOP(allObs); 114 _parlist->printResult(_epoTime, _QFlt, _xFlt); 181 115 _lastEpoTimeOK = _epoTime; // remember time of last successful epoch processing 182 116 return success; … … 186 120 //////////////////////////////////////////////////////////////////////////// 187 121 t_irc t_pppFilter::processSystem(const vector<t_lc::type> &LCs, 188 const vector<t_pppSatObs*> &obsVector, const t_prn &refPrn,189 bool pseudoObsIonoAvailable, bool preProcessing) {122 const vector<t_pppSatObs*> &obsVector, 123 bool pseudoObsIonoAvailable) { 190 124 LOG.setf(ios::fixed); 191 char sys = refPrn.system();192 125 193 126 // Detect Cycle Slips 194 127 // ------------------ 195 if (detectCycleSlips(LCs, obsVector , refPrn, preProcessing) != success) {128 if (detectCycleSlips(LCs, obsVector) != success) { 196 129 return failure; 197 130 } 198 if (preProcessing && _obsPool->refSatChangeRequired(sys)) { 199 return success; 200 } 201 202 ColumnVector xSav = _xFlt; 131 132 ColumnVector xSav = _xFlt; 203 133 SymmetricMatrix QSav = _QFlt; 204 string epoTimeStr = string(_epoTime);205 const vector<t_pppParam*> ¶ms = _parlist .params();206 unsigned nPar = _parlist.nPar();134 string epoTimeStr = string(_epoTime); 135 const vector<t_pppParam*> ¶ms = _parlist->params(); 136 unsigned nPar = _parlist->nPar(); 207 137 208 138 unsigned usedLCs = LCs.size(); … … 213 143 unsigned maxObs = obsVector.size() * usedLCs; 214 144 215 if (OPT->_pseudoObsIono && pseudoObsIonoAvailable) {216 maxObs -= 1; // pseudo obs iono with respect to refSat217 }218 219 145 // Outlier Detection Loop 220 146 // ---------------------- … … 229 155 // ----------------------------------------------------------- 230 156 Matrix AA(maxObs, nPar); 231 ColumnVector ll(maxObs); 232 DiagonalMatrix PP(maxObs); 233 PP = 0.0; 157 ColumnVector ll(maxObs); ll = 0.0; 158 DiagonalMatrix PP(maxObs); PP = 0.0; 234 159 235 160 int iObs = -1; … … 242 167 for (unsigned ii = 0; ii < obsVector.size(); ii++) { 243 168 t_pppSatObs *obs = obsVector[ii]; 244 if (iOutlier == 0 && !preProcessing) {169 if (iOutlier == 0) { 245 170 obs->resetOutlier(); 246 171 } … … 257 182 for (unsigned iPar = 0; iPar < nPar; iPar++) { 258 183 const t_pppParam *par = params[iPar]; 259 AA[iObs][iPar] = par->partial(_epoTime, obs, tLC , refPrn);184 AA[iObs][iPar] = par->partial(_epoTime, obs, tLC); 260 185 } 261 ll[iObs] = obs->obsValue(tLC) - obs->cmpValue(tLC) 262 - DotProduct(_x0, AA.Row(iObs + 1)); 186 ll[iObs] = obs->obsValue(tLC) - obs->cmpValue(tLC) - DotProduct(_x0, AA.Row(iObs + 1)); 263 187 PP[iObs] = 1.0 / (obs->sigma(tLC) * obs->sigma(tLC)); 264 188 } … … 269 193 // ---------------------------- 270 194 if ((iObs +1) < OPT->_minObs) { 271 LOG << "t_pppFilter::processSystem not enough observations " << sys << ": " <<iObs + 1 << "\n";195 LOG << "t_pppFilter::processSystem not enough observations " << iObs + 1 << "\n"; 272 196 return failure; 273 }274 275 if ((!iOutlier) &&276 (OPT->_obsModelType == OPT->DCMcodeBias ||277 OPT->_obsModelType == OPT->DCMphaseBias) && (!preProcessing)) {278 _datumTrafo->updateIndices(sys, iObs + 1);279 _datumTrafo->prepareAA(AA.SubMatrix(1, iObs + 1, 1, _parlist.nPar()), 1);280 197 } 281 198 … … 288 205 for (unsigned jj = 0; jj < usedLCs; jj++) { 289 206 const t_lc::type tLC = LCs[jj]; 290 if (tLC == t_lc::GIM && !obs->isReference()) {207 if (tLC == t_lc::GIM) { 291 208 ++iObs; 292 209 } else { … … 297 214 for (unsigned iPar = 0; iPar < nPar; iPar++) { 298 215 const t_pppParam *par = params[iPar]; 299 AA[iObs][iPar] = par->partial(_epoTime, obs, tLC , refPrn);216 AA[iObs][iPar] = par->partial(_epoTime, obs, tLC); 300 217 } 301 ll[iObs] = obs->obsValue(tLC) - obs->cmpValue(tLC) 302 - DotProduct(_x0, AA.Row(iObs + 1)); 218 ll[iObs] = obs->obsValue(tLC) - obs->cmpValue(tLC) - DotProduct(_x0, AA.Row(iObs + 1)); 303 219 PP[iObs] = 1.0 / (obs->sigma(tLC) * obs->sigma(tLC)); 304 220 } … … 340 256 t_pppSatObs *obs = usedObs[maxOutlierIndex]; 341 257 t_pppParam *par = 0; 258 LOG << epoTimeStr << " Outlier " << t_lc::toString(maxOutlierLC) << ' ' 259 << obs->prn().toString() << ' ' << setw(8) << setprecision(4) 260 << maxOutlier << endl; 342 261 for (unsigned iPar = 0; iPar < nPar; iPar++) { 343 262 t_pppParam *hlp = params[iPar]; 344 263 if (hlp->type() == t_pppParam::amb && 345 hlp->prn() == obs->prn() &&346 hlp->tLC() == usedTypes[maxOutlierIndex]) {264 hlp->prn() == obs->prn() && 265 hlp->tLC() == usedTypes[maxOutlierIndex]) { 347 266 par = hlp; 348 267 } 349 268 } 350 if (preProcessing) { 351 if (obs->prn() == refPrn) { 352 LOG << epoTimeStr << " Outlier (" 353 << ((preProcessing) ? "pre-processing) " : "fin-processing) ") 354 << t_lc::toString(maxOutlierLC) << ' ' << obs->prn().toString() 355 << ' ' << setw(8) << setprecision(4) << maxOutlier << endl; 356 _obsPool->setRefSatChangeRequired(sys, true); 357 break; 269 if (par) { 270 if (par->ambResetCandidate()) { 271 resetAmb(par->prn(), obsVector, maxOutlierLC, &QSav, &xSav); 358 272 } 359 273 else { 274 par->setAmbResetCandidate(); 360 275 obs->setOutlier(); 361 276 } 362 277 } 363 else { // fin-processing 364 LOG << epoTimeStr << " Outlier " << t_lc::toString(maxOutlierLC) << ' ' 365 << obs->prn().toString() << ' ' << setw(8) << setprecision(4) 366 << maxOutlier << endl; 367 if (par) { 368 if (par->ambResetCandidate() || 369 OPT->_obsModelType == OPT->DCMcodeBias || 370 OPT->_obsModelType == OPT->DCMphaseBias) { 371 resetAmb(par->prn(), obsVector, maxOutlierLC, &QSav, &xSav); 372 } 373 else { 374 par->setAmbResetCandidate(); 375 obs->setOutlier(); 376 } 377 } 378 else { 379 obs->setOutlier(); 380 } 278 else { 279 obs->setOutlier(); 381 280 } 382 281 } … … 384 283 // --------------- 385 284 else { 386 if (!preProcessing) {387 285 for (unsigned jj = 0; jj < LCs.size(); jj++) { 388 286 for (unsigned ii = 0; ii < usedObs.size(); ii++) { … … 393 291 LOG << epoTimeStr << " RES " << left << setw(3) 394 292 << t_lc::toString(tLC) << right << ' ' 395 << obs->prn().toString(); 396 LOG << setw(9) << setprecision(4) << vv[ii] << endl; 397 } 293 << obs->prn().toString() << ' ' 294 << setw(8) << setprecision(4) << vv[ii] << endl; 398 295 } 399 296 } … … 408 305 //////////////////////////////////////////////////////////////////////////// 409 306 t_irc t_pppFilter::detectCycleSlips(const vector<t_lc::type> &LCs, 410 const vector<t_pppSatObs*> &obsVector, const t_prn &refPrn, 411 bool preProcessing) { 412 const double SLIP = 50.0; 413 char sys = refPrn.system(); 307 const vector<t_pppSatObs*> &obsVector) { 308 309 const double SLIP = 20.0; 414 310 string epoTimeStr = string(_epoTime); 415 const vector<t_pppParam*> ¶ms = _parlist.params(); 416 unsigned nPar = _parlist.nPar(); 311 const vector<t_pppParam*> ¶ms = _parlist->params(); 417 312 418 313 for (unsigned ii = 0; ii < LCs.size(); ii++) { … … 426 321 bool slip = false; 427 322 428 // in pre-processing only the reference satellite has to be checked429 if (preProcessing && obs->prn() != refPrn) {430 continue;431 }432 433 323 if (obs->slip()) { 434 LOG << epoTimeStr << "cycle slip set (obs) " << obs->prn().toString() 435 << endl; 324 LOG << epoTimeStr << "cycle slip set (obs) " << obs->prn().toString() << endl; 436 325 slip = true; 437 326 } 438 327 439 if (_slips[obs->prn()]._obsSlipCounter != -1 440 && _slips[obs->prn()]._obsSlipCounter != obs->slipCounter()) { 441 LOG << epoTimeStr << "cycle slip set (obsSlipCounter) " 442 << obs->prn().toString() << endl; 328 if (_slips[obs->prn()]._obsSlipCounter != -1 && 329 _slips[obs->prn()]._obsSlipCounter != obs->slipCounter()) { 330 LOG << epoTimeStr << "cycle slip set (obsSlipCounter) " << obs->prn().toString() << endl; 443 331 slip = true; 444 332 } 445 if (!preProcessing) { 446 _slips[obs->prn()]._obsSlipCounter = obs->slipCounter(); 447 } 448 if (_slips[obs->prn()]._biasJumpCounter != -1 449 && _slips[obs->prn()]._biasJumpCounter != obs->biasJumpCounter()) { 450 LOG << epoTimeStr << "cycle slip set (biasJumpCounter) " 451 << obs->prn().toString() << endl; 333 _slips[obs->prn()]._obsSlipCounter = obs->slipCounter(); 334 335 if (_slips[obs->prn()]._biasJumpCounter != -1 && 336 _slips[obs->prn()]._biasJumpCounter != obs->biasJumpCounter()) { 337 LOG << epoTimeStr << "cycle slip set (biasJumpCounter) " << obs->prn().toString() << endl; 452 338 slip = true; 453 339 } 454 if (!preProcessing) { 455 _slips[obs->prn()]._biasJumpCounter = obs->biasJumpCounter(); 456 } 340 _slips[obs->prn()]._biasJumpCounter = obs->biasJumpCounter(); 341 457 342 // Slip Set 458 343 // -------- 459 344 if (slip) { 460 if (preProcessing) { 461 _obsPool->setRefSatChangeRequired(sys, true); 462 } else { 345 resetAmb(obs->prn(), obsVector, tLC); 346 } 347 348 // Check Pre-Fit Residuals 349 // ----------------------- 350 else { 351 ColumnVector AA(params.size()); 352 for (unsigned iPar = 0; iPar < params.size(); iPar++) { 353 const t_pppParam* par = params[iPar]; 354 AA[iPar] = par->partial(_epoTime, obs, tLC); 355 } 356 357 double ll = obs->obsValue(tLC) - obs->cmpValue(tLC) - DotProduct(_x0, AA); 358 double vv = DotProduct(AA, _xFlt) - ll; 359 360 if (fabs(vv) > SLIP) { 361 LOG << epoTimeStr << " cycle slip detected " << t_lc::toString(tLC) << ' ' 362 << obs->prn().toString() << ' ' << setw(8) << setprecision(4) << vv << endl; 463 363 resetAmb(obs->prn(), obsVector, tLC); 464 364 } 465 365 } 466 // Check Pre-Fit Residuals 467 /* ----------------------- 468 else { 469 if (!preProcessing) { 470 ColumnVector AA(nPar); 471 for (unsigned iPar = 0; iPar < nPar; iPar++) { 472 const t_pppParam *par = params[iPar]; 473 AA[iPar] = par->partial(_epoTime, obs, tLC, refPrn); 474 } 475 double ll = obs->obsValue(tLC) - obs->cmpValue(tLC) 476 - DotProduct(_x0, AA); 477 double vv = DotProduct(AA, _xFlt) - ll; 478 if (fabs(vv) > SLIP) { 479 LOG << epoTimeStr << " cycle slip detected " << t_lc::toString(tLC) 480 << ' ' << obs->prn().toString() << ' ' << setw(8) 481 << setprecision(4) << vv << endl; 482 resetAmb(obs->prn(), obsVector, tLC); 483 } 484 } 485 }*/ 486 } 487 } 488 } 366 } 367 } 368 } 369 489 370 return success; 490 371 } … … 496 377 497 378 t_irc irc = failure; 498 vector<t_pppParam*> ¶ms = _parlist.params();379 vector<t_pppParam*>& params = _parlist->params(); 499 380 for (unsigned iPar = 0; iPar < params.size(); iPar++) { 500 381 t_pppParam *par = params[iPar]; … … 506 387 } 507 388 LOG << string(_epoTime) << " RESET " << par->toString() << endl; 508 delete par; 509 par = new t_pppParam(t_pppParam::amb, prn, tLC, &obsVector); 389 delete par; par = new t_pppParam(t_pppParam::amb, prn, tLC, &obsVector); 510 390 par->setIndex(ind); 511 391 params[iPar] = par; … … 532 412 } 533 413 534 // Add infinite noise to iono535 ////////////////////////////////////////////////////////////////////////////536 t_irc t_pppFilter::addNoiseToPar(t_pppParam::e_type parType, char sys) {537 t_irc irc = failure;538 vector<t_pppParam*> ¶ms = _parlist.params();539 for (unsigned iPar = 0; iPar < params.size(); iPar++) {540 t_pppParam *par = params[iPar];541 if (par->type() == parType && par->prn().system() == sys) {542 int ind = par->indexNew();543 LOG << string(_epoTime) << " ADD NOISE TO " << par->toString() << endl;544 par->setIndex(ind);545 _QFlt(ind + 1, ind + 1) = par->sigma0() * par->sigma0();546 irc = success;547 }548 }549 550 return irc;551 }552 553 414 // Compute various DOP Values 554 415 //////////////////////////////////////////////////////////////////////////// 555 void t_pppFilter::cmpDOP(const vector<t_pppSatObs*> &obsVector, 556 const QMap<char, t_pppRefSat*> &refSatMap) { 416 void t_pppFilter::cmpDOP(const vector<t_pppSatObs*> &obsVector) { 557 417 558 418 _dop.reset(); … … 564 424 for (unsigned ii = 0; ii < obsVector.size(); ii++) { 565 425 t_pppSatObs *obs = obsVector[ii]; 566 char sys = obs->prn().system();567 t_prn refPrn = t_prn();568 if (OPT->_refSatRequired) {569 refPrn = refSatMap[sys]->prn();570 }571 426 if (obs->isValid() && !obs->outlier()) { 572 427 ++_numSat; 573 428 for (unsigned iPar = 0; iPar < numPar; iPar++) { 574 const t_pppParam *par = _parlist.params()[iPar];575 AA[_numSat - 1][iPar] = par->partial(_epoTime, obs, t_lc::c1 , refPrn);429 const t_pppParam* par = _parlist->params()[iPar]; 430 AA[_numSat - 1][iPar] = par->partial(_epoTime, obs, t_lc::c1); 576 431 } 577 432 } … … 581 436 } 582 437 AA = AA.Rows(1, _numSat); 583 SymmetricMatrix NN; 584 NN << AA.t() * AA; 438 SymmetricMatrix NN; NN << AA.t() * AA; 585 439 SymmetricMatrix QQ = NN.i(); 586 440 … … 590 444 _dop.T = sqrt(QQ(4, 4)); 591 445 _dop.G = sqrt(QQ(1, 1) + QQ(2, 2) + QQ(3, 3) + QQ(4, 4)); 592 } catch (...) { 446 } 447 catch (...) { 593 448 } 594 449 } … … 598 453 void t_pppFilter::predictCovCrdPart(const SymmetricMatrix &QFltOld, bool setNeuNoiseToZero) { 599 454 600 const vector<t_pppParam*> ¶ms = _parlist.params(); 455 const vector<t_pppParam*>& params = _parlist->params(); 456 601 457 if (params.size() < 3) { 602 458 return; … … 605 461 bool first = (params[0]->indexOld() < 0); 606 462 607 SymmetricMatrix Qneu(3); 608 Qneu = 0.0; 463 SymmetricMatrix Qneu(3); Qneu = 0.0; 609 464 for (unsigned ii = 0; ii < 3; ii++) { 610 465 const t_pppParam *par = params[ii]; 611 466 if (first) { 612 467 Qneu[ii][ii] = par->sigma0() * par->sigma0(); 613 } else { 468 } 469 else { 614 470 Qneu[ii][ii] = par->noise() * par->noise(); 615 471 } … … 622 478 if (first) { 623 479 _QFlt.SymSubMatrix(1, 3) = Qxyz; 624 } else { 480 } 481 else { 625 482 double dt = _epoTime - _firstEpoTime; 626 483 if (dt < OPT->_seedingTime || setNeuNoiseToZero) { 627 484 _QFlt.SymSubMatrix(1, 3) = QFltOld.SymSubMatrix(1, 3); 628 } else { 485 } 486 else { 629 487 _QFlt.SymSubMatrix(1, 3) = QFltOld.SymSubMatrix(1, 3) + Qxyz; 630 488 } … … 637 495 const SymmetricMatrix &QFltOld, bool setNeuNoiseToZero) { 638 496 639 const vector<t_pppParam*> ¶ms = _parlist.params();497 const vector<t_pppParam*>& params = _parlist->params(); 640 498 unsigned nPar = params.size(); 641 499 642 _QFlt.ReSize(nPar); 643 _QFlt = 0.0; 644 _xFlt.ReSize(nPar); 645 _xFlt = 0.0; 646 _x0.ReSize(nPar); 647 _x0 = 0.0; 500 _QFlt.ReSize(nPar); _QFlt = 0.0; 501 _xFlt.ReSize(nPar); _xFlt = 0.0; 502 _x0.ReSize(nPar); _x0 = 0.0; 648 503 649 504 for (unsigned ii = 0; ii < nPar; ii++) { … … 671 526 } 672 527 673 // Compute datum transformation674 ////////////////////////////////////////////////////////////////////////////675 t_irc t_pppFilter::datumTransformation(676 const QMap<char, t_pppRefSat*> &refSatMap) {677 678 // get last epoch679 t_pppObsPool::t_epoch *epoch = _obsPool->lastEpoch();680 #ifdef BNC_DEBUG_PPP681 LOG << "GET LAST EPOCH" << endl;682 #endif683 if (!epoch) {684 LOG << "t_pppFilter::datumTransformation: !lastEpoch" << endl;685 return failure;686 }687 _epoTime = epoch->epoTime();688 689 LOG.setf(ios::fixed);690 LOG << "DATUM TRANSFORMATION in Epoch "<< string(_epoTime) << endl;691 692 vector<t_pppSatObs*> &allObs = epoch->obsVector();693 694 const QMap<char, t_pppRefSat*> &refSatMapLastEpoch = epoch->refSatMap();695 696 bool pseudoObsIono = epoch->pseudoObsIono();697 698 // reset old and set new refSats in last epoch (ambiguities/GIM)699 // =============================================================700 if (resetRefSatellitesLastEpoch(allObs, refSatMap, refSatMapLastEpoch) != true) {701 LOG << "datumTransformation: resetRefSatellitesLastEpoch != success" << endl;702 return failure;703 }704 705 if (OPT->_obsModelType == OPT->UncombPPP) {706 _obsPool->putEpoch(_epoTime, allObs, pseudoObsIono, refSatMap);707 return success;708 }709 710 // set AA2711 // =======712 if (_parlist.set(_epoTime, allObs, refSatMap) != success) {713 return failure;714 }715 #ifdef BNC_DEBUG_PPP716 //_parlist.printParams(_epoTime);717 #endif718 719 const QList<char> &usedSystems = _parlist.usedSystems();720 for (int iSys = 0; iSys < usedSystems.size(); iSys++) {721 char sys = usedSystems[iSys];722 t_prn refPrn = refSatMap[sys]->prn();723 vector<t_pppSatObs*> obsVector;724 for (unsigned jj = 0; jj < allObs.size(); jj++) {725 if (allObs[jj]->prn().system() == sys) {726 allObs[jj]->resetOutlier();727 obsVector.push_back(allObs[jj]);728 }729 }730 if (iSys == 0) {731 _datumTrafo->setFirstSystem(sys);732 }733 vector<t_lc::type> LCs = OPT->LCs(sys);734 unsigned usedLCs = LCs.size();735 if (OPT->_pseudoObsIono && !pseudoObsIono) {736 usedLCs -= 1; // GIM not used737 }738 // max Obs739 unsigned maxObs = obsVector.size() * usedLCs;740 741 if (OPT->_pseudoObsIono && pseudoObsIono) {742 maxObs -= 1; // pseudo obs iono with respect to refSat743 }744 745 const vector<t_pppParam*> ¶ms = _parlist.params();746 unsigned nPar = _parlist.nPar();747 748 Matrix AA(maxObs, nPar); AA = 0.0;749 750 // Real Observations751 // -----------------752 int iObs = -1;753 for (unsigned ii = 0; ii < obsVector.size(); ii++) {754 t_pppSatObs *obs = obsVector[ii];755 for (unsigned jj = 0; jj < usedLCs; jj++) {756 const t_lc::type tLC = LCs[jj];757 if (tLC == t_lc::GIM) {758 continue;759 }760 ++iObs;761 for (unsigned iPar = 0; iPar < nPar; iPar++) {762 const t_pppParam *par = params[iPar];763 AA[iObs][iPar] = par->partial(_epoTime, obs, tLC, refPrn);764 }765 }766 }767 768 if (!(iObs+1)) {769 continue;770 }771 _datumTrafo->updateIndices(sys, iObs + 1);772 773 if (_datumTrafo->prepareAA(AA.SubMatrix(1, iObs + 1, 1, nPar), 2) != success) {774 return failure;775 }776 }777 _datumTrafo->updateNumObs();778 779 // Datum Transformation780 // ====================781 if (_datumTrafo->computeTrafoMatrix() != success) {782 return failure;783 }784 785 ColumnVector xFltOld = _xFlt;786 SymmetricMatrix QFltOld = _QFlt;787 788 _QFlt << _datumTrafo->D21() * QFltOld * _datumTrafo->D21().t();789 _xFlt = _datumTrafo->D21() * xFltOld;790 791 #ifdef BNC_DEBUG_PPP792 // LOG << "xFltOld:\n" << xFltOld << endl;793 // LOG << "xFlt :\n" << _xFlt << endl;794 #endif795 796 // Reset Ambiguities after Datum Transformation797 // ============================================798 for (int iSys = 0; iSys < usedSystems.size(); iSys++) {799 char sys = usedSystems[iSys];800 vector<t_lc::type> LCs = OPT->LCs(sys);801 unsigned usedLCs = LCs.size();802 if (OPT->_pseudoObsIono && !pseudoObsIono) {803 usedLCs -= 1; // GIM not used804 }805 t_prn refPrnOld = refSatMapLastEpoch[sys]->prn();806 t_prn refPrnNew = refSatMap[sys]->prn();807 if (refPrnNew != refPrnOld) {808 for (unsigned jj = 0; jj < usedLCs; jj++) {809 const t_lc::type tLC = LCs[jj];810 if (tLC == t_lc::GIM) {811 continue;812 }813 resetAmb(refPrnOld, allObs, tLC);814 }815 }816 }817 818 // switch AA2 to AA1819 // =================820 _datumTrafo->switchAA();821 822 _obsPool->putEpoch(_epoTime, allObs, pseudoObsIono, refSatMap);823 #ifdef BNC_DEBUG_PPP824 LOG << "PUT EPOCH t_pppFilter::datumTransformation " << _epoTime.timestr().c_str() << endl;825 #endif826 827 return success;828 }829 830 // Init datum transformation831 ////////////////////////////////////////////////////////////////////////////832 void t_pppFilter::initDatumTransformation(833 const std::vector<t_pppSatObs*> &allObs, bool pseudoObsIono) {834 unsigned trafoObs = 0;835 const QList<char> &usedSystems = _parlist.usedSystems();836 for (int iSys = 0; iSys < usedSystems.size(); iSys++) {837 char sys = usedSystems[iSys];838 int satNum = 0;839 for (unsigned jj = 0; jj < allObs.size(); jj++) {840 if (allObs[jj]->prn().system() == sys) {841 satNum++;842 }843 }844 // all LCs845 unsigned realUsedLCs = OPT->LCs(sys).size();846 // exclude pseudo obs GIM847 if (OPT->_pseudoObsIono && !pseudoObsIono) {848 realUsedLCs -= 1;849 }850 851 trafoObs += satNum * realUsedLCs;852 853 if (OPT->_pseudoObsIono && pseudoObsIono) {854 trafoObs -= 1; // pseudo obs iono with respect to refSat855 }856 }857 _datumTrafo->setNumObs(trafoObs);858 _datumTrafo->setNumPar(_parlist.nPar());859 _datumTrafo->initAA();860 }861 862 //863 //////////////////////////////////////////////////////////////////////////////864 bool t_pppFilter::resetRefSatellitesLastEpoch(865 std::vector<t_pppSatObs*> &obsVector,866 const QMap<char, t_pppRefSat*> &refSatMap,867 const QMap<char, t_pppRefSat*> &refSatMapLastEpoch) {868 bool resetRefSat;869 // reference satellite definition per system870 const QList<char> &usedSystems = _parlist.usedSystems();871 for (int iSys = 0; iSys < usedSystems.size(); iSys++) {872 resetRefSat = false;873 char sys = usedSystems[iSys];874 t_prn newPrn = refSatMap[sys]->prn();875 t_prn oldPrn = refSatMapLastEpoch[sys]->prn();876 #ifdef BNC_DEBUG_PPP877 if (oldPrn != newPrn) {878 LOG << "oldRef: " << oldPrn.toString() << " => newRef " << newPrn.toString() << endl;879 }880 #endif881 vector<t_pppSatObs*>::iterator it = obsVector.begin();882 while (it != obsVector.end()) {883 t_pppSatObs *satObs = *it;884 if (satObs->prn() == newPrn) {885 resetRefSat = true;886 satObs->setAsReference();887 } else if (satObs->prn() == oldPrn) {888 satObs->resetReference();889 }890 it++;891 }892 if (!resetRefSat) {893 _obsPool->setRefSatChangeRequired(sys, true);894 return resetRefSat;895 }896 }897 return resetRefSat;898 } -
trunk/BNC/src/PPP/pppFilter.h
r10028 r10034 8 8 #include "bnctime.h" 9 9 #include "t_prn.h" 10 #include "pppClient.h"11 10 12 11 namespace BNC_PPP { … … 18 17 class t_pppFilter { 19 18 public: 20 t_pppFilter( t_pppObsPool* obsPool);19 t_pppFilter(); 21 20 ~t_pppFilter(); 22 21 23 t_irc processEpoch( int num);22 t_irc processEpoch(t_pppObsPool* obsPool); 24 23 25 24 const ColumnVector& x() const {return _xFlt;} 26 25 const SymmetricMatrix& Q() const {return _QFlt;} 27 28 t_irc datumTransformation(const QMap<char, t_pppRefSat*>& refSatMap);29 void initDatumTransformation(const std::vector<t_pppSatObs*>& allObs, bool pseudoObsIono);30 unsigned setTrafoObs();31 void restoreState(int num) {32 #ifdef BNC_DEBUG_PPP33 LOG << "Restore parameter from last successful epoch: _parlist = _parlist_sav ("<< num << ")\n";34 #endif35 _QFlt = _QFlt_sav;36 _parlist = _parlist_sav;37 }38 void rememberState(int num) {39 #ifdef BNC_DEBUG_PPP40 LOG << "Remember parameters from successful epoch : _parlist_sav = _parlist ("<< num << ")\n";41 #endif42 _QFlt_sav = _QFlt;43 _parlist_sav = _parlist;44 }45 26 46 27 int numSat() const {return _numSat;} … … 50 31 double GDOP() const {return _dop.G;} 51 32 double trp() const { 52 const std::vector<t_pppParam*>& par = _parlist .params();33 const std::vector<t_pppParam*>& par = _parlist->params(); 53 34 for (unsigned ii = 0; ii < par.size(); ++ii) { 54 35 if (par[ii]->type() == t_pppParam::trp) { … … 59 40 }; 60 41 double trpStdev() const { 61 const std::vector<t_pppParam*>& par = _parlist .params();42 const std::vector<t_pppParam*>& par = _parlist->params(); 62 43 for (unsigned ii = 0; ii < par.size(); ++ii) { 63 44 if (par[ii]->type() == t_pppParam::trp) { … … 92 73 }; 93 74 94 class t_datumTrafo {95 public:96 t_datumTrafo () {initIndices();}97 ~t_datumTrafo (){}98 99 void initIndices() {_firstRow = 1; _lastRow = 0;}100 void updateIndices(char sys, int maxObsSys) {101 if (firstSystem(sys)) {102 initIndices();103 }104 else {105 _firstRow = _lastRow + 1;106 }107 _lastRow += maxObsSys;108 109 };110 111 void setFirstSystem(char firstSys) { _firstSys = firstSys;}112 bool firstSystem(char sys) {113 if (_firstSys == sys) {114 return true;115 }116 return false;117 }118 void setNumObs(int maxObs) {_maxObs = maxObs;}119 void setNumPar(int numPar) {_numPar = numPar;}120 int numPar() {return _numPar;}121 int numObs() {return _maxObs;}122 void updateNumObs() {123 _maxObs = _lastRow;124 _AA1 = _AA1.SubMatrix(1, _lastRow, 1, _numPar);125 _AA2 = _AA2.SubMatrix(1, _lastRow, 1, _numPar);126 }127 128 const Matrix& AA1() {return _AA1;}129 const Matrix& AA2() {return _AA2;}130 const Matrix& D21() {return _D21;}131 132 void initAA() {133 _AA1.ReSize(_maxObs, _numPar); _AA1 = 0.0;134 _AA2.ReSize(_maxObs, _numPar); _AA2 = 0.0;135 _D21.ReSize(_numPar, _numPar); _D21 = 0.0;136 }137 t_irc prepareAA(const Matrix& AA, int ind) {138 139 Matrix* Prep = &_AA2;140 if (ind == 1) {141 Prep = &_AA1;142 }143 if (AA.Ncols() != _numPar) {144 LOG << "t_pppFilter::prepareAA: AA.Ncols() != _numPar: " << AA.Ncols() << " != " << _numPar << "\n RETURN FAILURE" << std::endl;145 return failure;146 }147 Prep->SubMatrix(_firstRow, _lastRow, 1, _numPar) = AA;148 return success;149 }150 void switchAA() {151 _AA1 = _AA2;152 }153 t_irc computeTrafoMatrix() {154 if (((_AA2.t() * _AA2)).Determinant() == 0.0) {155 LOG << "t_pppFilter::computeTrafoMatrix: (_AA2.t() * _AA2).inv() is singular" << std::endl;156 return failure;157 }158 _D21 = ((_AA2.t() * _AA2).i()) * _AA2.t() * _AA1;159 return success;160 }161 162 void printMatrix(const Matrix& X, int nRow, int nCol) {163 for (int rr = 0; rr < nRow; rr++) {164 for (int cc = 0; cc < nCol; cc++) {165 LOG << std::setw(6) << std::setprecision(3) << X[rr][cc] << " ;";166 }167 LOG << std::endl;168 }169 LOG << std::endl;170 }171 private:172 int _firstRow;173 int _lastRow;174 Matrix _AA1;175 Matrix _AA2;176 Matrix _D21;177 char _firstSys;178 int _maxObs;179 int _numPar;180 QMap<char, t_prn> _refSatMapPseudoObs;181 };182 183 75 t_irc processSystem(const std::vector<t_lc::type>& LCs, 184 76 const std::vector<t_pppSatObs*>& obsVector, 185 const t_prn& refPrn, 186 bool pseudoObsIonoAvailable, 187 bool preProcessing); 77 bool pseudoObsIonoAvailable); 188 78 189 79 t_irc detectCycleSlips(const std::vector<t_lc::type>& LCs, 190 const std::vector<t_pppSatObs*>& obsVector, 191 const t_prn& refPrn, 192 bool preProcessing); 80 const std::vector<t_pppSatObs*>& obsVector); 193 81 194 82 t_irc resetAmb(t_prn prn, const std::vector<t_pppSatObs*>& obsVector, t_lc::type lc, 195 83 SymmetricMatrix* QSav = 0, ColumnVector* xSav = 0); 196 84 197 void cmpDOP(const std::vector<t_pppSatObs*>& obsVector, 198 const QMap<char, t_pppRefSat*>& refSatMap); 85 void cmpDOP(const std::vector<t_pppSatObs*>& obsVector); 199 86 200 87 void setStateVectorAndVarCovMatrix(const ColumnVector& xFltOld, const SymmetricMatrix& QFltOld, … … 203 90 void predictCovCrdPart(const SymmetricMatrix& QFltOld, bool setNeuNoiseToZero); 204 91 205 t_irc addNoiseToPar(t_pppParam::e_type parType, char sys);206 207 bool resetRefSatellitesLastEpoch(std::vector<t_pppSatObs*>& obsVector,208 const QMap<char, t_pppRefSat*>& refSatMap,209 const QMap<char, t_pppRefSat*>& refSatMapLastEpoch);210 211 92 bncTime _epoTime; 212 t_pppParlist _parlist; 213 t_pppParlist _parlist_sav; 214 t_pppObsPool* _obsPool; 215 t_datumTrafo* _datumTrafo; 93 t_pppParlist* _parlist; 216 94 SymmetricMatrix _QFlt; 217 SymmetricMatrix _QFlt_sav;218 95 ColumnVector _xFlt; 219 96 ColumnVector _x0; … … 223 100 bncTime _firstEpoTime; 224 101 bncTime _lastEpoTimeOK; 225 t_prn _refPrn;226 102 }; 227 103 -
trunk/BNC/src/PPP/pppObsPool.cpp
r10018 r10034 23 23 ///////////////////////////////////////////////////////////////////////////// 24 24 t_pppObsPool::t_epoch::t_epoch(const bncTime& epoTime, vector<t_pppSatObs*>& obsVector, 25 bool pseudoObsIono , const QMap<char, t_pppRefSat*>& refSatMap) {25 bool pseudoObsIono) { 26 26 _epoTime = epoTime; 27 27 _pseudoObsIono = pseudoObsIono; … … 30 30 } 31 31 obsVector.clear(); 32 33 QMapIterator<char, t_pppRefSat*> it(refSatMap);34 while (it.hasNext()) {35 it.next();36 char sys = it.key();37 t_pppRefSat* refSat = it.value();38 _refSatMap[sys] = new t_pppRefSat(refSat->prn(), refSat->stecValue());39 }40 //refSatMap.clear();41 32 } 42 33 … … 47 38 delete _obsVector[ii]; 48 39 } 49 50 QMapIterator<char, t_pppRefSat*> it(_refSatMap);51 while (it.hasNext()) {52 it.next();53 delete it.value();54 }55 _refSatMap.clear();56 40 } 57 41 … … 66 50 } 67 51 _vTec = 0; 68 _refSatChangeRequiredMap['G'] = false;69 _refSatChangeRequiredMap['R'] = false;70 _refSatChangeRequiredMap['E'] = false;71 _refSatChangeRequiredMap['C'] = false;72 73 52 } 74 53 … … 116 95 ///////////////////////////////////////////////////////////////////////////// 117 96 void t_pppObsPool::putEpoch(const bncTime& epoTime, vector<t_pppSatObs*>& obsVector, 118 bool pseudoObsIono , const QMap<char, t_pppRefSat*>& refSatMap) {97 bool pseudoObsIono) { 119 98 const unsigned MAXSIZE = 2; 120 _epochs.push_back(new t_epoch(epoTime, obsVector, pseudoObsIono , refSatMap));99 _epochs.push_back(new t_epoch(epoTime, obsVector, pseudoObsIono)); 121 100 122 101 if (_epochs.size() > MAXSIZE) { … … 125 104 } 126 105 } 127 128 //129 /////////////////////////////////////////////////////////////////////////////130 void t_pppObsPool::deleteLastEpoch() {131 132 if (!_epochs.empty()) {133 //LOG << " " << _epochs.back()->epoTime().timestr().c_str() << endl;134 delete _epochs.back();135 _epochs.pop_back();136 }137 } -
trunk/BNC/src/PPP/pppObsPool.h
r9508 r10034 4 4 #include <vector> 5 5 #include <deque> 6 #include <QMap>7 6 #include <iostream> 8 7 #include "pppSatObs.h" 9 8 #include "bnctime.h" 10 #include "pppRefSat.h"11 9 12 10 namespace BNC_PPP { … … 18 16 public: 19 17 t_epoch(const bncTime& epoTime, std::vector<t_pppSatObs*>& obsVector, 20 bool pseudoObsIono , const QMap<char, t_pppRefSat*>& refSatMap);18 bool pseudoObsIono); 21 19 ~t_epoch(); 22 20 std::vector<t_pppSatObs*>& obsVector() {return _obsVector;} 23 21 const std::vector<t_pppSatObs*>& obsVector() const {return _obsVector;} 24 const QMap<char, t_pppRefSat*>& refSatMap() const {return _refSatMap;}25 22 const bncTime& epoTime() const {return _epoTime;} 26 23 bool pseudoObsIono() const {return _pseudoObsIono;} … … 29 26 bool _pseudoObsIono; 30 27 std::vector<t_pppSatObs*> _obsVector; 31 QMap<char, t_pppRefSat*> _refSatMap;32 28 }; 33 29 … … 39 35 40 36 void putEpoch(const bncTime& epoTime, std::vector<t_pppSatObs*>& obsVector, 41 bool pseudoObsIono, const QMap<char, t_pppRefSat*>& refSatMap); 42 43 void deleteLastEpoch(); 37 bool pseudoObsIono); 44 38 45 39 const t_satCodeBias* satCodeBias(const t_prn& prn) const { … … 60 54 } 61 55 62 // RefSat change required in current epoch63 // =======================================64 void setRefSatChangeRequired(char sys, bool refSatChangeRequired) {65 _refSatChangeRequiredMap[sys] = refSatChangeRequired;66 }67 bool refSatChangeRequired() {68 QMapIterator<char, bool> it(_refSatChangeRequiredMap);69 while (it.hasNext()) {70 it.next();71 if (it.value() == true) {72 return true;73 }74 }75 return false;76 }77 bool refSatChangeRequired(char sys) {78 return _refSatChangeRequiredMap[sys];79 }80 81 // RefSat changed in current epoch (different from last epoch)82 // ===========================================================83 void setRefSatChanged(char sys, bool refSatChanged) {84 _refSatChangedMap[sys] = refSatChanged;85 }86 bool refSatChanged() {87 QMapIterator<char, bool> it(_refSatChangedMap);88 while (it.hasNext()) {89 it.next();90 if (it.value() == true) {91 return true;92 }93 }94 return false;95 }96 bool refSatChanged(char sys) {97 return _refSatChangedMap[sys];98 }99 100 56 private: 101 57 t_satCodeBias* _satCodeBiases[t_prn::MAXPRN+1]; … … 103 59 t_vTec* _vTec; 104 60 std::deque<t_epoch*> _epochs; 105 QMap<char, bool> _refSatChangeRequiredMap;106 QMap<char, bool> _refSatChangedMap;107 61 }; 108 62 -
trunk/BNC/src/PPP/pppParlist.cpp
r10031 r10034 62 62 _noise = OPT->_noiseCrd[2]; 63 63 break; 64 case rClkG: 65 _epoSpec = true; 66 _sigma0 = OPT->_aprSigClk; 67 break; 68 case rClkR: 69 _epoSpec = true; 70 _sigma0 = OPT->_aprSigClk; 71 break; 72 case rClkE: 73 _epoSpec = true; 74 _sigma0 = OPT->_aprSigClk; 75 break; 76 case rClkC: 64 case clkR: 77 65 _epoSpec = true; 78 66 _sigma0 = OPT->_aprSigClk; … … 86 74 const t_pppSatObs* obs = obsVector->at(ii); 87 75 if (obs->prn() == _prn) { 88 _x0 = floor((obs->obsValue(tLC) - obs->cmpValue(tLC)) / obs->lambda(tLC) + 0.5); 76 double offGlo = 0; 77 if (_prn.system() == 'R' && tLC != t_lc::MW) { 78 offGlo = PPP_CLIENT->offGlo(); 79 } 80 double offGal = 0; 81 if (_prn.system() == 'E' && tLC != t_lc::MW) { 82 offGal = PPP_CLIENT->offGal(); 83 } 84 double offBds = 0; 85 if (_prn.system() == 'C' && tLC != t_lc::MW) { 86 offBds = PPP_CLIENT->offBds(); 87 } 88 _x0 = floor((obs->obsValue(tLC) - offGlo - offGal - offBds - obs->cmpValue(tLC)) / obs->lambda(tLC) + 0.5); 89 89 break; 90 90 } 91 91 } 92 92 } 93 break; 94 case offGlo: 95 _epoSpec = true; 96 _sigma0 = OPT->_aprSigClk; 97 _x0 = PPP_CLIENT->offGlo(); 98 break; 99 case offGal: 100 _epoSpec = true; 101 _sigma0 = OPT->_aprSigClk; 102 _x0 = PPP_CLIENT->offGal(); 103 break; 104 case offBds: 105 _epoSpec = true; 106 _sigma0 = OPT->_aprSigClk; 107 _x0 = PPP_CLIENT->offBds(); 93 108 break; 94 109 case trp: … … 117 132 } 118 133 119 //120 ////////////////////////////////////////////////////////////////////////////121 t_pppParam::t_pppParam(const t_pppParam* old) {122 _type = old->type();123 _prn = old->prn();124 _tLC = old->tLC();125 _indexOld = old->indexOld();126 _indexNew = old->indexNew();127 _noise = old->noise();128 _sigma0 = old->sigma0();129 _epoSpec = old->epoSpec();130 _x0 = old->x0();131 setFirstObsTime(old->firstObsTime());132 setLastObsTime(old->lastObsTime());133 _ambInfo = 0;134 if (_type == t_pppParam::amb) {135 _ambInfo = new t_ambInfo();136 _ambInfo->_resetCandidate = old->_ambInfo->_resetCandidate;137 _ambInfo->_eleSat = old->_ambInfo->_eleSat;138 _ambInfo->_numEpo = old->_ambInfo->_numEpo;139 }140 }141 142 134 // Destructor 143 135 //////////////////////////////////////////////////////////////////////////// … … 150 142 //////////////////////////////////////////////////////////////////////////// 151 143 double t_pppParam::partial(const bncTime& /* epoTime */, const t_pppSatObs* obs, 152 const t_lc::type& tLC , const t_prn refPrn) const {144 const t_lc::type& tLC) const { 153 145 154 146 // Special Case - Melbourne-Wuebbena … … 176 168 if (tLC == t_lc::GIM) {return 0.0;} 177 169 return (sta->xyzApr()[2] - obs->xc()[2]) / rhoV.NormFrobenius(); 178 case rClkG:170 case clkR: 179 171 if (tLC == t_lc::GIM) {return 0.0;} 180 return (obs->prn().system() == 'G') ? 1.0 : 0.0;181 case rClkR:172 return 1.0; 173 case offGlo: 182 174 if (tLC == t_lc::GIM) {return 0.0;} 183 175 return (obs->prn().system() == 'R') ? 1.0 : 0.0; 184 case rClkE:176 case offGal: 185 177 if (tLC == t_lc::GIM) {return 0.0;} 186 178 return (obs->prn().system() == 'E') ? 1.0 : 0.0; 187 case rClkC:179 case offBds: 188 180 if (tLC == t_lc::GIM) {return 0.0;} 189 181 return (obs->prn().system() == 'C') ? 1.0 : 0.0; 190 182 case amb: 191 if (tLC == t_lc::GIM) {return 0.0;} 192 else if ((OPT->_obsModelType == OPT->IF) || 193 (OPT->_obsModelType == OPT->PPPRTK) || 194 (OPT->_obsModelType == OPT->UncombPPP) || 195 (OPT->_obsModelType == OPT->DCMcodeBias && !obs->isReference()) || 196 (OPT->_obsModelType == OPT->DCMphaseBias && !obs->isReference()) ) { 197 183 if (tLC == t_lc::GIM) { 184 return 0.0; 185 } 186 else { 198 187 if (obs->prn() == _prn) { 199 188 if (tLC == _tLC) { … … 236 225 } 237 226 else if (tLC == t_lc::GIM) { 238 return -1.0; 239 } 240 } 241 if (tLC == t_lc::GIM && _prn == refPrn) { 242 return 1.0; 227 return 1.0; 228 } 243 229 } 244 230 break; … … 310 296 ss << "CRD_Z"; 311 297 break; 312 case rClkG:313 ss << "REC_CLK G";314 break; 315 case rClkR:316 ss << " REC_CLK R";317 break; 318 case rClkE:319 ss << " REC_CLK E";320 break; 321 case rClkC:322 ss << " REC_CLK C";298 case clkR: 299 ss << "REC_CLK "; 300 break; 301 case offGlo: 302 ss << "OFF_GLO "; 303 break; 304 case offGal: 305 ss << "OFF_GAL "; 306 break; 307 case offBds: 308 ss << "OFF_BDS "; 323 309 break; 324 310 case trp: … … 361 347 _usedSystems.clear(); 362 348 363 vector<t_pppParam*>::iterator it = _params.begin(); 364 while (it != _params.end()) { 365 t_pppParam* par = *it; 366 delete par; 367 it = _params.erase(it); 349 for (unsigned ii = 0; ii < _params.size(); ii++) { 350 delete _params[ii]; 368 351 } 369 352 } … … 371 354 // 372 355 //////////////////////////////////////////////////////////////////////////// 373 t_pppParlist::t_pppParlist(const t_pppParlist& old) { 374 375 _usedSystems = old._usedSystems; 376 377 vector<t_pppParam*>::const_iterator it = old.params().begin(); 378 while (it != old.params().end()) { 379 const t_pppParam* oldParam = *it; 380 _params.push_back(new t_pppParam(oldParam)); 381 } 382 } 383 384 // 385 //////////////////////////////////////////////////////////////////////////// 386 const t_pppParlist& t_pppParlist::operator= (const t_pppParlist& p) { 387 388 _usedSystems.clear(); 389 390 _usedSystems = p._usedSystems; 391 392 vector<t_pppParam*>::iterator it = _params.begin(); 393 while (it != _params.end()) { 394 t_pppParam* par = *it; 395 delete par; 396 it = _params.erase(it); 397 } 398 399 for (unsigned jj = 0; jj < p.params().size(); jj++) { 400 t_pppParam* parFrom = p.params()[jj]; 401 _params.push_back(new t_pppParam(parFrom)); 402 } 403 return *this; 404 } 405 406 // 407 //////////////////////////////////////////////////////////////////////////// 408 t_irc t_pppParlist::set(const bncTime& epoTime, const std::vector<t_pppSatObs*>& obsVector, 409 const QMap<char, t_pppRefSat*>& refSatMap) { 356 t_irc t_pppParlist::set(const bncTime& epoTime, const std::vector<t_pppSatObs*>& obsVector) { 410 357 411 358 // Remove some Parameters … … 421 368 } 422 369 423 else if (par->type() == t_pppParam::crdX || 370 else if (par->type() == t_pppParam::amb || 371 par->type() == t_pppParam::ion || 372 par->type() == t_pppParam::crdX || 424 373 par->type() == t_pppParam::crdY || 425 374 par->type() == t_pppParam::crdZ) { … … 429 378 } 430 379 431 else if (par->type() == t_pppParam::amb) {432 if (par->lastObsTime().valid() && (epoTime - par->lastObsTime() > 60.0)) {433 remove = true;434 }435 if (OPT->_obsModelType == OPT->DCMcodeBias ||436 OPT->_obsModelType == OPT->DCMphaseBias) {437 char sys = par->prn().system();438 t_prn refPrn = (refSatMap[sys])->prn();439 if (par->lastObsTime().valid() && par->prn() == refPrn) {440 remove = true;441 }442 }443 }444 445 else if (par->type() == t_pppParam::ion) {446 if (par->lastObsTime().valid() && (epoTime - par->lastObsTime() > 60.0)) {447 remove = true;448 }449 }450 380 if (remove) { 451 381 #ifdef BNC_DEBUG_PPP … … 495 425 } 496 426 497 if (OPT->_obsModelType == OPT->DCMcodeBias || 498 OPT->_obsModelType == OPT->DCMphaseBias) { 499 // Check if ambiguity parameters have observations 500 // ----------------------------------------------- 427 if (OPT->_obsModelType == OPT->PPPRTK || OPT->_pseudoObsIono) { 501 428 vector<t_pppParam*>::iterator it = _params.begin(); 502 QList<t_prn> lostSats;503 429 while (it != _params.end()) { 504 430 t_pppParam* par = *it; 505 if ((par->type() == t_pppParam::amb) &&506 (!par->lastObsTime().valid() || (epoTime - par->lastObsTime() > 0.0))) {507 #ifdef BNC_DEBUG_PPP508 //LOG << "remove1 " << par->toString() << std::endl;509 #endif510 lostSats.append(par->prn());511 delete par;512 it = _params.erase(it);513 }514 431 // Check if systems have to be presented per biases 515 432 // ---------------------------------------------- 516 else if ((par->type() == t_pppParam::cBiasG1 ||433 if (( par->type() == t_pppParam::cBiasG1 || 517 434 par->type() == t_pppParam::cBiasG2 || 518 435 par->type() == t_pppParam::pBiasG1 || … … 558 475 } 559 476 } 560 // remove respective iono parameters 561 // --------------------------------- 562 it = _params.begin(); 563 while (it != _params.end()) { 564 t_pppParam* par = *it; 565 if ((par->type() == t_pppParam::ion) && 566 (lostSats.contains(par->prn()) || (epoTime - par->lastObsTime() > 0.0))) { 567 #ifdef BNC_DEBUG_PPP 568 //LOG << "remove1 " << par->toString() << std::endl; 569 #endif 570 delete par; 571 it = _params.erase(it); 572 } 573 else { 574 ++it; 575 } 576 } 577 } 578 477 } 579 478 580 479 // Required Set of Parameters … … 588 487 required.push_back(new t_pppParam(t_pppParam::crdZ, t_prn(), t_lc::dummy)); 589 488 489 // Receiver Clock 490 // -------------- 491 required.push_back(new t_pppParam(t_pppParam::clkR, t_prn(), t_lc::dummy)); 492 493 // GLONASS Clock Offset 494 // -------------------- 495 if ( _usedSystems.contains('R') && 496 (_usedSystems.contains('G') || _usedSystems.contains('E') || _usedSystems.contains('C'))) { 497 required.push_back(new t_pppParam(t_pppParam::offGlo, t_prn(), t_lc::dummy)); 498 } 499 500 // Galileo Clock Offset 501 // -------------------- 502 if (_usedSystems.contains('E') && _usedSystems.contains('G')) { 503 required.push_back(new t_pppParam(t_pppParam::offGal, t_prn(), t_lc::dummy)); 504 } 505 506 // BDS Clock Offset 507 // ---------------- 508 if (_usedSystems.contains('C') && (_usedSystems.contains('G') || _usedSystems.contains('E'))) { 509 required.push_back(new t_pppParam(t_pppParam::offBds, t_prn(), t_lc::dummy)); 510 } 511 512 // Troposphere 513 // ----------- 514 if (OPT->estTrp()) { 515 required.push_back(new t_pppParam(t_pppParam::trp, t_prn(), t_lc::dummy)); 516 } 517 518 // Ionosphere 519 // ---------- 520 if (OPT->_obsModelType == OPT->UncombPPP) { 521 for (unsigned jj = 0; jj < obsVector.size(); jj++) { 522 const t_pppSatObs* satObs = obsVector[jj]; 523 required.push_back(new t_pppParam(t_pppParam::ion, satObs->prn(), t_lc::dummy)); 524 } 525 } 526 // Ambiguities 527 // ----------- 528 for (unsigned jj = 0; jj < obsVector.size(); jj++) { 529 const t_pppSatObs* satObs = obsVector[jj]; 530 const vector<t_lc::type>& ambLCs = OPT->ambLCs(satObs->prn().system()); 531 for (unsigned ii = 0; ii < ambLCs.size(); ii++) { 532 required.push_back(new t_pppParam(t_pppParam::amb, satObs->prn(), ambLCs[ii], &obsVector)); 533 } 534 } 535 590 536 // Receiver Code Biases 591 537 // -------------------- 592 if (OPT->_obsModelType == OPT-> DCMcodeBias) {538 if (OPT->_obsModelType == OPT->PPPRTK) { 593 539 std::vector<t_lc::type> lc; 594 540 if (_usedSystems.contains('G')) { … … 629 575 } 630 576 } 577 if (OPT->_pseudoObsIono) { 578 std::vector<t_lc::type> lc; 579 if (_usedSystems.contains('G')) { 580 lc = OPT->LCs('G'); 581 if (std::find(lc.begin(), lc.end(), t_lc::c2) != lc.end()) { 582 required.push_back(new t_pppParam(t_pppParam::cBiasG2, t_prn(), t_lc::c2)); 583 } 584 } 585 if (_usedSystems.contains('R')) { 586 lc = OPT->LCs('R'); 587 if (std::find(lc.begin(), lc.end(), t_lc::c2) != lc.end()) { 588 required.push_back(new t_pppParam(t_pppParam::cBiasR2, t_prn(), t_lc::c2)); 589 } 590 } 591 if (_usedSystems.contains('E')) { 592 lc = OPT->LCs('E'); 593 if (std::find(lc.begin(), lc.end(), t_lc::c2) != lc.end()) { 594 required.push_back(new t_pppParam(t_pppParam::cBiasE2, t_prn(), t_lc::c2)); 595 } 596 } 597 if (_usedSystems.contains('C')) { 598 lc = OPT->LCs('C'); 599 if (std::find(lc.begin(), lc.end(), t_lc::c2) != lc.end()) { 600 required.push_back(new t_pppParam(t_pppParam::cBiasC2, t_prn(), t_lc::c2)); 601 } 602 } 603 } 631 604 632 605 // Receiver Phase Biases 633 606 // --------------------- 634 if ((OPT->_obsModelType == OPT->DCMphaseBias) || 635 (OPT->_obsModelType == OPT->PPPRTK) ) { 607 if (OPT->_obsModelType == OPT->PPPRTK) { 636 608 std::vector<t_lc::type> lc; 637 609 if (_usedSystems.contains('G')) { … … 669 641 if (std::find(lc.begin(), lc.end(), t_lc::l2) != lc.end()) { 670 642 required.push_back(new t_pppParam(t_pppParam::pBiasC2, t_prn(), t_lc::l2)); 671 }672 }673 }674 675 // Receiver Clocks676 // ---------------677 if (_usedSystems.contains('G')) {678 required.push_back(new t_pppParam(t_pppParam::rClkG, t_prn(), t_lc::dummy));679 }680 681 if (_usedSystems.contains('R')) {682 required.push_back(new t_pppParam(t_pppParam::rClkR, t_prn(), t_lc::dummy));683 }684 685 if (_usedSystems.contains('E')) {686 required.push_back(new t_pppParam(t_pppParam::rClkE, t_prn(), t_lc::dummy));687 }688 689 if (_usedSystems.contains('C')) {690 required.push_back(new t_pppParam(t_pppParam::rClkC, t_prn(), t_lc::dummy));691 }692 693 // Troposphere694 // -----------695 if (OPT->estTrp()) {696 required.push_back(new t_pppParam(t_pppParam::trp, t_prn(), t_lc::dummy));697 }698 699 // Ionosphere700 // ----------701 if (OPT->_obsModelType == OPT->UncombPPP ||702 OPT->_obsModelType == OPT->DCMcodeBias ||703 OPT->_obsModelType == OPT->DCMphaseBias ) {704 for (unsigned jj = 0; jj < obsVector.size(); jj++) {705 const t_pppSatObs* satObs = obsVector[jj];706 required.push_back(new t_pppParam(t_pppParam::ion, satObs->prn(), t_lc::dummy));707 }708 }709 // Ambiguities710 // -----------711 for (unsigned jj = 0; jj < obsVector.size(); jj++) {712 const t_pppSatObs* satObs = obsVector[jj];713 if ((OPT->_obsModelType == OPT->IF) ||714 (OPT->_obsModelType == OPT->PPPRTK) ||715 (OPT->_obsModelType == OPT->UncombPPP) ||716 (OPT->_obsModelType == OPT->DCMcodeBias && !satObs->isReference()) ||717 (OPT->_obsModelType == OPT->DCMphaseBias && !satObs->isReference()) ) {718 const vector<t_lc::type>& ambLCs = OPT->ambLCs(satObs->prn().system());719 for (unsigned ii = 0; ii < ambLCs.size(); ii++) {720 required.push_back(new t_pppParam(t_pppParam::amb, satObs->prn(), ambLCs[ii], &obsVector));721 643 } 722 644 } … … 779 701 t_pppParam* parY = 0; 780 702 t_pppParam* parZ = 0; 781 vector<t_pppParam*>::const_iterator it = _params.begin(); 782 while (it != _params.end()) { 783 t_pppParam* par = *it; 703 for (unsigned ii = 0; ii < _params.size(); ii++) { 704 t_pppParam* par = _params[ii]; 784 705 if (par->type() == t_pppParam::crdX) { 785 706 parX = par; … … 805 726 LOG << endl; 806 727 } 807 ++it;808 728 } 809 729 -
trunk/BNC/src/PPP/pppParlist.h
r10023 r10034 7 7 #include "t_prn.h" 8 8 #include "bnctime.h" 9 #include "pppRefSat.h"10 9 11 10 namespace BNC_PPP { … … 15 14 class t_pppParam { 16 15 public: 17 enum e_type {crdX, crdY, crdZ, rClkG, rClkR, rClkE, rClkC, trp, ion, amb,16 enum e_type {crdX, crdY, crdZ, clkR, offGlo, offGal, offBds, trp, ion, amb, 18 17 cBiasG1, cBiasR1, cBiasE1, cBiasC1, pBiasG1, pBiasR1, pBiasE1, pBiasC1, 19 18 cBiasG2, cBiasR2, cBiasE2, cBiasC2, pBiasG2, pBiasR2, pBiasE2, pBiasC2}; 20 19 21 20 t_pppParam(e_type type, const t_prn& prn, t_lc::type tLC, const std::vector<t_pppSatObs*>* obsVector = 0); 22 t_pppParam(const t_pppParam* old);23 21 ~t_pppParam(); 24 22 25 23 e_type type() const {return _type;} 26 24 double x0() const {return _x0;} 27 double partial(const bncTime& epoTime, const t_pppSatObs* obs, 28 const t_lc::type& tLC , const t_prn refPrn) const;25 double partial(const bncTime& epoTime, const t_pppSatObs* obs, 26 const t_lc::type& tLC) const; 29 27 bool epoSpec() const {return _epoSpec;} 30 28 bool isEqual(const t_pppParam* par2) const { … … 103 101 t_pppParlist(); 104 102 ~t_pppParlist(); 105 t_pppParlist(const t_pppParlist& old); 106 const t_pppParlist&operator= (const t_pppParlist& p); 107 t_irc set(const bncTime& epoTime, const std::vector<t_pppSatObs*>& obsVector, 108 const QMap<char, t_pppRefSat*>& refSatMap); 103 t_irc set(const bncTime& epoTime, const std::vector<t_pppSatObs*>& obsVector); 109 104 unsigned nPar() const {return _params.size();} 110 105 const std::vector<t_pppParam*>& params() const {return _params;} 111 std::vector<t_pppParam*>& params(){return _params;}106 std::vector<t_pppParam*>& params() {return _params;} 112 107 const QList<char>& usedSystems() const {return _usedSystems;} 113 108 void printResult(const bncTime& epoTime, const SymmetricMatrix& QQ, -
trunk/BNC/src/PPP/pppRefSat.h
r9507 r10034 9 9 #define PPPREFSAT_H_ 10 10 11 #include <vector> 11 12 #include "t_prn.h" 12 13 … … 32 33 double _stecValue; 33 34 }; 35 36 class t_refSatellites { 37 public: 38 t_refSatellites(std::vector<char> systems) { 39 for (unsigned iSys = 0; iSys < systems.size(); iSys++) { 40 char sys = systems[iSys]; 41 _refSatMap[sys] = new t_pppRefSat(); 42 } 43 } 44 ~t_refSatellites() { 45 QMapIterator<char, t_pppRefSat*> it(_refSatMap); 46 while (it.hasNext()) { 47 it.next(); 48 delete it.value(); 49 } 50 _refSatMap.clear(); 51 } 52 const QMap<char, t_pppRefSat*>& refSatMap() const {return _refSatMap;} 53 54 private: 55 QMap<char, t_pppRefSat*> _refSatMap; 56 57 }; 58 59 34 60 } 35 61 -
trunk/BNC/src/PPP/pppSatObs.cpp
r10014 r10034 44 44 _valid = true; 45 45 _reference = false; 46 _stecRefSat = 0.0;47 46 _stecSat = 0.0; 48 47 _signalPriorities = QString::fromStdString(OPT->_signalPriorities); 49 48 if (!_signalPriorities.size()) { 50 if (OPT->_obsModelType == OPT->DCMcodeBias || 51 OPT->_obsModelType == OPT->DCMphaseBias) { 52 // at the moment only one code or phase bias per system (G,R,E,C)/modulation considered 53 _signalPriorities = "G:12&CW R:12&CP E:1&CX E:5&QX C:26&I"; 54 } 55 else { 56 _signalPriorities = "G:12&CWPSLX R:12&CP E:1&CBX E:5&QIX C:26&IQX"; 57 } 49 _signalPriorities = "G:12&CWPSLX R:12&CP E:1&CBX E:5&QIX C:26&IQX"; 58 50 } 59 51 … … 109 101 if (obs->_rnxType2ch == obsType.toStdString() && 110 102 obs->_codeValid && obs->_code && 111 obs->_phaseValid && obs->_phase) { 103 obs->_phaseValid && obs->_phase && 104 obs->_lockTimeValid && obs->_lockTime > 5.0) { 112 105 _obs[iFreq] = new t_frqObs(*obs); //cout << "================> newObs: " << obs->_rnxType2ch <<endl; 113 106 } … … 261 254 // Pseudo observations 262 255 if (tLC == t_lc::GIM) { 263 if (_stec RefSat == 0.0 || _stecSat == 0.0) {256 if (_stecSat == 0.0) { 264 257 if (valid) *valid = false; 265 258 return 0.0; 266 259 } 267 260 else { 268 return _stec RefSat;261 return _stecSat; 269 262 } 270 263 } … … 339 332 340 333 if (tLC == t_lc::GIM) { 341 retVal = OPT->_sigmaGIM * OPT->_sigmaGIM + OPT->_sigmaGIM * OPT->_sigmaGIM;334 retVal = OPT->_sigmaGIM * OPT->_sigmaGIM; 342 335 } 343 336 … … 587 580 double f1GPS = t_CST::freq(t_frequency::G1, 0); 588 581 for (unsigned iFreq = 1; iFreq < t_frequency::max; iFreq++) { 589 if (OPT->_pseudoObsIono) { // DCMcodeBias, DCMphaseBias582 if (OPT->_pseudoObsIono) { 590 583 // For scaling the slant ionospheric delays the trick is to be consistent with units! 591 584 // The conversion of TECU into meters requires the frequency of the signal. … … 737 730 // 738 731 //////////////////////////////////////////////////////////////////////////// 739 void t_pppSatObs::setPseudoObsIono(t_frequency::type freq, double stecRefSat) { 732 bool t_pppSatObs::setPseudoObsIono(t_frequency::type freq) { 733 bool pseudoObsIono = false; 740 734 _stecSat = _model._ionoCodeDelay[freq]; 741 _stecRefSat = stecRefSat; 742 } 735 if (_stecSat) { 736 pseudoObsIono = true; 737 } 738 return pseudoObsIono; 739 } -
trunk/BNC/src/PPP/pppSatObs.h
r9866 r10034 47 47 void setRes(t_lc::type tLC, double res); 48 48 double getRes(t_lc::type tLC) const; 49 void setPseudoObsIono(t_frequency::type freq, double stecRefSat);49 bool setPseudoObsIono(t_frequency::type freq); 50 50 double getIonoCodeDelay(t_frequency::type freq) {return _model._ionoCodeDelay[freq];} 51 51 double getCodeBias(t_frequency::type freq) {return _model._codeBias[freq];} … … 149 149 std::map<t_lc::type, double> _res; 150 150 double _signalPropagationTime; 151 double _stecRefSat;152 151 double _stecSat; 153 152 double _tropo0; -
trunk/BNC/src/bncmain.cpp
r9958 r10034 249 249 " PPP/lcGalileo {Select observations from Galileo code and/or phase data [character string: Pi&Li|Pi|Li|no]}\n" 250 250 " PPP/lcBDS {Select observations from BDS code and/or phase data [character string: Pi&Li|Pi|Li|no]}\n" 251 " PPP/modelObs {select observation model [character string: Uncombined PPP|Ionosphere-free PPP |DCM with Code Biases|DCM with Phase Biases]}\n"251 " PPP/modelObs {select observation model [character string: Uncombined PPP|Ionosphere-free PPP]}\n" 252 252 " PPP/sigmaC1 {Sigma for code observations in meters [floating-point number]}\n" 253 253 " PPP/sigmaL1 {Sigma for phase observations in meters [floating-point number]}\n" -
trunk/BNC/src/bncwindow.cpp
r10032 r10034 1489 1489 _pppWidgets._lcGalileo->setWhatsThis(tr("<p>Specify which kind of Galileo observations you want to use</p><p><ul><li>Specifying 'Pi' means that you request BNC to use code data of two frequencies.</li><li>Specifying'Li' means that you request BNC to use phase data of two frequencies.</li> <li>Specifying'Pi&Li' means that you request BNC to use both, code and phase data of two frequencies.</li></ul></p><p>Specifying 'no' means that you don't want BNC to use Galileo data. <i>[key: PPP/lcGalileo]</i></p>")); 1490 1490 _pppWidgets._lcBDS->setWhatsThis(tr("<p>Specify which kind of BDS observations you want to use</p><p><ul><li>Specifying 'Pi' means that you request BNC to use code data from two frequencies.</li><li>Specifying'Li' means that you request BNC to use phase data of two frequencies.</li> <li>Specifying'Pi&Li' means that you request BNC to use both, code and phase data of two frequencies.</li></ul></p><p>Specifying 'no' means that you don't want BNC to use BDS data. <i>[key: PPP/lcBDS]</i></p>")); 1491 _pppWidgets._modelObs->setWhatsThis(tr("<p>Specify which kind of PPP model you want to use:</p><p><ul><li>Uncombined PPP</li><li>Iopnosphere-free PPP</li><li>PPP-RTK (currently not activated because of an incomplete standardized SSR model)</li><li> DCM with Code or Phase Biases</li><li></p><p>[key: PPP/modelObs]</i></p>"));1491 _pppWidgets._modelObs->setWhatsThis(tr("<p>Specify which kind of PPP model you want to use:</p><p><ul><li>Uncombined PPP</li><li>Iopnosphere-free PPP</li><li>PPP-RTK (currently not activated because of an incomplete standardized SSR model)</li><li></p><p>[key: PPP/modelObs]</i></p>")); 1492 1492 _pppWidgets._pseudoObs->setWhatsThis(tr("<p>Specify whether pseudo observations regarding the Ionosphere shall be used. Please note, this is useful, as soon as the ionospheric information is more accurate than the code data accuracy. <i>[key: PPP/pseudoObs]</i></p>")); 1493 1493 _pppWidgets._sigmaC1->setWhatsThis(tr("<p>Enter a Sigma for GPS C1 code observations in meters.</p><p>The higher the sigma you enter, the less the contribution of GPS C1 code observations to a PPP solution from combined code and phase data. 2.0 is likely to be an appropriate choice.</p><p>Default is an empty option field, meaning<br>'Sigma C1 = 2.0' <i>[key: PPP/sigmaC1]</i></p>")); -
trunk/BNC/src/pppMain.cpp
r10029 r10034 215 215 } 216 216 } 217 else if (settings.value("PPP/modelObs").toString() == "DCM with Code Biases") {218 opt->_obsModelType = t_pppOptions::DCMcodeBias;219 opt->_refSatRequired = true;220 }221 else if (settings.value("PPP/modelObs").toString() == "DCM with Phase Biases") {222 opt->_obsModelType = t_pppOptions::DCMphaseBias;223 opt->_refSatRequired = true;224 }225 217 #endif 226 218 // GPS -
trunk/BNC/src/pppOptions.h
r9866 r10034 11 11 class t_pppOptions { 12 12 public: 13 enum e_type {IF, UncombPPP, PPPRTK , DCMcodeBias, DCMphaseBias};13 enum e_type {IF, UncombPPP, PPPRTK}; 14 14 t_pppOptions(); 15 15 ~t_pppOptions(); … … 30 30 QStringList _obsmodelTypeStr = QStringList() 31 31 << "IF PPP" 32 << "Uncombined PPP" 33 << "DCM with Code Biases" 34 << "DCM with Phase Biases"; 32 << "Uncombined PPP"; 35 33 bool _realTime; 36 34 std::string _crdFile; -
trunk/BNC/src/pppWidgets.cpp
r10013 r10034 156 156 _pseudoObs->addItems(QString("no").split(",")); 157 157 #else 158 _modelObs->addItems(QString("Uncombined PPP,Ionosphere-free PPP ,DCM with Code Biases,DCM with Phase Biases").split(","));158 _modelObs->addItems(QString("Uncombined PPP,Ionosphere-free PPP").split(",")); 159 159 _pseudoObs->addItems(QString("no,Ionosphere").split(",")); 160 160 #endif … … 588 588 int iRow = _staTable->rowCount(); 589 589 _staTable->insertRow(iRow); 590 QString preferredAttributes = "G:12&CWPSLX R:12&CP E:1&CBX E:5&QIX C:26&IQX"; 591 if (_modelObs->currentText().contains("DCM")) { 592 preferredAttributes = "G:12&CW R:12&CP E:1&CX E:5&QX C:26&I"; 593 } 590 QString preferredAttributes = "G:12&W R:12&P E:1&C E:5&Q C:26&I"; 594 591 595 592 for (int iCol = 0; iCol < _staTable->columnCount(); iCol++) {
Note:
See TracChangeset
for help on using the changeset viewer.