Index: trunk/BNC/src/PPP/pppClient.cpp
===================================================================
--- trunk/BNC/src/PPP/pppClient.cpp	(revision 7287)
+++ trunk/BNC/src/PPP/pppClient.cpp	(revision 7288)
@@ -129,4 +129,12 @@
   for (unsigned ii = 0; ii < biases.size(); ii++) {
     _obsPool->putCodeBias(new t_satCodeBias(*biases[ii]));
+  }
+}
+
+//
+//////////////////////////////////////////////////////////////////////////////
+void t_pppClient::putPhaseBiases(const vector<t_satPhaseBias*>& biases) {
+  for (unsigned ii = 0; ii < biases.size(); ii++) {
+    _obsPool->putPhaseBias(new t_satPhaseBias(*biases[ii]));
   }
 }
Index: trunk/BNC/src/PPP/pppClient.h
===================================================================
--- trunk/BNC/src/PPP/pppClient.h	(revision 7287)
+++ trunk/BNC/src/PPP/pppClient.h	(revision 7288)
@@ -21,12 +21,13 @@
 class t_pppClient : public interface_pppClient {
  public:
-  t_pppClient(const t_pppOptions* opt);                                                      
-  ~t_pppClient();                                                     
+  t_pppClient(const t_pppOptions* opt);
+  ~t_pppClient();
 
-  void putEphemeris(const t_eph* eph);                  
+  void putEphemeris(const t_eph* eph);
   void putTec(const t_vTec* vTec);
-  void putOrbCorrections(const std::vector<t_orbCorr*>& corr); 
-  void putClkCorrections(const std::vector<t_clkCorr*>& corr); 
-  void putCodeBiases(const std::vector<t_satCodeBias*>& satBias);   
+  void putOrbCorrections(const std::vector<t_orbCorr*>& corr);
+  void putClkCorrections(const std::vector<t_clkCorr*>& corr);
+  void putCodeBiases(const std::vector<t_satCodeBias*>& biases);
+  void putPhaseBiases(const std::vector<t_satPhaseBias*>& biases);
   void processEpoch(const std::vector<t_satObs*>& satObs, t_output* output);
 
@@ -52,5 +53,5 @@
   t_irc cmpModel(t_pppStation* station, const ColumnVector& xyzc,
                  std::vector<t_pppSatObs*>& obsVector);
-  t_irc cmpBancroft(const bncTime& epoTime, std::vector<t_pppSatObs*>& obsVector, 
+  t_irc cmpBancroft(const bncTime& epoTime, std::vector<t_pppSatObs*>& obsVector,
                     ColumnVector& xyzc, bool print);
   double cmpOffGG(std::vector<t_pppSatObs*>& obsVector);
@@ -65,6 +66,6 @@
   double                    _offGG;
   std::vector<t_pppSatObs*> _obsRover;
-  std::ostringstream*       _log; 
-  t_pppOptions*             _opt; 
+  std::ostringstream*       _log;
+  t_pppOptions*             _opt;
   t_tides*                  _tides;
 };
Index: trunk/BNC/src/PPP/pppObsPool.cpp
===================================================================
--- trunk/BNC/src/PPP/pppObsPool.cpp	(revision 7287)
+++ trunk/BNC/src/PPP/pppObsPool.cpp	(revision 7288)
@@ -11,5 +11,5 @@
  * Created:    29-Jul-2014
  *
- * Changes:    
+ * Changes:
  *
  * -----------------------------------------------------------------------*/
@@ -44,4 +44,7 @@
     _satCodeBiases[ii] = 0;
   }
+  for (unsigned ii = 0; ii <= t_prn::MAXPRN; ii++) {
+    _satPhaseBiases[ii] = 0;
+  }
   _vTec = 0;
 }
@@ -70,4 +73,12 @@
 //
 /////////////////////////////////////////////////////////////////////////////
