Skip to content

Commit 49787af

Browse files
committed
Support for Advanced Navigation ANPP format
1 parent 57d39e7 commit 49787af

25 files changed

Lines changed: 716 additions & 33 deletions

File tree

app/consapp/convbin/bcc/_convbin.cbproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,9 @@
230230
<CppCompile Include="..\..\..\..\src\rcv\unicore.c">
231231
<BuildOrder>26</BuildOrder>
232232
</CppCompile>
233+
<CppCompile Include="..\..\..\..\src\rcv\adnav.c">
234+
<BuildOrder>28</BuildOrder>
235+
</CppCompile>
233236
<CppCompile Include="..\..\..\..\src\rinex.c">
234237
<BuildOrder>8</BuildOrder>
235238
<BuildOrder>13</BuildOrder>

app/consapp/convbin/convbin.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ static const char *help[]={
8686
" 0x01-01,0x01-02,0x01-03,0x01-04,0x01-06,0x7f-05",
8787
" Trimble : RT17",
8888
" Septentrio : SBF",
89+
" Advanded Navigation : ANPP",
8990
" RINEX : OBS, NAV, GNAV, HNAV, LNAV, QNAV",
9091
"",
9192
" Options [default]",
@@ -111,6 +112,7 @@ static const char *help[]={
111112
" rt17 = Trimble RT17",
112113
" sbf = Septentrio SBF",
113114
" unicore = Unicore binary data output",
115+
" anpp = Advanced Navigation Packet Protocol",
114116
" rinex= RINEX",
115117
" -ro opt receiver options",
116118
" -f freq number of frequencies [all]",
@@ -170,6 +172,7 @@ static const char *help[]={
170172
" *.rt17 Trimble RT17",
171173
" *.sbf Septentrio SBF",
172174
" *.unc Unicore binary data output",
175+
" *.anpp Advanced Navigation Packet Protocol",
173176
" *.obs,*.*o RINEX OBS",
174177
" *.rnx RINEX OBS",
175178
" *.nav,*.*n RINEX NAV",
@@ -403,7 +406,11 @@ static int get_filetime(const char *file, gtime_t *time)
403406
struct stat st;
404407
if (!stat(path, &st)) {
405408
struct tm tm;
409+
#ifdef _MSC_VER
410+
if (gmtime_s(&tm, &st.st_mtime) != 0) {
411+
#else
406412
if (gmtime_r(&st.st_mtime, &tm)) {
413+
#endif
407414
double ep[6];
408415
ep[0] = tm.tm_year + 1900;
409416
ep[1] = tm.tm_mon + 1;
@@ -633,6 +640,7 @@ static int cmdopts(int argc, char **argv, rnxopt_t *opt, char **ifile,
633640
#ifdef RTK_DISABLED
634641
else if (!strcmp(fmt,"tersus")) format=STRFMT_TERSUS;
635642
#endif
643+
else if (!strcmp(fmt,"anpp" )) format=STRFMT_ANPP;
636644
else if (!strcmp(fmt,"rinex")) format=STRFMT_RINEX;
637645
}
638646
else {
@@ -657,6 +665,7 @@ static int cmdopts(int argc, char **argv, rnxopt_t *opt, char **ifile,
657665
#ifdef RTK_DISABLED
658666
else if (!strcmp(p,".trs" )) format=STRFMT_TERSUS;
659667
#endif
668+
else if (!strcmp(p,".anpp" )) format=STRFMT_ANPP;
660669
else if (!strcmp(p,".obs" )) format=STRFMT_RINEX;
661670
else if (!strcmp(p+3,"o" )) format=STRFMT_RINEX;
662671
else if (!strcmp(p+3,"O" )) format=STRFMT_RINEX;

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
@@ -72,6 +72,8 @@ swiftnav.o: $(SRC)/rcv/swiftnav.c
7272
$(CC) -c $(CFLAGS) $(SRC)/rcv/swiftnav.c
7373
unicore.o: $(SRC)/rcv/unicore.c
7474
$(CC) -c $(CFLAGS) $(SRC)/rcv/unicore.c
75+
adnav.o : $(SRC)/rcv/adnav.c
76+
$(CC) -c $(CFLAGS) $(SRC)/rcv/adnav.c
7577
sofa.o : $(SRC)/sofa.c
7678
$(CC) -c $(CFLAGS) $(SRC)/sofa.c
7779

@@ -101,6 +103,7 @@ rt17.o : $(SRC)/rtklib.h
101103
septentrio.o: $(SRC)/rtklib.h
102104
swiftnav.o : $(SRC)/rtklib.h
103105
unciore.o : $(SRC)/rtklib.h
106+
adnav.o : $(SRC)/rtklib.h
104107

105108
DATDIR = ../../../test/data/rcvraw
106109

app/consapp/convbin/msc/msc.vcxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@
198198
<ClCompile Include="..\..\..\..\src\rcv\septentrio.c" />
199199
<ClCompile Include="..\..\..\..\src\rcv\swiftnav.c" />
200200
<ClCompile Include="..\..\..\..\src\rcv\unicore.c" />
201+
<ClCompile Include="..\..\..\..\src\rcv\adnav.c" />
201202
<ClCompile Include="..\convbin.c" />
202203
</ItemGroup>
203204
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

app/consapp/rtkrcv/gcc/makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ rtkrcv : rtkrcv.o vt.o rtkcmn.o trace.o rtksvr.o rtkpos.o geoid.o solution.o
1515
rtkrcv : sbas.o stream.o rcvraw.o rtcm.o preceph.o options.o pntpos.o ppp.o ppp_ar.o
1616
rtkrcv : novatel.o ublox.o crescent.o skytraq.o javad.o nvs.o binex.o
1717
rtkrcv : rt17.o ephemeris.o rinex.o ionex.o rtcm2.o rtcm3.o rtcm3e.o
18-
rtkrcv : tides.o septentrio.o swiftnav.o unicore.o
18+
rtkrcv : tides.o septentrio.o swiftnav.o unicore.o adnav.o
1919
rtkrcv : sofa.o
2020

2121

@@ -91,6 +91,8 @@ septentrio.o: $(SRC)/rcv/septentrio.c
9191
$(CC) -c $(CFLAGS) $(SRC)/rcv/septentrio.c
9292
unicore.o: $(SRC)/rcv/unicore.c
9393
$(CC) -c $(CFLAGS) $(SRC)/rcv/unicore.c
94+
adnav.o: $(SRC)/rcv/adnav.c
95+
$(CC) -c $(CFLAGS) $(SRC)/rcv/adnav.c
9496
sofa.o : $(SRC)/sofa.c
9597
$(CC) -c $(CFLAGS) $(SRC)/sofa.c
9698

@@ -126,6 +128,7 @@ binex.o : $(SRC)/rtklib.h
126128
rt17.o : $(SRC)/rtklib.h
127129
septentrio.o: $(SRC)/rtklib.h
128130
unciore.o : $(SRC)/rtklib.h
131+
adnav.o : $(SRC)/rtklib.h
129132
ephemeris.o: $(SRC)/rtklib.h
130133
rinex.o : $(SRC)/rtklib.h
131134
ionex.o : $(SRC)/rtklib.h

app/consapp/rtkrcv/rtkrcv.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ static const char *pathopts[]={ /* path options help */
185185
#define FLGOPT "0:off,1:std+2:age/ratio/ns"
186186
#define ISTOPT "0:off,1:serial,2:file,3:tcpsvr,4:tcpcli,6:ntripcli,7:ftp,8:http"
187187
#define OSTOPT "0:off,1:serial,2:file,3:tcpsvr,4:tcpcli,5:ntripsvr,9:ntripcas,11:udpcli"
188-
#define FMTOPT "0:rtcm2,1:rtcm3,2:oem4,4:ubx,5:swift,6:hemis,7:skytraq,8:javad,9:nvs,10:binex,11:rt17,12:sbf,14:unicore,15:rinex,16:sp3,17:clk"
188+
#define FMTOPT "0:rtcm2,1:rtcm3,2:oem4,4:ubx,5:swift,6:hemis,7:skytraq,8:javad,9:nvs,10:binex,11:rt17,12:sbf,14:unicore,15:anpp,16:rinex,17:sp3,18:clk"
189189
#define NMEOPT "0:off,1:latlon,2:single"
190190
#define SOLOPT "0:llh,1:xyz,2:enu,3:nmea,4:stat"
191191
#define MSGOPT "0:all,1:rover,2:base,3:corr"
@@ -1029,7 +1029,7 @@ static void prstream(vt_t *vt)
10291029
"http","ntripcas","udpsvr","udpcli","membuf"
10301030
};
10311031
const char *fmt[]={"rtcm2","rtcm3","oem4","","ubx","swift","hemis","skytreq",
1032-
"javad","nvs","binex","rt17","sbf","","unicore","sp3",""};
1032+
"javad","nvs","binex","rt17","sbf","","unicore","anpp","sp3",""};
10331033
const char *sol[]={"llh","xyz","enu","nmea","stat","-"};
10341034
stream_t stream[9];
10351035
int i,format[9]={0};

app/consapp/str2str/gcc/makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ all : str2str
1515
str2str : str2str.o stream.o rtkcmn.o trace.o solution.o sbas.o geoid.o
1616
str2str : rcvraw.o novatel.o ublox.o crescent.o skytraq.o javad.o
1717
str2str : nvs.o binex.o rt17.o rtcm.o rtcm2.o rtcm3.o rtcm3e.o preceph.o streamsvr.o
18-
str2str : septentrio.o swiftnav.o unicore.o
18+
str2str : septentrio.o swiftnav.o unicore.o adnav.o
1919
str2str : sofa.o
2020

2121
str2str.o : ../str2str.c
@@ -68,6 +68,8 @@ swiftnav.o: $(SRC)/rcv/swiftnav.c
6868
$(CC) -c $(CFLAGS) $(SRC)/rcv/swiftnav.c
6969
unicore.o: $(SRC)/rcv/unicore.c
7070
$(CC) -c $(CFLAGS) $(SRC)/rcv/unicore.c
71+
adnav.o: $(SRC)/rcv/adnav.c
72+
$(CC) -c $(CFLAGS) $(SRC)/rcv/adnav.c
7173
sofa.o: $(SRC)/sofa.c
7274
$(CC) -c $(CFLAGS) $(SRC)/sofa.c
7375

@@ -96,6 +98,7 @@ preceph.o : $(SRC)/rtklib.h
9698
septentrio.o: $(SRC)/rtklib.h
9799
swiftnav.o : $(SRC)/rtklib.h
98100
unicore.o : $(SRC)/rtklib.h
101+
adnav.o : $(SRC)/rtklib.h
99102

100103
install:
101104
cp str2str $(BINDIR)

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
}

app/qtapp/rtkconv_qt/convmain.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ void MainWindow::selectInputFile()
449449
{
450450
QString filename = QFileDialog::getOpenFileName(this, tr("Input RTCM, RCV RAW or RINEX File"), ui->cBInputFile->currentText(),
451451
tr("All (*.*);;RTCM 2 (*.rtcm2);;RTCM 3 (*.rtcm3);;NovtAtel (*.gps);;ublox (*.ubx);;"
452-
"Hemisphere (*.bin);;Javad (*.jps);;RINEX OBS (*.obs *.*O);;Septentrio (*.sbf)"));
452+
"Hemisphere (*.bin);;Javad (*.jps);;RINEX OBS (*.obs *.*O);;Septentrio (*.sbf);;ANPP (*.anpp)"));
453453

454454
if (!filename.isEmpty()) {
455455
ui->cBInputFile->setCurrentText(QDir::toNativeSeparators(filename));
@@ -798,6 +798,8 @@ void MainWindow::convertFile()
798798
conversionThread->format = STRFMT_SEPT;
799799
} else if (fi.completeSuffix() == "unc") {
800800
conversionThread->format = STRFMT_UNICORE;
801+
} else if (fi.completeSuffix() == "anpp") {
802+
conversionThread->format = STRFMT_ANPP;
801803
} else if (fi.completeSuffix().toLower() == "obs") {
802804
conversionThread->format = STRFMT_RINEX;
803805
} else if (fi.completeSuffix().toLower().contains("nav")) {

app/qtapp/rtknavi_qt/navimain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ static int strfmt[] = { /* stream formats */
9494
#define FLGOPT "0:off,1:std+2:age/ratio/ns"
9595
#define ISTOPT "0:off,1:serial,2:file,3:tcpsvr,4:tcpcli,6:ntripcli,7:ftp,8:http"
9696
#define OSTOPT "0:off,1:serial,2:file,3:tcpsvr,4:tcpcli,5:ntripsvr,9:ntripcas"
97-
#define FMTOPT "0:rtcm2,1:rtcm3,2:oem4,4:ubx,5:swift,6:hemis,7:skytraq,8:javad,9:nvs,10:binex,11:rt17,12:sbf,14:unicore,15:rinex,16:sp3,17:clk"
97+
#define FMTOPT "0:rtcm2,1:rtcm3,2:oem4,4:ubx,5:swift,6:hemis,7:skytraq,8:javad,9:nvs,10:binex,11:rt17,12:sbf,14:unicore,15:anpp,16:rinex,17:sp3,18:clk"
9898
#define NMEOPT "0:off,1:latlon,2:single"
9999
#define SOLOPT "0:llh,1:xyz,2:enu,3:nmea,4:stat"
100100

0 commit comments

Comments
 (0)