|
MRTKLIB 0.7.14
Modernized GNSS Positioning Library
|
MRTKLIB RINEX Module — RINEX file read/write functions. More...
#include "mrtklib/mrtk_rinex.h"#include <math.h>#include <stdlib.h>#include <string.h>#include "mrtklib/mrtk_mat.h"#include "mrtklib/mrtk_sys.h"#include "mrtklib/mrtk_trace.h"Go to the source code of this file.
Classes | |
| struct | sigind_t |
Macros | |
| #define | SYS_NONE 0x00 |
| #define | SYS_GPS 0x01 |
| #define | SYS_SBS 0x02 |
| #define | SYS_GLO 0x04 |
| #define | SYS_GAL 0x08 |
| #define | SYS_QZS 0x10 |
| #define | SYS_CMP 0x20 |
| #define | SYS_IRN 0x40 |
| #define | SYS_BD2 0x100 |
| #define | SYS_ALL 0xFF |
| #define | TSYS_GPS 0 |
| #define | TSYS_UTC 1 |
| #define | TSYS_GLO 2 |
| #define | TSYS_GAL 3 |
| #define | TSYS_QZS 4 |
| #define | TSYS_CMP 5 |
| #define | TSYS_IRN 6 |
| #define | LLI_SLIP 0x01 |
| #define | LLI_HALFC 0x02 |
| #define | LLI_BOCTRK 0x04 |
| #define | LLI_HALFA 0x40 |
| #define | LLI_HALFS 0x80 |
| #define | FILEPATHSEP '/' |
| #define | SQR(x) |
| #define | NAVEXP "D" /* exponent letter in RINEX NAV */ |
| #define | NUMSYS 8 /* number of systems (incl. BD2) */ |
| #define | MAXRNXLEN (16 * MAXOBSTYPE + 4) /* max RINEX record length */ |
| #define | MAXPOSHEAD 1024 /* max head line position */ |
| #define | MINFREQ_GLO -7 /* min frequency number GLONASS */ |
| #define | MAXFREQ_GLO 13 /* max frequency number GLONASS */ |
| #define | NINCOBS 262144 /* incremental number of obs data */ |
Functions | |
| static void | setstr (char *dst, const char *src, int n) |
| static gtime_t | adjweek (gtime_t t, gtime_t t0) |
| static gtime_t | adjday (gtime_t t, gtime_t t0) |
| static void | timestr_rnx (char *str) |
| static int | sat2code (int sat, char *code) |
| static double | uravalue (int sva) |
| static int | uraindex (double value) |
| static double | sisa_value (int sisa) |
| static int | sisa_index (double value) |
| static void | init_sta (sta_t *sta) |
| static void | convcode (int ver, int sys, const char *str, char *type) |
| static void | decode_obsh (FILE *fp, char *buff, int ver, int *tsys, char tobs[][MAXOBSTYPE][4], nav_t *nav, sta_t *sta) |
| static void | decode_navh (char *buff, nav_t *nav) |
| static void | decode_gnavh (char *buff, nav_t *nav) |
| static void | decode_hnavh (char *buff, nav_t *nav) |
| static int | readrnxh (FILE *fp, int *ver, char *type, int *sys, int *tsys, char tobs[][MAXOBSTYPE][4], nav_t *nav, sta_t *sta) |
| static int | decode_obsepoch (FILE *fp, char *buff, int ver, gtime_t *time, int *flag, int *sats) |
| static uint16_t | snr_val (int sat, double snr) |
| static int | decode_obsdata (FILE *fp, char *buff, int ver, int mask, sigind_t *index, obsd_t *obs) |
| static void | saveslips (uint8_t slips[][5+5], obsd_t *data) |
| static void | restslips (uint8_t slips[][5+5], obsd_t *data) |
| static int | addobsdata (obs_t *obs, const obsd_t *data) |
| static int | set_sysmask (const char *opt) |
| static void | set_index (int ver, int sys, const char *opt, char tobs[MAXOBSTYPE][4], sigind_t *ind) |
| static int | readrnxobsb (FILE *fp, const char *opt, int ver, int *tsys, char tobs[][MAXOBSTYPE][4], int *flag, obsd_t *data, sta_t *sta) |
| static int | readrnxobs (FILE *fp, gtime_t ts, gtime_t te, double tint, const char *opt, int rcv, int ver, int *tsys, char tobs[][MAXOBSTYPE][4], obs_t *obs, sta_t *sta) |
| static int | decode_eph_cnav (int ver, int sat, gtime_t toc, const double *data, int ndata, int v4type, eph_t *eph) |
| static int | decode_eph_bds_cnav (int ver, int sat, gtime_t toc, const double *data, int ndata, int v4type, eph_t *eph) |
| static int | decode_eph (int ver, int sat, gtime_t toc, const double *data, eph_t *eph) |
| static int | decode_geph (int ver, int sat, gtime_t toc, double *data, geph_t *geph) |
| static int | decode_seph (int ver, int sat, gtime_t toc, double *data, seph_t *seph) |
| static int | readrnxnavb (FILE *fp, const char *opt, int ver, int sys, int *type, eph_t *eph, geph_t *geph, seph_t *seph, nav_t *nav) |
| static int | add_eph (nav_t *nav, const eph_t *eph) |
| static int | add_geph (nav_t *nav, const geph_t *geph) |
| static int | add_seph (nav_t *nav, const seph_t *seph) |
| static int | readrnxnav (FILE *fp, const char *opt, int ver, int sys, nav_t *nav) |
| static int | readrnxclk (FILE *fp, const char *opt, int ver, int index, nav_t *nav) |
| static int | readrnxfp (FILE *fp, gtime_t ts, gtime_t te, double tint, const char *opt, int flag, int index, char *type, obs_t *obs, nav_t *nav, sta_t *sta) |
| static int | readrnxfile (const char *file, gtime_t ts, gtime_t te, double tint, const char *opt, int flag, int index, char *type, obs_t *obs, nav_t *nav, sta_t *sta) |
| 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 | readrnx (const char *file, int rcv, const char *opt, obs_t *obs, nav_t *nav, sta_t *sta) |
| Read RINEX OBS and NAV files. | |
| static int | cmppclk (const void *p1, const void *p2) |
| static void | combpclk (nav_t *nav) |
| int | readrnxc (const char *file, nav_t *nav) |
| Read RINEX clock files. | |
| 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). | |
| static void | outobstype_ver2 (FILE *fp, const rnxopt_t *opt) |
| static void | outobstype_ver3 (FILE *fp, const rnxopt_t *opt) |
| static void | outrnx_phase_shift (FILE *fp, const rnxopt_t *opt, const nav_t *nav) |
| static void | outrnx_glo_fcn (FILE *fp, const rnxopt_t *opt, const nav_t *nav) |
| static void | outrnx_glo_bias (FILE *fp, const rnxopt_t *opt) |
| int | outrnxobsh (FILE *fp, const rnxopt_t *opt, const nav_t *nav) |
| Output RINEX observation data file header. | |
| static void | outrnxobsf (FILE *fp, double obs, int lli) |
| static int | obsindex (int rnxver, int sys, const uint8_t *code, const char *tobs, const char *mask) |
| int | outrnxobsb (FILE *fp, const rnxopt_t *opt, const obsd_t *obs, int n, int flag) |
| Output RINEX observation data body. | |
| static void | outnavf_n (FILE *fp, double value, int n) |
| static void | outnavf (FILE *fp, double value) |
| static void | out_iono_sys (FILE *fp, const char *sys, const double *ion, int n) |
| static void | out_iono (FILE *fp, int sys, const rnxopt_t *opt, const nav_t *nav) |
| static void | out_time_sys (FILE *fp, const char *sys, const double *utc) |
| static void | out_time (FILE *fp, int sys, const rnxopt_t *opt, const nav_t *nav) |
| static void | out_leaps (FILE *fp, int sys, const rnxopt_t *opt, const nav_t *nav) |
| 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. | |
Variables | |
| static const int | navsys [] |
| static const char | syscodes [] = "GREJSCI" |
| static const char | obscodes [] = "CLDS" |
| static const double | ura_eph [] |
| static const double | ura_nominal [] |
MRTKLIB RINEX Module — RINEX file read/write functions.
This file contains all RINEX file reading and writing functions originally in rinex.c, migrated to the mrtklib modular architecture.
Definition in file mrtk_rinex.c.
| #define FILEPATHSEP '/' |
Definition at line 62 of file mrtk_rinex.c.
| #define LLI_BOCTRK 0x04 |
Definition at line 58 of file mrtk_rinex.c.
Referenced by outrnxobsf().
| #define LLI_HALFA 0x40 |
Definition at line 59 of file mrtk_rinex.c.
Referenced by decode_rangeb(), decode_rangecmpb(), resolve_halfc(), and update_halfc().
| #define LLI_HALFC 0x02 |
Definition at line 57 of file mrtk_rinex.c.
Referenced by ddres(), decode_rangeb(), decode_rangecmpb(), decode_rxmrawx(), outrnxobsf(), resolve_halfc(), and update_halfc().
| #define LLI_HALFS 0x80 |
Definition at line 60 of file mrtk_rinex.c.
Referenced by decode_rxmrawx(), resolve_halfc(), and update_halfc().
| #define LLI_SLIP 0x01 |
Definition at line 56 of file mrtk_rinex.c.
Referenced by convobs(), decode_rangeb(), decode_rangecmpb(), decode_rxmrawx(), outrnxobsf(), rest_slips(), restslips(), save_slips(), saveslips(), and update_halfc().
| #define MAXFREQ_GLO 13 /* max frequency number GLONASS */ |
Definition at line 75 of file mrtk_rinex.c.
Referenced by decode_geph().
| #define MAXPOSHEAD 1024 /* max head line position */ |
Definition at line 73 of file mrtk_rinex.c.
Referenced by readrnxh().
| #define MAXRNXLEN (16 * MAXOBSTYPE + 4) /* max RINEX record length */ |
Definition at line 72 of file mrtk_rinex.c.
Referenced by decode_obsdata(), decode_obsepoch(), decode_obsh(), readrnxclk(), readrnxh(), readrnxnavb(), and readrnxobsb().
| #define MINFREQ_GLO -7 /* min frequency number GLONASS */ |
Definition at line 74 of file mrtk_rinex.c.
Referenced by decode_geph().
| #define NAVEXP "D" /* exponent letter in RINEX NAV */ |
Definition at line 70 of file mrtk_rinex.c.
Referenced by outnavf_n().
| #define NINCOBS 262144 /* incremental number of obs data */ |
Definition at line 76 of file mrtk_rinex.c.
Referenced by addobsdata(), and addobsdata().
| #define NUMSYS 8 /* number of systems (incl. BD2) */ |
Definition at line 71 of file mrtk_rinex.c.
Referenced by open_rnxctr(), readrnxfp(), and readrnxobsb().
| #define SQR | ( | x | ) |
Definition at line 68 of file mrtk_rinex.c.
Referenced by decode_eph(), decode_eph_bds_cnav(), and decode_eph_cnav().
| #define SYS_ALL 0xFF |
Definition at line 46 of file mrtk_rinex.c.
| #define SYS_BD2 0x100 |
Definition at line 45 of file mrtk_rinex.c.
| #define SYS_CMP 0x20 |
Definition at line 43 of file mrtk_rinex.c.
| #define SYS_GAL 0x08 |
Definition at line 41 of file mrtk_rinex.c.
| #define SYS_GLO 0x04 |
Definition at line 40 of file mrtk_rinex.c.
| #define SYS_GPS 0x01 |
Definition at line 38 of file mrtk_rinex.c.
| #define SYS_IRN 0x40 |
Definition at line 44 of file mrtk_rinex.c.
| #define SYS_NONE 0x00 |
Definition at line 37 of file mrtk_rinex.c.
| #define SYS_QZS 0x10 |
Definition at line 42 of file mrtk_rinex.c.
| #define SYS_SBS 0x02 |
Definition at line 39 of file mrtk_rinex.c.
| #define TSYS_CMP 5 |
Definition at line 53 of file mrtk_rinex.c.
Referenced by decode_obsh(), and readrnxh().
| #define TSYS_GAL 3 |
Definition at line 51 of file mrtk_rinex.c.
Referenced by decode_obsh(), and readrnxh().
| #define TSYS_GLO 2 |
Definition at line 50 of file mrtk_rinex.c.
| #define TSYS_GPS 0 |
Definition at line 48 of file mrtk_rinex.c.
Referenced by decode_obsh(), readrnxfp(), and readrnxh().
| #define TSYS_IRN 6 |
Definition at line 54 of file mrtk_rinex.c.
Referenced by decode_obsh(), and readrnxh().
| #define TSYS_QZS 4 |
Definition at line 52 of file mrtk_rinex.c.
Referenced by decode_obsh(), and readrnxh().
| #define TSYS_UTC 1 |
Definition at line 49 of file mrtk_rinex.c.
Referenced by decode_obsh(), readrnxh(), and readrnxobs().
Definition at line 2031 of file mrtk_rinex.c.
References nav_s::eph, free, nav_s::n, nav_s::nmax, and trace().
Referenced by readrnxnav().
Definition at line 2048 of file mrtk_rinex.c.
References free, nav_s::geph, nav_s::ng, nav_s::ngmax, and trace().
Referenced by readrnxnav().
Definition at line 2065 of file mrtk_rinex.c.
References free, nav_s::ns, nav_s::nsmax, nav_s::seph, and trace().
Referenced by readrnxnav().
Definition at line 1050 of file mrtk_rinex.c.
References obs_t::data, free, obs_t::n, NINCOBS, obs_t::nmax, and trace().
Referenced by readrnxobs().
Definition at line 125 of file mrtk_rinex.c.
References timeadd(), and timediff().
Referenced by decode_geph().
Definition at line 114 of file mrtk_rinex.c.
References timeadd(), and timediff().
Referenced by decode_eph(), decode_eph_bds_cnav(), decode_eph_cnav(), and decode_seph().
|
static |
Definition at line 2370 of file mrtk_rinex.c.
References pclk_t::index, gtime_t::time, pclk_t::time, and timediff().
Referenced by combpclk().
|
static |
Definition at line 2376 of file mrtk_rinex.c.
References pclk_t::clk, cmppclk(), free, MAXSAT, nav_s::nc, nav_s::ncmax, nav_s::pclk, pclk_t::std, pclk_t::time, timediff(), and trace().
Referenced by readrnxc().
|
static |
Definition at line 239 of file mrtk_rinex.c.
References SYS_CMP, SYS_GAL, SYS_GLO, SYS_GPS, SYS_QZS, SYS_SBS, and trace().
Referenced by decode_obsh().
Definition at line 1494 of file mrtk_rinex.c.
References eph_t::A, adjweek(), bdt2gpst(), bdt2time(), 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, gpst2time(), eph_t::i0, eph_t::idot, eph_t::iodc, eph_t::iode, eph_t::M0, eph_t::omg, eph_t::OMG0, eph_t::OMGd, eph_t::sat, satsys(), sisa_index(), SQR, eph_t::sva, eph_t::svh, SYS_CMP, SYS_GAL, SYS_GPS, SYS_IRN, SYS_QZS, eph_t::tgd, eph_t::toc, eph_t::toe, eph_t::toes, trace(), eph_t::ttr, eph_t::type, uraindex(), and eph_t::week.
Referenced by readrnxnavb().
|
static |
Definition at line 1401 of file mrtk_rinex.c.
References eph_t::A, adjweek(), eph_t::Adot, bdt2gpst(), bdt2time(), eph_t::cic, eph_t::cis, 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::i0, eph_t::idot, eph_t::iodc, eph_t::iode, eph_t::M0, eph_t::ndot, eph_t::omg, eph_t::OMG0, eph_t::OMGd, eph_t::sat, satsys(), SQR, eph_t::sva, eph_t::svh, SYS_CMP, eph_t::tgd, time2bdt(), eph_t::toc, eph_t::toe, eph_t::toes, trace(), eph_t::ttr, eph_t::type, and eph_t::week.
Referenced by readrnxnavb().
|
static |
Definition at line 1323 of file mrtk_rinex.c.
References eph_t::A, adjweek(), eph_t::Adot, eph_t::cic, eph_t::cis, 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, gpst2time(), eph_t::i0, eph_t::idot, eph_t::iodc, eph_t::iode, eph_t::M0, eph_t::ndot, eph_t::omg, eph_t::OMG0, eph_t::OMGd, eph_t::sat, satsys(), SQR, eph_t::sva, eph_t::svh, SYS_GPS, SYS_QZS, eph_t::tgd, eph_t::toc, eph_t::toe, eph_t::toes, trace(), eph_t::ttr, eph_t::type, and eph_t::week.
Referenced by readrnxnavb().
Definition at line 1613 of file mrtk_rinex.c.
References geph_t::acc, adjday(), geph_t::age, geph_t::flags, geph_t::frq, geph_t::gamn, gpst2time(), geph_t::iode, MAXFREQ_GLO, MINFREQ_GLO, geph_t::pos, geph_t::sat, satsys(), geph_t::sva, geph_t::svh, SYS_GLO, geph_t::taun, time2gpst(), geph_t::toe, geph_t::tof, trace(), utc2gpst(), and geph_t::vel.
Referenced by readrnxnavb().
|
static |
Definition at line 703 of file mrtk_rinex.c.
References trace().
Referenced by readrnxh().
|
static |
Definition at line 714 of file mrtk_rinex.c.
References trace().
Referenced by readrnxh().
|
static |
Definition at line 577 of file mrtk_rinex.c.
References nav_s::ion_cmp, nav_s::ion_gal, nav_s::ion_gps, nav_s::ion_irn, nav_s::ion_qzs, str2num(), trace(), nav_s::utc_cmp, nav_s::utc_gal, nav_s::utc_glo, nav_s::utc_gps, nav_s::utc_irn, nav_s::utc_qzs, and nav_s::utc_sbs.
Referenced by readrnxh().
|
static |
Definition at line 888 of file mrtk_rinex.c.
References obsd_t::code, sigind_t::code, obsd_t::D, sigind_t::idx, obsd_t::L, obsd_t::LLI, MAXOBSTYPE, MAXRNXLEN, sigind_t::n, obsd_t::P, sigind_t::pos, sigind_t::pri, obsd_t::sat, satid2no(), satsys(), satsys_bd2(), sigind_t::shift, obsd_t::SNR, snr_val(), str2num(), SYS_BD2, SYS_CMP, SYS_GAL, SYS_GLO, SYS_IRN, SYS_QZS, SYS_SBS, obsd_t::time, time_str(), trace(), and sigind_t::type.
Referenced by readrnxobsb().
|
static |
Definition at line 826 of file mrtk_rinex.c.
References MAXOBS, MAXRNXLEN, satid2no(), str2num(), str2time(), time_str(), and trace().
Referenced by readrnxobsb().
|
static |
Definition at line 372 of file mrtk_rinex.c.
References sta_t::antdes, sta_t::antsno, convcode(), sta_t::del, sta_t::glo_cp_bias, nav_s::glo_fcn, sta_t::marker, MAXOBSTYPE, MAXPRNGLO, MAXRNXLEN, sta_t::name, sta_t::pos, sta_t::recsno, sta_t::rectype, sta_t::recver, setstr(), str2num(), SYS_CMP, SYS_GAL, SYS_GLO, SYS_GPS, SYS_QZS, SYS_SBS, syscodes, trace(), TSYS_CMP, TSYS_GAL, TSYS_GPS, TSYS_IRN, TSYS_QZS, TSYS_UTC, and nav_s::utc_gps.
Referenced by readrnxh(), and readrnxobsb().
Definition at line 1679 of file mrtk_rinex.c.
References seph_t::acc, adjweek(), seph_t::af0, seph_t::af1, gpst2time(), seph_t::pos, seph_t::sat, satsys(), seph_t::sva, seph_t::svh, SYS_SBS, seph_t::t0, time2gpst(), seph_t::tof, trace(), uraindex(), and seph_t::vel.
Referenced by readrnxnavb().
| 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().
|
static |
Definition at line 216 of file mrtk_rinex.c.
References sta_t::antdes, sta_t::antsetup, sta_t::antsno, sta_t::del, sta_t::deltype, sta_t::hgt, sta_t::itrf, sta_t::marker, sta_t::name, sta_t::pos, sta_t::recsno, sta_t::rectype, and sta_t::recver.
Referenced by readrnxfile().
| 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().
|
static |
Definition at line 2915 of file mrtk_rinex.c.
References code2obs(), CODE_L1C, CODE_L1L, CODE_L1N, CODE_L1P, CODE_L1S, CODE_L1W, CODE_L1X, CODE_L1Y, CODE_L2C, CODE_L2D, CODE_L2I, CODE_L2L, CODE_L2N, CODE_L2P, CODE_L2Q, CODE_L2S, CODE_L2W, CODE_L2X, CODE_L2Y, SYS_CMP, SYS_GLO, SYS_GPS, SYS_QZS, and SYS_SBS.
Referenced by outrnxobsb().
| 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().
Definition at line 3135 of file mrtk_rinex.c.
References nav_s::ion_cmp, nav_s::ion_gal, nav_s::ion_gps, nav_s::ion_irn, nav_s::ion_qzs, rnxopt_t::navsys, out_iono_sys(), rnxopt_t::outiono, rnxopt_t::rnxver, SYS_CMP, SYS_GAL, SYS_GPS, SYS_IRN, and SYS_QZS.
Referenced by outrnxcnavh(), outrnxinavh(), outrnxlnavh(), outrnxnavh(), and outrnxqnavh().
|
static |
Definition at line 3115 of file mrtk_rinex.c.
References norm(), and outnavf_n().
Referenced by out_iono().
Definition at line 3217 of file mrtk_rinex.c.
References leaps, norm(), rnxopt_t::outleaps, rnxopt_t::rnxver, SYS_CMP, SYS_GAL, SYS_GPS, SYS_IRN, SYS_QZS, nav_s::utc_cmp, nav_s::utc_gal, nav_s::utc_gps, nav_s::utc_irn, and nav_s::utc_qzs.
Referenced by outrnxcnavh(), outrnxgnavh(), outrnxhnavh(), outrnxinavh(), outrnxlnavh(), outrnxnavh(), and outrnxqnavh().
Definition at line 3181 of file mrtk_rinex.c.
References rnxopt_t::navsys, out_time_sys(), rnxopt_t::outtime, rnxopt_t::rnxver, SYS_CMP, SYS_GAL, SYS_GLO, SYS_GPS, SYS_IRN, SYS_QZS, SYS_SBS, nav_s::utc_cmp, nav_s::utc_gal, nav_s::utc_glo, nav_s::utc_gps, nav_s::utc_irn, nav_s::utc_qzs, and nav_s::utc_sbs.
Referenced by outrnxcnavh(), outrnxgnavh(), outrnxhnavh(), outrnxinavh(), outrnxlnavh(), outrnxnavh(), and outrnxqnavh().
|
static |
Definition at line 3161 of file mrtk_rinex.c.
References norm(), and outnavf_n().
Referenced by out_time().
|
static |
Definition at line 3113 of file mrtk_rinex.c.
References outnavf_n().
Referenced by outrnxgnavb(), outrnxhnavb(), and outrnxnavb().
|
static |
Definition at line 3108 of file mrtk_rinex.c.
References NAVEXP.
Referenced by out_iono_sys(), out_time_sys(), and outnavf().
|
static |
Definition at line 2660 of file mrtk_rinex.c.
References rnxopt_t::nobs, rnxopt_t::tobs, and trace().
Referenced by outrnxobsh().
|
static |
Definition at line 2684 of file mrtk_rinex.c.
References navsys, rnxopt_t::navsys, rnxopt_t::nobs, rnxopt_t::rnxver, SYS_CMP, syscodes, rnxopt_t::tobs, and trace().
Referenced by outrnxobsh().
|
static |
Definition at line 2795 of file mrtk_rinex.c.
References rnxopt_t::glo_cp_bias, rnxopt_t::navsys, and SYS_GLO.
Referenced by outrnxobsh().
Definition at line 2766 of file mrtk_rinex.c.
References geph_t::frq, nav_s::geph, nav_s::glo_fcn, MAXPRNGLO, rnxopt_t::navsys, geph_t::sat, satno(), and SYS_GLO.
Referenced by outrnxobsh().
Definition at line 2723 of file mrtk_rinex.c.
References CODE_L1B, CODE_L1C, CODE_L1D, CODE_L2C, CODE_L2I, CODE_L2P, CODE_L2S, CODE_L3I, CODE_L4A, CODE_L5A, CODE_L5D, CODE_L5I, CODE_L6A, CODE_L6B, CODE_L6I, CODE_L6S, CODE_L7D, CODE_L7I, CODE_L8D, CODE_L8I, CODE_L9A, navsys, rnxopt_t::navsys, rnxopt_t::nobs, obs2code(), rnxopt_t::rnxver, rnxopt_t::shift, SYS_CMP, syscodes, and rnxopt_t::tobs.
Referenced by outrnxobsh().
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().
|
static |
Definition at line 2902 of file mrtk_rinex.c.
References LLI_BOCTRK, LLI_HALFC, and LLI_SLIP.
Referenced by outrnxobsb().
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().
|
static |
Definition at line 2150 of file mrtk_rinex.c.
References pclk_t::clk, free, pclk_t::index, MAXRNXLEN, MAXSAT, nav_s::nc, nav_s::ncmax, nav_s::pclk, satid2no(), satsys(), set_sysmask(), pclk_t::std, str2num(), str2time(), pclk_t::time, timediff(), and trace().
Referenced by readrnxfp().
|
static |
Definition at line 2250 of file mrtk_rinex.c.
References init_sta(), readrnxfp(), rtk_uncompress(), and trace().
Referenced by readrnxc(), and readrnxt().
|
static |
Definition at line 2212 of file mrtk_rinex.c.
References MAXOBSTYPE, NUMSYS, readrnxclk(), readrnxh(), readrnxnav(), readrnxobs(), SYS_GAL, SYS_GLO, SYS_QZS, SYS_SBS, trace(), and TSYS_GPS.
Referenced by readrnxfile(), and readrnxt().
|
static |
Definition at line 727 of file mrtk_rinex.c.
References decode_gnavh(), decode_hnavh(), decode_navh(), decode_obsh(), MAXOBSTYPE, MAXPOSHEAD, MAXRNXLEN, str2num(), SYS_CMP, SYS_GAL, SYS_GLO, SYS_GPS, SYS_IRN, SYS_NONE, SYS_QZS, SYS_SBS, trace(), TSYS_CMP, TSYS_GAL, TSYS_GPS, TSYS_IRN, TSYS_QZS, and TSYS_UTC.
Referenced by open_rnxctr(), and readrnxfp().
|
static |
Definition at line 2083 of file mrtk_rinex.c.
References add_eph(), add_geph(), add_seph(), nav_s::ion_cmp, nav_s::ion_gal, nav_s::ion_gps, nav_s::ion_irn, nav_s::ion_qzs, nav_s::n, nav_s::ng, nav_s::ns, readrnxnavb(), trace(), nav_s::utc_cmp, nav_s::utc_gal, nav_s::utc_glo, nav_s::utc_gps, nav_s::utc_irn, nav_s::utc_qzs, and nav_s::utc_sbs.
Referenced by readrnxfp().
|
static |
Definition at line 1716 of file mrtk_rinex.c.
References decode_eph(), decode_eph_bds_cnav(), decode_eph_cnav(), decode_geph(), decode_seph(), nav_s::ion_cmp, nav_s::ion_gal, nav_s::ion_gps, nav_s::ion_irn, nav_s::ion_qzs, MAXRNXLEN, satid2no(), satno(), satsys(), set_sysmask(), str2num(), str2time(), SYS_GAL, SYS_GLO, SYS_GPS, SYS_QZS, SYS_SBS, trace(), nav_s::utc_cmp, nav_s::utc_gal, nav_s::utc_glo, nav_s::utc_gps, nav_s::utc_irn, and nav_s::utc_qzs.
Referenced by input_rnxctr(), and readrnxnav().
|
static |
Definition at line 1272 of file mrtk_rinex.c.
References addobsdata(), free, malloc, MAXOBS, MAXOBSTYPE, MAXRCV, MAXSAT, obs_t::n, obsd_t::rcv, readrnxobsb(), restslips(), saveslips(), screent(), obsd_t::time, trace(), TSYS_UTC, and utc2gpst().
Referenced by readrnxfp().
|
static |
Definition at line 1209 of file mrtk_rinex.c.
References decode_obsdata(), decode_obsepoch(), decode_obsh(), MAXOBS, MAXOBSTYPE, MAXRNXLEN, NUMSYS, obsd_t::sat, set_index(), set_sysmask(), SYS_BD2, SYS_CMP, SYS_GAL, SYS_GLO, SYS_GPS, SYS_IRN, SYS_QZS, SYS_SBS, and obsd_t::time.
Referenced by input_rnxctr(), and readrnxobs().
| 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().
|
static |
Definition at line 1040 of file mrtk_rinex.c.
References obsd_t::LLI, LLI_SLIP, and obsd_t::sat.
Referenced by readrnxobs().
|
static |
Definition at line 145 of file mrtk_rinex.c.
References MINPRNCMP, MINPRNGAL, MINPRNGLO, MINPRNGPS, MINPRNIRN, MINPRNQZS, satsys(), SYS_CMP, SYS_GAL, SYS_GLO, SYS_GPS, SYS_IRN, SYS_QZS, and SYS_SBS.
Referenced by outrnxgnavb(), outrnxhnavb(), outrnxnavb(), and outrnxobsb().
|
static |
Definition at line 1031 of file mrtk_rinex.c.
References obsd_t::LLI, LLI_SLIP, and obsd_t::sat.
Referenced by readrnxobs().
|
static |
Definition at line 1108 of file mrtk_rinex.c.
References sigind_t::code, code2freq_idx(), code2obs(), getcodepri(), sigind_t::idx, MAXOBSTYPE, sigind_t::n, obs2code(), obscodes, sigind_t::pos, sigind_t::pri, sigind_t::shift, SYS_CMP, SYS_GAL, SYS_GLO, SYS_GPS, SYS_IRN, SYS_QZS, SYS_SBS, trace(), and sigind_t::type.
Referenced by readrnxobsb().
|
static |
Definition at line 1072 of file mrtk_rinex.c.
References SYS_ALL, SYS_CMP, SYS_GAL, SYS_GLO, SYS_GPS, SYS_IRN, SYS_NONE, SYS_QZS, and SYS_SBS.
Referenced by readrnxclk(), readrnxnavb(), and readrnxobsb().
|
static |
Definition at line 102 of file mrtk_rinex.c.
Referenced by decode_obsh(), and readrnxt().
|
static |
Definition at line 203 of file mrtk_rinex.c.
Referenced by decode_eph().
|
static |
Definition at line 187 of file mrtk_rinex.c.
Referenced by outrnxnavb().
|
static |
Definition at line 880 of file mrtk_rinex.c.
References SNR_UNIT, and trace().
Referenced by decode_obsdata().
|
static |
Definition at line 136 of file mrtk_rinex.c.
References gtime_t::sec, time2epoch(), and timeget().
Referenced by outrnxcnavh(), outrnxgnavh(), outrnxhnavh(), outrnxinavh(), outrnxlnavh(), outrnxnavh(), outrnxobsh(), and outrnxqnavh().
|
static |
Definition at line 177 of file mrtk_rinex.c.
References ura_eph.
Referenced by decode_eph(), and decode_seph().
|
static |
Definition at line 175 of file mrtk_rinex.c.
References ura_nominal.
Referenced by outrnxhnavb(), and outrnxnavb().
|
static |
Definition at line 78 of file mrtk_rinex.c.
|
static |
Definition at line 82 of file mrtk_rinex.c.
|
static |
Definition at line 80 of file mrtk_rinex.c.
Referenced by decode_obsh(), outobstype_ver3(), and outrnx_phase_shift().
|
static |
Definition at line 84 of file mrtk_rinex.c.
Referenced by uraindex(), uraindex(), uraindex(), and uraindex().
|
static |
Definition at line 87 of file mrtk_rinex.c.
Referenced by uravalue().