Changeset 612 in Sophya for trunk/Poubelle/archTOI.old/gondolageom.cc
- Timestamp:
- Nov 22, 1999, 10:43:44 AM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Poubelle/archTOI.old/gondolageom.cc
r581 r612 4 4 #include <math.h> 5 5 #include "gondolageom.h" 6 7 6 8 extern "C" { 7 9 #include "aa_hadec.h" … … 27 29 28 30 29 GondolaGeom::GondolaGeom() { 31 GondolaGeom::GondolaGeom() 32 : fit(200, 2) 33 { 30 34 azPend = 0; 31 35 angPend = 0; … … 51 55 if (nstars<0) { 52 56 nstars = 0; 53 saz=staz=st=st2=0;57 fit.clear(); 54 58 } 55 59 … … 61 65 if (azCor - az0 > 180) azCor -= 360; 62 66 if (azCor - az0 < -180) azCor += 360; 63 saz += azCor; 64 staz += azCor*deltasn; 65 st += deltasn; 66 st2 += deltasn*deltasn; 67 68 fit.addData(deltasn, azCor); 67 69 } 68 70 … … 70 72 int GondolaGeom::solveStars() { 71 73 if (nstars<2) return -1; 72 staz /= nstars; 73 st /= nstars; 74 saz /= nstars; 75 st2 /= nstars; 76 double a = (staz - st*saz) / (st2 - st*st); 77 double b = saz - a*st; 78 79 nstars = -1; 80 81 azimut = b; 74 fit.doFit(); 75 azimut = fit.value(0); 82 76 83 77 if (azimut > 360) azimut -= 360; 84 78 if (azimut < 0) azimut += 360; 85 79 80 nstars = -1; 81 86 82 return 0; 87 83 }
Note:
See TracChangeset
for help on using the changeset viewer.