1
0
Fork 0

Misc updates

pull/2/head
Cees Bassa 2014-12-14 23:04:23 +01:00
parent 10a6c8b81e
commit 549d3c2f09
9 changed files with 123 additions and 52 deletions

View File

@ -0,0 +1,52 @@
12.136 42.261
27.250 41.051
39.165 38.353
39.307 41.219
41.064 41.217
41.427 37.444
53.189 33.648
60.012 31.236
60.014 29.760
61.758 29.071
61.758 31.236
67.880 24.262
79.866 14.586
86.310 15.141
91.774 7.468
100.868 7.206
101.726 5.890
107.234 6.124
116.757 5.362
124.933 12.275
127.903 4.834
135.524 4.197
145.910 9.475
146.254 10.759
147.906 10.757
156.868 3.621
164.669 5.619
168.449 3.679
168.734 10.146
184.098 11.251
193.368 9.367
212.182 8.605
217.564 6.900
231.699 5.234
243.576 2.894
258.719 1.967
262.187 4.889
268.389 4.895
279.180 16.305
280.481 16.305
285.178 11.437
287.270 11.439
291.023 7.061
302.353 18.552
302.353 20.947
303.752 20.943
303.755 19.635
315.817 28.318
327.334 34.540
340.645 39.549
357.896 41.536
12.136 42.261

View File

@ -1,4 +1,4 @@
45.965 63.305 Baikonur
46.0336 63.0289 Baikonur
62.7167 40.2833 Plesetsk
28.475 -80.5528 Cape Canaveral
34.7508 -120.4978 Vandenberg AFB

View File

@ -50,42 +50,7 @@
6242 JM 42.9453 -2.8284 623 Jon Mikel
6241 JM 42.9565 -2.8203 619 Jon Mikel
4160 BD 51.2793 5.4768 35 Bram Dorreman
9000 SL 28.2997 -16.5083 2000 Slooh
9988 AA 44.4783 8.9567 0 IK1FJI
9989 EC 60.6750 -151.118 0 KL7UW
9996 AA 51.4390 5.3790 0 PE1ITR
9992 AA 44.772 -0.621 0 F1TE
9991 AA 45.4198 -122.8167 0 N7ZO
9998 AA 53.398 26.629 0 ES5PC
9990 AA 60.675 -151.118 0 PA0JMV
9994 AA 48.698 6.3308 0 ON4BSM
9993 AA 52.273 -0.538 0 G3WDG
9995 AA 50.603 3.957 0 ON4KHG
9997 AA 53.228 6.957 0 PA3ARK
9999 GR 47.348 5.5151 100 Graves
9000 NJ 51.4198 5.4086 25 Nico Janssen
0000 CT 37.7441 23.9093 0 Christos Tsiplakos
#0000 GW 35.9676 -84.0249 348 Greg Williams
#0000 JO 60.45 22.2667 0 Juha Ojanpera
#0000 LW 52.6963 1.2456 0 Les West
#0000 BK 46.8 -92.1000 0 Bob King
#0000 PR 18.22 -65.66 0 Cdr. R. H. Healy
#0000 NP 90.0000 0.0000 0 North Pole
#0000 MP 33.3563 -116.8648 1713 Hale Telescope
#0000 JH 28.7564 -17.8889 2308 Jan Hattenbach
#0000 MB 44.6500 -63.6000 0 Michael Boschat
#0000 IS 54.2825 26.7466 0 Ivan Serhey
#0000 RL 38.9483 -104.5617 2073 Ron Lee
#0000 CW 59.3104 18.1003 0 Christoffer Wallstenius
#0000 BK 46.7217 -92.4592 0 Bob King
#0000 TL 41.5960 -71.0910 0 Tom Loebit
#0000 WH 53.9067 11.9170 0 Wolfgang Hamburg
#0000 CB 52.8361 6.3612 0 Cees Bassa
#0000 CL -32.449 118.861 0 Colin Legg
#0000 PA 31.7361 6.0422 0 Petter Aslaksen
#0000 PA 63.4303 10.4525 0 Petter Aslaksen
#0000 RB 37.2620 -121.977 72 Rick Baldridge
#0000 AM 44.3932 33.9701 44 Andriy Makeyev
#0000 CB -15.8769 -48.087 0 Carlos Bella
#0000 SC 46.1911 9.0223 203 Simone
#0000 AA 38.0 23.75 0 Anthony A
9990 WS 53.0574 -2.5688 65 William Stewart
9992 DB 53.3478 -6.2597 0 Dublin

View File

