void refine_offset(void *l,double *out_t,double *out_x) { int i; imgLocRec *loc=(imgLocRec *)l; loc->offT=0.0,loc->offX=0.0; errorVsTimeAz(loc->offT,loc); errorVsTimeRng(loc->offX,loc); printPosError(loc); #ifndef CHECK_OFFSET for (i=0;i<20;i++) { loc->offT = minimize((minFunc)errorVsTimeAz,(void *)loc,loc->offT,0.0001); loc->offX = minimize((minFunc)errorVsTimeRng,(void *)loc,loc->offX,1.0); printf("Offsets: Time=%f s; Slant Range=%f m\n",loc->offT,loc->offX); } errorVsTimeAz(loc->offT,loc); errorVsTimeRng(loc->offX,loc); printPosError(loc); #endif *out_t=loc->offT; *out_x=loc->offX; }
void Finger::printPosError(void) { printPosError(0); }