Changeset 3442 in ntrip for trunk/BNC/combination
- Timestamp:
- Sep 22, 2011, 12:36:00 PM (13 years ago)
- Location:
- trunk/BNC/combination
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/combination/bnccomb.cpp
r3441 r3442 33 33 34 34 const double sig0_offAC = 1000.0; 35 const double sig0_offACSat = 100.0;35 const double sig0_offACSat = 1000.0; 36 36 const double sigP_offACSat = 0.0; 37 const double sig0_clkSat = 100.0;38 const double sigP_clkSat = 100.0;37 const double sig0_clkSat = 10.0; 38 const double sigP_clkSat = 0.1; 39 39 40 40 const double sigObs = 0.05; … … 54 54 prn = prn_; 55 55 xx = 0.0; 56 eph = 0; 56 57 57 58 if (type == offAC) { … … 185 186 } 186 187 187 // Not yet regularized188 // -------------------189 _firstReg = false;190 191 188 // Maximal Residuum 192 189 // ---------------- … … 340 337 XYZ_to_RSW(newXC.Rows(1,3), newVV, dV, dDotRAO); 341 338 342 QString msg = "switch " + corr->prn339 QString msg = "switch corr " + corr->prn 343 340 + QString(" %1 -> %2 %3").arg(corr->iod,3) 344 341 .arg(lastEph->IOD(),3).arg(dC*t_CST::c, 8, 'f', 4); … … 386 383 ColumnVector x0(nPar); 387 384 for (int iPar = 1; iPar <= _params.size(); iPar++) { 388 cmbParam* pp = _params[iPar-1]; 385 cmbParam* pp = _params[iPar-1]; 386 QString prn = pp->prn; 387 if (!prn.isEmpty() && _eph.find(prn) != _eph.end()) { 388 switchToLastEph(_eph[prn]->last, pp); 389 } 389 390 if (pp->epoSpec) { 390 391 pp->xx = 0.0; … … 650 651 } 651 652 652 const int nCon = (_firstReg == false) ? 2 + MAXPRN_GPS :2;653 const int nCon = 2; 653 654 654 655 AA.ReSize(nObs+nCon, nPar); AA = 0.0; … … 680 681 // -------------- 681 682 const double Ph = 1.e6; 682 int iCond = 1;683 PP(nObs+ iCond)= Ph;683 PP(nObs+1) = Ph; 684 PP(nObs+2) = Ph; 684 685 for (int iPar = 1; iPar <= _params.size(); iPar++) { 685 686 cmbParam* pp = _params[iPar-1]; 686 if (pp->type == cmbParam::clkSat && 687 AA.Column(iPar).maximum_absolute_value() > 0.0) { 688 AA(nObs+iCond, iPar) = 1.0; 689 } 690 } 691 692 ++iCond; 693 PP(nObs+iCond) = Ph; 694 for (int iPar = 1; iPar <= _params.size(); iPar++) { 695 cmbParam* pp = _params[iPar-1]; 696 if (pp->type == cmbParam::offAC && 697 AA.Column(iPar).maximum_absolute_value() > 0.0) { 698 AA(nObs+iCond, iPar) = 1.0; 699 } 700 } 701 702 if (!_firstReg) { 703 _firstReg = true; 704 for (int iGps = 1; iGps <= MAXPRN_GPS; iGps++) { 705 ++iCond; 706 QString prn = QString("G%1").arg(iGps, 2, 10, QChar('0')); 707 PP(nObs+1+iGps) = Ph; 708 for (int iPar = 1; iPar <= _params.size(); iPar++) { 709 cmbParam* pp = _params[iPar-1]; 710 if (pp->type == cmbParam::offACSat && pp->prn == prn) { 711 AA(nObs+iCond, iPar) = 1.0; 712 } 713 } 687 if (pp->type == cmbParam::clkSat) { 688 AA(nObs+1, iPar) = 1.0; 689 } 690 else if (pp->type == cmbParam::offAC) { 691 AA(nObs+2, iPar) = 1.0; 714 692 } 715 693 } … … 717 695 return success; 718 696 } 697 698 // Change the parameter so that it refers to last received ephemeris 699 //////////////////////////////////////////////////////////////////////////// 700 void bncComb::switchToLastEph(const t_eph* lastEph, cmbParam* pp) { 701 702 if (pp->type != cmbParam::clkSat) { 703 return; 704 } 705 706 if (pp->eph == 0) { 707 pp->eph = lastEph; 708 return; 709 } 710 711 if (pp->eph == lastEph) { 712 return; 713 } 714 715 ColumnVector oldXC(4); 716 ColumnVector oldVV(3); 717 pp->eph->position(_resTime.gpsw(), _resTime.gpssec(), 718 oldXC.data(), oldVV.data()); 719 720 ColumnVector newXC(4); 721 ColumnVector newVV(3); 722 lastEph->position(_resTime.gpsw(), _resTime.gpssec(), 723 newXC.data(), newVV.data()); 724 725 double dC = newXC(4) - oldXC(4); 726 727 QString msg = "switch param " + pp->prn 728 + QString(" %1 -> %2 %3").arg(pp->eph->IOD(),3) 729 .arg(lastEph->IOD(),3).arg(dC*t_CST::c, 8, 'f', 4); 730 731 emit newMessage(msg.toAscii(), false); 732 733 pp->eph = lastEph; 734 pp->xx += dC * t_CST::c; 735 } 736 -
trunk/BNC/combination/bnccomb.h
r3440 r3442 26 26 double sigP; 27 27 bool epoSpec; 28 const t_eph* eph; 28 29 }; 29 30 … … 78 79 void printResults(QTextStream& out, const QMap<QString, t_corr*>& resCorr); 79 80 void switchToLastEph(const t_eph* lastEph, t_corr* corr); 81 void switchToLastEph(const t_eph* lastEph, cmbParam* pp); 80 82 81 83 QVector<cmbCorr*>& corrs() {return _buffer[_resTime].corrs;} … … 87 89 bncRtnetDecoder* _rtnetDecoder; 88 90 SymmetricMatrix _QQ; 89 bool _firstReg;90 91 QByteArray _log; 91 92 bncAntex* _antex;
Note:
See TracChangeset
for help on using the changeset viewer.