Changeset 10388 in ntrip
- Timestamp:
- Mar 12, 2024, 3:10:17 PM (6 months ago)
- Location:
- trunk/BNC
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/scripts/Bnc.pm
r10385 r10388 493 493 my $epochSec = 0; 494 494 my $epochDiff = 0; 495 my ( @hlp, @N, @E, @U, %SATNUM, @TRP, @CLK, @OFF_G LO, @OFF_GAL, @OFF_BDS);496 my ( @EPOCH, @EPOCH_CLK, @EPOCH_OFF_G LO, @EPOCH_OFF_GAL, @EPOCH_OFF_BDS );495 my ( @hlp, @N, @E, @U, %SATNUM, @TRP, @CLK, @OFF_GPS, @OFF_GLO, @OFF_GAL, @OFF_BDS); 496 my ( @EPOCH, @EPOCH_CLK, @EPOCH_OFF_GPS, @EPOCH_OFF_GLO, @EPOCH_OFF_GAL, @EPOCH_OFF_BDS ); 497 497 my ( %AMB, %RES, %ELE, %ION, %BIA ); 498 498 my ( $station, $lki, $sys, $sat, $amb ); … … 588 588 push ( @CLK, $hlp[2] + $hlp[3] ); 589 589 } 590 elsif ( $ln =~ /\bOFF_GPS\b/ ) { # 2015-08... OFF_GPS 52.6806 -3.8042 +- 9.0077 591 push ( @EPOCH_OFF_GPS, $epochSec ); 592 push ( @OFF_GPS, $hlp[2] + $hlp[3] ); 593 } 590 594 elsif ( $ln =~ /\bOFF_GLO\b/ ) { # 2015-08... OFF_GLO 52.6806 -3.8042 +- 9.0077 591 #push ( @EPOCH_OFF_GLO, $epochSec );595 push ( @EPOCH_OFF_GLO, $epochSec ); 592 596 push ( @OFF_GLO, $hlp[2] + $hlp[3] ); 593 597 } 594 598 elsif ( $ln =~ /\bOFF_GAL\b/ ) { # 2015-08... OFF_GAL 52.6806 -3.8042 +- 9.0077 595 #push ( @EPOCH_OFF_GAL, $epochSec );599 push ( @EPOCH_OFF_GAL, $epochSec ); 596 600 push ( @OFF_GAL, $hlp[2] + $hlp[3] ); 597 601 } 598 602 elsif ( $ln =~ /\bOFF_BDS\b/ ) { # 2015-08... OFF_BDS 52.6806 -3.8042 +- 9.0077 599 #push ( @EPOCH_OFF_BDS, $epochSec );603 push ( @EPOCH_OFF_BDS, $epochSec ); 600 604 push ( @OFF_BDS, $hlp[2] + $hlp[3] ); 601 605 } … … 624 628 if ( $nof_epochs != scalar @TRP ) { LOGDIE "number of epochs and TRP not equal\n" } 625 629 if ( @CLK && scalar @EPOCH_CLK != scalar @CLK ) { LOGDIE "number of epochs and CLK not equal\n" } 626 # if ( @OFF_GLO && scalar @EPOCH_OFF_GLO != scalar @OFF_GLO ) { LOGDIE "number of epochs and OFF_GLO not equal\n" } 627 # if ( @OFF_GAL && scalar @EPOCH_OFF_GAL != scalar @OFF_GAL ) { LOGDIE "number of epochs and OFF_GAL not equal\n" } 628 # if ( @OFF_BDS && scalar @EPOCH_OFF_BDS != scalar @OFF_BDS ) { LOGDIE "number of epochs and OFF_BDS not equal\n" } 630 if ( @OFF_GPS && scalar @EPOCH_OFF_GPS != scalar @OFF_GPS ) { LOGDIE "number of epochs and OFF_GPS not equal\n" } 631 if ( @OFF_GLO && scalar @EPOCH_OFF_GLO != scalar @OFF_GLO ) { LOGDIE "number of epochs and OFF_GLO not equal\n" } 632 if ( @OFF_GAL && scalar @EPOCH_OFF_GAL != scalar @OFF_GAL ) { LOGDIE "number of epochs and OFF_GAL not equal\n" } 633 if ( @OFF_BDS && scalar @EPOCH_OFF_BDS != scalar @OFF_BDS ) { LOGDIE "number of epochs and OFF_BDS not equal\n" } 629 634 630 635 if ( !$station ) { WARN "could not grep stationname from file: $file\n" } … … 638 643 TRP => \@TRP, 639 644 CLK => \@CLK, 645 OFF_GPS => \@OFF_GPS, 640 646 OFF_GLO => \@OFF_GLO, 641 647 OFF_GAL => \@OFF_GAL, -
trunk/BNC/scripts/pppPlot.pl
r10385 r10388 107 107 my ( $station, $file ) = Bnc::parsePPPLogfile( $file, $sampling ); 108 108 my $EPOCH = $file->{'EPOCH'}; 109 my $EPOCH_OFF_GPS = $file->{'EPOCH_OFF_GPS'}; 109 110 my $EPOCH_OFF_GLO = $file->{'EPOCH_OFF_GLO'}; 110 111 my $EPOCH_OFF_GAL = $file->{'EPOCH_OFF_GAL'}; … … 243 244 } 244 245 246 ######### OFF_GPS ##################### 247 if ( grep ( $_ eq "ALL", @plotTypes ) ) { 248 if ( scalar @{ $file->{'OFF_GPS'} } < 1 ) { 249 DEBUG "No OFF_GPS found"; 250 } 251 else { 252 DEBUG "Plot OFF_GPS"; 253 my $pngName = sprintf ( "%s_OFF_G.png", $station ); 254 my $chartOFF_GPS = newChart($station); 255 $chartOFF_GPS->set( output => $pngName ); 256 $chartOFF_GPS->set( ylabel => "Offset GPS [m]" ); 257 258 $dataset = Chart::Gnuplot::DataSet->new( 259 xdata => $EPOCH_OFF_GPS, 260 ydata => $file->{'OFF_GPS'}, 261 title => "Receiver Offset GPS", 262 timefmt => '%s', 263 style => "linespoints", 264 ); 265 $chartOFF_GPS->plot2d($dataset); #system ("display $pngName&"); 266 $y = $y - $dy; 267 268 if ( $y < 30 / mm ) { 269 $page = $pdf->page(); 270 $page->mediabox('A4'); 271 $y = $y0; 272 } 273 $png = $page->gfx(); 274 LOGDIE("could not find image file: $!\n") unless -e $pngName; 275 $png->image( $pdf->image_png($pngName), $x, $y, $width, $height ); 276 } 277 } 278 245 279 246 280 ######### OFF_GLO ##################### … … 257 291 258 292 $dataset = Chart::Gnuplot::DataSet->new( 259 #xdata => $EPOCH_OFF_GLO, 260 xdata => $EPOCH, 293 xdata => $EPOCH_OFF_GLO, 261 294 ydata => $file->{'OFF_GLO'}, 262 295 title => "Receiver Offset GLONASS", … … 291 324 292 325 $dataset = Chart::Gnuplot::DataSet->new( 293 #xdata => $EPOCH_OFF_GAL, 294 xdata => $EPOCH, 326 xdata => $EPOCH_OFF_GAL, 295 327 ydata => $file->{'OFF_GAL'}, 296 328 title => "Receiver Offset Galileo", … … 325 357 326 358 $dataset = Chart::Gnuplot::DataSet->new( 327 #xdata => $EPOCH_OFF_BDS, 328 xdata => $EPOCH, 359 xdata => $EPOCH_OFF_BDS, 329 360 ydata => $file->{'OFF_BDS'}, 330 361 title => "Receiver Offset Beidou", -
trunk/BNC/src/PPP/pppClient.cpp
r10384 r10388 67 67 } 68 68 } 69 _offGps = 0.0; 69 70 _offGlo = 0.0; 70 71 _offGal = 0.0; … … 301 302 const t_pppSatObs* satObs = obsVector.at(ii); 302 303 char sys = satObs->prn().system(); 303 if (satObs->isValid() && 304 if (satObs->isValid() && 304 305 (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle) ) { 305 306 ColumnVector rr = satObs->xc().Rows(1,3) - xyzc.Rows(1,3); … … 337 338 return success; 338 339 } 340 341 // Compute A Priori Gps Clock Offset 342 ////////////////////////////////////////////////////////////////////////////// 343 double t_pppClient::cmpOffGps(vector<t_pppSatObs*>& obsVector) { 344 345 t_lc::type tLC = t_lc::dummy; 346 double offGps = 0.0; 347 348 if (_opt->useSystem('G')) { 349 while (obsVector.size() > 0) { 350 offGps = 0.0; 351 double maxRes = 0.0; 352 int maxResIndex = -1; 353 unsigned nObs = 0; 354 t_prn maxResPrn; 355 for (unsigned ii = 0; ii < obsVector.size(); ii++) { 356 const t_pppSatObs* satObs = obsVector.at(ii); 357 if (satObs->prn().system() == 'G') { 358 if (tLC == t_lc::dummy) { 359 tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1; 360 } 361 if (satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle)) { 362 double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC); 363 ++nObs; 364 offGps += ll; 365 if (fabs(ll) > fabs(maxRes)) { 366 maxRes = ll; 367 maxResIndex = ii; 368 maxResPrn = satObs->prn(); 369 } 370 } 371 } 372 } 373 374 if (nObs > 0) { 375 offGps = offGps / nObs; 376 } 377 else { 378 offGps = 0.0; 379 } 380 381 if (fabs(maxRes) > 100.0) { 382 LOG << "t_pppClient::cmpOffGps outlier " << maxResPrn.toString() << " " << maxRes << endl; 383 delete obsVector.at(maxResIndex); 384 obsVector.erase(obsVector.begin() + maxResIndex); 385 } 386 else { 387 break; 388 } 389 } 390 } 391 return offGps; 392 } 393 339 394 340 395 // Compute A Priori Glonass Clock Offset … … 443 498 return offGal; 444 499 } 445 446 500 // Compute A Priori BDS Clock Offset 447 501 ////////////////////////////////////////////////////////////////////////////// … … 638 692 } 639 693 694 _offGps = cmpOffGps(_obsRover); 640 695 _offGlo = cmpOffGlo(_obsRover); 641 696 _offGal = cmpOffGal(_obsRover); -
trunk/BNC/src/PPP/pppClient.h
r10384 r10388 36 36 const bncAntex* antex() const {return _antex;} 37 37 const t_pppStation* staRover() const {return _staRover;} 38 double offGps() const {return _offGps;} 38 39 double offGlo() const {return _offGlo;} 39 40 double offGal() const {return _offGal;} 40 41 double offBds() const {return _offBds;} 42 void resetOffGps() {_offGps = 0.0;} 43 void resetOffGlo() {_offGlo = 0.0;} 44 void resetOffGal() {_offGal = 0.0;} 45 void resetOffBds() {_offBds = 0.0;} 41 46 42 47 … … 61 66 t_irc cmpBancroft(const bncTime& epoTime, std::vector<t_pppSatObs*>& obsVector, 62 67 ColumnVector& xyzc, bool print); 68 double cmpOffGps(std::vector<t_pppSatObs*>& obsVector); 63 69 double cmpOffGlo(std::vector<t_pppSatObs*>& obsVector); 64 70 double cmpOffGal(std::vector<t_pppSatObs*>& obsVector); … … 73 79 bncAntex* _antex; 74 80 t_pppFilter* _filter; 81 double _offGps; 75 82 double _offGlo; 76 83 double _offGal; -
trunk/BNC/src/PPP/pppFilter.cpp
r10386 r10388 310 310 string epoTimeStr = string(_epoTime); 311 311 const vector<t_pppParam*> ¶ms = _parlist->params(); 312 int maxNumberOfReset = (2.0 * obsVector.size()) - 2.0; 313 int numberOfReset = 0; 312 314 313 315 for (unsigned ii = 0; ii < LCs.size(); ii++) { … … 347 349 348 350 // Check Pre-Fit Residuals 349 / *-----------------------351 // ----------------------- 350 352 else { 351 353 ColumnVector AA(params.size()); … … 358 360 359 361 if (fabs(vv) > SLIP) { 362 numberOfReset++; 360 363 LOG << epoTimeStr << " cycle slip detected " << t_lc::toString(tLC) << ' ' 361 364 << obs->prn().toString() << ' ' << setw(8) << setprecision(4) << vv << endl; 362 resetAmb(obs->prn(), obsVector, tLC); 363 } 364 }*/ 365 if (numberOfReset < maxNumberOfReset) { 366 resetAmb(obs->prn(), obsVector, tLC); 367 } 368 } 369 } 365 370 } 366 371 } -
trunk/BNC/src/PPP/pppParlist.cpp
r10387 r10388 74 74 const t_pppSatObs* obs = obsVector->at(ii); 75 75 if (obs->prn() == _prn) { 76 double offGps = 0.0; 77 if (_prn.system() == 'G' && tLC != t_lc::MW) { 78 offGps = PPP_CLIENT->offGps(); 79 } 76 80 double offGlo = 0.0; 77 81 if (_prn.system() == 'R' && tLC != t_lc::MW) { … … 86 90 offBds = PPP_CLIENT->offBds(); 87 91 } 88 _x0 = floor((obs->obsValue(tLC) - offG lo - offGal - offBds - obs->cmpValue(tLC)) / obs->lambda(tLC) + 0.5);92 _x0 = floor((obs->obsValue(tLC) - offGps - offGlo - offGal - offBds - obs->cmpValue(tLC)) / obs->lambda(tLC) + 0.5); 89 93 break; 90 94 } 91 95 } 92 96 } 97 break; 98 case offGps: 99 _epoSpec = true; 100 _sigma0 = OPT->_aprSigClkOff; 101 _x0 = PPP_CLIENT->offGps(); 93 102 break; 94 103 case offGlo: … … 171 180 if (tLC == t_lc::GIM) {return 0.0;} 172 181 return 1.0; 182 case offGps: 183 if (tLC == t_lc::GIM) {return 0.0;} 184 return (obs->prn().system() == 'G') ? 1.0 : 0.0; 173 185 case offGlo: 174 186 if (tLC == t_lc::GIM) {return 0.0;} … … 298 310 case rClk: 299 311 ss << "REC_CLK "; 312 break; 313 case offGps: 314 ss << "OFF_GPS "; 300 315 break; 301 316 case offGlo: … … 401 416 } 402 417 418 // check which systems have observations 419 // ------------------------------------- 420 _usedSystems['G'] = _usedSystems['R'] = _usedSystems['E'] = _usedSystems['C'] = 0; 421 for (unsigned jj = 0; jj < obsVector.size(); jj++) { 422 const t_pppSatObs* satObs = obsVector[jj]; 423 char sys = satObs->prn().system(); 424 _usedSystems[sys]++; 425 } 426 403 427 // Check whether parameters have observations 404 428 // ------------------------------------------ … … 435 459 required.push_back(new t_pppParam(t_pppParam::crdZ, t_prn(), t_lc::dummy)); 436 460 437 // Receiver Clock 438 // -------------- 461 // Receiver Clocks 462 // --------------- 439 463 required.push_back(new t_pppParam(t_pppParam::rClk, t_prn(), t_lc::dummy)); 440 464 441 465 // GLONASS Clock Offset 442 466 // -------------------- 443 if ((OPT->useSystem('G') && OPT->useSystem('R')) || 444 (OPT->useSystem('E') && OPT->useSystem('R')) || 445 (OPT->useSystem('C') && OPT->useSystem('R')) ) { 467 if ( _usedSystems.value('R') && 468 (_usedSystems.value('G') || _usedSystems.value('E') || _usedSystems.value('C'))) { 446 469 required.push_back(new t_pppParam(t_pppParam::offGlo, t_prn(), t_lc::dummy)); 470 } 471 else { 472 PPP_CLIENT->resetOffGlo(); 447 473 } 448 474 449 475 // Galileo Clock Offset 450 476 // -------------------- 451 if ( OPT->useSystem('G') && OPT->useSystem('E')) {477 if (_usedSystems.value('E') && _usedSystems.value('G') && _usedSystems.value('G') >= OPT->_minObs) { 452 478 required.push_back(new t_pppParam(t_pppParam::offGal, t_prn(), t_lc::dummy)); 479 } 480 else { 481 PPP_CLIENT->resetOffGal(); 482 } 483 484 // GPS Clock Offset 485 // -------------------- 486 if (_usedSystems.value('E') && _usedSystems.value('G') && _usedSystems.value('G') < OPT->_minObs) { 487 required.push_back(new t_pppParam(t_pppParam::offGps, t_prn(), t_lc::dummy)); 488 } 489 else { 490 PPP_CLIENT->resetOffGps(); 453 491 } 454 492 455 493 // BDS Clock Offset 456 494 // ---------------- 457 if ( (OPT->useSystem('G') && OPT->useSystem('C')) ||458 ( OPT->useSystem('E') && OPT->useSystem('C'))) {495 if (_usedSystems.contains('C') && 496 (_usedSystems.contains('G') || _usedSystems.contains('E'))) { 459 497 required.push_back(new t_pppParam(t_pppParam::offBds, t_prn(), t_lc::dummy)); 498 } 499 else { 500 PPP_CLIENT->resetOffBds(); 460 501 } 461 502 -
trunk/BNC/src/PPP/pppParlist.h
r10384 r10388 14 14 class t_pppParam { 15 15 public: 16 enum e_type {crdX, crdY, crdZ, rClk, offG lo, offGal, offBds, trp, ion, amb,16 enum e_type {crdX, crdY, crdZ, rClk, offGps, offGlo, offGal, offBds, trp, ion, amb, 17 17 cBiasG1, cBiasR1, cBiasE1, cBiasC1, pBiasG1, pBiasR1, pBiasE1, pBiasC1, 18 18 cBiasG2, cBiasR2, cBiasE2, cBiasC2, pBiasG2, pBiasR2, pBiasE2, pBiasC2}; … … 104 104 const std::vector<t_pppParam*>& params() const {return _params;} 105 105 std::vector<t_pppParam*>& params() {return _params;} 106 const QMap<char, int>& usedSystems() const {return _usedSystems;} 106 107 void printResult(const bncTime& epoTime, const SymmetricMatrix& QQ, 107 108 const ColumnVector& xx) const; … … 110 111 private: 111 112 std::vector<t_pppParam*> _params; 113 QMap<char, int> _usedSystems; 112 114 }; 113 115
Note:
See TracChangeset
for help on using the changeset viewer.