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