Index: trunk/BNC/src/RTCM/rtcm_utils.cpp
===================================================================
--- trunk/BNC/src/RTCM/rtcm_utils.cpp	(revision 6108)
+++ trunk/BNC/src/RTCM/rtcm_utils.cpp	(revision 6109)
@@ -36,5 +36,11 @@
   // --------------
   rho = 0.0;
-  eph->position(GPSWeek, GPSWeeks, xSat, ySat, zSat, clkSat); 
+  ColumnVector xc(4);
+  ColumnVector vv(3);
+  eph->getCrd(bncTime(GPSWeek, GPSWeeks), xc, vv, false);
+  xSat   = xc(1);
+  ySat   = xc(2);
+  zSat   = xc(3);
+  clkSat = xc(4);
 
   ////cout << "----- cmpRho -----\n";
@@ -77,5 +83,9 @@
     }
       
-    eph->position(GPSWeek_tot, GPSWeeks_tot, xSat, ySat, zSat, clkSat); 
+    eph->getCrd(bncTime(GPSWeek_tot, GPSWeeks_tot), xc, vv, false);
+    xSat   = xc(1);
+    ySat   = xc(2);
+    zSat   = xc(3);
+    clkSat = xc(4);
 
     dx = xRec - xSat;
Index: trunk/BNC/src/combination/bnccomb.cpp
===================================================================
--- trunk/BNC/src/combination/bnccomb.cpp	(revision 6108)
+++ trunk/BNC/src/combination/bnccomb.cpp	(revision 6109)
@@ -412,11 +412,9 @@
   ColumnVector oldXC(4);
   ColumnVector oldVV(3);
-  corr->eph->position(corr->tRao.gpsw(), corr->tRao.gpssec(), 
-                      oldXC.data(), oldVV.data());
+  corr->eph->getCrd(corr->tRao, oldXC, oldVV, false);
 
   ColumnVector newXC(4);
   ColumnVector newVV(3);
-  lastEph->position(corr->tRao.gpsw(), corr->tRao.gpssec(), 
-                    newXC.data(), newVV.data());
+  lastEph->getCrd(corr->tRao, newXC, newVV, false);
 
   ColumnVector dX = newXC.Rows(1,3) - oldXC.Rows(1,3);
@@ -640,6 +638,7 @@
     const t_eph* eph = corr->eph;
     if (eph) {
-      double xx, yy, zz, cc;
-      eph->position(_resTime.gpsw(), _resTime.gpssec(), xx, yy, zz, cc);
+      ColumnVector xc(4);
+      ColumnVector vv(3);
+      eph->getCrd(_resTime, xc, vv, false);
 
       out << _resTime.datestr().c_str() << " " 
@@ -648,5 +647,5 @@
       out << "Full Clock " << corr->prn << " " << corr->iod << " ";
       out.setFieldWidth(14);
-      out << (cc + corr->dClk) * t_CST::c << endl;
+      out << (xc(4) + corr->dClk) * t_CST::c << endl;
       out.setFieldWidth(0);
     }
@@ -679,6 +678,5 @@
     ColumnVector xc(4);
     ColumnVector vv(3);
-    corr->eph->position(_resTime.gpsw(), _resTime.gpssec(), 
-                        xc.data(), vv.data());
+    corr->eph->getCrd(_resTime, xc, vv, false);
     
     // Correction Phase Center --> CoM
Index: trunk/BNC/src/ephemeris.cpp
===================================================================
--- trunk/BNC/src/ephemeris.cpp	(revision 6108)
+++ trunk/BNC/src/ephemeris.cpp	(revision 6109)
@@ -40,6 +40,5 @@
 // 
 ////////////////////////////////////////////////////////////////////////////
