GNSS-SDR  0.0.19
An Open Source GNSS Software Defined Receiver
rtklib_rtksvr.h
Go to the documentation of this file.
1 /*!
2  * \file rtklib_rtksvr.h
3  * \brief rtk server functions
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 
34 #ifndef GNSS_SDR_RTKLIB_RKTSVR_H
35 #define GNSS_SDR_RTKLIB_RKTSVR_H
36 
37 #include "rtklib.h"
38 
39 
40 const solopt_t SOLOPT_DEFAULT = {
41  /* defaults solution output options */
42  SOLF_LLH, TIMES_GPST, 1, 3, /* posf, times, timef, timeu */
43  0, 1, 0, 0, 0, 0, /* degf, outhead, outopt, datum, height, geoid */
44  0, 0, 0, /* solstatic, sstat, trace */
45  {0.0, 0.0}, /* nmeaintv */
46  " ", "", 0 /* separator/program name */
47 };
48 
49 const prcopt_t PRCOPT_DEFAULT = { /* defaults processing options */
50  PMODE_SINGLE, 0, 2, SYS_GPS, /* mode, soltype, nf, navsys */
51  15.0 * D2R, {{}, {{}, {}}}, /* elmin, snrmask */
52  0, 1, 1, 1, /* sateph, modear, glomodear, bdsmodear */
53  5, 0, 10, 1, /* maxout, minlock, minfix, armaxiter */
54  0, 0, 0, 0, /* estion, esttrop, dynamics, tidecorr */
55  1, 0, 0, 0, 0, /* niter, codesmooth, intpref, sbascorr, sbassatsel */
56  0, 0, /* rovpos, refpos */
57  {100.0, 100.0, 100.0}, /* eratio[] */
58  {100.0, 0.003, 0.003, 0.0, 1.0}, /* err[] */
59  {30.0, 0.03, 0.3}, /* std[] */
60  {1e-4, 1e-3, 1e-4, 1e-1, 1e-2, 0.0}, /* prn[] */
61  5E-12, /* sclkstab */
62  {3.0, 0.9999, 0.25, 0.1, 0.05, 0, 0, 0}, /* thresar */
63  0.0, 0.0, 0.05, /* elmaskar, almaskhold, thresslip */
64  30.0, 30.0, 30.0, /* maxtdif, maxinno, maxgdop */
65  {}, {}, {}, /* baseline, ru, rb */
66  {"", ""}, /* anttype */
67  {}, {}, {}, /* antdel, pcv, exsats */
68  0, 0, 0, {"", ""}, {}, 0, {{}, {}}, {{}, {{}, {}}, {{}, {}}, {}, {}}, 0, {}, true};
69 
70 
71 void writesolhead(stream_t *stream, const solopt_t *solopt);
72 
73 void saveoutbuf(rtksvr_t *svr, unsigned char *buff, int n, int index);
74 
75 void writesol(rtksvr_t *svr, int index);
76 
77 void updatenav(nav_t *nav);
78 
79 void updatefcn(rtksvr_t *svr);
80 
81 void updatesvr(rtksvr_t *svr, int ret, obs_t *obs, nav_t *nav, int sat,
82  sbsmsg_t *sbsmsg, int index, int iobs);
83 
84 int decoderaw(rtksvr_t *svr, int index);
85 
86 void decodefile(rtksvr_t *svr, int index);
87 
88 void *rtksvrthread(void *arg);
89 
90 int rtksvrinit(rtksvr_t *svr);
91 
92 void rtksvrfree(rtksvr_t *svr);
93 
94 void rtksvrlock(rtksvr_t *svr);
95 
96 void rtksvrunlock(rtksvr_t *svr);
97 
98 int rtksvrstart(rtksvr_t *svr, int cycle, int buffsize, int *strs,
99  char **paths, const int *formats, int navsel, char **cmds,
100  char **rcvopts, int nmeacycle, int nmeareq,
101  const double *nmeapos, prcopt_t *prcopt,
102  solopt_t *solopt, stream_t *moni);
103 
104 void rtksvrstop(rtksvr_t *svr, char **cmds);
105 
106 int rtksvropenstr(rtksvr_t *svr, int index, int str, const char *path,
107  const solopt_t *solopt);
108 
109 void rtksvrclosestr(rtksvr_t *svr, int index);
110 
111 int rtksvrostat(rtksvr_t *svr, int rcv, gtime_t *time, int *sat,
112  double *az, double *el, int **snr, int *vsat);
113 
114 void rtksvrsstat(rtksvr_t *svr, int *sstat, char *msg);
115 
116 
117 #endif
constexpr double D2R
deg to rad
const int PMODE_SINGLE
positioning mode: single
Definition: rtklib.h:105
const int SOLF_LLH
solution format: lat/lon/height
Definition: rtklib.h:115
Definition: rtklib.h:752
const int TIMES_GPST
time system: gps time
Definition: rtklib.h:132
main header file for the rtklib library
const int SYS_GPS
navigation system: GPS
Definition: rtklib.h:159
Definition: rtklib.h:375