Ignore:
Timestamp:
Nov 22, 1999, 10:43:44 AM (26 years ago)
Author:
ansari
Message:

fin de fichier, start

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Poubelle/archTOI.old/gondolageom.cc

    r581 r612  
    44#include <math.h>
    55#include "gondolageom.h"
     6
     7
    68extern "C" {
    79#include "aa_hadec.h"
     
    2729           
    2830
    29 GondolaGeom::GondolaGeom() {
     31GondolaGeom::GondolaGeom()
     32: fit(200, 2)
     33{
    3034  azPend = 0;
    3135  angPend = 0;
     
    5155  if (nstars<0) {
    5256    nstars = 0;
    53     saz=staz=st=st2=0;
     57    fit.clear();
    5458  }
    5559 
     
    6165  if (azCor - az0 >  180) azCor -= 360;
    6266  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);
    6769}
    6870
     
    7072int GondolaGeom::solveStars() {
    7173  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);
    8276 
    8377  if (azimut > 360) azimut -= 360;
    8478  if (azimut < 0)   azimut += 360;
    8579
     80  nstars = -1;
     81 
    8682  return 0;
    8783}
Note: See TracChangeset for help on using the changeset viewer.