+void t_pppObsPool::putPhaseBias(t_satPhaseBias* satPhaseBias) {
+  int iPrn = satPhaseBias->_prn.toInt();
+  delete _satPhaseBiases[iPrn];
+  _satPhaseBiases[iPrn] = satPhaseBias;
+}
+
+//
+/////////////////////////////////////////////////////////////////////////////
 void t_pppObsPool::putTec(t_vTec* vTec) {
    delete _vTec;
Index: trunk/BNC/src/PPP/pppObsPool.h
===================================================================
--- trunk/BNC/src/PPP/pppObsPool.h	(revision 7287)
+++ trunk/BNC/src/PPP/pppObsPool.h	(revision 7288)
@@ -10,5 +10,5 @@
 
 class t_pppObsPool {
- public: 
+ public:
 
   class t_epoch {
@@ -27,10 +27,14 @@
   ~t_pppObsPool();
   void putCodeBias(t_satCodeBias* satCodeBias);
+  void putPhaseBias(t_satPhaseBias* satPhaseBias);
   void putTec(t_vTec* _vTec);
 
   void putEpoch(const bncTime& epoTime, std::vector<t_pppSatObs*>& obsVector);
 
-  const t_satCodeBias* satCodeBias(const t_prn& prn) const {  
+  const t_satCodeBias* satCodeBias(const t_prn& prn) const {
     return _satCodeBiases[prn.toInt()];
+  }
+  const t_satPhaseBias* satPhaseBias(const t_prn& prn) const {
+    return _satPhaseBiases[prn.toInt()];
   }
   const t_vTec* vTec() const {return _vTec;}
@@ -47,4 +51,5 @@
  private:
   t_satCodeBias*       _satCodeBiases[t_prn::MAXPRN+1];
+  t_satPhaseBias*      _satPhaseBiases[t_prn::MAXPRN+1];
   t_vTec*              _vTec;
   std::deque<t_epoch*> _epochs;
Index: trunk/BNC/src/PPP/pppSatObs.cpp
===================================================================
--- trunk/BNC/src/PPP/pppSatObs.cpp	(revision 7287)
+++ trunk/BNC/src/PPP/pppSatObs.cpp	(revision 7288)
@@ -11,5 +11,5 @@
  * Created:    29-Jul-2014
  *
- * Changes:    
+ * Changes:
  *
  * -----------------------------------------------------------------------*/
@@ -53,5 +53,5 @@
 }
 
-// 
+//
 ////////////////////////////////////////////////////////////////////////////
 void t_pppSatObs::prepareObs(const t_satObs& pppSatObs) {
@@ -122,9 +122,9 @@
       break;
     }
-    satPosOld = _xcSat; 
+    satPosOld = _xcSat;
   }
   if (totOK) {
     _signalPropagationTime = prange / t_CST::c - _xcSat[3];
-    _model._satClkM = _xcSat[3] * t_CST::c; 
+    _model._satClkM = _xcSat[3] * t_CST::c;
   }
   else {
@@ -133,7 +133,7 @@
 }
 
-// 
-////////////////////////////////////////////////////////////////////////////
-void t_pppSatObs::lcCoeff(t_lc::type tLC, 
+//
+////////////////////////////////////////////////////////////////////////////
+void t_pppSatObs::lcCoeff(t_lc::type tLC,
                           map<t_frequency::type, double>& codeCoeff,
                           map<t_frequency::type, double>& phaseCoeff) const {
@@ -147,14 +147,14 @@
   switch (tLC) {
   case t_lc::l1:
-    phaseCoeff[_fType1] = 1.0;  
-    return;
-  case t_lc::l2:  
-    phaseCoeff[_fType2] = 1.0;  
-    return;
-  case t_lc::lIF: 
+    phaseCoeff[_fType1] = 1.0;
+    return;
+  case t_lc::l2:
+    phaseCoeff[_fType2] = 1.0;
+    return;
+  case t_lc::lIF:
     phaseCoeff[_fType1] =  f1 * f1 / (f1 * f1 - f2 * f2);
     phaseCoeff[_fType2] = -f2 * f2 / (f1 * f1 - f2 * f2);
     return;
-  case t_lc::MW:  
+  case t_lc::MW:
     phaseCoeff[_fType1] =  f1 / (f1 - f2);
     phaseCoeff[_fType2] = -f2 / (f1 - f2);
@@ -162,25 +162,25 @@
     codeCoeff[_fType2]  = -f2 / (f1 + f2);
     return;
-  case t_lc::CL:  
+  case t_lc::CL:
     phaseCoeff[_fType1] =  0.5;
     codeCoeff[_fType1]  =  0.5;
     return;
-  case t_lc::c1:  
-    codeCoeff[_fType1] = 1.0;  
-    return;
-  case t_lc::c2:  
-    codeCoeff[_fType2] = 1.0;  
-    return;
-  case t_lc::cIF: 
+  case t_lc::c1:
+    codeCoeff[_fType1] = 1.0;
+    return;
+  case t_lc::c2:
+    codeCoeff[_fType2] = 1.0;
+    return;
+  case t_lc::cIF:
     codeCoeff[_fType1] =  f1 * f1 / (f1 * f1 - f2 * f2);
     codeCoeff[_fType2] = -f2 * f2 / (f1 * f1 - f2 * f2);
     return;
-  case t_lc::dummy: 
-  case t_lc::maxLc: 
-    return;
-  }
-}
-
-// 
+  case t_lc::dummy:
+  case t_lc::maxLc:
+    return;
+  }
+}
+
+//
 ////////////////////////////////////////////////////////////////////////////
 bool t_pppSatObs::isValid(t_lc::type tLC) const {
@@ -189,5 +189,5 @@
   return valid;
 }
-// 
+//
 ////////////////////////////////////////////////////////////////////////////
 double t_pppSatObs::obsValue(t_lc::type tLC, bool* valid) const {
@@ -225,5 +225,5 @@
 }
 
-// 
+//
 ////////////////////////////////////////////////////////////////////////////
 double t_pppSatObs::lambda(t_lc::type tLC) const {
@@ -251,5 +251,5 @@
 }
 
-// 
+//
 ////////////////////////////////////////////////////////////////////////////
 double t_pppSatObs::sigma(t_lc::type tLC) const {
@@ -268,6 +268,6 @@
     retVal += it->second * it->second * OPT->_sigmaL1 * OPT->_sigmaL1;
   }
-  
-  retVal = sqrt(retVal);    
+
+  retVal = sqrt(retVal);
 
   // De-Weight GLONASS
@@ -290,5 +290,5 @@
 }
 
