Index: trunk/BNC/src/combination/bnccomb.cpp
===================================================================
--- trunk/BNC/src/combination/bnccomb.cpp	(revision 7011)
+++ trunk/BNC/src/combination/bnccomb.cpp	(revision 7012)
@@ -382,6 +382,6 @@
     // Check the Ephemeris
     //--------------------
-    const t_eph* ephLast = _ephUser.ephLast(prn);
-    const t_eph* ephPrev = _ephUser.ephPrev(prn);
+    t_eph* ephLast = _ephUser.ephLast(prn);
+    t_eph* ephPrev = _ephUser.ephPrev(prn);
     if (ephLast == 0) {
       emit newMessage("bncComb: eph not found "  + prn.mid(0,3).toAscii(), true);
@@ -426,5 +426,5 @@
 // Change the correction so that it refers to last received ephemeris 
 ////////////////////////////////////////////////////////////////////////////
-void bncComb::switchToLastEph(const t_eph* lastEph, cmbCorr* corr) {
+void bncComb::switchToLastEph(t_eph* lastEph, cmbCorr* corr) {
 
   if (corr->_eph == lastEph) {
@@ -714,6 +714,14 @@
     ColumnVector xc(4);
     ColumnVector vv(3);
-    corr->_eph->getCrd(_resTime, xc, vv, false);
-    
+    t_orbCorr orbCorr2Use(corr->_orbCorr);
+    t_clkCorr clkCorr2Use(corr->_clkCorr);
+    clkCorr2Use._dClk       = corr->_dClkResult *  t_CST::c;
+    clkCorr2Use._dotDClk    = 0.0;
+    clkCorr2Use._dotDotDClk = 0.0;
+
+    corr->_eph->setClkCorr(dynamic_cast<const t_clkCorr*>(&clkCorr2Use));
+    corr->_eph->setOrbCorr(dynamic_cast<const t_orbCorr*>(&orbCorr2Use));
+    corr->_eph->getCrd(_resTime, xc, vv, true);
+
     // Correction Phase Center --> CoM
     // -------------------------------
@@ -726,6 +734,6 @@
       }
     }
-    
-    outLines += corr->_prn;
+
+    outLines += corr->_prn.mid(0,3);
     QString hlp;
     hlp.sprintf(" APC 3 %15.4f %15.4f %15.4f"
@@ -733,6 +741,6 @@
                 " Vel 3 %15.4f %15.4f %15.4f"
                 " CoM 3 %15.4f %15.4f %15.4f\n",
-                xc(1), xc(2), xc(3), 
-                xc(4)*t_CST::c, 
+                xc(1), xc(2), xc(3),
+                xc(4) *  t_CST::c,
                 vv(1), vv(2), vv(3),
                 xc(1)-dx(1), xc(2)-dx(2), xc(3)-dx(3));
@@ -748,5 +756,5 @@
                  "   %10.5f INTERNAL",
                  messageType, updateInt, _resTime.gpsw(), _resTime.gpssec(),
-                 corr->_prn.toAscii().data(),
+                 corr->_prn.mid(0,3).toAscii().data(),
                  corr->_iod,
                  corr->_dClkResult * t_CST::c,
@@ -1052,6 +1060,6 @@
     QString  prn  = corr->_prn;
 
-    const t_eph* ephLast = _ephUser.ephLast(prn);
-    const t_eph* ephPrev = _ephUser.ephPrev(prn);
+    t_eph* ephLast = _ephUser.ephLast(prn);
+    t_eph* ephPrev = _ephUser.ephPrev(prn);
 
     if      (ephLast == 0) {
