Index: trunk/Cosy/main/MTracking.cc
===================================================================
--- trunk/Cosy/main/MTracking.cc	(revision 12594)
+++ trunk/Cosy/main/MTracking.cc	(revision 12595)
@@ -292,7 +292,4 @@
         return kFALSE;
 
-    fCosy->fRaDec     = fSlalib.GetRaDecRad();
-    fCosy->fHourAngle = fSlalib.GetHourAngle();
-
     return kTRUE;
 }
@@ -318,4 +315,13 @@
     // culminating before the zenith (north) we want the star to be
     // aligned between -180 and 180deg (which is the default of CalcZdAz)
+
+#ifdef FACT
+    if (fSlalib.GetPhi()>dst.Dec() && dest.Az()>0)
+    {
+        // align az from -180/180 to 0/360
+        gLog << inf2 << "Star culminating behind zenith: Adding 360deg to Azimuth " << dest.Az()*kRad2Deg << endl;
+        dest.Az(dest.Az() - TMath::TwoPi());
+    }
+#else
     if (fSlalib.GetPhi()>dst.Dec() && dest.Az()<0)
     {
@@ -324,4 +330,5 @@
         dest.Az(dest.Az() + TMath::TwoPi());
     }
+#endif
 
     // Position the telescope to the current local position of the
@@ -419,5 +426,9 @@
     //
     // *OLD*const float dt = 1;  // 1 second
+#ifdef FACT
+    const float dt = 7.6;//3;  // 2 second
+#else
     const float dt = 5;//3;  // 2 second
+#endif
     while (!Break()/* && !fCosy->HasError() && !fCosy->HasZombie()*/)
     {
@@ -522,5 +533,9 @@
         // (This is important on fast machines >500MHz)
         //
-        usleep(1000000); // 1s
+#ifdef FACT
+        usleep(760000/4); // 1.4s
+#else
+        usleep(1000000);
+#endif
 
         //
@@ -529,10 +544,21 @@
         //
         if (!fCosy->fMac1->IsRpmActive() || !fCosy->fMac2->IsRpmActive())
+        {
+            gLog << warn << fSlalib.GetTime() << " - RPM mode not active anymore." << endl;
             break;
-    }
+        }
+    }
+
+    if (fCosy->Break())
+        gLog << all << fSlalib.GetTime() << " - Break signal received." << endl;
+    if (fCosy->HasError())
+        gLog << all << fSlalib.GetTime() << " - HasError received." << endl;
+    if (fCosy->HasZombie())
+        gLog << all << fSlalib.GetTime() << " - HasZombie received." << endl;
 
     fSlalib.Now();
 
     CancelThread();
+    fCosy->fMJD = 0;
 
     // If CancelPoints are used we have to make this a Cleanup!
@@ -600,4 +626,7 @@
             ZdAz dummy = sla.GetZdAzRad();
             dummy = fCosy->AlignTrackingPos(dummy);
+            fCosy->fRaDec = sla.GetRaDecRad();
+            fCosy->fHourAngle = sla.GetHourAngle();
+            fCosy->fMJD = mjdaz;
             fCosy->fZdAzSoll.Zd(dummy.Zd());
             fCosy->fTrackingError.Zd(fCosy->fBending(dummy).Zd()-istse.Zd());
@@ -611,4 +640,7 @@
             ZdAz dummy = sla.GetZdAzRad();
             dummy = fCosy->AlignTrackingPos(dummy);
+            fCosy->fRaDec = sla.GetRaDecRad();
+            fCosy->fHourAngle = sla.GetHourAngle();
+            fCosy->fMJD = mjdaz;
             fCosy->fZdAzSoll.Az(dummy.Az());
             fCosy->fTrackingError.Az(fCosy->fBending(dummy).Az()-istse.Az());
