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