Changeset 3310 in ntrip
- Timestamp:
- Jun 21, 2011, 6:25:35 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncmodel.cpp
r3309 r3310 479 479 void bncModel::predict(int iPhase, t_epoData* epoData) { 480 480 481 bncSettings settings; 482 483 _time = epoData->tt; // current epoch time 484 485 _maxSolGap = settings.value("pppMaxSolGap").toDouble(); 486 487 bool firstCrd = false; 488 if (!_lastTimeOK.valid() || (_maxSolGap > 0 && _time - _lastTimeOK > _maxSolGap)) { 489 firstCrd = true; 490 _startTime = epoData->tt; 491 reset(); 492 } 493 494 // Use different white noise for Quick-Start mode 495 // ---------------------------------------------- 496 double sigCrdP_used = _sigCrdP; 497 if ( _quickStart > 0.0 && _quickStart > (epoData->tt - _startTime) ) { 498 sigCrdP_used = 0.0; 499 } 500 501 // Predict Parameter values, add white noise 502 // ----------------------------------------- 503 for (int iPar = 1; iPar <= _params.size(); iPar++) { 504 bncParam* pp = _params[iPar-1]; 505 506 // Coordinates 507 // ----------- 508 if (pp->type == bncParam::CRD_X) { 509 if (firstCrd) { 510 if (settings.value("pppRefCrdX").toString() != "" && 511 settings.value("pppRefCrdY").toString() != "" && 512 settings.value("pppRefCrdZ").toString() != "") { 513 pp->xx = settings.value("pppRefCrdX").toDouble(); 481 if (iPhase == 0) { 482 483 bncSettings settings; 484 485 _time = epoData->tt; // current epoch time 486 487 _maxSolGap = settings.value("pppMaxSolGap").toDouble(); 488 489 bool firstCrd = false; 490 if (!_lastTimeOK.valid() || (_maxSolGap > 0 && _time - _lastTimeOK > _maxSolGap)) { 491 firstCrd = true; 492 _startTime = epoData->tt; 493 reset(); 494 } 495 496 // Use different white noise for Quick-Start mode 497 // ---------------------------------------------- 498 double sigCrdP_used = _sigCrdP; 499 if ( _quickStart > 0.0 && _quickStart > (epoData->tt - _startTime) ) { 500 sigCrdP_used = 0.0; 501 } 502 503 // Predict Parameter values, add white noise 504 // ----------------------------------------- 505 for (int iPar = 1; iPar <= _params.size(); iPar++) { 506 bncParam* pp = _params[iPar-1]; 507 508 // Coordinates 509 // ----------- 510 if (pp->type == bncParam::CRD_X) { 511 if (firstCrd) { 512 if (settings.value("pppRefCrdX").toString() != "" && 513 settings.value("pppRefCrdY").toString() != "" && 514 settings.value("pppRefCrdZ").toString() != "") { 515 pp->xx = settings.value("pppRefCrdX").toDouble(); 516 } 517 else { 518 pp->xx = _xcBanc(1); 519 } 514 520 } 515 else { 516 pp->xx = _xcBanc(1); 521 _QQ(iPar,iPar) += sigCrdP_used * sigCrdP_used; 522 } 523 else if (pp->type == bncParam::CRD_Y) { 524 if (firstCrd) { 525 if (settings.value("pppRefCrdX").toString() != "" && 526 settings.value("pppRefCrdY").toString() != "" && 527 settings.value("pppRefCrdZ").toString() != "") { 528 pp->xx = settings.value("pppRefCrdY").toDouble(); 529 } 530 else { 531 pp->xx = _xcBanc(2); 532 } 517 533 } 518 } 519 _QQ(iPar,iPar) += sigCrdP_used * sigCrdP_used; 520 } 521 else if (pp->type == bncParam::CRD_Y) { 522 if (firstCrd) { 523 if (settings.value("pppRefCrdX").toString() != "" && 524 settings.value("pppRefCrdY").toString() != "" && 525 settings.value("pppRefCrdZ").toString() != "") { 526 pp->xx = settings.value("pppRefCrdY").toDouble(); 534 _QQ(iPar,iPar) += sigCrdP_used * sigCrdP_used; 535 } 536 else if (pp->type == bncParam::CRD_Z) { 537 if (firstCrd) { 538 if (settings.value("pppRefCrdX").toString() != "" && 539 settings.value("pppRefCrdY").toString() != "" && 540 settings.value("pppRefCrdZ").toString() != "") { 541 pp->xx = settings.value("pppRefCrdZ").toDouble(); 542 } 543 else { 544 pp->xx = _xcBanc(3); 545 } 527 546 } 528 else { 529 pp->xx = _xcBanc(2); 547 _QQ(iPar,iPar) += sigCrdP_used * sigCrdP_used; 548 } 549 550 // Receiver Clocks 551 // --------------- 552 else if (pp->type == bncParam::RECCLK) { 553 pp->xx = _xcBanc(4); 554 for (int jj = 1; jj <= _params.size(); jj++) { 555 _QQ(iPar, jj) = 0.0; 530 556 } 531 } 532 _QQ(iPar,iPar) += sigCrdP_used * sigCrdP_used; 533 } 534 else if (pp->type == bncParam::CRD_Z) { 535 if (firstCrd) { 536 if (settings.value("pppRefCrdX").toString() != "" && 537 settings.value("pppRefCrdY").toString() != "" && 538 settings.value("pppRefCrdZ").toString() != "") { 539 pp->xx = settings.value("pppRefCrdZ").toDouble(); 540 } 541 else { 542 pp->xx = _xcBanc(3); 543 } 544 } 545 _QQ(iPar,iPar) += sigCrdP_used * sigCrdP_used; 546 } 547 548 // Receiver Clocks 549 // --------------- 550 else if (pp->type == bncParam::RECCLK) { 551 pp->xx = _xcBanc(4); 552 for (int jj = 1; jj <= _params.size(); jj++) { 553 _QQ(iPar, jj) = 0.0; 554 } 555 _QQ(iPar,iPar) = _sigClk0 * _sigClk0; 556 } 557 558 // Tropospheric Delay 559 // ------------------ 560 else if (pp->type == bncParam::TROPO) { 561 _QQ(iPar,iPar) += _sigTrpP * _sigTrpP; 562 } 563 564 // Galileo Offset 565 // -------------- 566 else if (pp->type == bncParam::GALILEO_OFFSET) { 567 _QQ(iPar,iPar) += _sigGalileoOffsetP * _sigGalileoOffsetP; 557 _QQ(iPar,iPar) = _sigClk0 * _sigClk0; 558 } 559 560 // Tropospheric Delay 561 // ------------------ 562 else if (pp->type == bncParam::TROPO) { 563 _QQ(iPar,iPar) += _sigTrpP * _sigTrpP; 564 } 565 566 // Galileo Offset 567 // -------------- 568 else if (pp->type == bncParam::GALILEO_OFFSET) { 569 _QQ(iPar,iPar) += _sigGalileoOffsetP * _sigGalileoOffsetP; 570 } 568 571 } 569 572 }
Note:
See TracChangeset
for help on using the changeset viewer.