-// 
+//
 ////////////////////////////////////////////////////////////////////////////
 double t_pppSatObs::maxRes(t_lc::type tLC) const {
@@ -312,5 +312,5 @@
 
 
-// 
+//
 ////////////////////////////////////////////////////////////////////////////
 t_irc t_pppSatObs::cmpModel(const t_pppStation* station) {
@@ -323,5 +323,5 @@
   // ------------------------------
   ColumnVector rSat = _xcSat.Rows(1,3);
-  ColumnVector rhoV = rSat - station->xyzApr(); 
+  ColumnVector rhoV = rSat - station->xyzApr();
   _model._rho = rhoV.norm_Frobenius();
 
@@ -361,5 +361,5 @@
       t_frequency::type frqType = static_cast<t_frequency::type>(ii);
       bool found;
-      _model._antPCO[ii] = PPP_CLIENT->antex()->rcvCorr(station->antName(), frqType, 
+      _model._antPCO[ii] = PPP_CLIENT->antex()->rcvCorr(station->antName(), frqType,
                                                         _model._eleSat, _model._azSat, found);
     }
@@ -377,5 +377,5 @@
   // -----------
   const t_satCodeBias* satCodeBias = PPP_CLIENT->obsPool()->satCodeBias(_prn);
-  if (satCodeBias) { 
+  if (satCodeBias) {
     for (unsigned ii = 0; ii < satCodeBias->_bias.size(); ii++) {
       const t_frqCodeBias& bias = satCodeBias->_bias[ii];
@@ -389,4 +389,20 @@
   }
 
+  // Phase Biases
+  // -----------
+  // TODO: consideration of fix indicators, yaw angle and jump counter
+  const t_satPhaseBias* satPhaseBias = PPP_CLIENT->obsPool()->satPhaseBias(_prn);
+  if (satPhaseBias) {
+    for (unsigned ii = 0; ii < satPhaseBias->_bias.size(); ii++) {
+      const t_frqPhaseBias& bias = satPhaseBias->_bias[ii];
+      for (unsigned iFreq = 1; iFreq < t_frequency::max; iFreq++) {
+        const t_frqObs* obs = _obs[iFreq];
+        if (obs && obs->_rnxType2ch == bias._rnxType2ch) {
+          _model._phaseBias[iFreq]  = bias._value;
+        }
+      }
+    }
+  }
+
   // Tidal Correction
   // ----------------
@@ -424,5 +440,5 @@
 }
 
-// 
+//
 ////////////////////////////////////////////////////////////////////////////
 void t_pppSatObs::printModel() const {
@@ -442,8 +458,11 @@
   for (unsigned iFreq = 1; iFreq < t_frequency::max; iFreq++) {
     if (_obs[iFreq]) {
-      LOG << "PCO           : " << t_frequency::toString(t_frequency::type(iFreq)) << setw(12) << setprecision(3) << _model._antPCO[iFreq]    << endl
-          << "BIAS CODE     : " << t_frequency::toString(t_frequency::type(iFreq)) << setw(12) << setprecision(3) << _model._codeBias[iFreq]  << endl
-          << "BIAS PHASE    : " << t_frequency::toString(t_frequency::type(iFreq)) << setw(12) << setprecision(3) << _model._phaseBias[iFreq]  << endl
-          << "IONO CODEDELAY: " << t_frequency::toString(t_frequency::type(iFreq)) << setw(12) << setprecision(3) << _model._ionoCodeDelay[iFreq] << endl;
+      string frqStr = t_frequency::toString(t_frequency::type(iFreq));
+      if (_prn.system() == frqStr[0]) {
+      LOG << "PCO           : " << frqStr << setw(12) << setprecision(3) << _model._antPCO[iFreq]    << endl
+          << "BIAS CODE     : " << frqStr << setw(12) << setprecision(3) << _model._codeBias[iFreq]  << endl
+          << "BIAS PHASE    : " << frqStr << setw(12) << setprecision(3) << _model._phaseBias[iFreq]  << endl
+          << "IONO CODEDELAY: " << frqStr << setw(12) << setprecision(3) << _model._ionoCodeDelay[iFreq] << endl;
+      }
     }
   }
@@ -456,5 +475,5 @@
 
   }
-  LOG << "OBS-CMP MW: " << _prn.toString() << " " 
+  LOG << "OBS-CMP MW: " << _prn.toString() << " "
       << setw(12) << setprecision(3) << obsValue(t_lc::MW) << " "
       << setw(12) << setprecision(3) << cmpValue(t_lc::MW) << " "
@@ -462,5 +481,5 @@
 }
 
-// 
+//
 ////////////////////////////////////////////////////////////////////////////
 double t_pppSatObs::cmpValueForBanc(t_lc::type tLC) const {
@@ -468,5 +487,5 @@
 }
 
-// 
+//
 ////////////////////////////////////////////////////////////////////////////
 double t_pppSatObs::cmpValue(t_lc::type tLC) const {
@@ -478,6 +497,6 @@
   // Non-Dispersive Part
   // -------------------
-  double nonDisp = _model._rho    + _model._recClkM - _model._satClkM 
-                 + _model._sagnac + _model._antEcc  + _model._tropo 
+  double nonDisp = _model._rho    + _model._recClkM - _model._satClkM
+                 + _model._sagnac + _model._antEcc  + _model._tropo
                  + _model._tide;
 
@@ -506,5 +525,5 @@
 }
 
-// 
+//
 ////////////////////////////////////////////////////////////////////////////
 void t_pppSatObs::setRes(t_lc::type tLC, double res) {
@@ -512,5 +531,5 @@
 }
 
-// 
+//
 ////////////////////////////////////////////////////////////////////////////
 double t_pppSatObs::getRes(t_lc::type tLC) const {
Index: trunk/BNC/src/PPP_SSR_I/pppClient.cpp
===================================================================
--- trunk/BNC/src/PPP_SSR_I/pppClient.cpp	(revision 7287)
+++ trunk/BNC/src/PPP_SSR_I/pppClient.cpp	(revision 7288)
@@ -35,5 +35,5 @@
  * Created:    21-Nov-2009
  *
- * Changes:    
+ * Changes:
  *
  * -----------------------------------------------------------------------*/
@@ -76,10 +76,10 @@
 ////////////////////////////////////////////////////////////////////////////
 void t_pppClient::processEpoch(const vector<t_satObs*>& satObs, t_output* output) {
-  
+
   // Convert and store observations
   // ------------------------------
   _epoData->clear();
   for (unsigned ii = 0; ii < satObs.size(); ii++) {
-    const t_satObs* obs     = satObs[ii]; 
+    const t_satObs* obs     = satObs[ii];
     t_prn prn = obs->_prn;
     if (prn.system() == 'E') {prn.setFlags(1);} // force I/NAV usage
@@ -145,5 +145,5 @@
     QString    prn     = it.key();
     t_satData* satData = it.value();
-    
+
     if (cmpToT(satData) != success) {
       delete satData;
@@ -211,5 +211,5 @@
   // ------------------------
   else if (satData->system() == 'R' && _opt->useSystem('R')) {
-    if (satData->P1 != 0.0 && satData->P2 != 0.0 && 
+    if (satData->P1 != 0.0 && satData->P2 != 0.0 &&
         satData->L1 != 0.0 && satData->L2 != 0.0 ) {
 
@@ -249,5 +249,5 @@
   // ------------------------
   else if (satData->system() == 'E' && _opt->useSystem('E')) {
-    if (satData->P1 != 0.0 && satData->P5 != 0.0 && 
+    if (satData->P1 != 0.0 && satData->P5 != 0.0 &&
         satData->L1 != 0.0 && satData->L5 != 0.0 ) {
       double f1 = t_CST::freq(t_frequency::E1, 0);
@@ -293,5 +293,5 @@
 }
 
-// 
+//
 ////////////////////////////////////////////////////////////////////////////
 void t_pppClient::putOrbCorrections(const std::vector<t_orbCorr*>& corr) {
@@ -309,5 +309,5 @@
 }
 
-// 
+//
 ////////////////////////////////////////////////////////////////////////////
 void t_pppClient::putClkCorrections(const std::vector<t_clkCorr*>& corr) {
@@ -325,5 +325,5 @@
 }
 
-// 
+//
 //////////////////////////////////////////////////////////////////////////////
 void t_pppClient::putCodeBiases(const std::vector<t_satCodeBias*>& satCodeBias) {
@@ -335,8 +335,13 @@
 //
 //////////////////////////////////////////////////////////////////////////////
+void t_pppClient::putPhaseBiases(const std::vector<t_satPhaseBias*>& /*satPhaseBias*/) {
+}
+
+//
+//////////////////////////////////////////////////////////////////////////////
 void t_pppClient::putTec(const t_vTec* /*vTec*/) {
 }
 
-// 
+//
 //////////////////////////////////////////////////////////////////////////////
 void t_pppClient::putEphemeris(const t_eph* eph) {
@@ -362,5 +367,5 @@
 // Satellite Position
 ////////////////////////////////////////////////////////////////////////////
-t_irc t_pppClient::getSatPos(const bncTime& tt, const QString& prn, 
+t_irc t_pppClient::getSatPos(const bncTime& tt, const QString& prn,
                               ColumnVector& xc, ColumnVector& vv) {
 
@@ -404,5 +409,5 @@
       satData->clk     = clkSat * t_CST::c;
       return success;
-    } 
+    }
   }
 
Index: trunk/BNC/src/PPP_SSR_I/pppClient.h
===================================================================
--- trunk/BNC/src/PPP_SSR_I/pppClient.h	(revision 7287)
+++ trunk/BNC/src/PPP_SSR_I/pppClient.h	(revision 7288)
@@ -38,5 +38,5 @@
 
 namespace BNC_PPP {
-  
+
 class t_pppClient : public interface_pppClient {
  public:
@@ -46,7 +46,8 @@
   void                putEphemeris(const t_eph* eph);
   void                putTec(const t_vTec* vTec);
-  void                putOrbCorrections(const std::vector<t_orbCorr*>& corr); 
-  void                putClkCorrections(const std::vector<t_clkCorr*>& corr); 
-  void                putCodeBiases(const std::vector<t_satCodeBias*>& satCodeBias);   
+  void                putOrbCorrections(const std::vector<t_orbCorr*>& corr);
+  void                putClkCorrections(const std::vector<t_clkCorr*>& corr);
+  void                putCodeBiases(const std::vector<t_satCodeBias*>& satCodeBias);
+  void                putPhaseBiases(const std::vector<t_satPhaseBias*>& satPhaseBias);
   std::ostringstream& log() {return *_log;}
   const t_pppOptions* opt() const {return _opt;}
@@ -61,5 +62,5 @@
   t_pppFilter*        _filter;
   t_pppUtils*         _pppUtils;
-  std::ostringstream* _log; 
+  std::ostringstream* _log;
 };
 
Index: trunk/BNC/src/pppRun.cpp
===================================================================
--- trunk/BNC/src/pppRun.cpp	(revision 7287)
+++ trunk/BNC/src/pppRun.cpp	(revision 7288)
@@ -112,4 +112,7 @@
     connect(BNC_CORE, SIGNAL(newCodeBiases(QList<t_satCodeBias>)),
             this, SLOT(slotNewCodeBiases(QList<t_satCodeBias>)),conType);
+
+    connect(BNC_CORE, SIGNAL(newPhaseBiases(QList<t_satPhaseBias>)),
+            this, SLOT(slotNewPhaseBiases(QList<t_satPhaseBias>)),conType);
   }
   else {
@@ -409,4 +412,28 @@
 //
 ////////////////////////////////////////////////////////////////////////////
+void t_pppRun::slotNewPhaseBiases(QList<t_satPhaseBias> phaseBiases) {
+  if (phaseBiases.size() == 0) {
+    return;
+  }
+
+  if (_opt->_realTime) {
+    if (_opt->_corrMount.empty() || _opt->_corrMount != phaseBiases[0]._staID) {
+      return;
+    }
+  }
+  vector<t_satPhaseBias*> biases;
+  for (int ii = 0; ii < phaseBiases.size(); ii++) {
+    biases.push_back(new t_satPhaseBias(phaseBiases[ii]));
+  }
+
+  _pppClient->putPhaseBiases(biases);
+
+  for (unsigned ii = 0; ii < biases.size(); ii++) {
+    delete biases[ii];
+  }
+}
+
+//
+////////////////////////////////////////////////////////////////////////////
 void t_pppRun::processFiles() {
 
@@ -432,4 +459,6 @@
     connect(_corrFile, SIGNAL(newCodeBiases(QList<t_satCodeBias>)),
             this, SLOT(slotNewCodeBiases(QList<t_satCodeBias>)));
+    connect(_corrFile, SIGNAL(newPhaseBiases(QList<t_satPhaseBias>)),
+            this, SLOT(slotNewPhaseBiases(QList<t_satPhaseBias>)));
   }
 
Index: trunk/BNC/src/pppRun.h
===================================================================
--- trunk/BNC/src/pppRun.h	(revision 7287)
+++ trunk/BNC/src/pppRun.h	(revision 7288)
@@ -44,4 +44,5 @@
   void slotNewClkCorrections(QList<t_clkCorr> clkCorr);
   void slotNewCodeBiases(QList<t_satCodeBias> codeBiases);
+  void slotNewPhaseBiases(QList<t_satPhaseBias> phaseBiases);
   void slotNewObs(QByteArray staID, QList<t_satObs> obsList);
   void slotSetSpeed(int speed);
