|
MRTKLIB 0.7.14
Modernized GNSS Positioning Library
|
MRTKLIB RINEX Module — RINEX file read/write types and functions. More...
#include <stdio.h>#include "mrtklib/mrtk_eph.h"#include "mrtklib/mrtk_foundation.h"#include "mrtklib/mrtk_nav.h"#include "mrtklib/mrtk_obs.h"#include "mrtklib/mrtk_time.h"Go to the source code of this file.
Classes | |
| struct | rnxopt_t |
| RINEX options type. More... | |
| struct | rnxctr_t |
| RINEX control struct type. More... | |
Functions | |
| int | readrnx (const char *file, int rcv, const char *opt, obs_t *obs, nav_t *nav, sta_t *sta) |
| Read RINEX OBS and NAV files. | |
| int | readrnxt (const char *file, int rcv, gtime_t ts, gtime_t te, double tint, const char *opt, obs_t *obs, nav_t *nav, sta_t *sta) |
| Read RINEX OBS and NAV files with time span. | |
| int | readrnxc (const char *file, nav_t *nav) |
| Read RINEX clock files. | |
| int | outrnxobsh (FILE *fp, const rnxopt_t *opt, const nav_t *nav) |
| Output RINEX observation data file header. | |
| int | outrnxobsb (FILE *fp, const rnxopt_t *opt, const obsd_t *obs, int n, int flag) |
| Output RINEX observation data body. | |
| int | outrnxnavh (FILE *fp, const rnxopt_t *opt, const nav_t *nav) |
| Output RINEX navigation data file header. | |
| int | outrnxnavb (FILE *fp, const rnxopt_t *opt, const eph_t *eph) |
| Output RINEX navigation data file body. | |
| int | outrnxgnavh (FILE *fp, const rnxopt_t *opt, const nav_t *nav) |
| Output RINEX GLONASS navigation data file header. | |
| int | outrnxgnavb (FILE *fp, const rnxopt_t *opt, const geph_t *geph) |
| Output RINEX GLONASS navigation data file body. | |
| int | outrnxhnavh (FILE *fp, const rnxopt_t *opt, const nav_t *nav) |
| Output RINEX GEO navigation data file header. | |
| int | outrnxhnavb (FILE *fp, const rnxopt_t *opt, const seph_t *seph) |
| Output RINEX GEO navigation data file body. | |
| int | outrnxlnavh (FILE *fp, const rnxopt_t *opt, const nav_t *nav) |
| Output RINEX Galileo navigation data file header. | |
| int | outrnxqnavh (FILE *fp, const rnxopt_t *opt, const nav_t *nav) |
| Output RINEX QZSS navigation data file header. | |
| int | outrnxcnavh (FILE *fp, const rnxopt_t *opt, const nav_t *nav) |
| Output RINEX BDS navigation data file header. | |
| int | outrnxinavh (FILE *fp, const rnxopt_t *opt, const nav_t *nav) |
| Output RINEX NavIC/IRNSS navigation data file header. | |
| int | init_rnxctr (rnxctr_t *rnx) |
| Initialize RINEX control struct. | |
| void | free_rnxctr (rnxctr_t *rnx) |
| Free RINEX control struct buffers. | |
| int | open_rnxctr (rnxctr_t *rnx, FILE *fp) |
| Open RINEX data (read header). | |
| int | input_rnxctr (rnxctr_t *rnx, FILE *fp) |
| Input RINEX control (read next message). | |
MRTKLIB RINEX Module — RINEX file read/write types and functions.
This header provides the RINEX option type (rnxopt_t), RINEX control struct (rnxctr_t), and all public RINEX read/write function declarations extracted from rinex.c.
Definition in file mrtk_rinex.h.
| void free_rnxctr | ( | rnxctr_t * | rnx | ) |
Free RINEX control struct buffers.
| [in,out] | rnx | RINEX control struct |
Definition at line 2522 of file mrtk_rinex.c.
References obs_t::data, nav_s::eph, free, nav_s::geph, nav_s::n, obs_t::n, rnxctr_t::nav, nav_s::ng, nav_s::ns, rnxctr_t::obs, nav_s::seph, and trace().
Referenced by free_strfile(), and init_rnxctr().
| int init_rnxctr | ( | rnxctr_t * | rnx | ) |
Initialize RINEX control struct.
| [in,out] | rnx | RINEX control struct |
Definition at line 2466 of file mrtk_rinex.c.
References obs_t::data, nav_s::eph, rnxctr_t::ephsat, rnxctr_t::ephset, free_rnxctr(), nav_s::geph, malloc, MAXOBS, MAXOBSTYPE, MAXSAT, nav_s::n, obs_t::n, rnxctr_t::nav, nav_s::ng, nav_s::ns, NSATGLO, NSATSBS, rnxctr_t::obs, rnxctr_t::opt, nav_s::seph, rnxctr_t::sys, rnxctr_t::time, rnxctr_t::tobs, trace(), rnxctr_t::tsys, and rnxctr_t::ver.
Referenced by gen_strfile().
| int input_rnxctr | ( | rnxctr_t * | rnx, |
| FILE * | fp ) |
Input RINEX control (read next message).
| [in,out] | rnx | RINEX control struct |
| [in] | fp | File pointer |
Definition at line 2592 of file mrtk_rinex.c.
References eph_t::code, obs_t::data, nav_s::eph, rnxctr_t::ephsat, rnxctr_t::ephset, nav_s::geph, MAXSAT, MINPRNSBS, obs_t::n, rnxctr_t::nav, rnxctr_t::obs, rnxctr_t::opt, readrnxnavb(), readrnxobsb(), eph_t::sat, geph_t::sat, seph_t::sat, satsys(), nav_s::seph, rnxctr_t::sta, SYS_GAL, SYS_GLO, SYS_NONE, SYS_QZS, SYS_SBS, obsd_t::time, rnxctr_t::time, rnxctr_t::tobs, geph_t::tof, seph_t::tof, trace(), rnxctr_t::tsys, eph_t::ttr, rnxctr_t::type, and rnxctr_t::ver.
Referenced by input_strfile().
| int open_rnxctr | ( | rnxctr_t * | rnx, |
| FILE * | fp ) |
Open RINEX data (read header).
| [in,out] | rnx | RINEX control struct |
| [in] | fp | File pointer |
Definition at line 2545 of file mrtk_rinex.c.
References rnxctr_t::ephsat, rnxctr_t::ephset, MAXOBSTYPE, rnxctr_t::nav, NUMSYS, readrnxh(), rnxctr_t::sta, rnxctr_t::sys, rnxctr_t::tobs, trace(), rnxctr_t::tsys, rnxctr_t::type, and rnxctr_t::ver.
Referenced by open_strfile().
Output RINEX BDS navigation data file header.
| [in] | fp | Output file pointer |
| [in] | opt | RINEX options |
| [in] | nav | Navigation data (NULL: no input) |
Definition at line 3697 of file mrtk_rinex.c.
References rnxopt_t::comment, MAXCOMMENT, out_iono(), out_leaps(), out_time(), rnxopt_t::prog, rnxopt_t::rnxver, rnxopt_t::runby, SYS_CMP, timestr_rnx(), and trace().
Referenced by write_header().
Output RINEX GLONASS navigation data file body.
| [in] | fp | Output file pointer |
| [in] | opt | RINEX options |
| [in] | geph | GLONASS ephemeris |
Definition at line 3466 of file mrtk_rinex.c.
References geph_t::acc, geph_t::age, geph_t::dtaun, geph_t::flags, geph_t::frq, geph_t::gamn, gpst2utc(), rnxopt_t::navsys, outnavf(), geph_t::pos, rnxopt_t::rnxver, geph_t::sat, sat2code(), satsys(), geph_t::sva, geph_t::svh, SYS_GLO, geph_t::taun, time2epoch(), time2gpst(), geph_t::toe, geph_t::tof, trace(), and geph_t::vel.
Referenced by convnav().
Output RINEX GLONASS navigation data file header.
| [in] | fp | Output file pointer |
| [in] | opt | RINEX options |
| [in] | nav | Navigation data (NULL: no input) |
Definition at line 3431 of file mrtk_rinex.c.
References rnxopt_t::comment, MAXCOMMENT, out_leaps(), out_time(), rnxopt_t::prog, rnxopt_t::rnxver, rnxopt_t::runby, SYS_GLO, SYS_GPS, timestr_rnx(), and trace().
Referenced by write_header().
Output RINEX GEO navigation data file body.
| [in] | fp | Output file pointer |
| [in] | opt | RINEX options |
| [in] | seph | SBAS ephemeris |
Definition at line 3570 of file mrtk_rinex.c.
References seph_t::acc, seph_t::af0, seph_t::af1, rnxopt_t::navsys, outnavf(), seph_t::pos, rnxopt_t::rnxver, seph_t::sat, sat2code(), satsys(), seph_t::sva, seph_t::svh, SYS_SBS, seph_t::t0, time2epoch(), time2gpst(), seph_t::tof, trace(), uravalue(), and seph_t::vel.
Referenced by convnav(), and convsbs().
Output RINEX GEO navigation data file header.
| [in] | fp | Output file pointer |
| [in] | opt | RINEX options |
| [in] | nav | Navigation data (NULL: no input) |
Definition at line 3535 of file mrtk_rinex.c.
References rnxopt_t::comment, MAXCOMMENT, out_leaps(), out_time(), rnxopt_t::prog, rnxopt_t::rnxver, rnxopt_t::runby, SYS_GPS, SYS_SBS, timestr_rnx(), and trace().
Referenced by write_header().
Output RINEX NavIC/IRNSS navigation data file header.
| [in] | fp | Output file pointer |
| [in] | opt | RINEX options |
| [in] | nav | Navigation data (NULL: no input) |
Definition at line 3733 of file mrtk_rinex.c.
References rnxopt_t::comment, MAXCOMMENT, out_iono(), out_leaps(), out_time(), rnxopt_t::prog, rnxopt_t::rnxver, rnxopt_t::runby, SYS_IRN, timestr_rnx(), and trace().
Referenced by write_header().
Output RINEX Galileo navigation data file header.
| [in] | fp | Output file pointer |
| [in] | opt | RINEX options |
| [in] | nav | Navigation data (NULL: no input) |
Definition at line 3625 of file mrtk_rinex.c.
References rnxopt_t::comment, MAXCOMMENT, out_iono(), out_leaps(), out_time(), rnxopt_t::prog, rnxopt_t::rnxver, rnxopt_t::runby, SYS_GAL, timestr_rnx(), and trace().
Referenced by write_header().
Output RINEX navigation data file body.
| [in] | fp | Output file pointer |
| [in] | opt | RINEX options |
| [in] | eph | Ephemeris |
Definition at line 3320 of file mrtk_rinex.c.
References eph_t::A, eph_t::cic, eph_t::cis, eph_t::code, eph_t::crc, eph_t::crs, eph_t::cuc, eph_t::cus, eph_t::deln, eph_t::e, eph_t::f0, eph_t::f1, eph_t::f2, eph_t::fit, eph_t::flag, gpst2bdt(), eph_t::i0, eph_t::idot, eph_t::iodc, eph_t::iode, eph_t::M0, rnxopt_t::navsys, eph_t::omg, eph_t::OMG0, eph_t::OMGd, outnavf(), rnxopt_t::rnxver, eph_t::sat, sat2code(), satsys(), sisa_value(), eph_t::sva, eph_t::svh, SYS_CMP, SYS_GAL, SYS_GPS, SYS_IRN, SYS_QZS, eph_t::tgd, time2bdt(), time2epoch(), time2gpst(), eph_t::toc, eph_t::toes, trace(), eph_t::ttr, uravalue(), and eph_t::week.
Referenced by convnav().
Output RINEX navigation data file header.
| [in] | fp | Output file pointer |
| [in] | opt | RINEX options |
| [in] | nav | Navigation data (NULL: no input) |
Definition at line 3264 of file mrtk_rinex.c.
References rnxopt_t::comment, MAXCOMMENT, rnxopt_t::navsys, out_iono(), out_leaps(), out_time(), rnxopt_t::prog, rnxopt_t::rnxver, rnxopt_t::runby, rnxopt_t::sep_nav, SYS_ALL, SYS_CMP, SYS_GAL, SYS_GLO, SYS_GPS, SYS_IRN, SYS_QZS, SYS_SBS, timestr_rnx(), and trace().
Referenced by write_header().
Output RINEX observation data body.
| [in] | fp | Output file pointer |
| [in] | opt | RINEX options |
| [in] | obs | Observation data |
| [in] | n | Number of observation data |
| [in] | flag | Epoch flag (0:ok,1:power failure,>1:event flag) |
Definition at line 2992 of file mrtk_rinex.c.
References obsd_t::code, rnxopt_t::exsats, obsd_t::L, rnxopt_t::mask, MAXOBS, rnxopt_t::navsys, rnxopt_t::nobs, obsindex(), outrnxobsf(), rnxopt_t::rnxver, obsd_t::sat, sat2code(), satsys(), rnxopt_t::shift, SNR_UNIT, SYS_CMP, SYS_GAL, SYS_GLO, SYS_GPS, SYS_IRN, SYS_QZS, SYS_SBS, time2epoch(), rnxopt_t::tobs, and trace().
Referenced by convobs().
Output RINEX observation data file header.
| [in] | fp | Output file pointer |
| [in] | opt | RINEX options |
| [in] | nav | Navigation data |
Definition at line 2813 of file mrtk_rinex.c.
References rnxopt_t::ant, rnxopt_t::antdel, rnxopt_t::apppos, rnxopt_t::comment, rnxopt_t::marker, rnxopt_t::markerno, rnxopt_t::markertype, MAXCOMMENT, rnxopt_t::name, rnxopt_t::navsys, outobstype_ver2(), outobstype_ver3(), outrnx_glo_bias(), outrnx_glo_fcn(), outrnx_phase_shift(), rnxopt_t::prog, rnxopt_t::rec, rnxopt_t::rnxver, rnxopt_t::runby, SYS_CMP, SYS_GAL, SYS_GLO, SYS_GPS, SYS_IRN, SYS_QZS, SYS_SBS, rnxopt_t::tend, time2epoch(), timestr_rnx(), rnxopt_t::tint, trace(), and rnxopt_t::tstart.
Referenced by write_header().
Output RINEX QZSS navigation data file header.
| [in] | fp | Output file pointer |
| [in] | opt | RINEX options |
| [in] | nav | Navigation data (NULL: no input) |
Definition at line 3661 of file mrtk_rinex.c.
References rnxopt_t::comment, MAXCOMMENT, out_iono(), out_leaps(), out_time(), rnxopt_t::prog, rnxopt_t::rnxver, rnxopt_t::runby, SYS_QZS, timestr_rnx(), and trace().
Referenced by write_header().
Read RINEX OBS and NAV files.
| [in] | file | File path (wild-card * expanded) ("": stdin) |
| [in] | rcv | Receiver number for obs data |
| [in] | opt | RINEX options ("": no option) |
| [in,out] | obs | Observation data (NULL: no input) |
| [in,out] | nav | Navigation data (NULL: no input) |
| [in,out] | sta | Station parameters (NULL: no input) |
Definition at line 2362 of file mrtk_rinex.c.
References readrnxt(), and trace().
| int readrnxc | ( | const char * | file, |
| nav_t * | nav ) |
Read RINEX clock files.
| [in] | file | File path (wild-card * expanded) |
| [in,out] | nav | Navigation data (NULL: no input) |
Definition at line 2421 of file mrtk_rinex.c.
References combpclk(), expath(), free, malloc, MAXEXFILE, nav_s::nc, readrnxfile(), and trace().
Referenced by decodefile(), and readpreceph().
| int readrnxt | ( | const char * | file, |
| int | rcv, | ||
| gtime_t | ts, | ||
| gtime_t | te, | ||
| double | tint, | ||
| const char * | opt, | ||
| obs_t * | obs, | ||
| nav_t * | nav, | ||
| sta_t * | sta ) |
Read RINEX OBS and NAV files with time span.
| [in] | file | File path (wild-card * expanded) ("": stdin) |
| [in] | rcv | Receiver number for obs data |
| [in] | ts | Observation time start (ts.time==0: no limit) |
| [in] | te | Observation time end (te.time==0: no limit) |
| [in] | tint | Observation time interval (s) (0:all) |
| [in] | opt | RINEX options ("": no option) |
| [in,out] | obs | Observation data (NULL: no input) |
| [in,out] | nav | Navigation data (NULL: no input) |
| [in,out] | sta | Station parameters (NULL: no input) |
Definition at line 2317 of file mrtk_rinex.c.
References expath(), FILEPATHSEP, free, malloc, MAXEXFILE, sta_t::name, readrnxfile(), readrnxfp(), setstr(), and trace().
Referenced by readobsnav(), and readrnx().