GNSS-SDR  0.0.19
An Open Source GNSS Software Defined Receiver
rtklib.h
Go to the documentation of this file.
1 /*!
2  * \file rtklib.h
3  * \brief main header file for the rtklib library
4  * \authors <ul>
5  * <li> 2007-2013, T. Takasu
6  * <li> 2017, Javier Arribas
7  * <li> 2017-2023, Carles Fernandez
8  * </ul>
9  *
10  * This is a derived work from RTKLIB http://www.rtklib.com/
11  * The original source code at https://github.com/tomojitakasu/RTKLIB is
12  * released under the BSD 2-clause license with an additional exclusive clause
13  * that does not apply here. This additional clause is reproduced below:
14  *
15  * " The software package includes some companion executive binaries or shared
16  * libraries necessary to execute APs on Windows. These licenses succeed to the
17  * original ones of these software. "
18  *
19  * Neither the executive binaries nor the shared libraries are required by, used
20  * or included in GNSS-SDR.
21  *
22  * -----------------------------------------------------------------------------
23  * Copyright (C) 2007-2013, T. Takasu
24  * Copyright (C) 2017, Javier Arribas
25  * Copyright (C) 2017-2023, Carles Fernandez
26  * All rights reserved.
27  *
28  * SPDX-License-Identifier: BSD-2-Clause
29  *
30  * -----------------------------------------------------------------------------
31  */
32 
33 #ifndef GNSS_SDR_RTKLIB_H
34 #define GNSS_SDR_RTKLIB_H
35 
36 #include "MATH_CONSTANTS.h"
37 #include "gnss_frequencies.h"
38 #include "gnss_obs_codes.h"
39 #include <cctype>
40 #include <cmath>
41 #include <cstdarg>
42 #include <cstdint>
43 #include <cstdlib>
44 #include <netinet/in.h>
45 #include <pthread.h>
46 #include <string>
47 
48 /** \addtogroup PVT
49  * \{ */
50 /** \addtogroup RTKLIB_Library algorithms_libs_rtklib
51  * Our version of the RTKLIB core library (see http://www.rtklib.com/)
52  * \{ */
53 
54 
55 /* macros --------------------------------------------------------------------*/
56 
57 #define dev_t int
58 #define socket_t int
59 #define closesocket close
60 #define lock_t pthread_mutex_t
61 #define initlock(f) pthread_mutex_init(f, NULL)
62 #define rtk_lock(f) pthread_mutex_lock(f)
63 #define rtk_unlock(f) pthread_mutex_unlock(f)
64 
65 #define VER_RTKLIB "2.4.2"
66 #define NTRIP_AGENT "RTKLIB/" VER_RTKLIB
67 #define NTRIP_CLI_PORT 2101 /* default ntrip-client connection port */
68 #define NTRIP_SVR_PORT 80 /* default ntrip-server connection port */
69 #define NTRIP_MAXRSP 32768 /* max size of ntrip response */
70 #define NTRIP_MAXSTR 256 /* max length of mountpoint string */
71 #define NTRIP_RSP_OK_CLI "ICY 200 OK\r\n" /* ntrip response: client */
72 #define NTRIP_RSP_OK_SVR "OK\r\n" /* ntrip response: server */
73 #define NTRIP_RSP_SRCTBL "SOURCETABLE 200 OK\r\n" /* ntrip response: source table */
74 #define NTRIP_RSP_TBLEND "ENDSOURCETABLE"
75 #define NTRIP_RSP_HTTP "HTTP/" /* ntrip response: http */
76 #define NTRIP_RSP_ERROR "ERROR" /* ntrip response: error */
77 
78 #define FTP_CMD "wget" /* ftp/http command */
79 
80 const int TINTACT = 200; //!< period for stream active (ms)
81 const int SERIBUFFSIZE = 4096; //!< serial buffer size (bytes)
82 const int TIMETAGH_LEN = 64; //!< time tag file header length
83 const int MAXCLI = 32; //!< max client connection for tcp svr
84 const int MAXSTATMSG = 32; //!< max length of status message
85 
86 const int FTP_TIMEOUT = 30; //!< ftp/http timeout (s)
87 const int MAXRAWLEN = 4096; //!< max length of receiver raw message
88 const int MAXSOLBUF = 256; //!< max number of solution buffer
89 const int MAXSBSMSG = 32; //!< max number of SBAS msg in RTK server
90 const int MAXOBSBUF = 128; //!< max number of observation data buffer
91 
92 const int FILEPATHSEP = '/';
93 const double RE_WGS84 = 6378137.0; //!< earth semimajor axis (WGS84) (m)
94 const double FE_WGS84 = (1.0 / 298.257223563); //!< earth flattening (WGS84)
95 
96 const double HION = 350000.0; //!< ionosphere height (m)
97 const double PRN_HWBIAS = 1e-6; //!< process noise of h/w bias (m/MHz/sqrt(s))
98 
99 const double INT_SWAP_STAT = 86400.0; //!< swap interval of solution status file (s)
100 const double INT_SWAP_TRAC = 86400.0; //!< swap interval of trace file (s)
101 
102 const unsigned int POLYCRC32 = 0xEDB88320u; //!< CRC32 polynomial
103 const unsigned int POLYCRC24Q = 0x1864CFBu; //!< CRC24Q polynomial
104 
105 const int PMODE_SINGLE = 0; //!< positioning mode: single
106 const int PMODE_DGPS = 1; //!< positioning mode: DGPS/DGNSS
107 const int PMODE_KINEMA = 2; //!< positioning mode: kinematic
108 const int PMODE_STATIC = 3; //!< positioning mode: static
109 const int PMODE_MOVEB = 4; //!< positioning mode: moving-base
110 const int PMODE_FIXED = 5; //!< positioning mode: fixed
111 const int PMODE_PPP_KINEMA = 6; //!< positioning mode: PPP-kinemaric
112 const int PMODE_PPP_STATIC = 7; //!< positioning mode: PPP-static
113 const int PMODE_PPP_FIXED = 8; //!< positioning mode: PPP-fixed
114 
115 const int SOLF_LLH = 0; //!< solution format: lat/lon/height
116 const int SOLF_XYZ = 1; //!< solution format: x/y/z-ecef
117 const int SOLF_ENU = 2; //!< solution format: e/n/u-baseline
118 const int SOLF_NMEA = 3; //!< solution format: NMEA-183
119 const int SOLF_STAT = 4; //!< solution format: solution status
120 const int SOLF_GSIF = 5; //!< solution format: GSI F1/F2
121 
122 const int SOLQ_NONE = 0; //!< solution status: no solution
123 const int SOLQ_FIX = 1; //!< solution status: fix
124 const int SOLQ_FLOAT = 2; //!< solution status: float
125 const int SOLQ_SBAS = 3; //!< solution status: SBAS
126 const int SOLQ_DGPS = 4; //!< solution status: DGPS/DGNSS
127 const int SOLQ_SINGLE = 5; //!< solution status: single
128 const int SOLQ_PPP = 6; //!< solution status: PPP
129 const int SOLQ_DR = 7; //!< solution status: dead reckoning
130 const int MAXSOLQ = 7; //!< max number of solution status
131 
132 const int TIMES_GPST = 0; //!< time system: gps time
133 const int TIMES_UTC = 1; //!< time system: utc
134 const int TIMES_JST = 2; //!< time system: jst
135 
136 
137 const double ERR_SAAS = 0.3; //!< saastamoinen model error std (m)
138 const double ERR_BRDCI = 0.5; //!< broadcast iono model error factor
139 const double ERR_CBIAS = 0.3; //!< code bias error std (m)
140 const double REL_HUMI = 0.7; //!< relative humidity for saastamoinen model
141 const double GAP_RESION = 120; //!< default gap to reset ionos parameters (ep)
142 
143 const int MAXFREQ = 7; //!< max NFREQ
144 
145 const int MAXLEAPS = 64; //!< max number of leap seconds table
146 const double DTTOL = 0.005; //!< tolerance of time difference (s)
147 
148 const int NFREQ = 3; //!< number of carrier frequencies
149 const int NFREQGLO = 2; //!< number of carrier frequencies of GLONASS
150 const int NEXOBS = 0; //!< number of extended obs codes
151 const int MAXANT = 64; //!< max length of station name/antenna type
152 
153 const int MINPRNGPS = 1; //!< min satellite PRN number of GPS
154 const int MAXPRNGPS = 32; //!< max satellite PRN number of GPS
155 const int NSATGPS = (MAXPRNGPS - MINPRNGPS + 1); //!< number of GPS satellites
156 const int NSYSGPS = 1;
157 
158 const int SYS_NONE = 0x00; //!< navigation system: none
159 const int SYS_GPS = 0x01; //!< navigation system: GPS
160 const int SYS_SBS = 0x02; //!< navigation system: SBAS
161 const int SYS_GLO = 0x04; //!< navigation system: GLONASS
162 const int SYS_GAL = 0x08; //!< navigation system: Galileo
163 const int SYS_QZS = 0x10; //!< navigation system: QZSS
164 const int SYS_BDS = 0x20; //!< navigation system: BeiDou
165 const int SYS_IRN = 0x40; //!< navigation system: IRNS
166 const int SYS_LEO = 0x80; //!< navigation system: LEO
167 const int SYS_ALL = 0xFF; //!< navigation system: all
168 
169 
170 #define ENAGLO
171 #ifdef ENAGLO
172 const int MINPRNGLO = 1; //!< min satellite slot number of GLONASS
173 const int MAXPRNGLO = 27; //!< max satellite slot number of GLONASS
174 const int NSATGLO = (MAXPRNGLO - MINPRNGLO + 1); //!< number of GLONASS satellites
175 const int NSYSGLO = 1;
176 #else
177 const int MINPRNGLO = 0;
178 const int MAXPRNGLO = 0;
179 const int NSATGLO = 0;
180 const int NSYSGLO = 0;
181 #endif
182 
183 
184 const int MINPRNGAL = 1; //!< min satellite PRN number of Galileo
185 const int MAXPRNGAL = 36; //!< max satellite PRN number of Galileo
186 const int NSATGAL = (MAXPRNGAL - MINPRNGAL + 1); //!< number of Galileo satellites
187 const int NSYSGAL = 1;
188 
189 const int MAXPRNQZS = 199; //!< max satellite PRN number of QZSS
190 const int MINPRNQZS = 193; //!< min satellite PRN number of QZSS
191 #ifdef ENAQZS
192 const int MINPRNQZS_S = 183; //!< min satellite PRN number of QZSS SAIF
193 const int MAXPRNQZS_S = 189; //!< max satellite PRN number of QZSS SAIF
194 const int NSATQZS = (MAXPRNQZS - MINPRNQZS + 1); //!< number of QZSS satellites
195 const int NSYSQZS = 1;
196 #else
197 const int MINPRNQZS_S = 0;
198 const int NSATQZS = 0;
199 const int NSYSQZS = 0;
200 #endif
201 
202 #define ENABDS
203 #ifdef ENABDS
204 const int MINPRNBDS = 1; //!< min satellite sat number of BeiDou
205 const int MAXPRNBDS = 63; //!< max satellite sat number of BeiDou
206 const int NSATBDS = (MAXPRNBDS - MINPRNBDS + 1); //!< number of BeiDou satellites
207 const int NSYSBDS = 1;
208 #else
209 const int MINPRNBDS = 0;
210 const int MAXPRNBDS = 0;
211 const int NSATBDS = 0;
212 const int NSYSBDS = 0;
213 #endif
214 
215 const int MINPRNIRN = 1; //!< min satellite sat number of IRNSS
216 const int MAXPRNIRN = 7; //!< max satellite sat number of IRNSS
217 #ifdef ENAIRN
218 const int NSATIRN = (MAXPRNIRN - MINPRNIRN + 1); //!< number of IRNSS satellites
219 const int NSYSIRN = 1;
220 #else
221 const int NSATIRN = 0;
222 const int NSYSIRN = 0;
223 #endif
224 
225 const int MINPRNLEO = 1; //!< min satellite sat number of LEO
226 const int MAXPRNLEO = 10; //!< max satellite sat number of LEO */
227 #ifdef ENALEO
228 const int NSATLEO = (MAXPRNLEO - MINPRNLEO + 1); //!< number of LEO satellites
229 const int NSYSLEO = 1;
230 #else
231 const int NSATLEO = 0;
232 const int NSYSLEO = 0;
233 #endif
234 
235 const int NSYS = (NSYSGPS + NSYSGLO + NSYSGAL + NSYSQZS + NSYSBDS + NSYSIRN + NSYSLEO); //!< number of systems
236 
237 const int MINPRNSBS = 120; //!< min satellite PRN number of SBAS
238 const int MAXPRNSBS = 142; //!< max satellite PRN number of SBAS
239 const int NSATSBS = (MAXPRNSBS - MINPRNSBS + 1); //!< number of SBAS satellites
240 
241 const int MAXSAT = (NSATGPS + NSATGLO + NSATGAL + NSATQZS + NSATBDS + NSATIRN + NSATSBS + NSATLEO);
242 
243 const int MAXSTA = 255;
244 
245 #ifndef MAXOBS
246 const int MAXOBS = 64; //!< max number of obs in an epoch
247 #endif
248 
249 const int MAXRCV = 64; //!< max receiver number (1 to MAXRCV)
250 const int MAXOBSTYPE = 64; //!< max number of obs type in RINEX
251 const double MAXDTOE = 7200.0; //!< max time difference to GPS Toe (s)
252 const double MAXDTOE_QZS = 7200.0; //!< max time difference to QZSS Toe (s)
253 const double MAXDTOE_GAL = 10800.0; //!< max time difference to Galileo Toe (s)
254 const double MAXDTOE_BDS = 21600.0; //!< max time difference to BeiDou Toe (s)
255 const double MAXDTOE_GLO = 1800.0; //!< max time difference to GLONASS Toe (s)
256 const double MAXDTOE_SBS = 360.0; //!< max time difference to SBAS Toe (s)
257 const double MAXDTOE_S = 86400.0; //!< max time difference to ephem toe (s) for other
258 const double MAXGDOP = 300.0; //!< max GDOP
259 
260 const int MAXSBSURA = 8; //!< max URA of SBAS satellite
261 const int MAXBAND = 10; //!< max SBAS band of IGP
262 const int MAXNIGP = 201; //!< max number of IGP in SBAS band
263 const int MAXNGEO = 4; //!< max number of GEO satellites
264 
265 const int MAXSOLMSG = 8191; //!< max length of solution message
266 const int MAXERRMSG = 4096; //!< max length of error/warning message
267 
268 const int IONOOPT_OFF = 0; //!< ionosphere option: correction off
269 const int IONOOPT_BRDC = 1; //!< ionosphere option: broadcast model
270 const int IONOOPT_SBAS = 2; //!< ionosphere option: SBAS model
271 const int IONOOPT_IFLC = 3; //!< ionosphere option: L1/L2 or L1/L5 iono-free LC
272 const int IONOOPT_EST = 4; //!< ionosphere option: estimation
273 const int IONOOPT_TEC = 5; //!< ionosphere option: IONEX TEC model
274 const int IONOOPT_QZS = 6; //!< ionosphere option: QZSS broadcast model
275 const int IONOOPT_LEX = 7; //!< ionosphere option: QZSS LEX ionospehre
276 const int IONOOPT_STEC = 8; //!< ionosphere option: SLANT TEC model
277 
278 const int TROPOPT_OFF = 0; //!< troposphere option: correction off
279 const int TROPOPT_SAAS = 1; //!< troposphere option: Saastamoinen model
280 const int TROPOPT_SBAS = 2; //!< troposphere option: SBAS model
281 const int TROPOPT_EST = 3; //!< troposphere option: ZTD estimation
282 const int TROPOPT_ESTG = 4; //!< troposphere option: ZTD+grad estimation
283 const int TROPOPT_COR = 5; //!< troposphere option: ZTD correction
284 const int TROPOPT_CORG = 6; //!< troposphere option: ZTD+grad correction
285 
286 
287 const int EPHOPT_BRDC = 0; //!< ephemeris option: broadcast ephemeris
288 const int EPHOPT_PREC = 1; //!< ephemeris option: precise ephemeris
289 const int EPHOPT_SBAS = 2; //!< ephemeris option: broadcast + SBAS
290 const int EPHOPT_SSRAPC = 3; //!< ephemeris option: broadcast + SSR_APC
291 const int EPHOPT_SSRCOM = 4; //!< ephemeris option: broadcast + SSR_COM
292 const int EPHOPT_LEX = 5; //!< ephemeris option: QZSS LEX ephemeris
293 
294 const double EFACT_GPS = 1.0; //!< error factor: GPS
295 const double EFACT_GLO = 1.5; //!< error factor: GLONASS
296 const double EFACT_GAL = 1.0; //!< error factor: Galileo
297 const double EFACT_QZS = 1.0; //!< error factor: QZSS
298 const double EFACT_BDS = 1.0; //!< error factor: BeiDou
299 const double EFACT_IRN = 1.5; //!< error factor: IRNSS
300 const double EFACT_SBS = 3.0; //!< error factor: SBAS
301 
302 const int MAXEXFILE = 1024; //!< max number of expanded files
303 const double MAXSBSAGEF = 30.0; //!< max age of SBAS fast correction (s)
304 const double MAXSBSAGEL = 1800.0; //!< max age of SBAS long term corr (s)
305 
306 const int ARMODE_OFF = 0; //!< AR mode: off
307 const int ARMODE_CONT = 1; //!< AR mode: continuous
308 const int ARMODE_INST = 2; //!< AR mode: instantaneous
309 const int ARMODE_FIXHOLD = 3; //!< AR mode: fix and hold
310 const int ARMODE_PPPAR = 4; //!< AR mode: PPP-AR
311 const int ARMODE_PPPAR_ILS = 5; //!< AR mode: AR mode: PPP-AR ILS
312 const int ARMODE_WLNL = 6;
313 const int ARMODE_TCAR = 7;
314 
315 
316 const int POSOPT_RINEX = 3; //!< pos option: rinex header pos
317 const int MAXSTRPATH = 1024; //!< max length of stream path
318 const int MAXSTRMSG = 1024; //!< max length of stream message
319 
320 using fatalfunc_t = void(const char *); //!< fatal callback function type
321 
322 // clang-format off
323 #define STR_MODE_R 0x1 /* stream mode: read */
324 #define STR_MODE_W 0x2 /* stream mode: write */
325 #define STR_MODE_RW 0x3 /* stream mode: read/write */
326 
327 #define STR_NONE 0 /* stream type: none */
328 #define STR_SERIAL 1 /* stream type: serial */
329 #define STR_FILE 2 /* stream type: file */
330 #define STR_TCPSVR 3 /* stream type: TCP server */
331 #define STR_TCPCLI 4 /* stream type: TCP client */
332 #define STR_UDP 5 /* stream type: UDP stream */
333 #define STR_NTRIPSVR 6 /* stream type: NTRIP server */
334 #define STR_NTRIPCLI 7 /* stream type: NTRIP client */
335 #define STR_FTP 8 /* stream type: ftp */
336 #define STR_HTTP 9 /* stream type: http */
337 
338 #define NP_PPP(opt) ((opt)->dynamics ? 9 : 3) /* number of pos solution */
339 #define IC_PPP(s, opt) (NP_PPP(opt) + (s)) /* state index of clocks (s=0:gps,1:glo) */
340 #define IT_PPP(opt) (IC_PPP(0, opt) + NSYS) /* state index of tropos */
341 #define NR_PPP(opt) (IT_PPP(opt) + ((opt)->tropopt < TROPOPT_EST ? 0 : ((opt)->tropopt == TROPOPT_EST ? 1 : 3))) /* number of solutions */
342 #define IB_PPP(s, opt) (NR_PPP(opt) + (s)-1) /* state index of phase bias */
343 #define NX_PPP(opt) (IB_PPP(MAXSAT, opt) + 1) /* number of estimated states */
344 // clang-format on
345 
346 #define NF_RTK(opt) ((opt)->ionoopt == IONOOPT_IFLC ? 1 : (opt)->nf)
347 #define NP_RTK(opt) ((opt)->dynamics == 0 ? 3 : 9)
348 #define NI_RTK(opt) ((opt)->ionoopt != IONOOPT_EST ? 0 : MAXSAT)
349 #define NT_RTK(opt) ((opt)->tropopt < TROPOPT_EST ? 0 : ((opt)->tropopt < TROPOPT_ESTG ? 2 : 6))
350 #define NL_RTK(opt) ((opt)->glomodear != 2 ? 0 : NFREQGLO)
351 #define NB_RTK(opt) ((opt)->mode <= PMODE_DGPS ? 0 : MAXSAT * NF_RTK(opt))
352 #define NR_RTK(opt) (NP_RTK(opt) + NI_RTK(opt) + NT_RTK(opt) + NL_RTK(opt))
353 #define NX_RTK(opt) (NR_RTK(opt) + NB_RTK(opt))
354 
355 typedef struct
356 { /* time struct */
357  time_t time; /* time (s) expressed by standard time_t */
358  double sec; /* fraction of second under 1 s */
359 } gtime_t;
360 
361 
362 typedef struct
363 { /* observation data record */
364  gtime_t time; /* receiver sampling time (GPST) */
365  unsigned char sat, rcv; /* satellite/receiver number */
366  unsigned char SNR[NFREQ + NEXOBS]; /* signal strength (0.25 dBHz) */
367  unsigned char LLI[NFREQ + NEXOBS]; /* loss of lock indicator */
368  unsigned char code[NFREQ + NEXOBS]; /* code indicator (CODE_???) */
369  double L[NFREQ + NEXOBS]; /* observation data carrier-phase (cycle) */
370  double P[NFREQ + NEXOBS]; /* observation data pseudorange (m) */
371  float D[NFREQ + NEXOBS]; /* observation data doppler frequency (Hz) */
372 } obsd_t;
373 
374 
375 typedef struct
376 { /* observation data */
377  int n, nmax; /* number of obervation data/allocated */
378  obsd_t *data; /* observation data records */
379 } obs_t;
380 
381 
382 typedef struct
383 { /* earth rotation parameter data type */
384  double mjd; /* mjd (days) */
385  double xp, yp; /* pole offset (rad) */
386  double xpr, ypr; /* pole offset rate (rad/day) */
387  double ut1_utc; /* ut1-utc (s) */
388  double lod; /* length of day (s/day) */
389 } erpd_t;
390 
391 
392 typedef struct
393 { /* earth rotation parameter type */
394  int n, nmax; /* number and max number of data */
395  erpd_t *data; /* earth rotation parameter data */
396 } erp_t;
397 
398 
399 typedef struct
400 { /* antenna parameter type */
401  int sat; /* satellite number (0:receiver) */
402  char type[MAXANT]; /* antenna type */
403  char code[MAXANT]; /* serial number or satellite code */
404  gtime_t ts, te; /* valid time start and end */
405  double off[NFREQ][3]; /* phase center offset e/n/u or x/y/z (m) */
406  double var[NFREQ][19]; /* phase center variation (m) */
407  /* el=90,85,...,0 or nadir=0,1,2,3,... (deg) */
408 } pcv_t;
409 
410 
411 typedef struct
412 { /* antenna parameters type */
413  int n, nmax; /* number of data/allocated */
414  pcv_t *pcv; /* antenna parameters data */
415 } pcvs_t;
416 
417 
418 typedef struct
419 { /* almanac type */
420  int sat; /* satellite number */
421  int svh; /* sv health (0:ok) */
422  int svconf; /* as and sv config */
423  int week; /* GPS/QZS: gps week, GAL: galileo week */
424  gtime_t toa; /* Toa */
425  /* SV orbit parameters */
426  double A, e, i0, OMG0, omg, M0, OMGd;
427  double toas; /* Toa (s) in week */
428  double f0, f1; /* SV clock parameters (af0,af1) */
429 } alm_t;
430 
431 
432 typedef struct
433 { /* GPS/QZS/GAL broadcast ephemeris type */
434  int sat; /* satellite number */
435  int iode, iodc; /* IODE,IODC */
436  int sva; /* SV accuracy (URA index) */
437  int svh; /* SV health (0:ok) */
438  int week; /* GPS/QZS: gps week, GAL: galileo week */
439  int code; /* GPS/QZS: code on L2, GAL/BDS: data sources */
440  int flag; /* GPS/QZS: L2 P data flag, BDS: nav type */
441  gtime_t toe, toc, ttr; /* Toe,Toc,T_trans */
442  /* SV orbit parameters */
443  double A, e, i0, OMG0, omg, M0, deln, OMGd, idot;
444  double crc, crs, cuc, cus, cic, cis;
445  double toes; /* Toe (s) in week */
446  double fit; /* fit interval (h) */
447  double f0, f1, f2; /* SV clock parameters (af0,af1,af2) */
448  double tgd[4]; /* group delay parameters */
449  /* GPS/QZS:tgd[0]=TGD */
450  /* GAL :tgd[0]=BGD E5a/E1,tgd[1]=BGD E5b/E1 */
451  /* BDS :tgd[0]=BGD1,tgd[1]=BGD2 */
452  double isc[4]; /* GPS :isc[0]=ISCL1, isc[1]=ISCL2, isc[2]=ISCL5I, isc[3]=ISCL5Q */
453  double Adot, ndot; /* Adot,ndot for CNAV */
454  float has_clock_correction_m; /* Galileo High Accuracy Service clock correction, in [m] */
455  float has_orbit_radial_correction_m; /* Galileo High Accuracy Service orbit radial correction, in [m] */
456  float has_orbit_in_track_correction_m; /* Galileo High Accuracy Service orbit in-track correction, in [m] */
457  float has_orbit_cross_track_correction_m; /* Galileo High Accuracy Service orbit cross-track correction, in [m] */
458  bool apply_has_corrections;
459 } eph_t;
460 
461 
462 typedef struct
463 { /* GLONASS broadcast ephemeris type */
464  int sat; /* satellite number */
465  int iode; /* IODE (0-6 bit of tb field) */
466  int frq; /* satellite frequency number */
467  int svh, sva, age; /* satellite health, accuracy, age of operation */
468  gtime_t toe; /* epoch of epherides (gpst) */
469  gtime_t tof; /* message frame time (gpst) */
470  double pos[3]; /* satellite position (ecef) (m) */
471  double vel[3]; /* satellite velocity (ecef) (m/s) */
472  double acc[3]; /* satellite acceleration (ecef) (m/s^2) */
473  double taun, gamn; /* SV clock bias (s)/relative freq bias */
474  double dtaun; /* delay between L1 and L2 (s) */
475 } geph_t;
476 
477 
478 typedef struct
479 { /* precise ephemeris type */
480  gtime_t time; /* time (GPST) */
481  int index; /* ephemeris index for multiple files */
482  double pos[MAXSAT][4]; /* satellite position/clock (ecef) (m|s) */
483  float std[MAXSAT][4]; /* satellite position/clock std (m|s) */
484  double vel[MAXSAT][4]; /* satellite velocity/clk-rate (m/s|s/s) */
485  float vst[MAXSAT][4]; /* satellite velocity/clk-rate std (m/s|s/s) */
486  float cov[MAXSAT][3]; /* satellite position covariance (m^2) */
487  float vco[MAXSAT][3]; /* satellite velocity covariance (m^2) */
488 } peph_t;
489 
490 
491 typedef struct
492 { /* precise clock type */
493  gtime_t time; /* time (GPST) */
494  int index; /* clock index for multiple files */
495  double clk[MAXSAT][1]; /* satellite clock (s) */
496  float std[MAXSAT][1]; /* satellite clock std (s) */
497 } pclk_t;
498 
499 
500 typedef struct
501 { /* SBAS ephemeris type */
502  int sat; /* satellite number */
503  gtime_t t0; /* reference epoch time (GPST) */
504  gtime_t tof; /* time of message frame (GPST) */
505  int sva; /* SV accuracy (URA index) */
506  int svh; /* SV health (0:ok) */
507  double pos[3]; /* satellite position (m) (ecef) */
508  double vel[3]; /* satellite velocity (m/s) (ecef) */
509  double acc[3]; /* satellite acceleration (m/s^2) (ecef) */
510  double af0, af1; /* satellite clock-offset/drift (s,s/s) */
511 } seph_t;
512 
513 
514 typedef struct
515 { /* norad two line element data type */
516  char name[32]; /* common name */
517  char alias[32]; /* alias name */
518  char satno[16]; /* satellite catalog number */
519  char satclass; /* classification */
520  char desig[16]; /* international designator */
521  gtime_t epoch; /* element set epoch (UTC) */
522  double ndot; /* 1st derivative of mean motion */
523  double nddot; /* 2st derivative of mean motion */
524  double bstar; /* B* drag term */
525  int etype; /* element set type */
526  int eleno; /* element number */
527  double inc; /* orbit inclination (deg) */
528  double OMG; /* right ascension of ascending node (deg) */
529  double ecc; /* eccentricity */
530  double omg; /* argument of perigee (deg) */
531  double M; /* mean anomaly (deg) */
532  double n; /* mean motion (rev/day) */
533  int rev; /* revolution number at epoch */
534 } tled_t;
535 
536 
537 typedef struct
538 { /* norad two line element type */
539  int n, nmax; /* number/max number of two line element data */
540  tled_t *data; /* norad two line element data */
541 } tle_t;
542 
543 
544 typedef struct
545 { /* TEC grid type */
546  gtime_t time; /* epoch time (GPST) */
547  int ndata[3]; /* TEC grid data size {nlat,nlon,nhgt} */
548  double rb; /* earth radius (km) */
549  double lats[3]; /* latitude start/interval (deg) */
550  double lons[3]; /* longitude start/interval (deg) */
551  double hgts[3]; /* heights start/interval (km) */
552  double *data; /* TEC grid data (tecu) */
553  float *rms; /* RMS values (tecu) */
554 } tec_t;
555 
556 
557 typedef struct
558 { /* satellite fcb data type */
559  gtime_t ts, te; /* start/end time (GPST) */
560  double bias[MAXSAT][3]; /* fcb value (cyc) */
561  double std[MAXSAT][3]; /* fcb std-dev (cyc) */
562 } fcbd_t;
563 
564 
565 typedef struct
566 { /* SBAS message type */
567  int week, tow; /* reception time */
568  int prn; /* SBAS satellite PRN number */
569  unsigned char msg[29]; /* SBAS message (226bit) padded by 0 */
570 } sbsmsg_t;
571 
572 
573 typedef struct
574 { /* SBAS messages type */
575  int n, nmax; /* number of SBAS messages/allocated */
576  sbsmsg_t *msgs; /* SBAS messages */
577 } sbs_t;
578 
579 
580 typedef struct
581 { /* SBAS fast correction type */
582  gtime_t t0; /* time of applicability (TOF) */
583  double prc; /* pseudorange correction (PRC) (m) */
584  double rrc; /* range-rate correction (RRC) (m/s) */
585  double dt; /* range-rate correction delta-time (s) */
586  int iodf; /* IODF (issue of date fast corr) */
587  short udre; /* UDRE+1 */
588  short ai; /* degradation factor indicator */
589 } sbsfcorr_t;
590 
591 
592 typedef struct
593 { /* SBAS long term satellite error correction type */
594  gtime_t t0; /* correction time */
595  int iode; /* IODE (issue of date ephemeris) */
596  double dpos[3]; /* delta position (m) (ecef) */
597  double dvel[3]; /* delta velocity (m/s) (ecef) */
598  double daf0, daf1; /* delta clock-offset/drift (s,s/s) */
599 } sbslcorr_t;
600 
601 
602 typedef struct
603 { /* SBAS satellite correction type */
604  int sat; /* satellite number */
605  sbsfcorr_t fcorr; /* fast correction */
606  sbslcorr_t lcorr; /* long term correction */
607 } sbssatp_t;
608 
609 
610 typedef struct
611 { /* SBAS satellite corrections type */
612  int iodp; /* IODP (issue of date mask) */
613  int nsat; /* number of satellites */
614  int tlat; /* system latency (s) */
615  sbssatp_t sat[MAXSAT]; /* satellite correction */
616 } sbssat_t;
617 
618 
619 typedef struct
620 { /* SBAS ionospheric correction type */
621  gtime_t t0; /* correction time */
622  short lat, lon; /* latitude/longitude (deg) */
623  short give; /* GIVI+1 */
624  float delay; /* vertical delay estimate (m) */
625 } sbsigp_t;
626 
627 
628 typedef struct
629 { /* IGP band type */
630  short x; /* longitude/latitude (deg) */
631  const short *y; /* latitudes/longitudes (deg) */
632  unsigned char bits; /* IGP mask start bit */
633  unsigned char bite; /* IGP mask end bit */
634 } sbsigpband_t;
635 
636 
637 typedef struct
638 { /* SBAS ionospheric corrections type */
639  int iodi; /* IODI (issue of date ionos corr) */
640  int nigp; /* number of igps */
641  sbsigp_t igp[MAXNIGP]; /* ionospheric correction */
642 } sbsion_t;
643 
644 
645 typedef struct
646 { /* DGPS/GNSS correction type */
647  gtime_t t0; /* correction time */
648  double prc; /* pseudorange correction (PRC) (m) */
649  double rrc; /* range rate correction (RRC) (m/s) */
650  int iod; /* issue of data (IOD) */
651  double udre; /* UDRE */
652 } dgps_t;
653 
654 
655 typedef struct
656 { /* SSR correction type */
657  gtime_t t0[6]; /* epoch time (GPST) {eph,clk,hrclk,ura,bias,pbias} */
658  double udi[6]; /* SSR update interval (s) */
659  int iod[6]; /* iod ssr {eph,clk,hrclk,ura,bias,pbias} */
660  int iode; /* issue of data */
661  int iodcrc; /* issue of data crc for beidou/sbas */
662  int ura; /* URA indicator */
663  int refd; /* sat ref datum (0:ITRF,1:regional) */
664  double deph[3]; /* delta orbit {radial,along,cross} (m) */
665  double ddeph[3]; /* dot delta orbit {radial,along,cross} (m/s) */
666  double dclk[3]; /* delta clock {c0,c1,c2} (m,m/s,m/s^2) */
667  double hrclk; /* high-rate clock corection (m) */
668  float cbias[MAXCODE]; /* code biases (m) */
669  double pbias[MAXCODE]; /* phase biases (m) */
670  float stdpb[MAXCODE]; /* std-dev of phase biases (m) */
671  double yaw_ang, yaw_rate; /* yaw angle and yaw rate (deg,deg/s) */
672  unsigned char update; /* update flag (0:no update,1:update) */
673 } ssr_t;
674 
675 
676 typedef struct
677 { /* QZSS LEX message type */
678  int prn; /* satellite PRN number */
679  int type; /* message type */
680  int alert; /* alert flag */
681  unsigned char stat; /* signal tracking status */
682  unsigned char snr; /* signal C/N0 (0.25 dBHz) */
683  unsigned int ttt; /* tracking time (ms) */
684  unsigned char msg[212]; /* LEX message data part 1695 bits */
685 } lexmsg_t;
686 
687 
688 typedef struct
689 { /* QZSS LEX messages type */
690  int n, nmax; /* number of LEX messages and allocated */
691  lexmsg_t *msgs; /* LEX messages */
692 } lex_t;
693 
694 
695 typedef struct
696 { /* QZSS LEX ephemeris type */
697  gtime_t toe; /* epoch time (GPST) */
698  gtime_t tof; /* message frame time (GPST) */
699  int sat; /* satellite number */
700  unsigned char health; /* signal health (L1,L2,L1C,L5,LEX) */
701  unsigned char ura; /* URA index */
702  double pos[3]; /* satellite position (m) */
703  double vel[3]; /* satellite velocity (m/s) */
704  double acc[3]; /* satellite acceleration (m/s2) */
705  double jerk[3]; /* satellite jerk (m/s3) */
706  double af0, af1; /* satellite clock bias and drift (s,s/s) */
707  double tgd; /* TGD */
708  double isc[8]; /* ISC */
709 } lexeph_t;
710 
711 
712 typedef struct
713 { /* QZSS LEX ionosphere correction type */
714  gtime_t t0; /* epoch time (GPST) */
715  double tspan; /* valid time span (s) */
716  double pos0[2]; /* reference position {lat,lon} (rad) */
717  double coef[3][2]; /* coefficients lat x lon (3 x 2) */
718 } lexion_t;
719 
720 
721 typedef struct
722 { /* stec data type */
723  gtime_t time; /* time (GPST) */
724  unsigned char sat; /* satellite number */
725  double ion; /* slant ionos delay (m) */
726  float std; /* std-dev (m) */
727  float azel[2]; /* azimuth/elevation (rad) */
728  unsigned char flag; /* fix flag */
729 } stec_t;
730 
731 
732 typedef struct
733 { /* trop data type */
734  gtime_t time; /* time (GPST) */
735  double trp[3]; /* zenith tropos delay/gradient (m) */
736  float std[3]; /* std-dev (m) */
737 } trop_t;
738 
739 
740 typedef struct
741 { /* ppp corrections type */
742  int nsta; /* number of stations */
743  char stas[MAXSTA][8]; /* station names */
744  double rr[MAXSTA][3]; /* station ecef positions (m) */
745  int ns[MAXSTA], nsmax[MAXSTA]; /* number of stec data */
746  int nt[MAXSTA], ntmax[MAXSTA]; /* number of trop data */
747  stec_t *stec[MAXSTA]; /* stec data */
748  trop_t *trop[MAXSTA]; /* trop data */
749 } pppcorr_t;
750 
751 
752 typedef struct
753 { /* navigation data type */
754  int n, nmax; /* number of broadcast ephemeris */
755  int ng, ngmax; /* number of glonass ephemeris */
756  int ns, nsmax; /* number of sbas ephemeris */
757  int ne, nemax; /* number of precise ephemeris */
758  int nc, ncmax; /* number of precise clock */
759  int na, namax; /* number of almanac data */
760  int nt, ntmax; /* number of tec grid data */
761  int nf, nfmax; /* number of satellite fcb data */
762  eph_t *eph; /* GPS/QZS/GAL ephemeris */
763  geph_t *geph; /* GLONASS ephemeris */
764  seph_t *seph; /* SBAS ephemeris */
765  peph_t *peph; /* precise ephemeris */
766  pclk_t *pclk; /* precise clock */
767  alm_t *alm; /* almanac data */
768  tec_t *tec; /* tec grid data */
769  fcbd_t *fcb; /* satellite fcb data */
770  erp_t erp; /* earth rotation parameters */
771  double utc_gps[4]; /* GPS delta-UTC parameters {A0,A1,T,W} */
772  double utc_glo[4]; /* GLONASS UTC GPS time parameters */
773  double utc_gal[4]; /* Galileo UTC GPS time parameters */
774  double utc_qzs[4]; /* QZS UTC GPS time parameters */
775  double utc_cmp[4]; /* BeiDou UTC parameters */
776  double utc_irn[4]; /* IRNSS UTC parameters */
777  double utc_sbs[4]; /* SBAS UTC parameters */
778  double ion_gps[8]; /* GPS iono model parameters {a0,a1,a2,a3,b0,b1,b2,b3} */
779  double ion_gal[4]; /* Galileo iono model parameters {ai0,ai1,ai2,0} */
780  double ion_qzs[8]; /* QZSS iono model parameters {a0,a1,a2,a3,b0,b1,b2,b3} */
781  double ion_cmp[8]; /* BeiDou iono model parameters {a0,a1,a2,a3,b0,b1,b2,b3} */
782  double ion_irn[8]; /* IRNSS iono model parameters {a0,a1,a2,a3,b0,b1,b2,b3} */
783  int leaps; /* leap seconds (s) */
784  double lam[MAXSAT][NFREQ]; /* carrier wave lengths (m) */
785  double cbias[MAXSAT][3]; /* satellite dcb (0:p1-p2,1:p1-c1,2:p2-c2) (m) */
786  double rbias[MAXRCV][2][3]; /* receiver dcb (0:p1-p2,1:p1-c1,2:p2-c2) (m) */
787  double wlbias[MAXSAT]; /* wide-lane bias (cycle) */
788  double glo_cpbias[4]; /* glonass code-phase bias {1C,1P,2C,2P} (m) */
789  char glo_fcn[MAXPRNGLO + 1]; /* glonass frequency channel number + 8 */
790  pcv_t pcvs[MAXSAT]; /* satellite antenna pcv */
791  sbssat_t sbssat; /* SBAS satellite corrections */
792  sbsion_t sbsion[MAXBAND + 1]; /* SBAS ionosphere corrections */
793  dgps_t dgps[MAXSAT]; /* DGPS corrections */
794  ssr_t ssr[MAXSAT]; /* SSR corrections */
795  lexeph_t lexeph[MAXSAT]; /* LEX ephemeris */
796  lexion_t lexion; /* LEX ionosphere correction */
797  pppcorr_t pppcorr; /* ppp corrections */
798 } nav_t;
799 
800 
801 typedef struct
802 { /* station parameter type */
803  char name[MAXANT]; /* marker name */
804  char marker[MAXANT]; /* marker number */
805  char antdes[MAXANT]; /* antenna descriptor */
806  char antsno[MAXANT]; /* antenna serial number */
807  char rectype[MAXANT]; /* receiver type descriptor */
808  char recver[MAXANT]; /* receiver firmware version */
809  char recsno[MAXANT]; /* receiver serial number */
810  int antsetup; /* antenna setup id */
811  int itrf; /* ITRF realization year */
812  int deltype; /* antenna delta type (0:enu,1:xyz) */
813  double pos[3]; /* station position (ecef) (m) */
814  double del[3]; /* antenna position delta (e/n/u or x/y/z) (m) */
815  double hgt; /* antenna height (m) */
816 } sta_t;
817 
818 
819 typedef struct
820 { /* solution type */
821  gtime_t time; /* time (GPST) */
822  double rr[6]; /* position/velocity (m|m/s) */
823  /* {x,y,z,vx,vy,vz} or {e,n,u,ve,vn,vu} */
824  float qr[6]; /* position variance/covariance (m^2) */
825  /* {c_xx,c_yy,c_zz,c_xy,c_yz,c_zx} or */
826  /* {c_ee,c_nn,c_uu,c_en,c_nu,c_ue} */
827  double dtr[6]; /* receiver clock bias to time systems (s) */
828  unsigned char type; /* type (0:xyz-ecef,1:enu-baseline) */
829  unsigned char stat; /* solution status (SOLQ_???) */
830  unsigned char ns; /* number of valid satellites */
831  float age; /* age of differential (s) */
832  float ratio; /* AR ratio factor for validation */
833  float thres; /* AR ratio threshold for validation */
834 } sol_t;
835 
836 
837 typedef struct
838 { /* solution buffer type */
839  int n, nmax; /* number of solution/max number of buffer */
840  int cyclic; /* cyclic buffer flag */
841  int start, end; /* start/end index */
842  gtime_t time; /* current solution time */
843  sol_t *data; /* solution data */
844  double rb[3]; /* reference position {x,y,z} (ecef) (m) */
845  unsigned char buff[MAXSOLMSG + 1]; /* message buffer */
846  int nb; /* number of byte in message buffer */
847 } solbuf_t;
848 
849 
850 typedef struct
851 { /* solution status type */
852  gtime_t time; /* time (GPST) */
853  unsigned char sat; /* satellite number */
854  unsigned char frq; /* frequency (1:L1,2:L2,...) */
855  float az, el; /* azimuth/elevation angle (rad) */
856  float resp; /* pseudorange residual (m) */
857  float resc; /* carrier-phase residual (m) */
858  unsigned char flag; /* flags: (vsat<<5)+(slip<<3)+fix */
859  unsigned char snr; /* signal strength (0.25 dBHz) */
860  unsigned short lock; /* lock counter */
861  unsigned short outc; /* outage counter */
862  unsigned short slipc; /* slip counter */
863  unsigned short rejc; /* reject counter */
864 } solstat_t;
865 
866 
867 typedef struct
868 { /* solution status buffer type */
869  int n, nmax; /* number of solution/max number of buffer */
870  solstat_t *data; /* solution status data */
871 } solstatbuf_t;
872 
873 
874 typedef struct
875 { /* RTCM control struct type */
876  int staid; /* station id */
877  int stah; /* station health */
878  int seqno; /* sequence number for rtcm 2 or iods msm */
879  int outtype; /* output message type */
880  gtime_t time; /* message time */
881  gtime_t time_s; /* message start time */
882  obs_t obs; /* observation data (uncorrected) */
883  nav_t nav; /* satellite ephemerides */
884  sta_t sta; /* station parameters */
885  dgps_t *dgps; /* output of dgps corrections */
886  ssr_t ssr[MAXSAT]; /* output of ssr corrections */
887  char msg[128]; /* special message */
888  char msgtype[256]; /* last message type */
889  char msmtype[6][128]; /* msm signal types */
890  int obsflag; /* obs data complete flag (1:ok,0:not complete) */
891  int ephsat; /* update satellite of ephemeris */
892  double cp[MAXSAT][NFREQ + NEXOBS]; /* carrier-phase measurement */
893  unsigned short lock[MAXSAT][NFREQ + NEXOBS]; /* lock time */
894  unsigned short loss[MAXSAT][NFREQ + NEXOBS]; /* loss of lock count */
895  gtime_t lltime[MAXSAT][NFREQ + NEXOBS]; /* last lock time */
896  int nbyte; /* number of bytes in message buffer */
897  int nbit; /* number of bits in word buffer */
898  int len; /* message length (bytes) */
899  unsigned char buff[1200]; /* message buffer */
900  unsigned int word; /* word buffer for rtcm 2 */
901  unsigned int nmsg2[100]; /* message count of RTCM 2 (1-99:1-99,0:other) */
902  unsigned int nmsg3[400]; /* message count of RTCM 3 (1-299:1001-1299,300-399:2000-2099,0:other) */
903  char opt[256]; /* RTCM dependent options */
904 } rtcm_t;
905 
906 
907 typedef struct
908 { /* download url type */
909  char type[32]; /* data type */
910  char path[1024]; /* url path */
911  char dir[1024]; /* local directory */
912  double tint; /* time interval (s) */
913 } url_t;
914 
915 
916 typedef struct
917 { /* option type */
918  const char *name; /* option name */
919  int format; /* option format (0:int,1:double,2:string,3:enum) */
920  void *var; /* pointer to option variable */
921  const char *comment; /* option comment/enum labels/unit */
922 } opt_t;
923 
924 
925 typedef struct
926 { /* extended receiver error model */
927  int ena[4]; /* model enabled */
928  double cerr[4][NFREQ * 2]; /* code errors (m) */
929  double perr[4][NFREQ * 2]; /* carrier-phase errors (m) */
930  double gpsglob[NFREQ]; /* gps-glonass h/w bias (m) */
931  double gloicb[NFREQ]; /* glonass interchannel bias (m/fn) */
932 } exterr_t;
933 
934 
935 typedef struct
936 { /* SNR mask type */
937  int ena[2]; /* enable flag {rover,base} */
938  double mask[NFREQ][9]; /* mask (dBHz) at 5,10,...85 deg */
939 } snrmask_t;
940 
941 
942 typedef struct
943 { /* processing options type */
944  int mode; /* positioning mode (PMODE_???) */
945  int soltype; /* solution type (0:forward,1:backward,2:combined) */
946  int nf; /* number of frequencies (1:L1,2:L1+L2,3:L1+L2+L5) */
947  int navsys; /* navigation system */
948  double elmin; /* elevation mask angle (rad) */
949  snrmask_t snrmask; /* SNR mask */
950  int sateph; /* satellite ephemeris/clock (EPHOPT_???) */
951  int modear; /* AR mode (0:off,1:continuous,2:instantaneous,3:fix and hold,4:ppp-ar) */
952  int glomodear; /* GLONASS AR mode (0:off,1:on,2:auto cal,3:ext cal) */
953  int bdsmodear; /* BeiDou AR mode (0:off,1:on) */
954  int maxout; /* obs outage count to reset bias */
955  int minlock; /* min lock count to fix ambiguity */
956  int minfix; /* min fix count to hold ambiguity */
957  int armaxiter; /* max iteration to resolve ambiguity */
958  int ionoopt; /* ionosphere option (IONOOPT_???) */
959  int tropopt; /* troposphere option (TROPOPT_???) */
960  int dynamics; /* dynamics model (0:none,1:velociy,2:accel) */
961  int tidecorr; /* earth tide correction (0:off,1:solid,2:solid+otl+pole) */
962  int niter; /* number of filter iteration */
963  int codesmooth; /* code smoothing window size (0:none) */
964  int intpref; /* interpolate reference obs (for post mission) */
965  int sbascorr; /* SBAS correction options */
966  int sbassatsel; /* SBAS satellite selection (0:all) */
967  int rovpos; /* rover position for fixed mode */
968  int refpos; /* base position for relative mode */
969  /* (0:pos in prcopt, 1:average of single pos, */
970  /* 2:read from file, 3:rinex header, 4:rtcm pos) */
971  double eratio[NFREQ]; /* code/phase error ratio */
972  double err[5]; /* measurement error factor */
973  /* [0]:reserved */
974  /* [1-3]:error factor a/b/c of phase (m) */
975  /* [4]:doppler frequency (hz) */
976  double std[3]; /* initial-state std [0]bias,[1]iono [2]trop */
977  double prn[6]; /* process-noise std [0]bias,[1]iono [2]trop [3]acch [4]accv [5] pos */
978  double sclkstab; /* satellite clock stability (sec/sec) */
979  double thresar[8]; /* AR validation threshold */
980  double elmaskar; /* elevation mask of AR for rising satellite (deg) */
981  double elmaskhold; /* elevation mask to hold ambiguity (deg) */
982  double thresslip; /* slip threshold of geometry-free phase (m) */
983  double maxtdiff; /* max difference of time (sec) */
984  double maxinno; /* reject threshold of innovation (m) */
985  double maxgdop; /* reject threshold of gdop */
986  double baseline[2]; /* baseline length constraint {const,sigma} (m) */
987  double ru[3]; /* rover position for fixed mode {x,y,z} (ecef) (m) */
988  double rb[3]; /* base position for relative mode {x,y,z} (ecef) (m) */
989  char anttype[2][MAXANT]; /* antenna types {rover,base} */
990  double antdel[2][3]; /* antenna delta {{rov_e,rov_n,rov_u},{ref_e,ref_n,ref_u}} */
991  pcv_t pcvr[2]; /* receiver antenna parameters {rov,base} */
992  unsigned char exsats[MAXSAT]; /* excluded satellites (1:excluded,2:included) */
993  int maxaveep; /* max averaging epoches */
994  int initrst; /* initialize by restart */
995  int outsingle; /* output single by dgps/float/fix/ppp outage */
996  char rnxopt[2][256]; /* rinex options {rover,base} */
997  int posopt[6]; /* positioning options */
998  int syncsol; /* solution sync mode (0:off,1:on) */
999  double odisp[2][6 * 11]; /* ocean tide loading parameters {rov,base} */
1000  exterr_t exterr; /* extended receiver error model */
1001  int freqopt; /* disable L2-AR */
1002  char pppopt[256]; /* ppp option */
1003  bool bancroft_init; /* enable Bancroft initialization for the first iteration of the PVT computation */
1004 } prcopt_t;
1005 
1006 
1007 typedef struct
1008 { /* solution options type */
1009  int posf; /* solution format (SOLF_???) */
1010  int times; /* time system (TIMES_???) */
1011  int timef; /* time format (0:sssss.s,1:yyyy/mm/dd hh:mm:ss.s) */
1012  int timeu; /* time digits under decimal point */
1013  int degf; /* latitude/longitude format (0:ddd.ddd,1:ddd mm ss) */
1014  int outhead; /* output header (0:no,1:yes) */
1015  int outopt; /* output processing options (0:no,1:yes) */
1016  int datum; /* datum (0:WGS84,1:Tokyo) */
1017  int height; /* height (0:ellipsoidal,1:geodetic) */
1018  int geoid; /* geoid model (0:EGM96,1:JGD2000) */
1019  int solstatic; /* solution of static mode (0:all,1:single) */
1020  int sstat; /* solution statistics level (0:off,1:states,2:residuals) */
1021  int trace; /* debug trace level (0:off,1-5:debug) */
1022  double nmeaintv[2]; /* nmea output interval (s) (<0:no,0:all) */
1023  /* nmeaintv[0]:gprmc,gpgga,nmeaintv[1]:gpgsv */
1024  char sep[64]; /* field separator */
1025  char prog[64]; /* program name */
1026  double maxsolstd; /* max std-dev for solution output (m) (0:all) */
1027 } solopt_t;
1028 
1029 
1030 typedef struct
1031 { /* satellite status type */
1032  unsigned char sys; /* navigation system */
1033  unsigned char vs; /* valid satellite flag single */
1034  double azel[2]; /* azimuth/elevation angles {az,el} (rad) */
1035  double resp[NFREQ]; /* residuals of pseudorange (m) */
1036  double resc[NFREQ]; /* residuals of carrier-phase (m) */
1037  unsigned char vsat[NFREQ]; /* valid satellite flag */
1038  unsigned char snr[NFREQ]; /* signal strength (0.25 dBHz) */
1039  unsigned char fix[NFREQ]; /* ambiguity fix flag (1:fix,2:float,3:hold) */
1040  unsigned char slip[NFREQ]; /* cycle-slip flag */
1041  unsigned char half[NFREQ]; /* half-cycle valid flag */
1042  int lock[NFREQ]; /* lock counter of phase */
1043  unsigned int outc[NFREQ]; /* obs outage counter of phase */
1044  unsigned int slipc[NFREQ]; /* cycle-slip counter */
1045  unsigned int rejc[NFREQ]; /* reject counter */
1046  double gf; /* geometry-free phase L1-L2 (m) */
1047  double gf2; /* geometry-free phase L1-L5 (m) */
1048  double mw; /* MW-LC (m) */
1049  double phw; /* phase windup (cycle) */
1050  gtime_t pt[2][NFREQ]; /* previous carrier-phase time */
1051  double ph[2][NFREQ]; /* previous carrier-phase observable (cycle) */
1052 } ssat_t;
1053 
1054 
1055 typedef struct
1056 { /* ambiguity control type */
1057  gtime_t epoch[4]; /* last epoch */
1058  int n[4]; /* number of epochs */
1059  double LC[4]; /* linear combination average */
1060  double LCv[4]; /* linear combination variance */
1061  int fixcnt; /* fix count */
1062  char flags[MAXSAT]; /* fix flags */
1063 } ambc_t;
1064 
1065 
1066 typedef struct
1067 { /* RTK control/result type */
1068  sol_t sol; /* RTK solution */
1069  double rb[6]; /* base position/velocity (ecef) (m|m/s) */
1070  int nx, na; /* number of float states/fixed states */
1071  double tt; /* time difference between current and previous (s) */
1072  double *x, *P; /* float states and their covariance */
1073  double *xa, *Pa; /* fixed states and their covariance */
1074  int nfix; /* number of continuous fixes of ambiguity */
1075  ambc_t ambc[MAXSAT]; /* ambiguity control */
1076  ssat_t ssat[MAXSAT]; /* satellite status */
1077  int neb; /* bytes in error message buffer */
1078  char errbuf[MAXERRMSG]; /* error message buffer */
1079  prcopt_t opt; /* processing options */
1080 } rtk_t;
1081 
1082 
1083 typedef struct half_cyc_tag
1084 { /* half-cycle correction list type */
1085  unsigned char sat; /* satellite number */
1086  unsigned char freq; /* frequency number (0:L1,1:L2,2:L5) */
1087  unsigned char valid; /* half-cycle valid flag */
1088  char corr; /* half-cycle corrected (x 0.5 cyc) */
1089  gtime_t ts, te; /* time start, time end */
1090  struct half_cyc_tag *next; /* pointer to next correction */
1091 } half_cyc_t;
1092 
1093 
1094 typedef struct
1095 { /* stream type */
1096  int type; /* type (STR_???) */
1097  int mode; /* mode (STR_MODE_?) */
1098  int state; /* state (-1:error,0:close,1:open) */
1099  unsigned int inb, inr; /* input bytes/rate */
1100  unsigned int outb, outr; /* output bytes/rate */
1101  unsigned int tick, tact; /* tick/active tick */
1102  unsigned int inbt, outbt; /* input/output bytes at tick */
1103  lock_t lock; /* lock flag */
1104  void *port; /* type dependent port control struct */
1105  char path[MAXSTRPATH]; /* stream path */
1106  char msg[MAXSTRMSG]; /* stream message */
1107 } stream_t;
1108 
1109 
1110 typedef struct
1111 { /* serial control type */
1112  dev_t dev; /* serial device */
1113  int error; /* error state */
1114 } serial_t;
1115 
1116 
1117 struct file_t
1118 { /* file control type */
1119  FILE *fp = nullptr; /* file pointer */
1120  FILE *fp_tag = nullptr; /* file pointer of tag file */
1121  FILE *fp_tmp = nullptr; /* temporary file pointer for swap */
1122  FILE *fp_tag_tmp = nullptr; /* temporary file pointer of tag file for swap */
1123  std::string path; /* file path */
1124  std::string openpath; /* open file path */
1125  int mode = 0; /* file mode */
1126  int timetag; /* time tag flag (0:off,1:on) */
1127  int repmode = 0; /* replay mode (0:master,1:slave) */
1128  int offset = 0; /* time offset (ms) for slave */
1129  gtime_t time = {}; /* start time */
1130  gtime_t wtime = {}; /* write time */
1131  unsigned int tick = 0; /* start tick */
1132  unsigned int tick_f = 0; /* start tick in file */
1133  unsigned int fpos = 0; /* current file position */
1134  double start = 0; /* start offset (s) */
1135  double speed = 0; /* replay speed (time factor) */
1136  double swapintv = 0; /* swap interval (hr) (0: no swap) */
1137  lock_t lock; /* lock flag */
1138 };
1139 
1140 
1141 typedef struct
1142 { /* tcp control type */
1143  int state; /* state (0:close,1:wait,2:connect) */
1144  char saddr[256]; /* address string */
1145  int port; /* port */
1146  struct sockaddr_in addr; /* address resolved */
1147  socket_t sock; /* socket descriptor */
1148  int tcon; /* reconnect time (ms) (-1:never,0:now) */
1149  unsigned int tact; /* data active tick */
1150  unsigned int tdis; /* disconnect tick */
1151 } tcp_t;
1152 
1153 
1154 typedef struct
1155 { /* tcp server type */
1156  tcp_t svr; /* tcp server control */
1157  tcp_t cli[MAXCLI]; /* tcp client controls */
1158 } tcpsvr_t;
1159 
1160 
1161 typedef struct
1162 { /* tcp cilent type */
1163  tcp_t svr; /* tcp server control */
1164  int toinact; /* inactive timeout (ms) (0:no timeout) */
1165  int tirecon; /* reconnect interval (ms) (0:no reconnect) */
1166 } tcpcli_t;
1167 
1168 
1169 typedef struct
1170 { /* ntrip control type */
1171  int state; /* state (0:close,1:wait,2:connect) */
1172  int type; /* type (0:server,1:client) */
1173  int nb; /* response buffer size */
1174  char url[256]; /* url for proxy */
1175  char mntpnt[256]; /* mountpoint */
1176  char user[256]; /* user */
1177  char passwd[256]; /* password */
1178  char str[NTRIP_MAXSTR]; /* mountpoint string for server */
1179  unsigned char buff[NTRIP_MAXRSP]; /* response buffer */
1180  tcpcli_t *tcp; /* tcp client */
1181 } ntrip_t;
1182 
1183 
1184 typedef struct
1185 { /* ftp download control type */
1186  int state; /* state (0:close,1:download,2:complete,3:error) */
1187  int proto; /* protocol (0:ftp,1:http) */
1188  int error; /* error code (0:no error,1-10:wget error, */
1189  /* 11:no temp dir,12:uncompact error) */
1190  char addr[1024]; /* download address */
1191  char file[1024]; /* download file path */
1192  char user[256]; /* user for ftp */
1193  char passwd[256]; /* password for ftp */
1194  char local[1024]; /* local file path */
1195  int topts[4]; /* time options {poff,tint,toff,tretry} (s) */
1196  gtime_t tnext; /* next retry time (gpst) */
1197  pthread_t thread; /* download thread */
1198 } ftp_t;
1199 
1200 
1201 typedef struct
1202 { /* receiver raw data control type */
1203  gtime_t time; /* message time */
1204  gtime_t tobs; /* observation data time */
1205  obs_t obs; /* observation data */
1206  obs_t obuf; /* observation data buffer */
1207  nav_t nav; /* satellite ephemerides */
1208  sta_t sta; /* station parameters */
1209  int ephsat; /* sat number of update ephemeris (0:no satellite) */
1210  sbsmsg_t sbsmsg; /* SBAS message */
1211  char msgtype[256]; /* last message type */
1212  unsigned char subfrm[MAXSAT][380]; /* subframe buffer */
1213  lexmsg_t lexmsg; /* LEX message */
1214  double lockt[MAXSAT][NFREQ + NEXOBS]; /* lock time (s) */
1215  double icpp[MAXSAT], off[MAXSAT], icpc; /* carrier params for ss2 */
1216  double prCA[MAXSAT], dpCA[MAXSAT]; /* L1/CA pseudrange/doppler for javad */
1217  unsigned char halfc[MAXSAT][NFREQ + NEXOBS]; /* half-cycle add flag */
1218  char freqn[MAXOBS]; /* frequency number for javad */
1219  int nbyte; /* number of bytes in message buffer */
1220  int len; /* message length (bytes) */
1221  int iod; /* issue of data */
1222  int tod; /* time of day (ms) */
1223  int tbase; /* time base (0:gpst,1:utc(usno),2:glonass,3:utc(su) */
1224  int flag; /* general purpose flag */
1225  int outtype; /* output message type */
1226  unsigned char buff[MAXRAWLEN]; /* message buffer */
1227  char opt[256]; /* receiver dependent options */
1228  double receive_time; /* RT17: Reiceve time of week for week rollover detection */
1229  unsigned int plen; /* RT17: Total size of packet to be read */
1230  unsigned int pbyte; /* RT17: How many packet bytes have been read so far */
1231  unsigned int page; /* RT17: Last page number */
1232  unsigned int reply; /* RT17: Current reply number */
1233  int week; /* RT17: week number */
1234  unsigned char pbuff[255 + 4 + 2]; /* RT17: Packet buffer */
1235 } raw_t;
1236 
1237 
1238 typedef struct
1239 { /* RTK server type */
1240  int state; /* server state (0:stop,1:running) */
1241  int cycle; /* processing cycle (ms) */
1242  int nmeacycle; /* NMEA request cycle (ms) (0:no req) */
1243  int nmeareq; /* NMEA request (0:no,1:nmeapos,2:single sol) */
1244  double nmeapos[3]; /* NMEA request position (ecef) (m) */
1245  int buffsize; /* input buffer size (bytes) */
1246  int format[3]; /* input format {rov,base,corr} */
1247  solopt_t solopt[2]; /* output solution options {sol1,sol2} */
1248  int navsel; /* ephemeris select (0:all,1:rover,2:base,3:corr) */
1249  int nsbs; /* number of sbas message */
1250  int nsol; /* number of solution buffer */
1251  rtk_t rtk; /* RTK control/result struct */
1252  int nb[3]; /* bytes in input buffers {rov,base} */
1253  int nsb[2]; /* bytes in soulution buffers */
1254  int npb[3]; /* bytes in input peek buffers */
1255  unsigned char *buff[3]; /* input buffers {rov,base,corr} */
1256  unsigned char *sbuf[2]; /* output buffers {sol1,sol2} */
1257  unsigned char *pbuf[3]; /* peek buffers {rov,base,corr} */
1258  sol_t solbuf[MAXSOLBUF]; /* solution buffer */
1259  unsigned int nmsg[3][10]; /* input message counts */
1260  raw_t raw[3]; /* receiver raw control {rov,base,corr} */
1261  rtcm_t rtcm[3]; /* RTCM control {rov,base,corr} */
1262  gtime_t ftime[3]; /* download time {rov,base,corr} */
1263  char files[3][MAXSTRPATH]; /* download paths {rov,base,corr} */
1264  obs_t obs[3][MAXOBSBUF]; /* observation data {rov,base,corr} */
1265  nav_t nav; /* navigation data */
1266  sbsmsg_t sbsmsg[MAXSBSMSG]; /* SBAS message buffer */
1267  stream_t stream[8]; /* streams {rov,base,corr,sol1,sol2,logr,logb,logc} */
1268  stream_t *moni; /* monitor stream */
1269  unsigned int tick; /* start tick */
1270  pthread_t thread; /* server thread */
1271  int cputime; /* CPU time (ms) for a processing cycle */
1272  int prcout; /* missing observation data count */
1273  lock_t lock; /* lock flag */
1274 } rtksvr_t;
1275 
1276 typedef struct
1277 { /* multi-signal-message header type */
1278  unsigned char iod; /* issue of data station */
1279  unsigned char time_s; /* cumulative session transmitting time */
1280  unsigned char clk_str; /* clock steering indicator */
1281  unsigned char clk_ext; /* external clock indicator */
1282  unsigned char smooth; /* divergence free smoothing indicator */
1283  unsigned char tint_s; /* soothing interval */
1284  unsigned char nsat, nsig; /* number of satellites/signals */
1285  unsigned char sats[64]; /* satellites */
1286  unsigned char sigs[32]; /* signals */
1287  unsigned char cellmask[64]; /* cell mask */
1288 } msm_h_t;
1289 
1290 
1291 const double CHISQR[100] = {/* chi-sqr(n) (alpha=0.001) */
1292  10.8, 13.8, 16.3, 18.5, 20.5, 22.5, 24.3, 26.1, 27.9, 29.6,
1293  31.3, 32.9, 34.5, 36.1, 37.7, 39.3, 40.8, 42.3, 43.8, 45.3,
1294  46.8, 48.3, 49.7, 51.2, 52.6, 54.1, 55.5, 56.9, 58.3, 59.7,
1295  61.1, 62.5, 63.9, 65.2, 66.6, 68.0, 69.3, 70.7, 72.1, 73.4,
1296  74.7, 76.0, 77.3, 78.6, 80.0, 81.3, 82.6, 84.0, 85.4, 86.7,
1297  88.0, 89.3, 90.6, 91.9, 93.3, 94.7, 96.0, 97.4, 98.7, 100,
1298  101, 102, 103, 104, 105, 107, 108, 109, 110, 112,
1299  113, 114, 115, 116, 118, 119, 120, 122, 123, 125,
1300  126, 127, 128, 129, 131, 132, 133, 134, 135, 137,
1301  138, 139, 140, 142, 143, 144, 145, 147, 148, 149};
1302 
1303 
1304 const double LAM_CARR[MAXFREQ] = {/* carrier wave length (m) */
1307 
1308 const int STRFMT_RTCM2 = 0; /* stream format: RTCM 2 */
1309 const int STRFMT_RTCM3 = 1; /* stream format: RTCM 3 */
1310 const int STRFMT_SP3 = 16; /* stream format: SP3 */
1311 const int STRFMT_RNXCLK = 17; /* stream format: RINEX CLK */
1312 const int STRFMT_SBAS = 18; /* stream format: SBAS messages */
1313 const int STRFMT_NMEA = 19; /* stream format: NMEA 0183 */
1314 // const solopt_t solopt_default; /* default solution output options */
1315 
1316 const int MAXSTRRTK = 8; /* max number of stream in RTK server */
1317 
1318 /** \} */
1319 /** \} */
1320 #endif // GNSS_SDR_RTKLIB_H
const double ERR_CBIAS
code bias error std (m)
Definition: rtklib.h:139
const double EFACT_GPS
error factor: GPS
Definition: rtklib.h:294
constexpr double FREQ1
L1/E1 frequency (Hz)
const int ARMODE_CONT
AR mode: continuous.
Definition: rtklib.h:307
const int MINPRNLEO
min satellite sat number of LEO
Definition: rtklib.h:225
const double GAP_RESION
default gap to reset ionos parameters (ep)
Definition: rtklib.h:141
const int SOLQ_NONE
solution status: no solution
Definition: rtklib.h:122
const int NFREQ
number of carrier frequencies
Definition: rtklib.h:148
const int PMODE_SINGLE
positioning mode: single
Definition: rtklib.h:105
const int MINPRNIRN
min satellite sat number of IRNSS
Definition: rtklib.h:215
const double EFACT_SBS
error factor: SBAS
Definition: rtklib.h:300
const int SOLQ_FIX
solution status: fix
Definition: rtklib.h:123
const int PMODE_PPP_STATIC
positioning mode: PPP-static
Definition: rtklib.h:112
const int SOLF_XYZ
solution format: x/y/z-ecef
Definition: rtklib.h:116
const int MINPRNQZS
min satellite PRN number of QZSS
Definition: rtklib.h:190
const int PMODE_PPP_KINEMA
positioning mode: PPP-kinemaric
Definition: rtklib.h:111
const int MAXCLI
max client connection for tcp svr
Definition: rtklib.h:83
const int TIMES_JST
time system: jst
Definition: rtklib.h:134
Definition: rtklib.h:874
const double FE_WGS84
earth flattening (WGS84)
Definition: rtklib.h:94
const int NSATGAL
number of Galileo satellites
Definition: rtklib.h:186
const double REL_HUMI
relative humidity for saastamoinen model
Definition: rtklib.h:140
const int NSATSBS
number of SBAS satellites
Definition: rtklib.h:239
const double EFACT_IRN
error factor: IRNSS
Definition: rtklib.h:299
const double INT_SWAP_TRAC
swap interval of trace file (s)
Definition: rtklib.h:100
const int SOLF_ENU
solution format: e/n/u-baseline
Definition: rtklib.h:117
const int TROPOPT_SAAS
troposphere option: Saastamoinen model
Definition: rtklib.h:279
const int MAXPRNGAL
max satellite PRN number of Galileo
Definition: rtklib.h:185
const double EFACT_QZS
error factor: QZSS
Definition: rtklib.h:297
const int PMODE_FIXED
positioning mode: fixed
Definition: rtklib.h:110
Definition: rtklib.h:362
const int TROPOPT_EST
troposphere option: ZTD estimation
Definition: rtklib.h:281
GNSS Observable codes.
const int SYS_ALL
navigation system: all
Definition: rtklib.h:167
const int SYS_BDS
navigation system: BeiDou
Definition: rtklib.h:164
Definition: rtklib.h:573
const int TROPOPT_ESTG
troposphere option: ZTD+grad estimation
Definition: rtklib.h:282
const double PRN_HWBIAS
process noise of h/w bias (m/MHz/sqrt(s))
Definition: rtklib.h:97
const int FTP_TIMEOUT
ftp/http timeout (s)
Definition: rtklib.h:86
const int SOLF_STAT
solution format: solution status
Definition: rtklib.h:119
const int MAXSTATMSG
max length of status message
Definition: rtklib.h:84
const int MAXPRNGPS
max satellite PRN number of GPS
Definition: rtklib.h:154
const int SOLF_LLH
solution format: lat/lon/height
Definition: rtklib.h:115
const int ARMODE_INST
AR mode: instantaneous.
Definition: rtklib.h:308
const int IONOOPT_OFF
ionosphere option: correction off
Definition: rtklib.h:268
Definition: rtklib.h:752
const int PMODE_MOVEB
positioning mode: moving-base
Definition: rtklib.h:109
const int MAXPRNLEO
max satellite sat number of LEO */
Definition: rtklib.h:226
const int EPHOPT_SBAS
ephemeris option: broadcast + SBAS
Definition: rtklib.h:289
const int IONOOPT_TEC
ionosphere option: IONEX TEC model
Definition: rtklib.h:273
const int EPHOPT_SSRCOM
ephemeris option: broadcast + SSR_COM
Definition: rtklib.h:291
const double INT_SWAP_STAT
swap interval of solution status file (s)
Definition: rtklib.h:99
Definition: rtklib.h:721
STL namespace.
constexpr double FREQ6
E6/LEX frequency (Hz)
Definition: rtklib.h:916
Definition: rtklib.h:732
Definition: rtklib.h:462
const int IONOOPT_SBAS
ionosphere option: SBAS model
Definition: rtklib.h:270
const int IONOOPT_LEX
ionosphere option: QZSS LEX ionospehre
Definition: rtklib.h:275
const double MAXDTOE
max time difference to GPS Toe (s)
Definition: rtklib.h:251
Definition: rtklib.h:411
const int SOLQ_DR
solution status: dead reckoning
Definition: rtklib.h:129
const int NFREQGLO
number of carrier frequencies of GLONASS
Definition: rtklib.h:149
const double MAXSBSAGEL
max age of SBAS long term corr (s)
Definition: rtklib.h:304
Definition: rtklib.h:432
const int MAXERRMSG
max length of error/warning message
Definition: rtklib.h:266
const int PMODE_STATIC
positioning mode: static
Definition: rtklib.h:108
const int MINPRNSBS
min satellite PRN number of SBAS
Definition: rtklib.h:237
const int MAXSOLQ
max number of solution status
Definition: rtklib.h:130
const int MAXSOLBUF
max number of solution buffer
Definition: rtklib.h:88
Definition: rtklib.h:399
Definition: rtklib.h:537
const int MINPRNGPS
min satellite PRN number of GPS
Definition: rtklib.h:153
const int EPHOPT_BRDC
ephemeris option: broadcast ephemeris
Definition: rtklib.h:287
constexpr double FREQ5
L5/E5a frequency (Hz)
constexpr double FREQ7
E5b frequency (Hz)
const int TINTACT
period for stream active (ms)
Definition: rtklib.h:80
const int MAXFREQ
max NFREQ
Definition: rtklib.h:143
const int ARMODE_OFF
AR mode: off.
Definition: rtklib.h:306
Definition: rtklib.h:1201
const int SOLF_NMEA
solution format: NMEA-183
Definition: rtklib.h:118
const int MINPRNGAL
min satellite PRN number of Galileo
Definition: rtklib.h:184
const double MAXDTOE_BDS
max time difference to BeiDou Toe (s)
Definition: rtklib.h:254
const int MAXOBS
max number of obs in an epoch
Definition: rtklib.h:246
const double MAXDTOE_QZS
max time difference to QZSS Toe (s)
Definition: rtklib.h:252
const int MAXSOLMSG
max length of solution message
Definition: rtklib.h:265
Definition: rtklib.h:557
Definition: rtklib.h:544
Defines useful mathematical constants and their scaled versions.
const int TIMES_GPST
time system: gps time
Definition: rtklib.h:132
const double ERR_BRDCI
broadcast iono model error factor
Definition: rtklib.h:138
const double MAXDTOE_GAL
max time difference to Galileo Toe (s)
Definition: rtklib.h:253
const int MAXPRNQZS
max satellite PRN number of QZSS
Definition: rtklib.h:189
Definition: rtklib.h:907
const int SOLQ_DGPS
solution status: DGPS/DGNSS
Definition: rtklib.h:126
const double HION
ionosphere height (m)
Definition: rtklib.h:96
const int MAXOBSTYPE
max number of obs type in RINEX
Definition: rtklib.h:250
const int TIMETAGH_LEN
time tag file header length
Definition: rtklib.h:82
const int MINPRNBDS
min satellite sat number of BeiDou
Definition: rtklib.h:204
const int MAXLEAPS
max number of leap seconds table
Definition: rtklib.h:145
const int MAXRCV
max receiver number (1 to MAXRCV)
Definition: rtklib.h:249
const int SOLF_GSIF
solution format: GSI F1/F2
Definition: rtklib.h:120
const int MAXPRNSBS
max satellite PRN number of SBAS
Definition: rtklib.h:238
const int MAXBAND
max SBAS band of IGP
Definition: rtklib.h:261
const int NSATGPS
number of GPS satellites
Definition: rtklib.h:155
const int EPHOPT_SSRAPC
ephemeris option: broadcast + SSR_APC
Definition: rtklib.h:290
constexpr int32_t MAXCODE
max number of obs code
constexpr double FREQ2
L2 frequency (Hz)
const int MAXRAWLEN
max length of receiver raw message
Definition: rtklib.h:87
const int SYS_IRN
navigation system: IRNS
Definition: rtklib.h:165
const int ARMODE_PPPAR_ILS
AR mode: AR mode: PPP-AR ILS.
Definition: rtklib.h:311
GNSS Frequencies.
const int NSATBDS
number of BeiDou satellites
Definition: rtklib.h:206
const int MAXSBSMSG
max number of SBAS msg in RTK server
Definition: rtklib.h:89
const int IONOOPT_QZS
ionosphere option: QZSS broadcast model
Definition: rtklib.h:274
Definition: rtklib.h:500
Definition: rtklib.h:392
Definition: rtklib.h:688
const int SYS_GAL
navigation system: Galileo
Definition: rtklib.h:162
const int MAXSBSURA
max URA of SBAS satellite
Definition: rtklib.h:260
Definition: rtklib.h:655
const int IONOOPT_STEC
ionosphere option: SLANT TEC model
Definition: rtklib.h:276
const double MAXGDOP
max GDOP
Definition: rtklib.h:258
const int IONOOPT_IFLC
ionosphere option: L1/L2 or L1/L5 iono-free LC
Definition: rtklib.h:271
const int SYS_QZS
navigation system: QZSS
Definition: rtklib.h:163
const unsigned int POLYCRC32
CRC32 polynomial.
Definition: rtklib.h:102
Definition: rtklib.h:801
const int SERIBUFFSIZE
serial buffer size (bytes)
Definition: rtklib.h:81
Definition: rtklib.h:478
constexpr double FREQ8
E5a+b frequency (Hz)
const int MAXPRNGLO
max satellite slot number of GLONASS
Definition: rtklib.h:173
const double MAXDTOE_GLO
max time difference to GLONASS Toe (s)
Definition: rtklib.h:255
Definition: rtklib.h:645
const int SOLQ_SINGLE
solution status: single
Definition: rtklib.h:127
const int TROPOPT_COR
troposphere option: ZTD correction
Definition: rtklib.h:283
Definition: rtklib.h:382
const int MAXNGEO
max number of GEO satellites
Definition: rtklib.h:263
const int NSATGLO
number of GLONASS satellites
Definition: rtklib.h:174
const int SYS_SBS
navigation system: SBAS
Definition: rtklib.h:160
const int ARMODE_PPPAR
AR mode: PPP-AR.
Definition: rtklib.h:310
Definition: rtklib.h:514
const int MAXPRNBDS
max satellite sat number of BeiDou
Definition: rtklib.h:205
const int EPHOPT_PREC
ephemeris option: precise ephemeris
Definition: rtklib.h:288
void(const char *) fatalfunc_t
fatal callback function type
Definition: rtklib.h:320
const double EFACT_GLO
error factor: GLONASS
Definition: rtklib.h:295
const int MINPRNGLO
min satellite slot number of GLONASS
Definition: rtklib.h:172
const int SYS_LEO
navigation system: LEO
Definition: rtklib.h:166
const double RE_WGS84
earth semimajor axis (WGS84) (m)
Definition: rtklib.h:93
const int PMODE_DGPS
positioning mode: DGPS/DGNSS
Definition: rtklib.h:106
const int EPHOPT_LEX
ephemeris option: QZSS LEX ephemeris
Definition: rtklib.h:292
const int MAXNIGP
max number of IGP in SBAS band
Definition: rtklib.h:262
const int IONOOPT_BRDC
ionosphere option: broadcast model
Definition: rtklib.h:269
Definition: rtklib.h:418
const int MAXPRNIRN
max satellite sat number of IRNSS
Definition: rtklib.h:216
const double MAXSBSAGEF
max age of SBAS fast correction (s)
Definition: rtklib.h:303
const int SOLQ_PPP
solution status: PPP
Definition: rtklib.h:128
const int SYS_GLO
navigation system: GLONASS
Definition: rtklib.h:161
const int SOLQ_FLOAT
solution status: float
Definition: rtklib.h:124
const double EFACT_BDS
error factor: BeiDou
Definition: rtklib.h:298
const int TROPOPT_OFF
troposphere option: correction off
Definition: rtklib.h:278
const int PMODE_PPP_FIXED
positioning mode: PPP-fixed
Definition: rtklib.h:113
const int MAXOBSBUF
max number of observation data buffer
Definition: rtklib.h:90
const int SYS_GPS
navigation system: GPS
Definition: rtklib.h:159
const double EFACT_GAL
error factor: Galileo
Definition: rtklib.h:296
const double MAXDTOE_SBS
max time difference to SBAS Toe (s)
Definition: rtklib.h:256
const double MAXDTOE_S
max time difference to ephem toe (s) for other
Definition: rtklib.h:257
const int ARMODE_FIXHOLD
AR mode: fix and hold.
Definition: rtklib.h:309
const int SOLQ_SBAS
solution status: SBAS
Definition: rtklib.h:125
Definition: rtklib.h:819
Definition: rtklib.h:1184
const int MAXANT
max length of station name/antenna type
Definition: rtklib.h:151
const int PMODE_KINEMA
positioning mode: kinematic
Definition: rtklib.h:107
const int MAXSTRPATH
max length of stream path
Definition: rtklib.h:317
const int MAXSTRMSG
max length of stream message
Definition: rtklib.h:318
constexpr double SPEED_OF_LIGHT_M_S
Speed of light in vacuum [m/s].
Definition: rtklib.h:1141
const double ERR_SAAS
saastamoinen model error std (m)
Definition: rtklib.h:137
const int NEXOBS
number of extended obs codes
Definition: rtklib.h:150
Definition: rtklib.h:491
const int MAXEXFILE
max number of expanded files
Definition: rtklib.h:302
const int TROPOPT_CORG
troposphere option: ZTD+grad correction
Definition: rtklib.h:284
Definition: rtklib.h:375
const double DTTOL
tolerance of time difference (s)
Definition: rtklib.h:146
const int TROPOPT_SBAS
troposphere option: SBAS model
Definition: rtklib.h:280
Definition: rtklib.h:1066
const int IONOOPT_EST
ionosphere option: estimation
Definition: rtklib.h:272
const unsigned int POLYCRC24Q
CRC24Q polynomial.
Definition: rtklib.h:103
const int SYS_NONE
navigation system: none
Definition: rtklib.h:158
const int NSYS
number of systems
Definition: rtklib.h:235
constexpr double FREQ9
S frequency (Hz)
const int TIMES_UTC
time system: utc
Definition: rtklib.h:133
const int POSOPT_RINEX
pos option: rinex header pos
Definition: rtklib.h:316