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
