Index: /trunk/Poubelle/archTOI.old/archeopsfile.cc
===================================================================
--- /trunk/Poubelle/archTOI.old/archeopsfile.cc	(revision 580)
+++ /trunk/Poubelle/archTOI.old/archeopsfile.cc	(revision 581)
@@ -438,5 +438,5 @@
   static char* buffer = 0;
   static int4  debswp = debut_block_mesure;
-  static int4  longmax = taille_maxi_block_archeops*20; 
+  static long  longmax = taille_maxi_block_archeops*20; 
   if (!buffer) {
     buffer = new char[longmax];
Index: /trunk/Poubelle/archTOI.old/gondolageom.cc
===================================================================
--- /trunk/Poubelle/archTOI.old/gondolageom.cc	(revision 580)
+++ /trunk/Poubelle/archTOI.old/gondolageom.cc	(revision 581)
@@ -15,5 +15,5 @@
 double GondolaGeom::azFPC     = 0;
 double GondolaGeom::elevSST0  = 39.6567;
-double GondolaGeom::sstHeight = 1.41;
+double GondolaGeom::sstPixelHeight = 0.031359;
 
  			//	 ;
Index: /trunk/Poubelle/archTOI.old/gondolageom.h
===================================================================
--- /trunk/Poubelle/archTOI.old/gondolageom.h	(revision 580)
+++ /trunk/Poubelle/archTOI.old/gondolageom.h	(revision 581)
@@ -42,5 +42,5 @@
   static double azFPC;      // degrees, relative to SST alignment
   static double elevSST0;   // degrees
-  static double sstHeight;  // degrees, between middle pixel 0 and pixel 45
+  static double sstPixelHeight;  // degrees
   
   static void getAltAzBolo(int ibolo, double& elv, double& az); // pure geom, 
Index: /trunk/Poubelle/archTOI.old/starmatcher.cc
===================================================================
--- /trunk/Poubelle/archTOI.old/starmatcher.cc	(revision 580)
+++ /trunk/Poubelle/archTOI.old/starmatcher.cc	(revision 581)
@@ -12,8 +12,14 @@
 #define STARDUMP
 
+#include <math.h>
+
 extern "C" {
 #include "aa_hadec.h"
 #define NRANSI
 #include "nrutil.h"
+
+#ifndef M_PI
+#define M_PI 3.1415926535
+#endif
 
 void lfit(double x[], double y[], double sig[], int ndat, double a[], int ia[],
@@ -235,7 +241,7 @@
     double dmin = delta - dist; if (dmin<-90) dmin=-90;
     double dmax = delta + dist; if (dmax> 90) dmax= 90;
-    double amin = alpha - dist / cos(delta * 3.1415926/180) / 15.;
+    double amin = alpha - dist / cos(delta * M_PI/180) / 15.;
     if (amin<0) amin += 24;
-    double amax = alpha + dist / cos(delta * 3.1415926/180) / 15.;
+    double amax = alpha + dist / cos(delta * M_PI/180) / 15.;
     if (amax>24) amax -= 24;
   
@@ -256,15 +262,15 @@
     for (int i=imin; i<=imax; i++) {
       if (stars[i].ra >= amin && stars[i].ra <= amax) {
-        double ha = (ts/3600. - stars[i].ra) * 15. * 3.1415926/180.;
+        double ha = (ts/3600. - stars[i].ra) * 15. * M_PI/180.;
         double elv, azim;
-        hadec_aa(lat * 3.1415926/180., ha, stars[i].dec * 3.1415926/180.,
+        hadec_aa(lat * M_PI/180., ha, stars[i].dec * M_PI/180.,
                  &elv, &azim);
-        elv  *= 180/3.1415926;
-        azim *= 180/3.1415926;
+        elv  *= 180/M_PI;
+        azim *= 180/M_PI;
         if (azim<0) azim += 360;
       
         double da = azim-az; if (da>360) da -= 360;
         if (da < -0.6 || da > 0.4) continue;
-        double elv0 = elv - 1.41/45. * lastStar.NoDiode;
+        double elv0 = elv - GondolaGeom::sstPixelHeight * lastStar.NoDiode;
         if (fabs(elv0-GondolaGeom::elevSST0) > 0.25) continue; // Might be too strong
         
@@ -375,5 +381,5 @@
     if (ndata > 0 && az - oldAz >  180) az -= 360;
     if (ndata > 0 && az - oldAz < -180) az += 360;
-    fitElvAz.addData(s1.SN-sn0, s1.elvGSC - s1.nDiode*1.41/45., az);
+    fitElvAz.addData(s1.SN-sn0, s1.elvGSC - s1.nDiode*GondolaGeom::sstPixelHeight, az);
     oldAz = az;
     ndata++;
@@ -408,5 +414,6 @@
       matchStar sss = (*it1);
       if (!sss.ok) continue;
-      if (fabs(fitElvAz.valueY(sss.SN-sn0)-(sss.elvGSC - sss.nDiode*1.41/45.)) > dcutElv) {
+      if (fabs(fitElvAz.valueY(sss.SN-sn0)-
+	       (sss.elvGSC - sss.nDiode*GondolaGeom::sstPixelHeight)) > dcutElv) {
         (*it1).ok = false;
         //logstream << "  kill " << sss.seq << " " << setprecision(11) << sss.SN << " "
@@ -483,6 +490,6 @@
     ndata++;
     snmean += st.SN;
-    azi[ndata]  = st.azGSC * 3.1415926/180;
-    elv0[ndata] = st.elvGSC - st.nDiode*1.41/45.;
+    azi[ndata]  = st.azGSC * M_PI/180;
+    elv0[ndata] = st.elvGSC - st.nDiode*GondolaGeom::sstPixelHeight;
     sig[ndata]  = 0.01;
   }
@@ -516,5 +523,5 @@
 
   double ampl = sqrt(cc*cc+ss*ss);
-  double phase = atan2(cc,ss)/(3.1415926/180);
+  double phase = atan2(cc,ss)/(M_PI/180);
   
   
Index: /trunk/Poubelle/archTOI.old/toillsstproducer.cc
===================================================================
--- /trunk/Poubelle/archTOI.old/toillsstproducer.cc	(revision 580)
+++ /trunk/Poubelle/archTOI.old/toillsstproducer.cc	(revision 581)
@@ -13,4 +13,10 @@
 
 // diodpermut[i] = channel de la diode i
+// int TOILLSSTProducer::diodpermut[46]=
+//  { 8,24,40, 9,25,41,10,26,42,11,
+//   27,43,16,32, 1,17,33, 2,18,34,
+//    3,19,35,12,28,44,13,29,45,14,
+//   30,46,15,31,47,20,36, 5,21,37,
+//    6,22,38, 7,23,39};
 int TOILLSSTProducer::diodpermut[46]=
  { 8,24,40, 9,25,41,10,26,42,11,
@@ -18,5 +24,5 @@
    3,19,35,12,28,44,13,29,45,14,
   30,46,15,31,47,20,36, 5,21,37,
-   6,22,38, 7,23,39};
+   6,38,22, 7,23,39};
  // voies 0 et 4 non connectees, voie 1 en panne.
 
