Index: trunk/Mars/fact/processing/lidar.C
===================================================================
--- trunk/Mars/fact/processing/lidar.C	(revision 18522)
+++ trunk/Mars/fact/processing/lidar.C	(revision 18524)
@@ -1,3 +1,3 @@
-void dust(const char *fname, double beg=0, double end=100000)
+void lidar(const char *fname, double beg=0, double end=100000)
 {
     fits file(fname);
@@ -27,4 +27,9 @@
     while (file.GetNextRow())
     {
+        if (time<50000)
+            time += 682607./45;
+
+        time += offset;
+
         if (time<beg)
         {
@@ -50,29 +55,19 @@
     if (cnt>0)
     {
-        cout << "result ";
-        avg[0]/cnt << " ";
-        avg[1]/cnt << " ";
-        avg[2]/cnt << " ";
-        avg[3]/cnt << endl;
+        cout << "result " << avg[0]/cnt << " " << avg[1]/cnt << " " << avg[2]/cnt << " " << avg[3]/cnt << endl;
         return;
     }
 
-    if (beg-lastt<time-end && (beg-last)*24*3600<10*60)
+    if (beg-lastt<time-end && (beg-lastt)*24*3600<10*60)
     {
-        cout << "result ";
-        trans[0] << " ";
-        trans[1] << " ";
-        trans[2] << " ";
-        trans[3] << endl;
+        cout << "result " << trans[0] << " " << trans[1] << " " << trans[2] << " " << trans[3] << endl;
         return;
     }
     if (beg-lastt>time-end && (time-end)*24*3600<10*60)
     {
-        cout << "result ";
-        t3 << " ";
-        t6 << " ";
-        t9 << " ";
-        t12 << endl;
+        cout << "result " << t3 << " " << t6 << " " << t9 << " " << t12 << endl;
         return;
     }
+    cout << "result " << endl;
+    return;
 }
