Index: trunk/BNC/src/PPP/pppSatObs.cpp
===================================================================
--- trunk/BNC/src/PPP/pppSatObs.cpp	(revision 9473)
+++ trunk/BNC/src/PPP/pppSatObs.cpp	(revision 9485)
@@ -397,4 +397,31 @@
   _model._azSat  = atan2(neu[1], neu[0]);
 
+  // Sun unit vector
+  ColumnVector xSun = t_astro::Sun(_time.mjddec());
+  xSun /= xSun.norm_Frobenius();
+
+  // Satellite unit vectors sz, sy, sx
+  ColumnVector sz = -rSat / rSat.norm_Frobenius();
+  ColumnVector sy = crossproduct(sz, xSun);
+  ColumnVector sx = crossproduct(sy, sz);
+
+  sx /= sx.norm_Frobenius();
+  sy /= sy.norm_Frobenius();
+
+  // LOS unit vector satellite --> receiver
+  ColumnVector rho = rRec - rSat;
+  rho /= rho.norm_Frobenius();
+
+  // LOS vector in satellite frame
+  ColumnVector u(3);
+  u(1) = dotproduct(sx, rho);
+  u(2) = dotproduct(sy, rho);
+  u(3) = dotproduct(sz, rho);
+
+  // Azimuth and elevation in satellite antenna frame
+  _model._elTx = atan2(u(3),sqrt(pow(u(2),2)+pow(u(1),2)));
+  _model._azTx = atan2(u(2),u(1));
+
+
   // Satellite Clocks
   // ----------------
@@ -423,6 +450,23 @@
       t_frequency::type frqType = static_cast<t_frequency::type>(ii);
       bool found;
-      _model._antPCO[ii] = PPP_CLIENT->antex()->rcvCorr(station->antName(), frqType,
-                                                        _model._eleSat, _model._azSat, found);
+      QString prn(_prn.toString().c_str());
+      _model._antPCO[ii]  = PPP_CLIENT->antex()->rcvCorr(station->antName(), frqType, _model._eleSat, _model._azSat, found);
+      _model._antPCO[ii] += PPP_CLIENT->antex()->satCorr(prn, frqType,  _model._elTx, _model._azTx, found);
+      if (OPT->_isAPC) {
+        // the PCOs as given in the satellite antenna correction for all frequencies
+        // have to be reduced by the PCO of the reference frequency
+        if      (_prn.system() == 'G') {
+          _model._antPCO[ii] -= PPP_CLIENT->antex()->satCorr(prn, t_frequency::G1, _model._elTx, _model._azTx, found);
+        }
+        else if (_prn.system() == 'R') {
+          _model._antPCO[ii] -= PPP_CLIENT->antex()->satCorr(prn, t_frequency::R1, _model._elTx, _model._azTx, found);
+        }
+        else if (_prn.system() == 'E') {
+          _model._antPCO[ii] -= PPP_CLIENT->antex()->satCorr(prn, t_frequency::E1, _model._elTx, _model._azTx, found);
+        }
+        else if (_prn.system() == 'C') {
+          _model._antPCO[ii] -= PPP_CLIENT->antex()->satCorr(prn, t_frequency::C2, _model._elTx, _model._azTx, found);
+        }
+      }
     }
   }
Index: trunk/BNC/src/PPP/pppSatObs.h
===================================================================
--- trunk/BNC/src/PPP/pppSatObs.h	(revision 9473)
+++ trunk/BNC/src/PPP/pppSatObs.h	(revision 9485)
@@ -92,4 +92,6 @@
       _eleSat    = 0.0;
       _azSat     = 0.0;
+      _elTx      = 0.0;
+      _azTx      = 0.0;
       _recClkM   = 0.0;
       _satClkM   = 0.0;
@@ -113,4 +115,6 @@
     double _eleSat;
     double _azSat;
+    double _elTx;
+    double _azTx;
     double _recClkM;
     double _satClkM;
