Skip to content

Commit 6d192ad

Browse files
committed
upstream patches and modifications
1 parent 5473b43 commit 6d192ad

20 files changed

Lines changed: 96 additions & 58 deletions

File tree

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ set(TEST_DATA_DIR ${CMAKE_CURRENT_SOURCE_DIR}/test/data)
2121
# configure rtklib
2222
add_definitions(-DENAGLO -DENAQZS -DENACMP -DENAGAL -DENAIRN -DNFREQ=3 -DNEXOBS=3 -DTRACE -DSVR_REUSEADDR)
2323

24-
2524
# 3rd party libs
2625
add_subdirectory(lib)
2726

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: 8 additions & 2 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]",
@@ -171,6 +172,7 @@ static const char *help[]={
171172
" *.rt17 Trimble RT17",
172173
" *.sbf Septentrio SBF",
173174
" *.unc Unicore binary data output",
175+
" *.anpp Advanced Navigation Packet Protocol",
174176
" *.obs,*.*o RINEX OBS",
175177
" *.rnx RINEX OBS",
176178
" *.nav,*.*n RINEX NAV",
@@ -404,7 +406,11 @@ static int get_filetime(const char *file, gtime_t *time)
404406
struct stat st;
405407
if (!stat(path, &st)) {
406408
struct tm tm;
409+
#ifdef _MSC_VER
410+
if (gmtime_s(&tm, &st.st_mtime) != 0) {
411+
#else
407412
if (gmtime_r(&st.st_mtime, &tm)) {
413+
#endif
408414
double ep[6];
409415
ep[0] = tm.tm_year + 1900;
410416
ep[1] = tm.tm_mon + 1;
@@ -631,10 +637,10 @@ static int cmdopts(int argc, char **argv, rnxopt_t *opt, char **ifile,
631637
else if (!strcmp(fmt,"rt17" )) format=STRFMT_RT17;
632638
else if (!strcmp(fmt,"sbf" )) format=STRFMT_SEPT;
633639
else if (!strcmp(fmt,"unicore")) format=STRFMT_UNICORE;
634-
else if (!strcmp(fmt,"anpp" )) format=STRFMT_ANPP;
635640
#ifdef RTK_DISABLED
636641
else if (!strcmp(fmt,"tersus")) format=STRFMT_TERSUS;
637642
#endif
643+
else if (!strcmp(fmt,"anpp" )) format=STRFMT_ANPP;
638644
else if (!strcmp(fmt,"rinex")) format=STRFMT_RINEX;
639645
}
640646
else {
@@ -656,10 +662,10 @@ static int cmdopts(int argc, char **argv, rnxopt_t *opt, char **ifile,
656662
else if (!strcmp(p,".rt17" )) format=STRFMT_RT17;
657663
else if (!strcmp(p,".sbf" )) format=STRFMT_SEPT;
658664
else if (!strcmp(p,".unc" )) format=STRFMT_UNICORE;
659-
else if (!strcmp(p,".anpp" )) format=STRFMT_ANPP;
660665
#ifdef RTK_DISABLED
661666
else if (!strcmp(p,".trs" )) format=STRFMT_TERSUS;
662667
#endif
668+
else if (!strcmp(p,".anpp" )) format=STRFMT_ANPP;
663669
else if (!strcmp(p,".obs" )) format=STRFMT_RINEX;
664670
else if (!strcmp(p+3,"o" )) format=STRFMT_RINEX;
665671
else if (!strcmp(p+3,"O" )) format=STRFMT_RINEX;

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"
@@ -1015,7 +1015,7 @@ static void prstream(vt_t *vt)
10151015
"http","ntripcas","udpsvr","udpcli","membuf"
10161016
};
10171017
const char *fmt[]={"rtcm2","rtcm3","oem4","","ubx","swift","hemis","skytreq",
1018-
"javad","nvs","binex","rt17","sbf","","unicore","sp3",""};
1018+
"javad","nvs","binex","rt17","sbf","","unicore","anpp","sp3",""};
10191019
const char *sol[]={"llh","xyz","enu","nmea","stat","-"};
10201020
stream_t stream[9];
10211021
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
@@ -70,6 +70,8 @@ swiftnav.o: $(SRC)/rcv/swiftnav.c
7070
$(CC) -c $(CFLAGS) $(SRC)/rcv/swiftnav.c
7171
unicore.o: $(SRC)/rcv/unicore.c
7272
$(CC) -c $(CFLAGS) $(SRC)/rcv/unicore.c
73+
adnav.o: $(SRC)/rcv/adnav.c
74+
$(CC) -c $(CFLAGS) $(SRC)/rcv/adnav.c
7375
sofa.o: $(SRC)/sofa.c
7476
$(CC) -c $(CFLAGS) $(SRC)/sofa.c
7577

@@ -99,6 +101,7 @@ preceph.o : $(SRC)/rtklib.h
99101
septentrio.o: $(SRC)/rtklib.h
100102
swiftnav.o : $(SRC)/rtklib.h
101103
unicore.o : $(SRC)/rtklib.h
104+
adnav.o : $(SRC)/rtklib.h
102105

103106
install:
104107
cp str2str $(BINDIR)

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);;SuperStart II (*.log);;"
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

app/winapp/rtkconv/convmain.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -896,6 +896,7 @@ void __fastcall TMainWindow::ConvertFile(void)
896896
else if (!strcmp(p,".trs" )) format=STRFMT_TERSUS;
897897
else if (!strcmp(p,".cnb" )) format=STRFMT_CNAV;
898898
#endif
899+
else if (!strcmp(p,".anpp" )) format=STRFMT_ANPP;
899900
else if (!strcmp(p,".obs" )) format=STRFMT_RINEX;
900901
else if (!strcmp(p,".OBS" )) format=STRFMT_RINEX;
901902
else if (!strcmp(p,".nav" )) format=STRFMT_RINEX;

app/winapp/rtkconv/convmain.dfm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,6 +1151,7 @@ object MainWindow: TMainWindow
11511151
'All (*.*)|*.*|RTCM 2 (*.rtcm2)|*.rtcm2|RTCM 3 (*.rtcm3)|*.rtcm3|' +
11521152
'NovtAtel (*.gps)|*.gps|ublox (*.ubx)|*.ubx|SuperStart II (*.log)' +
11531153
'|*.log|Hemisphere (*.bin)|*.bin|Javad (*.jps)|*.jps|RINEX OBS (*' +
1154+
'ANPP (*.anpp)|*.anpp|' +
11541155
'.obs,*.*O)|*.obs;*.*O'
11551156
Options = [ofHideReadOnly, ofNoChangeDir, ofEnableSizing]
11561157
Left = 260

0 commit comments

Comments
 (0)