@ -187,7 +187,12 @@ int main(int argc,char *argv[])
} else {
file=fopen(fname,"r");
while (fgetline(file,line,LIM)>0) {
status=sscanf(line,"%lf %lf %lf %lf",&mjd,&satpos.x,&satpos.y,&satpos.z);
if (line[10]=='T') {
status=sscanf(line,"%s %lf %lf %lf",nfd,&satpos.x,&satpos.y,&satpos.z);
mjd=nfd2mjd(nfd);
} else {
status=sscanf(line,"%lf %lf %lf %lf",&mjd,&satpos.x,&satpos.y,&satpos.z);
}
compute_position(mjd,satpos,s,satno,desig);
}
fclose(file);
@ -434,10 +439,11 @@ void mjd2date(double mjd,char *date)
// nfd2mjd
double nfd2mjd(char *date)
{
int year,month,day,hour,min,sec;
int year,month,day,hour,min;
float sec;
double mjd,dday;
sscanf(date,"%04d-%02d-%02dT%02d:%02d:%02d",&year,&month,&day,&hour,&min,&sec);
sscanf(date,"%04d-%02d-%02dT%02d:%02d:%f",&year,&month,&day,&hour,&min,&sec);
dday=day+hour/24.0+min/1440.0+sec/86400.0;
mjd=date2mjd(year,month,dday);

View File

@ -21,6 +21,8 @@ double mjd2doy(double mjd,int *yr);
double nfd2mjd(char *date);
double date2mjd(int year,int month,double day);
void mjd2date(double mjd,int *year,int *month,double *day);
double gmst(double mjd);
double modulo(double x,double y);
void usage(void)
{
@ -45,7 +47,7 @@ int main(int argc,char *argv[])
float aodp,perigee,apogee,period,dt=0.0;
char line1[70],line2[70];
int arg=0;
double mjd;
double mjd,dh;
// Initialize
orb.satno=99999;
@ -108,13 +110,13 @@ int main(int argc,char *argv[])
orb.ep_day=mjd2doy(mjd+dt/86400.0,&orb.ep_year);
perigee+=XKMPER;
apogee+=XKMPER;
aodp=0.5*(perigee+apogee)/XKMPER;
orb.ecc=0.5*(apogee-perigee)/(aodp*XKMPER);
orb.rev=XKE*pow(aodp,-1.5)*XMNPDA/(2.0*M_PI);
if (orb.rev<10)
orb.bstar=0.0;
orbit(orb,&aodp,&perigee,&apogee,&period);
format_tle(orb,line1,line2);
@ -275,3 +277,24 @@ void mjd2date(double mjd,int *year,int *month,double *day)
return;
}
// Greenwich Mean Sidereal Time
double gmst(double mjd)
{
double t,gmst;
t=(mjd-51544.5)/36525.0;
gmst=modulo(280.46061837+360.98564736629*(mjd-51544.5)+t*t*(0.000387933-t/38710000),360.0);
return gmst;
}
// Return x modulo y [0,y)
double modulo(double x,double y)
{
x=fmod(x,y);
if (x<0.0) x+=y;
return x;
}

View File

@ -339,6 +339,8 @@ int main(int argc,char *argv[])
plot_satellites(filename,img,0,img.mjd,img.exptime,3);
sprintf(filename,"%s/catalog.tle",env);
plot_satellites(filename,img,0,img.mjd,img.exptime,0);
sprintf(filename,"/home/bassa/jsc.txt");
plot_satellites(filename,img,0,img.mjd,img.exptime,5);
cpgend();

View File

@ -401,7 +401,7 @@ void plot_xyz(void)
long imode;
int isci;
float isch;
char norad[7],line[LIM];
char norad[7],line[LIM],nfd[32];
struct sat s;
double rsun,rearth;
double dx,dy,dz,sra,sde;
@ -419,7 +419,12 @@ void plot_xyz(void)
while (fgetline(fp,line,LIM)>0) {
// Get satellite position
sscanf(line,"%lf %lf %lf %lf",&mjd,&satpos.x,&satpos.y,&satpos.z);
if (line[10]=='T') {
sscanf(line,"%s %lf %lf %lf",nfd,&satpos.x,&satpos.y,&satpos.z);
mjd=nfd2mjd(nfd);
} else {
sscanf(line,"%lf %lf %lf %lf",&mjd,&satpos.x,&satpos.y,&satpos.z);
}
// Mark point to plot
if (mjd>m.mjd && mjd0<=m.mjd && flag==0 && i>0)

View File

@ -2191,6 +2191,11 @@ int plot_skymap(void)
cpgsch(1.0);
// Plot everything
if (m.plotstars==1) {
sprintf(filename,"%s/data/constfig.dat",m.datadir);
skymap_plotconstellations(filename);
skymap_plotstars(m.starfile);
}
if (strcmp(m.orientation,"horizontal")==0) {
skymap_plothorizontal_grid();
horizontal2equatorial(m.mjd,m.azi0,m.alt0,&m.ra0,&m.de0);
@ -2199,11 +2204,6 @@ int plot_skymap(void)
skymap_plotequatorial_grid();
equatorial2horizontal(m.mjd,m.ra0,m.de0,&m.azi0,&m.alt0);
}
if (m.plotstars==1) {
sprintf(filename,"%s/data/constfig.dat",m.datadir);
skymap_plotconstellations(filename);
skymap_plotstars(m.starfile);
}
skymap_plotsun();
plot_apex(35786.0,0.0);

View File

@ -223,6 +223,24 @@ int main(int argc,char *argv[])
if (file==NULL)
fatal_error("File open failed for reading \"%s\"",tlefile);
while (fgetline(file,line1,LIM)>0) {
// Find TLE line
if (line1[0]=='1') {
fgetline(file,line2,LIM);
sscanf(line1+2,"%d",&no);
if (satno==0 || satno==no) {
if (name==1 && desig==0)
printf("%s\n",line0);
else if (name==0 && desig==1)
printf("%.8s\n",line1+9);
else
printf("%s\n%s\n%s\n",line0,line1,line2);
}
}
strcpy(line0,line1);
}
/*
// Loop over file
while (fgetline(file,line0,LIM)>0) {
// Read data lines
@ -247,7 +265,7 @@ int main(int argc,char *argv[])
printf("%s\n%s\n",line0,line2);
}
}
*/
fclose(file);
} else if (oneline==1) {
// Open file