GNSS-SDR 0.0.21
An Open Source GNSS Software Defined Receiver
Loading...
Searching...
No Matches
rtklib_solution.h
Go to the documentation of this file.
1/*!
2 * \file rtklib_solution.h
3 * \brief solution functions headers
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#ifndef GNSS_SDR_RTKLIB_SOLUTION_H
33#define GNSS_SDR_RTKLIB_SOLUTION_H
34
35#include "rtklib.h"
36
37/** \addtogroup PVT
38 * \{ */
39/** \addtogroup RTKLIB_Library
40 * \{ */
41
42
43#define COMMENTH "%" /* comment line indicator for solution */
44#define MSG_DISCONN "$_DISCONNECT\r\n" /* disconnect message */
45
46const char *opt2sep(const solopt_t *opt);
47
48int tonum(char *buff, const char *sep, double *v);
49
50double sqvar(double covar);
51
52double dmm2deg(double dmm);
53
54void septime(double t, double *t1, double *t2, double *t3);
55
56void soltocov(const sol_t *sol, double *P);
57
58void covtosol(const double *P, sol_t *sol);
59
60int decode_nmearmc(char **val, int n, sol_t *sol);
61
62int decode_nmeagga(char **val, int n, sol_t *sol);
63
64int decode_nmea(char *buff, sol_t *sol);
65
66char *decode_soltime(char *buff, const solopt_t *opt, gtime_t *time);
67
68int decode_solxyz(char *buff, const solopt_t *opt, sol_t *sol);
69
70int decode_solllh(char *buff, const solopt_t *opt, sol_t *sol);
71
72int decode_solenu(char *buff, const solopt_t *opt, sol_t *sol);
73
74int decode_solgsi(char *buff, const solopt_t *opt, sol_t *sol);
75
76int decode_solpos(char *buff, const solopt_t *opt, sol_t *sol);
77
78void decode_refpos(char *buff, const solopt_t *opt, double *rb);
79
80int decode_sol(char *buff, const solopt_t *opt, sol_t *sol, double *rb);
81
82void decode_solopt(char *buff, solopt_t *opt);
83
84void readsolopt(FILE *fp, solopt_t *opt);
85
86int inputsol(unsigned char data, gtime_t ts, gtime_t te, double tint,
87 int qflag, const solopt_t *opt, solbuf_t *solbuf);
88
89int readsoldata(FILE *fp, gtime_t ts, gtime_t te, double tint, int qflag,
90 const solopt_t *opt, solbuf_t *solbuf);
91
92int cmpsol(const void *p1, const void *p2);
93
94int sort_solbuf(solbuf_t *solbuf);
95
96int readsolt(char *files[], int nfile, gtime_t ts, gtime_t te,
97 double tint, int qflag, solbuf_t *solbuf);
98
99int readsol(char *files[], int nfile, solbuf_t *sol);
100
101int addsol(solbuf_t *solbuf, const sol_t *sol);
102
103sol_t *getsol(solbuf_t *solbuf, int index);
104
105void initsolbuf(solbuf_t *solbuf, int cyclic, int nmax);
106
107void freesolbuf(solbuf_t *solbuf);
108
109void freesolstatbuf(solstatbuf_t *solstatbuf);
110
111int cmpsolstat(const void *p1, const void *p2);
112
113int sort_solstat(solstatbuf_t *statbuf);
114
115int decode_solstat(char *buff, solstat_t *stat);
116
117void addsolstat(solstatbuf_t *statbuf, const solstat_t *stat);
118
119int readsolstatdata(FILE *fp, gtime_t ts, gtime_t te, double tint,
120 solstatbuf_t *statbuf);
121
122int readsolstatt(char *files[], int nfile, gtime_t ts, gtime_t te,
123 double tint, solstatbuf_t *statbuf);
124
125int readsolstat(char *files[], int nfile, solstatbuf_t *statbuf);
126
127int outecef(unsigned char *buff, const char *s, const sol_t *sol,
128 const solopt_t *opt);
129
130int outpos(unsigned char *buff, const char *s, const sol_t *sol, const solopt_t *opt);
131
132int outenu(unsigned char *buff, const char *s, const sol_t *sol,
133 const double *rb, const solopt_t *opt);
134
135int outnmea_rmc(unsigned char *buff, const sol_t *sol);
136
137int outnmea_gga(unsigned char *buff, const sol_t *sol);
138
139int outnmea_gsa(unsigned char *buff, const sol_t *sol,
140 const ssat_t *ssat);
141
142int outnmea_gsv(unsigned char *buff, const sol_t *sol,
143 const ssat_t *ssat);
144
145int outprcopts(unsigned char *buff, const prcopt_t *opt);
146
147int outsolheads(unsigned char *buff, const solopt_t *opt);
148
149int outsols(unsigned char *buff, const sol_t *sol, const double *rb,
150 const solopt_t *opt);
151
152int outsolexs(unsigned char *buff, const sol_t *sol, const ssat_t *ssat,
153 const solopt_t *opt);
154
155void outprcopt(FILE *fp, const prcopt_t *opt);
156
157void outsolhead(FILE *fp, const solopt_t *opt);
158
159void outsol(FILE *fp, const sol_t *sol, const double *rb,
160 const solopt_t *opt);
161
162void outsolex(FILE *fp, const sol_t *sol, const ssat_t *ssat,
163 const solopt_t *opt);
164
165
166/** \} */
167/** \} */
168#endif // GNSS_SDR_RTKLIB_SOLUTION_H
main header file for the rtklib library