24 if ((fp = fopen(indx->l0file,
"r")) ==
NULL) {
26 "-E- %s line %d: unable to open %s for reading\n",
27 __FILE__, __LINE__, indx->l0file);
38 for (irec = 0; irec < indx->nrecs; irec++) {
45 !(indx->rec[irec].tRanError ||
46 indx->rec[irec].tSeqError ||
47 indx->rec[irec].tDifError)) ||
49 ((indx->rec[irec].mnfnum == 1) &&
50 !(indx->rec[irec].scidError ||
51 indx->rec[irec].sgaError ||
52 indx->rec[irec].tRanError ||
53 indx->rec[irec].tSeqError ||
54 indx->rec[irec].tDifError ||
55 indx->rec[irec].bitError))) {
57 if (fseek(fp,
sizeof (swl0hdr) + irec * (
L0LEN), SEEK_SET) != 0) {
59 "-E- %s line %d: error reading %s\n",
60 __FILE__, __LINE__, indx->l0file);
63 if (fread(mnf,
L0LEN, 1, fp) != 1) {
65 "-E- %s line %d: error reading %s\n",
66 __FILE__, __LINE__, indx->l0file);
71 memcpy(gps[ngps].sc_id, &mnf[
O_SCID], 4);
74 memcpy(ttag, &mnf[
O_TIME], 8);
78 &gps[ngps].iyear, &gps[ngps].iday, (
INT32 *) & gps[ngps].
msec);
85 "-W- %s line %d: limit on MAXFRAMES exceeded\n",
95 unix2yds(indx->timeLast, &gps[ngps].iyear, &gps[ngps].iday, &secs);
96 gps[ngps].msec = (
INT32) secs * 1000;
97 memset(gps[ngps].sc_ana, 0,
sizeof (gps[ngps].sc_ana));
98 memset(gps[ngps].sc_dis, 0,
sizeof (gps[ngps].sc_dis));