-t_irc t_eph::getCrd(const bncTime& tt, ColumnVector& xc,
-                    ColumnVector& vv, bool useCorr) const {
+t_irc t_eph::getCrd(const bncTime& tt, ColumnVector& xc, ColumnVector& vv, bool useCorr) const {
   xc.ReSize(4);
   vv.ReSize(3);
Index: trunk/BNC/src/ephemeris.h
===================================================================
--- trunk/BNC/src/ephemeris.h	(revision 6108)
+++ trunk/BNC/src/ephemeris.h	(revision 6109)
@@ -25,51 +25,26 @@
   virtual ~t_eph() {};
 
-  static bool earlierTime(const t_eph* eph1, const t_eph* eph2) {
-    return eph1->_TOC < eph2->_TOC;
-  }
-
-  virtual e_type type() const = 0;
+  virtual e_type  type() const = 0;
   virtual QString toString(double version) const = 0;
-  virtual void position(int GPSweek, double GPSweeks, 
-                        double* xc, double* vv) const = 0;
-  virtual int  IOD() const = 0;
-
-  bool ok() const {return _ok;}
+  virtual int     IOD() const = 0;
+  virtual int     slotNum() const {return 0;}
+  bool    ok() const {return _ok;}
   bncTime TOC() const {return _TOC;}
-  bool isNewerThan(const t_eph* eph) const {
-    return earlierTime(eph, this);
-  }
-  t_prn prn() const {return _prn;}
+  bool    isNewerThan(const t_eph* eph) const {return earlierTime(eph, this);}
+  t_prn   prn() const {return _prn;}
+  t_irc   getCrd(const bncTime& tt, ColumnVector& xc, ColumnVector& vv, bool useCorr) const;
+  void    setOrbCorr(const BNC_PPP::t_orbCorr* orbCorr);
+  void    setClkCorr(const BNC_PPP::t_clkCorr* clkCorr);
   const QDateTime& receptDateTime() const {return _receptDateTime;}
-
-  void position(int GPSweek, double GPSweeks, 
-                double& xx, double& yy, double& zz, double& cc) const {
-    double tmp_xx[4];
-    double tmp_vv[4];
-    position(GPSweek, GPSweeks, tmp_xx, tmp_vv);
-
-    xx = tmp_xx[0];
-    yy = tmp_xx[1];
-    zz = tmp_xx[2];
-    cc = tmp_xx[3];
-  }
-
-  t_irc getCrd(const bncTime& tt, ColumnVector& xc,
-               ColumnVector& vv, bool useCorr) const;
-  void setOrbCorr(const BNC_PPP::t_orbCorr* orbCorr);
-  void setClkCorr(const BNC_PPP::t_clkCorr* clkCorr);
-  virtual int slotNum() const {return 0;}
-
-  static QString rinexDateStr(const bncTime& tt, const t_prn& prn,
-                              double version);
-
-  static QString rinexDateStr(const bncTime& tt, const QString& prnStr,
-                              double version);
+  static QString rinexDateStr(const bncTime& tt, const t_prn& prn, double version);
+  static QString rinexDateStr(const bncTime& tt, const QString& prnStr, double version);
+  static bool earlierTime(const t_eph* eph1, const t_eph* eph2) {return eph1->_TOC < eph2->_TOC;}
 
  protected:  
-  t_prn           _prn;
-  bncTime         _TOC;
-  QDateTime       _receptDateTime;
-  bool            _ok;
+  virtual void position(int GPSweek, double GPSweeks, double* xc, double* vv) const = 0;
+  t_prn               _prn;
+  bncTime             _TOC;
+  QDateTime           _receptDateTime;
+  bool                _ok;
   BNC_PPP::t_orbCorr* _orbCorr;
   BNC_PPP::t_clkCorr* _clkCorr;
@@ -85,18 +60,12 @@
 
   virtual e_type type() const {return t_eph::GPS;}
-
   virtual QString toString(double version) const;
-
+  virtual int  IOD() const { return static_cast<int>(_IODC); }
   void set(const gpsephemeris* ee);
-
-  virtual void position(int GPSweek, double GPSweeks, 
-                        double* xc,
-                        double* vv) const;
-
-  virtual int  IOD() const { return static_cast<int>(_IODC); }
-
   double TGD() const {return _TGD;} // Timing Group Delay (P1-P2 DCB)
 
  private:
+  virtual void position(int GPSweek, double GPSweeks, double* xc, double* vv) const;
+
   double  _clock_bias;      // [s]    
   double  _clock_drift;     // [s/s]  
@@ -142,24 +111,15 @@
   t_ephGlo() { _xv.ReSize(6); }
   t_ephGlo(float rnxVersion, const QStringList& lines);
-
   virtual ~t_ephGlo() {}
 
   virtual e_type type() const {return t_eph::GLONASS;}
-
   virtual QString toString(double version) const;
-
-  virtual void position(int GPSweek, double GPSweeks, 
-                        double* xc,
-                        double* vv) const;
-
   virtual int  IOD() const;
-
+  virtual int slotNum() const {return int(_frequency_number);}
   void set(const glonassephemeris* ee);
 
-  virtual int slotNum() const {return int(_frequency_number);}
-
  private:
-  static ColumnVector glo_deriv(double /* tt */, const ColumnVector& xv,
-                                double* acc);
+  virtual void position(int GPSweek, double GPSweeks, double* xc, double* vv) const;
+  static ColumnVector glo_deriv(double /* tt */, const ColumnVector& xv, double* acc);
 
   mutable bncTime      _tt;  // time 
@@ -195,16 +155,11 @@
 
   virtual QString toString(double version) const;
-
   virtual e_type type() const {return t_eph::Galileo;}
-
+  virtual int  IOD() const { return static_cast<int>(_IODnav); }
   void set(const galileoephemeris* ee);
 
-  virtual void position(int GPSweek, double GPSweeks, 
-                        double* xc,
-                        double* vv) const;
-
-  virtual int  IOD() const { return static_cast<int>(_IODnav); }
-
  private:
+  virtual void position(int GPSweek, double GPSweeks, double* xc, double* vv) const;
+
   double  _clock_bias;       //  [s]    
   double  _clock_drift;      //  [s/s]  
Index: trunk/BNC/src/rinex/reqcanalyze.cpp
===================================================================
--- trunk/BNC/src/rinex/reqcanalyze.cpp	(revision 6108)
+++ trunk/BNC/src/rinex/reqcanalyze.cpp	(revision 6109)
@@ -554,11 +554,10 @@
           
           if (eph) {
-            double xSat, ySat, zSat, clkSat;
-            eph->position(oneObs->_GPSWeek, oneObs->_GPSWeeks, 
-                          xSat, ySat, zSat, clkSat);
+            ColumnVector xc(4);
+            ColumnVector vv(3);
+            eph->getCrd(bncTime(oneObs->_GPSWeek, oneObs->_GPSWeeks), xc, vv, false);
           
             double rho, eleSat, azSat;
-            topos(xyzSta(1), xyzSta(2), xyzSta(3), 
-                  xSat, ySat, zSat, rho, eleSat, azSat);
+            topos(xyzSta(1), xyzSta(2), xyzSta(3), xc(1), xc(2), xc(3), rho, eleSat, azSat);
           
             aziDeg = azSat * 180.0/M_PI;
@@ -764,9 +763,8 @@
     if (eph) {
       ++nSatUsed;
-      ColumnVector xSat(3);
-      double clkSat;
-      eph->position(_currEpo->tt.gpsw(), _currEpo->tt.gpssec(), 
-                    xSat(1), xSat(2), xSat(3), clkSat);
-      ColumnVector dx = xSat - xyzSta;
+      ColumnVector xSat(4);
+      ColumnVector vv(3);
+      eph->getCrd(_currEpo->tt, xSat, vv, false);
+      ColumnVector dx = xSat.Rows(1,3) - xyzSta;
       double rho = dx.norm_Frobenius();
       AA(nSatUsed,1) = dx(1) / rho;
Index: trunk/BNC/src/src.pri
===================================================================
--- trunk/BNC/src/src.pri	(revision 6108)
+++ trunk/BNC/src/src.pri	(revision 6109)
@@ -116,5 +116,5 @@
 }
 
-exists(PPP) {
+exists(PPPxxx) {
   INCLUDEPATH += PPP
   HEADERS += PPP/pppClient.h    PPP/pppObsPool.h   PPP/pppEphPool.h   \
Index: trunk/BNC/src/upload/bncrtnetuploadcaster.cpp
===================================================================
--- trunk/BNC/src/upload/bncrtnetuploadcaster.cpp	(revision 6108)
+++ trunk/BNC/src/upload/bncrtnetuploadcaster.cpp	(revision 6109)
@@ -647,5 +647,5 @@
   ColumnVector xB(4);
   ColumnVector vB(3);
-  eph->position(GPSweek, GPSweeks, xB.data(), vB.data());
+  eph->getCrd(bncTime(GPSweek, GPSweeks), xB, vB, false);
 
   // Precise Position
