Log time and site for newly identified curves
parent
9ed7764338
commit
c2b8c40438
10
rftrace.c
10
rftrace.c
|
@ -5,6 +5,8 @@
|
|||
#include "sgdp4h.h"
|
||||
#include "satutl.h"
|
||||
#include "rftrace.h"
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
|
||||
#define LIM 80
|
||||
#define D2R M_PI/180.0
|
||||
|
@ -324,7 +326,9 @@ void identify_trace(char *tlefile,struct trace t,int satno)
|
|||
int satnomin;
|
||||
double rmsmin,freqmin;
|
||||
char *env,freqlist[LIM];
|
||||
|
||||
struct timeval tv;
|
||||
char tbuf[30];
|
||||
|
||||
env=getenv("ST_DATADIR");
|
||||
sprintf(freqlist,"%s/data/frequencies.txt",env);
|
||||
|
||||
|
@ -413,8 +417,10 @@ void identify_trace(char *tlefile,struct trace t,int satno)
|
|||
printf("Store frequency? [y/n]\n");
|
||||
status=scanf("%s",text);
|
||||
if (text[0]=='y') {
|
||||
gettimeofday(&tv,0);
|
||||
strftime(tbuf,30,"%Y-%m-%dT%T",gmtime(&tv.tv_sec));
|
||||
file=fopen(freqlist,"a");
|
||||
fprintf(file,"%05d %8.3f\n",satnomin,1e-6*freqmin);
|
||||
fprintf(file,"%05d %8.3f %.19s %04d\n",satnomin,1e-6*freqmin,tbuf,s.id);
|
||||
fclose(file);
|
||||
file=fopen("log.txt","a");
|
||||
fprintf(file,"%05d %8.3f %.3f %.19s\n",satnomin,1e-6*freqmin,1e-3*rmsmin,nfdmin);
|
||||
|
|
Loading…
Reference in New Issue