Index: trunk/BNC/src/PPP/filter.cpp
===================================================================
--- trunk/BNC/src/PPP/filter.cpp	(revision 5807)
+++ trunk/BNC/src/PPP/filter.cpp	(revision 5808)
@@ -7,9 +7,9 @@
 
 #include "filter.h"
+#include "bncutils.h"
 #include "parlist.h"
 #include "obspool.h"
 #include "station.h"
 #include "pppClient.h"
-#include "bncmodel.h"
 
 using namespace BNC;
@@ -212,5 +212,5 @@
     }
     ColumnVector dx;
-    bncModel::kalman(AA, ll, PP, _QFlt, dx);
+    kalman(AA, ll, PP, _QFlt, dx);
     _xFlt += dx;
     //// end test
Index: trunk/BNC/src/PPP/pppModel.cpp
===================================================================
--- trunk/BNC/src/PPP/pppModel.cpp	(revision 5807)
+++ trunk/BNC/src/PPP/pppModel.cpp	(revision 5808)
@@ -292,2 +292,44 @@
   return sumWind[prn.toInt()];  
 }
+
+// Tropospheric Model (Saastamoinen)
+////////////////////////////////////////////////////////////////////////////
+double t_tropo::delay_saast(const ColumnVector& xyz, double Ele) {
+
+  Tracer tracer("bncModel::delay_saast");
+
+  if (xyz[0] == 0.0 && xyz[1] == 0.0 && xyz[2] == 0.0) {
+    return 0.0;
+  }
+
+  double ell[3]; 
+  xyz2ell(xyz.data(), ell);
+  double height = ell[2];
+
+  double pp =  1013.25 * pow(1.0 - 2.26e-5 * height, 5.225);
+  double TT =  18.0 - height * 0.0065 + 273.15;
+  double hh =  50.0 * exp(-6.396e-4 * height);
+  double ee =  hh / 100.0 * exp(-37.2465 + 0.213166*TT - 0.000256908*TT*TT);
+
+  double h_km = height / 1000.0;
+  
+  if (h_km < 0.0) h_km = 0.0;
+  if (h_km > 5.0) h_km = 5.0;
+  int    ii   = int(h_km + 1);
+  double href = ii - 1;
+  
+  double bCor[6]; 
+  bCor[0] = 1.156;
+  bCor[1] = 1.006;
+  bCor[2] = 0.874;
+  bCor[3] = 0.757;
+  bCor[4] = 0.654;
+  bCor[5] = 0.563;
+  
+  double BB = bCor[ii-1] + (bCor[ii]-bCor[ii-1]) * (h_km - href);
+  
+  double zen  = M_PI/2.0 - Ele;
+
+  return (0.002277/cos(zen)) * (pp + ((1255.0/TT)+0.05)*ee - BB*(tan(zen)*tan(zen)));
+}
+
Index: trunk/BNC/src/PPP/pppModel.h
===================================================================
--- trunk/BNC/src/PPP/pppModel.h	(revision 5807)
+++ trunk/BNC/src/PPP/pppModel.h	(revision 5808)
@@ -54,4 +54,9 @@
 };
 
+class t_tropo {
+ public:  
+  static double delay_saast(const ColumnVector& xyz, double Ele);
+};
+
 }
 
Index: trunk/BNC/src/PPP/satobs.cpp
===================================================================
--- trunk/BNC/src/PPP/satobs.cpp	(revision 5807)
+++ trunk/BNC/src/PPP/satobs.cpp	(revision 5808)
@@ -51,5 +51,4 @@
 #include "obspool.h"
 #include "pppClient.h"
-#include "bncmodel.h"
 
 using namespace BNC;
@@ -234,5 +233,5 @@
   // Tropospheric Delay
   // ------------------
-  _model._tropo = bncModel::delay_saast(station->xyzApr(), station->ellApr()[2]);
+  _model._tropo = t_tropo::delay_saast(station->xyzApr(), station->ellApr()[2]);
 
   // Phase Wind-Up
Index: trunk/BNC/src/bncmodel.cpp
===================================================================
--- trunk/BNC/src/bncmodel.cpp	(revision 5807)
+++ trunk/BNC/src/bncmodel.cpp	(revision 5808)
@@ -346,5 +346,5 @@
   satData->rho = (satData->xx - xRec).norm_Frobenius();
 
-  double tropDelay = delay_saast(xRec, satData->eleSat) + 
+  double tropDelay = t_tropo::delay_saast(xRec, satData->eleSat) + 
                      trp() / sin(satData->eleSat);
 
@@ -385,45 +385,4 @@
   return satData->rho + phaseCenter + antennaOffset + clk() 
                       + offset - satData->clk + tropDelay + wind;
