Changeset 3134 in ntrip for trunk/BNC/combination
- Timestamp:
- Mar 25, 2011, 12:51:09 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/combination/bnccomb.cpp
r3081 r3134 31 31 using namespace std; 32 32 33 const int MAXPRN_GPS = 32; 34 33 35 // Constructor 34 36 //////////////////////////////////////////////////////////////////////////// … … 137 139 it.next(); 138 140 cmbAC* AC = it.value(); 139 if (AC->name != _masterAC) { 140 _params.push_back(new cmbParam(cmbParam::AC_offset, ++nextPar, 141 AC->name, "", sigAC_0, sigAC_P)); 142 for (int iGps = 1; iGps <= 32; iGps++) { 143 QString prn = QString("G%1").arg(iGps, 2, 10, QChar('0')); 144 _params.push_back(new cmbParam(cmbParam::Sat_offset, ++nextPar, 145 AC->name, prn, sigSat_0, sigSat_P)); 146 } 147 } 148 } 149 for (int iGps = 1; iGps <= 32; iGps++) { 141 _params.push_back(new cmbParam(cmbParam::AC_offset, ++nextPar, 142 AC->name, "", sigAC_0, sigAC_P)); 143 for (int iGps = 1; iGps <= MAXPRN_GPS; iGps++) { 144 QString prn = QString("G%1").arg(iGps, 2, 10, QChar('0')); 145 _params.push_back(new cmbParam(cmbParam::Sat_offset, ++nextPar, 146 AC->name, prn, sigSat_0, sigSat_P)); 147 } 148 } 149 for (int iGps = 1; iGps <= MAXPRN_GPS; iGps++) { 150 150 QString prn = QString("G%1").arg(iGps, 2, 10, QChar('0')); 151 151 _params.push_back(new cmbParam(cmbParam::clk, ++nextPar, "", prn, … … 598 598 599 599 if (nObs > 0) { 600 Matrix AA(nObs, nPar); 601 ColumnVector ll(nObs); 602 DiagonalMatrix PP(nObs); PP = 1.0; 600 const int nCon = 2 + MAXPRN_GPS; 601 Matrix AA(nObs+nCon, nPar); AA = 0.0; 602 ColumnVector ll(nObs+nCon); ll = 0.0; 603 DiagonalMatrix PP(nObs+nCon); PP = 1.0; 603 604 604 605 int iObs = 0; … … 628 629 } 629 630 631 // Regularization 632 // -------------- 633 const double Ph = 1.e6; 634 int iCond = 1; 635 PP(nObs+iCond) = Ph; 636 for (int iPar = 1; iPar <= _params.size(); iPar++) { 637 cmbParam* pp = _params[iPar-1]; 638 if (pp->type == cmbParam::AC_offset) { 639 AA(nObs+iCond, iPar) = 1.0; 640 } 641 } 642 643 ++iCond; 644 PP(nObs+iCond) = Ph; 645 for (int iPar = 1; iPar <= _params.size(); iPar++) { 646 cmbParam* pp = _params[iPar-1]; 647 if (pp->type == cmbParam::clk) { 648 AA(nObs+iCond, iPar) = 1.0; 649 } 650 } 651 652 for (int iGps = 1; iGps <= MAXPRN_GPS; iGps++) { 653 ++iCond; 654 QString prn = QString("G%1").arg(iGps, 2, 10, QChar('0')); 655 PP(nObs+1+iGps) = Ph; 656 for (int iPar = 1; iPar <= _params.size(); iPar++) { 657 cmbParam* pp = _params[iPar-1]; 658 if (pp->type == cmbParam::Sat_offset && pp->prn == prn) { 659 AA(nObs+iCond, iPar) = 1.0; 660 } 661 } 662 } 663 630 664 const double MAXRES = 999.10; // TODO: make it an option 631 665
Note:
See TracChangeset
for help on using the changeset viewer.