// Prediction mouvement d'etoiles entre un tour et le suivant... // si TS -> TS + dT, H -> H + dT, dT=dH // // dz = - cos phi sin az dH (check sign) // daz = (sin phi - cos az cotg z cos phi) dH (check sign) // // free parameters = period + phase #define DIODE_UNUSED_1 3 #define DIODE_UNUSED_2 7 #include #include "ssthandler.h" SSTHandler::SSTHandler() { diodeHistLength = nb_per_block*2+10; diodeT = new int[diodeHistLength*nb_photo_diodes]; starHistLength = 300; stars = new (vector[starHistLength]); lastBlkNum = -1; Has2Bars(false); prcTodo=0; } SSTHandler::SSTHandler(SSTHandler const& x) { diodeHistLength = x.diodeHistLength; diodeT = new int[diodeHistLength*nb_photo_diodes]; memcpy(diodeT, x.diodeT, diodeHistLength*nb_photo_diodes); starHistLength = x.starHistLength; stars = new (vector[starHistLength]); for (int i=0; i[starHistLength]); for (int i=0; isst[i][j*3+k]; word = (word >> (28-4*l)) & 0xF; //printf("diode %d mot %d valeur %d\n", j*8+l, k, word); diod[j*8+l] = (diod[j*8+l] << 4) + word; } } void SSTHandler::RemoveOffset() { int j0 = diodeHistLength-(nb_per_block*2); // Decalage vers la gauche de la taille d'un bloc memcpy(diodeT, diodeT + (nb_per_block*2)*nb_photo_diodes, j0*nb_photo_diodes); for (int j=0; j0) { m = s/n; sig = sqrt(s2/n - m*m); } else { m = 0; break; } } for (int i=0; i<46; i++) diode(j+j0,i) -= m; } } int SSTHandler::getRawSignal(int imesure, int idiode) // for last block { if (imesure<0 || imesure>=nb_per_block*2 || idiode<0 || idiode>=48) return -99999; return diodeRaw[imesure][idiode]; } int SSTHandler::getSignal(int imesure, int idiode) // for last block { int j0 = diodeHistLength-(nb_per_block*2); if (imesure+j0<0 || imesure>=nb_per_block*2 || idiode<0 || idiode>=nb_photo_diodes) return -99999; return diode(imesure+j0, idiode); }