Updates
parent
a85c24da4f
commit
d1999fbe9a
2
makefile
2
makefile
|
@ -11,7 +11,7 @@ CC = gcc
|
|||
F77 = gfortran
|
||||
|
||||
all:
|
||||
make addwcs angular calibrate dec2sex faketle fitsheader fitskey imgstat jpg2fits jpgstack measure pgm2fits plotfits pstrack rde2iod reduce residuals runsched satfit satid satmap satorbit sex2dec skymap tle2ole tleinfo uk2iod viewer wcsfit deproject slewto waitfor pass detect launchtle propagate fakeiod csv2tle normal posmatch posvel xyz2tle
|
||||
make addwcs angular calibrate dec2sex faketle fitsheader fitskey imgstat jpg2fits jpgstack measure pgm2fits plotfits pstrack rde2iod reduce residuals runsched satfit satid satmap satorbit sex2dec skymap tle2ole tleinfo uk2iod viewer wcsfit deproject slewto waitfor pass detect launchtle propagate fakeiod csv2tle normal posmatch posvel xyz2tle mvtle
|
||||
|
||||
mvtle: mvtle.o sgdp4.o satutl.o deep.o ferror.o
|
||||
$(CC) -o mvtle mvtle.o sgdp4.o satutl.o deep.o ferror.o $(LFLAGS)
|
||||
|
|
83
satorbit.c
83
satorbit.c
|
@ -73,6 +73,7 @@ double dgmst(double);
|
|||
double modulo(double,double);
|
||||
void get_site(int site_id);
|
||||
void ecliptical2equatorial(double l,double b,double *ra,double *de);
|
||||
void plot_launch_sites(void);
|
||||
|
||||
// Initialize setup
|
||||
void initialize_setup(void)
|
||||
|
@ -971,10 +972,6 @@ void plot_map(void)
|
|||
// Plot terminator
|
||||
plot_terminator();
|
||||
|
||||
// Plot moon
|
||||
if (m.moonflag==1)
|
||||
plot_moon();
|
||||
|
||||
// Plot Grid
|
||||
cpgsls(2);
|
||||
cpgsci(14);
|
||||
|
@ -997,6 +994,13 @@ void plot_map(void)
|
|||
cpgsci(1);
|
||||
}
|
||||
|
||||
// Plot moon
|
||||
if (m.moonflag==1)
|
||||
plot_moon();
|
||||
|
||||
// Plot launch sites
|
||||
plot_launch_sites();
|
||||
|
||||
// Plot track
|
||||
if (m.xyzflag==0)
|
||||
plot_track();
|
||||
|
@ -1112,7 +1116,7 @@ int main(int argc,char *argv[])
|
|||
initialize_setup();
|
||||
|
||||
// Decode options
|
||||
while ((arg=getopt(argc,argv,"t:c:i:s:l:hN:p:mL:B:"))!=-1) {
|
||||
while ((arg=getopt(argc,argv,"t:c:i:s:l:hN:p:mL:B:R:S"))!=-1) {
|
||||
switch (arg) {
|
||||
|
||||
case 't':
|
||||
|
@ -1149,6 +1153,14 @@ int main(int argc,char *argv[])
|
|||
m.lat=atof(optarg);
|
||||
break;
|
||||
|
||||
case 'R':
|
||||
m.w=atof(optarg);
|
||||
break;
|
||||
|
||||
case 'S':
|
||||
strcpy(m.orientation,"sidereal");
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
strcpy(m.xyzfile,optarg);
|
||||
m.xyzflag=1;
|
||||
|
@ -1512,3 +1524,64 @@ void get_site(int site_id)
|
|||
|
||||
return;
|
||||
}
|
||||
|
||||
// Plot launch sites
|
||||
void plot_launch_sites(void)
|
||||
{
|
||||
int i=0;
|
||||
char line[LIM];
|
||||
FILE *file;
|
||||
double lat,lng;
|
||||
char site[64],text[8],filename[LIM];
|
||||
float isch;
|
||||
float x0,y0,z0,l0,b0;
|
||||
|
||||
|
||||
cpgqch(&isch);
|
||||
|
||||
sprintf(filename,"%s/data/launchsites.txt",m.datadir);
|
||||
file=fopen(filename,"r");
|
||||
if (file==NULL) {
|
||||
printf("File with site information not found!\n");
|
||||
return;
|
||||
}
|
||||
while (fgets(line,LIM,file)!=NULL) {
|
||||
// Skip
|
||||
if (strstr(line,"#")!=NULL)
|
||||
continue;
|
||||
|
||||
// Strip newline
|
||||
line[strlen(line)-1]='\0';
|
||||
|
||||
// Read data
|
||||
sscanf(line,"%lf %lf",
|
||||
&lat,&lng);
|
||||
strcpy(site,line+21);
|
||||
|
||||
l0=modulo(lng,360.0);
|
||||
b0=lat;
|
||||
if (l0>180.0)
|
||||
l0-=360.0;
|
||||
|
||||
// Convert
|
||||
z0=cos(l0*D2R)*cos(b0*D2R)*XKMPER;
|
||||
x0=sin(l0*D2R)*cos(b0*D2R)*XKMPER;
|
||||
y0=sin(b0*D2R)*XKMPER;
|
||||
|
||||
rotate(1,m.l0,&x0,&y0,&z0);
|
||||
rotate(0,m.b0,&x0,&y0,&z0);
|
||||
|
||||
// Plot location
|
||||
if (z0>0.0) {
|
||||
cpgsci(2);
|
||||
cpgsch(0.5);
|
||||
cpgpt1(x0,y0,4);
|
||||
cpgtext(x0,y0,site);
|
||||
cpgsci(1);
|
||||
}
|
||||
}
|
||||
fclose(file);
|
||||
cpgsch(isch);
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
2
skymap.c
2
skymap.c
|
@ -1981,7 +1981,7 @@ long identify_satellite(char *filename,int satno,double mjd,float rx,float ry)
|
|||
// Print TLE
|
||||
print_tle(filename,Isatmin);
|
||||
printf("Age: %.1f d\n\n",smin.age);
|
||||
printf("x: %+10.2lf km; vx: %+6.3f km/s\ny: %+10.2lf km; vy: %+6.3f km/s\nz: %+10.2lf km; vz: %+6.3f km/s\nr: %10.2lf km; v: %6.3f km/s\nl: %6.2lf; b: %6.2lf; h: %10.2lf km\n\n",smin.x,smin.vx,smin.y,smin.vy,smin.z,smin.vz,smin.r,smin.v,lng,lat,smin.h);
|
||||
printf("x: %+12.4lf km; vx: %+8.5f km/s\ny: %+12.4lf km; vy: %+8.5f km/s\nz: %+12.4lf km; vz: %+8.5f km/s\nr: %10.2lf km; v: %6.3f km/s\nl: %6.2lf; b: %6.2lf; h: %10.2lf km\n\n",smin.x,smin.vx,smin.y,smin.vy,smin.z,smin.vz,smin.r,smin.v,lng,lat,smin.h);
|
||||
dec2sex(smin.ra/15.0,sra,0,5);
|
||||
dec2sex(smin.de,sde,0,4);
|
||||
|
||||
|
|
Loading…
Reference in New Issue