Go to the documentation of this file.
27 if (scene->mnftype ==
GACTYPE) {
35 memset(navinp, 0,
sizeof (input_sType) * scene->nrec);
40 if ((fp = fopen(scene->l0file,
"r")) ==
NULL) {
42 "-E- %s line %d: unable to open %s for reading\n",
43 __FILE__, __LINE__, scene->l0file);
51 for (
i = 0;
i < scene->nrec;
i++) {
53 irec = scene->indx[
i];
55 if (fseek(fp,
sizeof (swl0hdr) + irec * (
L0LEN), SEEK_SET) != 0) {
57 "-E- %s line %d: error reading %s\n",
58 __FILE__, __LINE__, scene->l0file);
61 if (fread(mnf,
L0LEN, 1, fp) != 1) {
63 "-E- %s line %d: error reading %s\n",
64 __FILE__, __LINE__, scene->l0file);
69 navinp[
i].flag = scene->qual[
i];
72 memcpy(scid, &mnf[
O_SCID],
sizeof (scid));
79 if (mnftype != scene->mnftype) {
81 "-E- %s line %d: frame type mismatch\n",
86 memcpy(navinp[
i].sc_id, &mnf[
O_SCID], 4);
90 memcpy(ttag, &mnf[
O_TIME], 8);
94 &navinp[
i].iyear, &navinp[
i].iday, (
INT32 *) & navinp[
i].
msec);
99 if (trec->action == 1) {
100 printf(
"Correcting frame %d of time %d %d %d by %d msecs\n",
101 irec, navinp[
i].iyear, navinp[
i].iday, navinp[
i].
msec, trec->delmsec);
102 navinp[
i].msec -= trec->delmsec;
103 navinp[
i].nflag[5] = 1;
105 scene->stime -= trec->delmsec / 1000.0;
106 else if (
i == scene->nrec - 1)
107 scene->etime -= trec->delmsec / 1000.0;
108 }
else if (trec->action == 2) {
109 printf(
"Failing frame %d of time %d %d %d for time correction ambiguity\n",
110 irec, navinp[
i].iyear, navinp[
i].iday, navinp[
i].
msec);
111 navinp[
i].nflag[5] = 1;
112 navinp[
i].nflag[0] = 1;
120 for (
j = 0;
j < ninst;
j++)
123 &(navinp[
i].inst_ana[
j][0]),
124 &(navinp[
i].inst_dis[
j][0]));
int conv_soh_(BYTE *soh, FLOAT32 *scana, BYTE *scdis)
INT32 getnavdata(swl0scene *scene, input_sType navinp[])
void ttag2ydmsec(INT16 ttag[], INT16 *year, INT16 *day, INT32 *msec)
INT16 scid2mnftype(INT16 scid[])
int endianess(void)
determine endianess
int swapc_bytes(char *in, int nbyte, int ntime)
INT16 scid2mnfnum(INT16 scid[])
int conv_ins_(BYTE *soh, FLOAT32 *insta, BYTE *instd)
INT16 valid_instlm(INT16 mnftype, INT16 mnfnum, INT16 scanNum)
timeTab * temporal_anomaly(INT16 mnftype, INT16 year, INT16 day, INT32 msec)