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