|
MRTKLIB 0.7.14
Modernized GNSS Positioning Library
|
MRTKLIB Solution Module — Solution data types and I/O functions. More...
#include <stdint.h>#include <stdio.h>#include "mrtklib/mrtk_foundation.h"#include "mrtklib/mrtk_opt.h"#include "mrtklib/mrtk_time.h"Go to the source code of this file.
Classes | |
| struct | sol_t |
| struct | solbuf_t |
| struct | solstat_t |
| struct | solstatbuf_t |
| struct | ssat_t |
Functions | |
| void | initsolbuf (solbuf_t *solbuf, int cyclic, int nmax) |
| Initialize solution buffer. | |
| void | freesolbuf (solbuf_t *solbuf) |
| Free solution buffer memory. | |
| void | freesolstatbuf (solstatbuf_t *solstatbuf) |
| Free solution status buffer memory. | |
| sol_t * | getsol (solbuf_t *solbuf, int index) |
| Get solution from buffer. | |
| int | addsol (solbuf_t *solbuf, const sol_t *sol) |
| Add solution to buffer. | |
| int | readsol (char *files[], int nfile, solbuf_t *sol) |
| Read solutions from files. | |
| int | readsolt (char *files[], int nfile, gtime_t ts, gtime_t te, double tint, int qflag, solbuf_t *sol) |
| Read solutions from files with time filter. | |
| int | readsolstat (char *files[], int nfile, solstatbuf_t *statbuf) |
| Read solution status from files. | |
| int | readsolstatt (char *files[], int nfile, gtime_t ts, gtime_t te, double tint, solstatbuf_t *statbuf) |
| Read solution status from files with time filter. | |
| int | inputsol (uint8_t data, gtime_t ts, gtime_t te, double tint, int qflag, const solopt_t *opt, solbuf_t *solbuf) |
| Input solution data from stream. | |
| int | outprcopts (uint8_t *buff, const prcopt_t *opt) |
| Output processing options to buffer. | |
| int | outsolheads (uint8_t *buff, const solopt_t *opt) |
| Output solution header to buffer. | |
| int | outsols (uint8_t *buff, const sol_t *sol, const double *rb, const solopt_t *opt) |
| Output solution to buffer. | |
| int | outsolexs (uint8_t *buff, const sol_t *sol, const ssat_t *ssat, const solopt_t *opt) |
| Output solution extended data to buffer. | |
| void | outprcopt (FILE *fp, const prcopt_t *opt) |
| Output processing options to file. | |
| void | outsolhead (FILE *fp, const solopt_t *opt) |
| Output solution header to file. | |
| void | outsol (FILE *fp, const sol_t *sol, const double *rb, const solopt_t *opt) |
| Output solution to file. | |
| void | outsolex (FILE *fp, const sol_t *sol, const ssat_t *ssat, const solopt_t *opt) |
| Output solution extended data to file. | |
| int | outnmea_rmc (uint8_t *buff, const sol_t *sol) |
| Output NMEA RMC sentence. | |
| int | outnmea_gga (uint8_t *buff, const sol_t *sol) |
| Output NMEA GGA sentence. | |
| int | outnmea_gsa (uint8_t *buff, const sol_t *sol, const ssat_t *ssat) |
| Output NMEA GSA sentence. | |
| int | outnmea_gsv (uint8_t *buff, const sol_t *sol, const ssat_t *ssat) |
| Output NMEA GSV sentence. | |
MRTKLIB Solution Module — Solution data types and I/O functions.
This header provides the solution data structures (sol_t, solbuf_t, solstat_t, solstatbuf_t, ssat_t) and solution I/O functions extracted from rtklib.h/solution.c with zero algorithmic changes.
Definition in file mrtk_sol.h.
Add solution to buffer.
| [in,out] | solbuf | Solution buffer |
| [in] | sol | Solution data |
Definition at line 1017 of file mrtk_sol.c.
References solbuf_t::cyclic, solbuf_t::data, solbuf_t::end, free, solbuf_t::n, solbuf_t::nmax, solbuf_t::start, and trace().
Referenced by inputsol().
| void freesolbuf | ( | solbuf_t * | solbuf | ) |
Free solution buffer memory.
| [in,out] | solbuf | Solution buffer |
Definition at line 1111 of file mrtk_sol.c.
References solbuf_t::data, solbuf_t::end, free, solbuf_t::n, solbuf_t::nb, solbuf_t::nmax, solbuf_t::rb, solbuf_t::start, and trace().
| void freesolstatbuf | ( | solstatbuf_t * | solstatbuf | ) |
Free solution status buffer memory.
| [in,out] | solstatbuf | Solution status buffer |
Definition at line 1123 of file mrtk_sol.c.
References solstatbuf_t::data, free, solstatbuf_t::n, solstatbuf_t::nmax, and trace().
Get solution from buffer.
| [in,out] | solbuf | Solution buffer |
| [in] | index | Solution index (0 to n-1) |
Definition at line 1060 of file mrtk_sol.c.
References solbuf_t::data, solbuf_t::nmax, solbuf_t::start, and trace().
| void initsolbuf | ( | solbuf_t * | solbuf, |
| int | cyclic, | ||
| int | nmax ) |
Initialize solution buffer.
| [out] | solbuf | Solution buffer |
| [in] | cyclic | Cyclic buffer flag (0:off, 1:on) |
| [in] | nmax | Max number of solutions (0:default) |
Definition at line 1078 of file mrtk_sol.c.
References solbuf_t::cyclic, solbuf_t::data, solbuf_t::end, malloc, solbuf_t::n, solbuf_t::nb, solbuf_t::nmax, solbuf_t::rb, solbuf_t::start, solbuf_t::time, and trace().
Referenced by readsolt().
| int inputsol | ( | uint8_t | data, |
| gtime_t | ts, | ||
| gtime_t | te, | ||
| double | tint, | ||
| int | qflag, | ||
| const solopt_t * | opt, | ||
| solbuf_t * | solbuf ) |
Input solution data from stream.
| [in] | data | Stream data byte |
| [in] | ts | Start time (GPST) |
| [in] | te | End time (GPST) |
| [in] | tint | Time interval (s) |
| [in] | qflag | Quality flag (0:all) |
| [in] | opt | Solution options |
| [in,out] | solbuf | Solution buffer |
Definition at line 874 of file mrtk_sol.c.
References addsol(), solbuf_t::buff, decode_sol(), MAXSOLMSG, MSG_DISCONN, solbuf_t::nb, solbuf_t::rb, screent(), sol_t::stat, sol_t::time, solbuf_t::time, and trace().
Referenced by readsoldata().
| int outnmea_gga | ( | uint8_t * | buff, |
| const sol_t * | sol ) |
Output NMEA GGA sentence.
| [out] | buff | Output buffer |
| [in] | sol | Solution data |
Definition at line 1447 of file mrtk_sol.c.
References sol_t::age, deg2dms(), ecef2pos(), geoidh(), gpst2utc(), nmea_solq, NMEA_TID, sol_t::ns, R2D, sol_t::rr, gtime_t::sec, SOLQ_NONE, sol_t::stat, gtime_t::time, sol_t::time, time2epoch(), and trace().
Referenced by outsols(), and strsendnmea().
Output NMEA GSA sentence.
| [out] | buff | Output buffer |
| [in] | sol | Solution data |
| [in] | ssat | Satellite status |
Definition at line 1493 of file mrtk_sol.c.
References ssat_t::azel, dops(), MAXSAT, nmea_sid, nmea_sys, nmea_tid, satsys(), sol_t::stat, SYS_GLO, SYS_QZS, SYS_SBS, and trace().
Referenced by outsolexs().
Output NMEA GSV sentence.
| [out] | buff | Output buffer |
| [in] | sol | Solution data |
| [in] | ssat | Satellite status |
Definition at line 1552 of file mrtk_sol.c.
References ssat_t::azel, MAXSAT, nmea_sys, nmea_tid, R2D, satsys(), ssat_t::snr, SNR_UNIT, SYS_GLO, SYS_QZS, SYS_SBS, and trace().
Referenced by outsolexs().
| int outnmea_rmc | ( | uint8_t * | buff, |
| const sol_t * | sol ) |
Output NMEA RMC sentence.
| [out] | buff | Output buffer |
| [in] | sol | Solution data |
Definition at line 1390 of file mrtk_sol.c.
References deg2dms(), ecef2enu(), ecef2pos(), gpst2utc(), KNOT2M, NMEA_TID, norm(), R2D, sol_t::rr, gtime_t::sec, SOLQ_DGPS, SOLQ_FIX, SOLQ_FLOAT, SOLQ_NONE, SOLQ_PPP, SOLQ_SBAS, sol_t::stat, gtime_t::time, sol_t::time, time2epoch(), and trace().
Referenced by outsols().
| void outprcopt | ( | FILE * | fp, |
| const prcopt_t * | opt ) |
Output processing options to file.
| [in] | fp | Output file pointer |
| [in] | opt | Processing options |
Definition at line 1871 of file mrtk_sol.c.
References MAXSOLMSG, outprcopts(), and trace().
Referenced by outheader().
| int outprcopts | ( | uint8_t * | buff, |
| const prcopt_t * | opt ) |
Output processing options to buffer.
| [out] | buff | Output buffer |
| [in] | opt | Processing options |
Definition at line 1609 of file mrtk_sol.c.
References prcopt_t::antdel, prcopt_t::anttype, prcopt_t::arsys, prcopt_t::baseline, COMMENTH, prcopt_t::dynamics, prcopt_t::elmin, prcopt_t::ionoopt, prcopt_t::mode, prcopt_t::modear, prcopt_t::navsys, prcopt_t::nf, PMODE_DGPS, PMODE_FIXED, PMODE_KINEMA, PMODE_MOVEB, PMODE_PPP_FIXED, PMODE_SINGLE, R2D, prcopt_t::sateph, prcopt_t::soltype, SYS_CMP, SYS_GAL, SYS_GLO, SYS_GPS, SYS_IRN, SYS_QZS, SYS_SBS, prcopt_t::thresar, prcopt_t::tidecorr, trace(), and prcopt_t::tropopt.
Referenced by outprcopt().
Output solution to file.
| [in] | fp | Output file pointer |
| [in] | sol | Solution data |
| [in] | rb | Reference position (ecef) (m) |
| [in] | opt | Solution options |
Definition at line 1905 of file mrtk_sol.c.
References MAXSOLMSG, outsols(), and trace().
Referenced by combres(), and procpos().
Output solution extended data to file.
| [in] | fp | Output file pointer |
| [in] | sol | Solution data |
| [in] | ssat | Satellite status |
| [in] | opt | Solution options |
Definition at line 1924 of file mrtk_sol.c.
References MAXSOLMSG, outsolexs(), and trace().
Output solution extended data to buffer.
| [out] | buff | Output buffer |
| [in] | sol | Solution data |
| [in] | ssat | Satellite status |
| [in] | opt | Solution options |
Definition at line 1841 of file mrtk_sol.c.
References solopt_t::maxsolstd, solopt_t::nmeaintv, outnmea_gsa(), outnmea_gsv(), solopt_t::posf, screent(), sol_std(), SOLF_NMEA, sol_t::time, and trace().
Referenced by outsolex(), and writesol().
| void outsolhead | ( | FILE * | fp, |
| const solopt_t * | opt ) |
Output solution header to file.
| [in] | fp | Output file pointer |
| [in] | opt | Solution options |
Definition at line 1887 of file mrtk_sol.c.
References MAXSOLMSG, outsolheads(), and trace().
Referenced by outheader().
| int outsolheads | ( | uint8_t * | buff, |
| const solopt_t * | opt ) |
Output solution header to buffer.
| [out] | buff | Output buffer |
| [in] | opt | Solution options |
Definition at line 1683 of file mrtk_sol.c.
References COMMENTH, solopt_t::datum, solopt_t::degf, solopt_t::height, opt2sep(), solopt_t::outhead, solopt_t::outvel, solopt_t::posf, SOLF_ENU, SOLF_GSIF, SOLF_LLH, SOLF_NMEA, SOLF_STAT, SOLF_XYZ, solopt_t::timef, solopt_t::times, solopt_t::timeu, and trace().
Referenced by outsolhead(), and writesolhead().
Output solution to buffer.
| [out] | buff | Output buffer |
| [in] | sol | Solution data |
| [in] | rb | Reference position (ecef) (m) |
| [in] | opt | Solution options |
Definition at line 1770 of file mrtk_sol.c.
References gpst2utc(), solopt_t::maxsolstd, solopt_t::nmeaintv, norm(), opt2sep(), outecef(), outenu(), outnmea_gga(), outnmea_rmc(), outpos(), solopt_t::posf, screent(), sol_std(), SOLF_ENU, SOLF_LLH, SOLF_NMEA, SOLF_XYZ, SOLQ_NONE, sol_t::stat, sol_t::time, time2gpst(), time2str(), timeadd(), solopt_t::timef, solopt_t::times, TIMES_JST, TIMES_UTC, solopt_t::timeu, and trace().
Referenced by outsol(), and writesol().
| int readsol | ( | char * | files[], |
| int | nfile, | ||
| solbuf_t * | sol ) |
Read solutions from files.
| [in] | files | Solution file paths |
| [in] | nfile | Number of files |
| [out] | sol | Solution buffer |
Definition at line 1004 of file mrtk_sol.c.
References readsolt(), and trace().
| int readsolstat | ( | char * | files[], |
| int | nfile, | ||
| solstatbuf_t * | statbuf ) |
Read solution status from files.
| [in] | files | Solution status file paths |
| [in] | nfile | Number of files |
| [out] | statbuf | Solution status buffer |
Definition at line 1293 of file mrtk_sol.c.
References readsolstatt(), and trace().
| int readsolstatt | ( | char * | files[], |
| int | nfile, | ||
| gtime_t | ts, | ||
| gtime_t | te, | ||
| double | tint, | ||
| solstatbuf_t * | statbuf ) |
Read solution status from files with time filter.
| [in] | files | Solution status file paths |
| [in] | nfile | Number of files |
| [in] | ts | Start time (GPST) |
| [in] | te | End time (GPST) |
| [in] | tint | Time interval (s) |
| [out] | statbuf | Solution status buffer |
Definition at line 1261 of file mrtk_sol.c.
References solstatbuf_t::data, solstatbuf_t::n, solstatbuf_t::nmax, readsolstatdata(), sort_solstat(), and trace().
Referenced by readsolstat().
| int readsolt | ( | char * | files[], |
| int | nfile, | ||
| gtime_t | ts, | ||
| gtime_t | te, | ||
| double | tint, | ||
| int | qflag, | ||
| solbuf_t * | sol ) |
Read solutions from files with time filter.
| [in] | files | Solution file paths |
| [in] | nfile | Number of files |
| [in] | ts | Start time (GPST) (ts.time==0: no limit) |
| [in] | te | End time (GPST) (te.time==0: no limit) |
| [in] | tint | Time interval (s) (0.0: no limit) |
| [in] | qflag | Quality flag (0:all) |
| [out] | sol | Solution buffer |
Definition at line 978 of file mrtk_sol.c.
References initsolbuf(), readsoldata(), readsolopt(), solopt_default, sort_solbuf(), and trace().
Referenced by readsol().