Skip to content

Commit b4f5fd4

Browse files
committed
Support for Advanced Navigation ANPP format
1 parent af7be18 commit b4f5fd4

8 files changed

Lines changed: 560 additions & 24 deletions

File tree

app/consapp/convbin/convbin.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ static const char *help[]={
111111
" rt17 = Trimble RT17",
112112
" sbf = Septentrio SBF",
113113
" unicore = Unicore binary data output",
114+
" anpp = Advanced Navigation Packet Protocol",
114115
" rinex= RINEX",
115116
" -ro opt receiver options",
116117
" -f freq number of frequencies [all]",
@@ -630,6 +631,7 @@ static int cmdopts(int argc, char **argv, rnxopt_t *opt, char **ifile,
630631
else if (!strcmp(fmt,"rt17" )) format=STRFMT_RT17;
631632
else if (!strcmp(fmt,"sbf" )) format=STRFMT_SEPT;
632633
else if (!strcmp(fmt,"unicore")) format=STRFMT_UNICORE;
634+
else if (!strcmp(fmt,"anpp" )) format=STRFMT_ANPP;
633635
#ifdef RTK_DISABLED
634636
else if (!strcmp(fmt,"tersus")) format=STRFMT_TERSUS;
635637
#endif
@@ -654,6 +656,7 @@ static int cmdopts(int argc, char **argv, rnxopt_t *opt, char **ifile,
654656
else if (!strcmp(p,".rt17" )) format=STRFMT_RT17;
655657
else if (!strcmp(p,".sbf" )) format=STRFMT_SEPT;
656658
else if (!strcmp(p,".unc" )) format=STRFMT_UNICORE;
659+
else if (!strcmp(p,".anpp" )) format=STRFMT_ANPP;
657660
#ifdef RTK_DISABLED
658661
else if (!strcmp(p,".trs" )) format=STRFMT_TERSUS;
659662
#endif

app/consapp/convbin/gcc/makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ all : convbin
1717
convbin : convbin.o rtkcmn.o trace.o rinex.o sbas.o preceph.o rcvraw.o convrnx.o
1818
convbin : rtcm.o rtcm2.o rtcm3.o rtcm3e.o pntpos.o ephemeris.o ionex.o
1919
convbin : novatel.o ublox.o crescent.o skytraq.o javad.o nvs.o
20-
convbin : binex.o rt17.o septentrio.o swiftnav.o unicore.o
20+
convbin : binex.o rt17.o septentrio.o swiftnav.o unicore.o adnav.o
2121
convbin : sofa.o
2222

2323
convbin.o : ../convbin.c
@@ -74,6 +74,8 @@ swiftnav.o: $(SRC)/rcv/swiftnav.c
7474
$(CC) -c $(CFLAGS) $(SRC)/rcv/swiftnav.c
7575
unicore.o: $(SRC)/rcv/unicore.c
7676
$(CC) -c $(CFLAGS) $(SRC)/rcv/unicore.c
77+
adnav.o : $(SRC)/rcv/adnav.c
78+
$(CC) -c $(CFLAGS) $(SRC)/rcv/adnav.c
7779
sofa.o : $(SRC)/sofa.c
7880
$(CC) -c $(CFLAGS) $(SRC)/sofa.c
7981

@@ -104,6 +106,7 @@ rt17.o : $(SRC)/rtklib.h
104106
septentrio.o: $(SRC)/rtklib.h
105107
swiftnav.o : $(SRC)/rtklib.h
106108
unciore.o : $(SRC)/rtklib.h
109+
adnav.o : $(SRC)/rtklib.h
107110

108111
DATDIR = ../../../test/data/rcvraw
109112

app/consapp/str2str/str2str.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ static const char *help[]={
9191
" rt17 : Trimble RT17 (only in)",
9292
" sbf : Septentrio SBF (only in)",
9393
" unicore : Unicore (only in)",
94+
" anpp : Advanced Navigation Packet Protocol (only in)",
9495
"",
9596
" -msg \"type[(tint)][,type[(tint)]...]\"",
9697
" rtcm message types and output intervals (s)",
@@ -168,6 +169,7 @@ static void decodefmt(char *path, int *fmt)
168169
else if (!strcmp(p,"#rt17" )) *fmt=STRFMT_RT17;
169170
else if (!strcmp(p,"#sbf" )) *fmt=STRFMT_SEPT;
170171
else if (!strcmp(p,"#unicore" )) *fmt=STRFMT_UNICORE;
172+
else if (!strcmp(p,"#anpp" )) *fmt=STRFMT_ANPP;
171173
else return;
172174
*p='\0';
173175
}

src/convrnx.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -340,16 +340,7 @@ static int open_strfile(strfile_t *str, const char *file)
340340
static void close_strfile(strfile_t *str)
341341
{
342342
trace(3,"close_strfile:\n");
343-
344-
if (str->format==STRFMT_RTCM2||str->format==STRFMT_RTCM3) {
345-
if (str->fp) fclose(str->fp);
346-
}
347-
else if (str->format<=MAXRCVFMT) {
348-
if (str->fp) fclose(str->fp);
349-
}
350-
else if (str->format==STRFMT_RINEX) {
351-
if (str->fp) fclose(str->fp);
352-
}
343+
if (str->fp) fclose(str->fp);
353344
}
354345
/* set format and files in RINEX options comments ----------------------------*/
355346
static void setopt_file(int format, char **paths, int n, const int *mask,

0 commit comments

Comments
 (0)