Go to the documentation of this file.
6 #define buffsize_mb 0.5
7 #define primary_hdr_size 6
9 int main(
int argc,
char *argv[]) {
16 static unsigned char start_time_tag[8];
17 static unsigned char stop_time_tag[8];
22 unsigned char inbuf[384];
25 printf(
"read_constructor_file: Version as of 06/18/04\n\n");
27 stream = fopen(argv[1],
"r");
29 printf(
"%s not found.\n", argv[1]);
32 fseek(stream, (
long) 0, SEEK_SET);
35 fread(inbuf,
sizeof (
char), 384, stream);
37 tptr = 64 + 16 * inbuf[51];
38 memcpy(start_time_tag, &inbuf[tptr], 8);
39 memcpy(stop_time_tag, &inbuf[tptr + 8], 8);
43 PGS_TD_EOSAMtoTAI(start_time_tag, &taitime_start);
44 PGS_TD_EOSAMtoTAI(stop_time_tag, &taitime_stop);
45 printf(
"starttimeTAI=%f\n", taitime_start);
46 printf(
"stoptimeTAI =%f\n", taitime_stop);
48 PGS_TD_TAItoUTC(taitime_start, (
char*) inbuf);
49 printf(
"starttime=%s\n", inbuf);
50 PGS_TD_TAItoUTC(taitime_stop, (
char*) inbuf);
51 printf(
"stoptime =%s\n", inbuf);
53 printf(
"granule length =%f\n", (taitime_stop - taitime_start) / 60.0);
int main(int argc, char *argv[])