-}
-
-// Tropospheric Model (Saastamoinen)
-////////////////////////////////////////////////////////////////////////////
-double bncModel::delay_saast(const ColumnVector& xyz, double Ele) {
-
-  Tracer tracer("bncModel::delay_saast");
-
-  if (xyz[0] == 0.0 && xyz[1] == 0.0 && xyz[2] == 0.0) {
-    return 0.0;
-  }
-
-  double ell[3]; 
-  xyz2ell(xyz.data(), ell);
-  double height = ell[2];
-
-  double pp =  1013.25 * pow(1.0 - 2.26e-5 * height, 5.225);
-  double TT =  18.0 - height * 0.0065 + 273.15;
-  double hh =  50.0 * exp(-6.396e-4 * height);
-  double ee =  hh / 100.0 * exp(-37.2465 + 0.213166*TT - 0.000256908*TT*TT);
-
-  double h_km = height / 1000.0;
-  
-  if (h_km < 0.0) h_km = 0.0;
-  if (h_km > 5.0) h_km = 5.0;
-  int    ii   = int(h_km + 1);
-  double href = ii - 1;
-  
-  double bCor[6]; 
-  bCor[0] = 1.156;
-  bCor[1] = 1.006;
-  bCor[2] = 0.874;
-  bCor[3] = 0.757;
-  bCor[4] = 0.654;
-  bCor[5] = 0.563;
-  
-  double BB = bCor[ii-1] + (bCor[ii]-bCor[ii-1]) * (h_km - href);
-  
-  double zen  = M_PI/2.0 - Ele;
-
-  return (0.002277/cos(zen)) * (pp + ((1255.0/TT)+0.05)*ee - BB*(tan(zen)*tan(zen)));
 }
 
@@ -654,5 +613,5 @@
     else if (par->type == bncParam::TROPO) {
       ColumnVector xyz(3); xyz(1) = x(); xyz(2) = y(); xyz(3) = z();
-      double aprTrp = delay_saast(xyz, M_PI/2.0);
+      double aprTrp = t_tropo::delay_saast(xyz, M_PI/2.0);
       strB << "\n    trp     = " << par->prn.toAscii().data()
            << setw(7) << setprecision(3) << aprTrp << " "
Index: trunk/BNC/src/bncmodel.h
===================================================================
--- trunk/BNC/src/bncmodel.h	(revision 5807)
+++ trunk/BNC/src/bncmodel.h	(revision 5808)
@@ -98,6 +98,4 @@
   }
 
-  static double delay_saast(const ColumnVector& xyz, double Ele);
-
  private:
   void   reset();
Index: trunk/BNC/src/combination/bnccomb.cpp
===================================================================
--- trunk/BNC/src/combination/bnccomb.cpp	(revision 5807)
+++ trunk/BNC/src/combination/bnccomb.cpp	(revision 5808)
@@ -192,5 +192,5 @@
       cmbAC* AC = it.next();
       _params.push_back(new cmbParam(cmbParam::offACgps, ++nextPar, AC->name, ""));
-      for (int iGps = 1; iGps <= t_prn::MAXPRN_GPS; iGps++) {
+      for (unsigned iGps = 1; iGps <= t_prn::MAXPRN_GPS; iGps++) {
         QString prn = QString("G%1").arg(iGps, 2, 10, QChar('0'));
         _params.push_back(new cmbParam(cmbParam::offACSat, ++nextPar, 
@@ -199,5 +199,5 @@
       if (_useGlonass) {
         _params.push_back(new cmbParam(cmbParam::offACglo, ++nextPar, AC->name, ""));
-        for (int iGlo = 1; iGlo <= t_prn::MAXPRN_GLONASS; iGlo++) {
+        for (unsigned iGlo = 1; iGlo <= t_prn::MAXPRN_GLONASS; iGlo++) {
           QString prn = QString("R%1").arg(iGlo, 2, 10, QChar('0'));
           _params.push_back(new cmbParam(cmbParam::offACSat, ++nextPar, 
@@ -206,10 +206,10 @@
       }
     }
-    for (int iGps = 1; iGps <= t_prn::MAXPRN_GPS; iGps++) {
+    for (unsigned iGps = 1; iGps <= t_prn::MAXPRN_GPS; iGps++) {
       QString prn = QString("G%1").arg(iGps, 2, 10, QChar('0'));
       _params.push_back(new cmbParam(cmbParam::clkSat, ++nextPar, "", prn));
     }
     if (_useGlonass) {
-      for (int iGlo = 1; iGlo <= t_prn::MAXPRN_GLONASS; iGlo++) {
+      for (unsigned iGlo = 1; iGlo <= t_prn::MAXPRN_GLONASS; iGlo++) {
         QString prn = QString("R%1").arg(iGlo, 2, 10, QChar('0'));
         _params.push_back(new cmbParam(cmbParam::clkSat, ++nextPar, "", prn));
@@ -594,5 +594,5 @@
     }
 
-    bncModel::kalman(AA, ll, PP, _QQ, dx);
+    kalman(AA, ll, PP, _QQ, dx);
     ColumnVector vv = ll - AA * dx;
 
@@ -806,5 +806,5 @@
     }
     int iCond = 1;
-    for (int iGps = 1; iGps <= t_prn::MAXPRN_GPS; iGps++) {
+    for (unsigned iGps = 1; iGps <= t_prn::MAXPRN_GPS; iGps++) {
       QString prn = QString("G%1").arg(iGps, 2, 10, QChar('0'));
       ++iCond;
