Index: /trunk/BNC/src/PPP/pppFilter.cpp
===================================================================
--- /trunk/BNC/src/PPP/pppFilter.cpp	(revision 9523)
+++ /trunk/BNC/src/PPP/pppFilter.cpp	(revision 9524)
@@ -86,6 +86,7 @@
   }
   const vector<t_pppParam*>& params = _parlist.params();
+  unsigned nPar = _parlist.nPar();
 #ifdef BNC_DEBUG_PPP
-  for (unsigned iPar = 0; iPar < params.size(); iPar++) {
+  for (unsigned iPar = 0; iPar < nPar; iPar++) {
     LOG << "t_pppFilter::processEpoch par_cur " << params[iPar]->toString()
         << "  lastObsTime().valid() " << params[iPar]->lastObsTime().valid()
@@ -99,9 +100,9 @@
   SymmetricMatrix QFltOld = _QFlt;
 
-  _QFlt.ReSize(_parlist.nPar()); _QFlt = 0.0;
-  _xFlt.ReSize(_parlist.nPar()); _xFlt = 0.0;
-  _x0.ReSize(_parlist.nPar());   _x0   = 0.0;
-
-  for (unsigned ii = 0; ii < params.size(); ii++) {
+  _QFlt.ReSize(nPar); _QFlt = 0.0;
+  _xFlt.ReSize(nPar); _xFlt = 0.0;
+  _x0.ReSize(nPar);   _x0   = 0.0;
+
+  for (unsigned ii = 0; ii < nPar; ii++) {
     t_pppParam* par1 = params[ii];
     if (QFltOld.size() == 0) {
@@ -227,4 +228,5 @@
   string                     epoTimeStr = string(_epoTime);
   const vector<t_pppParam*>& params     = _parlist.params();
+  unsigned nPar = _parlist.nPar();
 
   unsigned usedLCs     = LCs.size();
@@ -256,5 +258,5 @@
     // First-Design Matrix, Terms Observed-Computed, Weight Matrix
     // -----------------------------------------------------------
-    Matrix                AA(maxObs, _parlist.nPar());
+    Matrix                AA(maxObs, nPar);
     ColumnVector          ll(maxObs);
     DiagonalMatrix        PP(maxObs); PP = 0.0;
@@ -279,5 +281,5 @@
           usedObs.push_back(obs);
           usedTypes.push_back(tLC);
-          for (unsigned iPar = 0; iPar < params.size(); iPar++) {
+          for (unsigned iPar = 0; iPar < nPar; iPar++) {
             const t_pppParam* par = params[iPar];
             AA[iObs][iPar] = par->partial(_epoTime, obs, tLC, refPrn);
@@ -303,5 +305,5 @@
           usedObs.push_back(obs);
           usedTypes.push_back(tLC);
-          for (unsigned iPar = 0; iPar < params.size(); iPar++) {
+          for (unsigned iPar = 0; iPar < nPar; iPar++) {
             const t_pppParam* par = params[iPar];
             AA[iObs][iPar] = par->partial(_epoTime, obs, tLC, refPrn);
@@ -334,5 +336,5 @@
             usedObs.push_back(obs);
             usedTypes.push_back(tLC);
-            for (unsigned iPar = 0; iPar < params.size(); iPar++) {
+            for (unsigned iPar = 0; iPar < nPar; iPar++) {
               const t_pppParam* par = params[iPar];
               AA[iObs][iPar] = par->partial(_epoTime, obs, tLC, refPrn);
@@ -385,5 +387,5 @@
           << obs->prn().toString()                        << ' '
           << setw(8) << setprecision(4) << maxOutlier << endl;
-      for (unsigned iPar = 0; iPar < params.size(); iPar++) {
+      for (unsigned iPar = 0; iPar < nPar; iPar++) {
         t_pppParam* hlp = params[iPar];
         if (hlp->type() == t_pppParam::amb &&
@@ -461,4 +463,5 @@
   string epoTimeStr = string(_epoTime);
   const vector<t_pppParam*>& params  = _parlist.params();
+  unsigned nPar = _parlist.nPar();
 
   for (unsigned ii = 0; ii < LCs.size(); ii++) {
@@ -512,6 +515,6 @@
         else {
           if (refPrn != t_prn()) {return success;}
-          ColumnVector AA(params.size());
-          for (unsigned iPar = 0; iPar < params.size(); iPar++) {
+          ColumnVector AA(nPar);
+          for (unsigned iPar = 0; iPar < nPar; iPar++) {
             const t_pppParam* par = params[iPar];
             AA[iPar] = par->partial(_epoTime, obs, tLC, refPrn);
@@ -713,12 +716,12 @@
     return failure;
   }
-  vector<t_pppParam*>& _params = _parlist.params();
+  const vector<t_pppParam*>& params = _parlist.params();
   unsigned nPar = _parlist.nPar();
 #ifdef BNC_DEBUG_PPP
-  LOG << " t_pppFilter::datumTransformation par last epoch: " << _params.size() << "/" << nPar <<  endl;
+  LOG << " t_pppFilter::datumTransformation par last epoch: " << nPar << "/" << nPar <<  endl;
   for (unsigned iPar = 0; iPar < nPar; iPar++) {
-    LOG << "t_pppFilter::processEpoch par_cur " << _params[iPar]->toString()
-        << "  lastObsTime().valid() " << _params[iPar]->lastObsTime().valid()
-        << "  epoTime-params[iPar]->lastObsTime() " << (_epoTime - _params[iPar]->lastObsTime()) << endl;
+    LOG << "t_pppFilter::processEpoch par_cur " << params[iPar]->toString()
+        << "  lastObsTime().valid() " << params[iPar]->lastObsTime().valid()
+        << "  epoTime-params[iPar]->lastObsTime() " << (_epoTime - params[iPar]->lastObsTime()) << endl;
   }
 #endif
@@ -755,4 +758,5 @@
     }
     Matrix  AA(maxObs, nPar);
+
     // Real Observations
     // -----------------
@@ -765,6 +769,6 @@
         if (tLC == t_lc::Tz0) {continue;}
         ++iObs;
-        for (unsigned iPar = 0; iPar < _params.size(); iPar++) {
-          const t_pppParam* par = _params[iPar];
+        for (unsigned iPar = 0; iPar < nPar; iPar++) {
+          const t_pppParam* par = params[iPar];
           AA[iObs][iPar] = par->partial(_epoTime, obs, tLC, refPrn);
         }
@@ -783,6 +787,6 @@
           ++iObs;
           pseudoObsTropoConsidered = true;
-          for (unsigned iPar = 0; iPar < _params.size(); iPar++) {
-            const t_pppParam* par = _params[iPar];
+          for (unsigned iPar = 0; iPar < nPar; iPar++) {
+            const t_pppParam* par = params[iPar];
             AA[iObs][iPar] = par->partial(_epoTime, obs, tLC, refPrn);
           }
