Bug in angles expecting degrees, getting arcseconds
parent
1b33716d7b
commit
39f9972751
8
makefile
8
makefile
|
@ -112,8 +112,8 @@ faketle: faketle.o sgdp4.o satutl.o deep.o ferror.o
|
|||
imgstat: imgstat.o
|
||||
$(CC) -o imgstat imgstat.o -lm -lqfits
|
||||
|
||||
satfit: satfit.o sgdp4.o satutl.o deep.o ferror.o versafit.o dsmin.o simplex.o forward.o
|
||||
$(F77) -o satfit satfit.o sgdp4.o satutl.o deep.o ferror.o versafit.o dsmin.o simplex.o forward.o $(LFLAGS)
|
||||
satfit: satfit.o sgdp4.o satutl.o deep.o ferror.o versafit.o dsmin.o simplex.o
|
||||
$(F77) -o satfit satfit.o sgdp4.o satutl.o deep.o ferror.o versafit.o dsmin.o simplex.o $(LFLAGS)
|
||||
|
||||
uk2iod: uk2iod.o
|
||||
$(CC) -o uk2iod uk2iod.o -lm
|
||||
|
@ -124,8 +124,8 @@ rde2iod: rde2iod.o
|
|||
stviewer: stviewer.o
|
||||
$(CC) -o stviewer stviewer.o -lm -lqfits
|
||||
|
||||
residuals: residuals.o sgdp4.o satutl.o deep.o ferror.o forward.o
|
||||
$(CC) -o residuals residuals.o sgdp4.o satutl.o deep.o ferror.o forward.o -lm -lwcs
|
||||
residuals: residuals.o sgdp4.o satutl.o deep.o ferror.o
|
||||
$(CC) -o residuals residuals.o sgdp4.o satutl.o deep.o ferror.o -lm -lwcs
|
||||
|
||||
tleinfo: tleinfo.o sgdp4.o satutl.o deep.o ferror.o
|
||||
$(CC) -o tleinfo tleinfo.o sgdp4.o satutl.o deep.o ferror.o -lm
|
||||
|
|
24
residuals.c
24
residuals.c
|
@ -566,3 +566,27 @@ struct data read_data(char *filename)
|
|||
return d;
|
||||
}
|
||||
|
||||
// Get a x and y from a RA and Decl
|
||||
void forward(double ra0,double de0,double ra,double de,double *x,double *y)
|
||||
{
|
||||
int i,status;
|
||||
double phi,theta;
|
||||
struct celprm cel;
|
||||
|
||||
// Initialize Reference Angles
|
||||
celini(&cel);
|
||||
cel.ref[0]=ra0;
|
||||
cel.ref[1]=de0;
|
||||
cel.ref[2]=999.;
|
||||
cel.ref[3]=999.;
|
||||
cel.flag=0.;
|
||||
strcpy(cel.prj.code,"TAN");
|
||||
|
||||
if (celset(&cel)) {
|
||||
printf("Error in Projection (celset)\n");
|
||||
return;
|
||||
}
|
||||
cels2x(&cel,1,0,1,1,&ra,&de,&phi,&theta,x,y,&status);
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
28
satfit.c
28
satfit.c
|
@ -1487,6 +1487,7 @@ double chisq(double a[])
|
|||
d.p[i].rac=modulo(atan2(dy,dx)*R2D,360.0);
|
||||
d.p[i].dec=asin(dz/r)*R2D;
|
||||
|
||||
|
||||
// Compute offset
|
||||
forward(d.p[i].ra,d.p[i].de,d.p[i].rac,d.p[i].dec,&d.p[i].dx,&d.p[i].dy);
|
||||
d.p[i].dr=sqrt(d.p[i].dx*d.p[i].dx+d.p[i].dy*d.p[i].dy);
|
||||
|
@ -1937,3 +1938,30 @@ orbit_t rv2el(int satno,double mjd,xyz_t r0,xyz_t v0)
|
|||
|
||||
return orb[i];
|
||||
}
|
||||
|
||||
|
||||
// Get a x and y from a RA and Decl
|
||||
void forward(double ra0,double de0,double ra,double de,double *x,double *y)
|
||||
{
|
||||
int i,status;
|
||||
double phi,theta;
|
||||
struct celprm cel;
|
||||
|
||||
// Initialize Reference Angles
|
||||
celini(&cel);
|
||||
cel.ref[0]=ra0;
|
||||
cel.ref[1]=de0;
|
||||
cel.ref[2]=999.;
|
||||
cel.ref[3]=999.;
|
||||
cel.flag=0.;
|
||||
strcpy(cel.prj.code,"STG");
|
||||
|
||||
if (celset(&cel)) {
|
||||
printf("Error in Projection (celset)\n");
|
||||
return;
|
||||
}
|
||||
cels2x(&cel,1,0,1,1,&ra,&de,&phi,&theta,x,y,&status);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue