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