MRTKLIB 0.7.14
Modernized GNSS Positioning Library
Loading...
Searching...
No Matches
mrtk_rinex.c File Reference

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"
Include dependency graph for mrtk_rinex.c:

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 []

Detailed Description

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.

Note
All functions in this module are pure cut-and-paste extractions from rinex.c with zero algorithmic changes.

Definition in file mrtk_rinex.c.

Macro Definition Documentation

◆ FILEPATHSEP

#define FILEPATHSEP   '/'

Definition at line 62 of file mrtk_rinex.c.

◆ LLI_BOCTRK

#define LLI_BOCTRK   0x04

Definition at line 58 of file mrtk_rinex.c.

Referenced by outrnxobsf().

◆ LLI_HALFA

#define LLI_HALFA   0x40

Definition at line 59 of file mrtk_rinex.c.

Referenced by decode_rangeb(), decode_rangecmpb(), resolve_halfc(), and update_halfc().

◆ LLI_HALFC

#define LLI_HALFC   0x02

◆ LLI_HALFS

#define LLI_HALFS   0x80

Definition at line 60 of file mrtk_rinex.c.

Referenced by decode_rxmrawx(), resolve_halfc(), and update_halfc().

◆ LLI_SLIP

#define LLI_SLIP   0x01

◆ MAXFREQ_GLO

#define MAXFREQ_GLO   13 /* max frequency number GLONASS */

Definition at line 75 of file mrtk_rinex.c.

Referenced by decode_geph().

◆ MAXPOSHEAD

#define MAXPOSHEAD   1024 /* max head line position */

Definition at line 73 of file mrtk_rinex.c.

Referenced by readrnxh().

◆ MAXRNXLEN

#define MAXRNXLEN   (16 * MAXOBSTYPE + 4) /* max RINEX record length */

◆ MINFREQ_GLO

#define MINFREQ_GLO   -7 /* min frequency number GLONASS */

Definition at line 74 of file mrtk_rinex.c.

Referenced by decode_geph().

◆ NAVEXP

#define NAVEXP   "D" /* exponent letter in RINEX NAV */

Definition at line 70 of file mrtk_rinex.c.

Referenced by outnavf_n().

◆ NINCOBS

#define NINCOBS   262144 /* incremental number of obs data */

Definition at line 76 of file mrtk_rinex.c.

Referenced by addobsdata(), and addobsdata().

◆ NUMSYS

#define NUMSYS   8 /* number of systems (incl. BD2) */

Definition at line 71 of file mrtk_rinex.c.

Referenced by open_rnxctr(), readrnxfp(), and readrnxobsb().

◆ SQR

#define SQR ( x)
Value:
((x) * (x))

Definition at line 68 of file mrtk_rinex.c.

Referenced by decode_eph(), decode_eph_bds_cnav(), and decode_eph_cnav().

◆ SYS_ALL

#define SYS_ALL   0xFF

Definition at line 46 of file mrtk_rinex.c.

◆ SYS_BD2

#define SYS_BD2   0x100

Definition at line 45 of file mrtk_rinex.c.

◆ SYS_CMP

#define SYS_CMP   0x20

Definition at line 43 of file mrtk_rinex.c.

◆ SYS_GAL

#define SYS_GAL   0x08

Definition at line 41 of file mrtk_rinex.c.

◆ SYS_GLO

#define SYS_GLO   0x04

Definition at line 40 of file mrtk_rinex.c.

◆ SYS_GPS

#define SYS_GPS   0x01

Definition at line 38 of file mrtk_rinex.c.

◆ SYS_IRN

#define SYS_IRN   0x40

Definition at line 44 of file mrtk_rinex.c.

◆ SYS_NONE

#define SYS_NONE   0x00

Definition at line 37 of file mrtk_rinex.c.

◆ SYS_QZS

#define SYS_QZS   0x10

Definition at line 42 of file mrtk_rinex.c.

◆ SYS_SBS

#define SYS_SBS   0x02

Definition at line 39 of file mrtk_rinex.c.

◆ TSYS_CMP

#define TSYS_CMP   5

Definition at line 53 of file mrtk_rinex.c.

Referenced by decode_obsh(), and readrnxh().

◆ TSYS_GAL

#define TSYS_GAL   3

Definition at line 51 of file mrtk_rinex.c.

Referenced by decode_obsh(), and readrnxh().

◆ TSYS_GLO

#define TSYS_GLO   2

Definition at line 50 of file mrtk_rinex.c.

◆ TSYS_GPS

#define TSYS_GPS   0

Definition at line 48 of file mrtk_rinex.c.

Referenced by decode_obsh(), readrnxfp(), and readrnxh().

◆ TSYS_IRN

#define TSYS_IRN   6

Definition at line 54 of file mrtk_rinex.c.

Referenced by decode_obsh(), and readrnxh().

◆ TSYS_QZS

#define TSYS_QZS   4

Definition at line 52 of file mrtk_rinex.c.

Referenced by decode_obsh(), and readrnxh().

◆ TSYS_UTC

#define TSYS_UTC   1

Definition at line 49 of file mrtk_rinex.c.

Referenced by decode_obsh(), readrnxh(), and readrnxobs().

Function Documentation

◆ add_eph()

int add_eph ( nav_t * nav,
const eph_t * eph )
static

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_geph()

int add_geph ( nav_t * nav,
const geph_t * geph )
static

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_seph()

int add_seph ( nav_t * nav,
const seph_t * seph )
static

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addobsdata()

int addobsdata ( obs_t * obs,
const obsd_t * data )
static

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ adjday()

gtime_t adjday ( gtime_t t,
gtime_t t0 )
static

Definition at line 125 of file mrtk_rinex.c.

References timeadd(), and timediff().

Referenced by decode_geph().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ adjweek()

gtime_t adjweek ( gtime_t t,
gtime_t t0 )
static

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cmppclk()

int cmppclk ( const void * p1,
const void * p2 )
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ combpclk()

void combpclk ( nav_t * nav)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ convcode()

void convcode ( int ver,
int sys,
const char * str,
char * type )
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_eph()

int decode_eph ( int ver,
int sat,
gtime_t toc,
const double * data,
eph_t * eph )
static

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_eph_bds_cnav()

int decode_eph_bds_cnav ( int ver,
int sat,
gtime_t toc,
const double * data,
int ndata,
int v4type,
eph_t * eph )
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_eph_cnav()

int decode_eph_cnav ( int ver,
int sat,
gtime_t toc,
const double * data,
int ndata,
int v4type,
eph_t * eph )
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_geph()

int decode_geph ( int ver,
int sat,
gtime_t toc,
double * data,
geph_t * geph )
static

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_gnavh()

void decode_gnavh ( char * buff,
nav_t * nav )
static

Definition at line 703 of file mrtk_rinex.c.

References trace().

Referenced by readrnxh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_hnavh()

void decode_hnavh ( char * buff,
nav_t * nav )
static

Definition at line 714 of file mrtk_rinex.c.

References trace().

Referenced by readrnxh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_navh()

void decode_navh ( char * buff,
nav_t * nav )
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_obsdata()

int decode_obsdata ( FILE * fp,
char * buff,
int ver,
int mask,
sigind_t * index,
obsd_t * obs )
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_obsepoch()

int decode_obsepoch ( FILE * fp,
char * buff,
int ver,
gtime_t * time,
int * flag,
int * sats )
static

Definition at line 826 of file mrtk_rinex.c.

References MAXOBS, MAXRNXLEN, satid2no(), str2num(), str2time(), time_str(), and trace().

Referenced by readrnxobsb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_obsh()

void decode_obsh ( FILE * fp,
char * buff,
int ver,
int * tsys,
char tobs[][MAXOBSTYPE][4],
nav_t * nav,
sta_t * sta )
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_seph()

int decode_seph ( int ver,
int sat,
gtime_t toc,
double * data,
seph_t * seph )
static

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ free_rnxctr()

void free_rnxctr ( rnxctr_t * rnx)

Free RINEX control struct buffers.

Parameters
[in,out]rnxRINEX 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_rnxctr()

int init_rnxctr ( rnxctr_t * rnx)

Initialize RINEX control struct.

Parameters
[in,out]rnxRINEX control struct
Returns
Status (1:ok, 0:memory allocation error)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_sta()

void init_sta ( sta_t * sta)
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().

Here is the caller graph for this function:

◆ input_rnxctr()

int input_rnxctr ( rnxctr_t * rnx,
FILE * fp )

Input RINEX control (read next message).

Parameters
[in,out]rnxRINEX control struct
[in]fpFile pointer
Returns
Status (-2:end of file, 0:no message, 1:obs data, 2:nav data)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ obsindex()

int obsindex ( int rnxver,
int sys,
const uint8_t * code,
const char * tobs,
const char * mask )
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ open_rnxctr()

int open_rnxctr ( rnxctr_t * rnx,
FILE * fp )

Open RINEX data (read header).

Parameters
[in,out]rnxRINEX control struct
[in]fpFile pointer
Returns
Status (-2:end of file, 0:no message, 1:ok)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ out_iono()

void out_iono ( FILE * fp,
int sys,
const rnxopt_t * opt,
const nav_t * nav )
static

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ out_iono_sys()

void out_iono_sys ( FILE * fp,
const char * sys,
const double * ion,
int n )
static

Definition at line 3115 of file mrtk_rinex.c.

References norm(), and outnavf_n().

Referenced by out_iono().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ out_leaps()

void out_leaps ( FILE * fp,
int sys,
const rnxopt_t * opt,
const nav_t * nav )
static

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ out_time()

void out_time ( FILE * fp,
int sys,
const rnxopt_t * opt,
const nav_t * nav )
static

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ out_time_sys()

void out_time_sys ( FILE * fp,
const char * sys,
const double * utc )
static

Definition at line 3161 of file mrtk_rinex.c.

References norm(), and outnavf_n().

Referenced by out_time().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ outnavf()

void outnavf ( FILE * fp,
double value )
static

Definition at line 3113 of file mrtk_rinex.c.

References outnavf_n().

Referenced by outrnxgnavb(), outrnxhnavb(), and outrnxnavb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ outnavf_n()

void outnavf_n ( FILE * fp,
double value,
int n )
static

Definition at line 3108 of file mrtk_rinex.c.

References NAVEXP.

Referenced by out_iono_sys(), out_time_sys(), and outnavf().

Here is the caller graph for this function:

◆ outobstype_ver2()

void outobstype_ver2 ( FILE * fp,
const rnxopt_t * opt )
static

Definition at line 2660 of file mrtk_rinex.c.

References rnxopt_t::nobs, rnxopt_t::tobs, and trace().

Referenced by outrnxobsh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ outobstype_ver3()

void outobstype_ver3 ( FILE * fp,
const rnxopt_t * opt )
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ outrnx_glo_bias()

void outrnx_glo_bias ( FILE * fp,
const rnxopt_t * opt )
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().

Here is the caller graph for this function:

◆ outrnx_glo_fcn()

void outrnx_glo_fcn ( FILE * fp,
const rnxopt_t * opt,
const nav_t * nav )
static

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ outrnx_phase_shift()

void outrnx_phase_shift ( FILE * fp,
const rnxopt_t * opt,
const nav_t * nav )
static

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ outrnxcnavh()

int outrnxcnavh ( FILE * fp,
const rnxopt_t * opt,
const nav_t * nav )

Output RINEX BDS navigation data file header.

Parameters
[in]fpOutput file pointer
[in]optRINEX options
[in]navNavigation data (NULL: no input)
Returns
Status (1:ok, 0:output error)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ outrnxgnavb()

int outrnxgnavb ( FILE * fp,
const rnxopt_t * opt,
const geph_t * geph )

Output RINEX GLONASS navigation data file body.

Parameters
[in]fpOutput file pointer
[in]optRINEX options
[in]gephGLONASS ephemeris
Returns
Status (1:ok, 0:output error)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ outrnxgnavh()

int outrnxgnavh ( FILE * fp,
const rnxopt_t * opt,
const nav_t * nav )

Output RINEX GLONASS navigation data file header.

Parameters
[in]fpOutput file pointer
[in]optRINEX options
[in]navNavigation data (NULL: no input)
Returns
Status (1:ok, 0:output error)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ outrnxhnavb()

int outrnxhnavb ( FILE * fp,
const rnxopt_t * opt,
const seph_t * seph )

Output RINEX GEO navigation data file body.

Parameters
[in]fpOutput file pointer
[in]optRINEX options
[in]sephSBAS ephemeris
Returns
Status (1:ok, 0:output error)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ outrnxhnavh()

int outrnxhnavh ( FILE * fp,
const rnxopt_t * opt,
const nav_t * nav )

Output RINEX GEO navigation data file header.

Parameters
[in]fpOutput file pointer
[in]optRINEX options
[in]navNavigation data (NULL: no input)
Returns
Status (1:ok, 0:output error)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ outrnxinavh()

int outrnxinavh ( FILE * fp,
const rnxopt_t * opt,
const nav_t * nav )

Output RINEX NavIC/IRNSS navigation data file header.

Parameters
[in]fpOutput file pointer
[in]optRINEX options
[in]navNavigation data (NULL: no input)
Returns
Status (1:ok, 0:output error)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ outrnxlnavh()

int outrnxlnavh ( FILE * fp,
const rnxopt_t * opt,
const nav_t * nav )

Output RINEX Galileo navigation data file header.

Parameters
[in]fpOutput file pointer
[in]optRINEX options
[in]navNavigation data (NULL: no input)
Returns
Status (1:ok, 0:output error)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ outrnxnavb()

int outrnxnavb ( FILE * fp,
const rnxopt_t * opt,
const eph_t * eph )

Output RINEX navigation data file body.

Parameters
[in]fpOutput file pointer
[in]optRINEX options
[in]ephEphemeris
Returns
Status (1:ok, 0:output error)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ outrnxnavh()

int outrnxnavh ( FILE * fp,
const rnxopt_t * opt,
const nav_t * nav )

Output RINEX navigation data file header.

Parameters
[in]fpOutput file pointer
[in]optRINEX options
[in]navNavigation data (NULL: no input)
Returns
Status (1:ok, 0:output error)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ outrnxobsb()

int outrnxobsb ( FILE * fp,
const rnxopt_t * opt,
const obsd_t * obs,
int n,
int flag )

Output RINEX observation data body.

Parameters
[in]fpOutput file pointer
[in]optRINEX options
[in]obsObservation data
[in]nNumber of observation data
[in]flagEpoch flag (0:ok,1:power failure,>1:event flag)
Returns
Status (1:ok, 0:output error)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ outrnxobsf()

void outrnxobsf ( FILE * fp,
double obs,
int lli )
static

Definition at line 2902 of file mrtk_rinex.c.

References LLI_BOCTRK, LLI_HALFC, and LLI_SLIP.

Referenced by outrnxobsb().

Here is the caller graph for this function:

◆ outrnxobsh()

int outrnxobsh ( FILE * fp,
const rnxopt_t * opt,
const nav_t * nav )

Output RINEX observation data file header.

Parameters
[in]fpOutput file pointer
[in]optRINEX options
[in]navNavigation data
Returns
Status (1:ok, 0:output error)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ outrnxqnavh()

int outrnxqnavh ( FILE * fp,
const rnxopt_t * opt,
const nav_t * nav )

Output RINEX QZSS navigation data file header.

Parameters
[in]fpOutput file pointer
[in]optRINEX options
[in]navNavigation data (NULL: no input)
Returns
Status (1:ok, 0:output error)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readrnx()

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.

Parameters
[in]fileFile path (wild-card * expanded) ("": stdin)
[in]rcvReceiver number for obs data
[in]optRINEX options ("": no option)
[in,out]obsObservation data (NULL: no input)
[in,out]navNavigation data (NULL: no input)
[in,out]staStation parameters (NULL: no input)
Returns
Status (1:ok, 0:no data, -1:error)

Definition at line 2362 of file mrtk_rinex.c.

References readrnxt(), and trace().

Here is the call graph for this function:

◆ readrnxc()

int readrnxc ( const char * file,
nav_t * nav )

Read RINEX clock files.

Parameters
[in]fileFile path (wild-card * expanded)
[in,out]navNavigation data (NULL: no input)
Returns
Number of precise clock records

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readrnxclk()

int readrnxclk ( FILE * fp,
const char * opt,
int ver,
int index,
nav_t * nav )
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readrnxfile()

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 )
static

Definition at line 2250 of file mrtk_rinex.c.

References init_sta(), readrnxfp(), rtk_uncompress(), and trace().

Referenced by readrnxc(), and readrnxt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readrnxfp()

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

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readrnxh()

int readrnxh ( FILE * fp,
int * ver,
char * type,
int * sys,
int * tsys,
char tobs[][MAXOBSTYPE][4],
nav_t * nav,
sta_t * sta )
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readrnxnav()

int readrnxnav ( FILE * fp,
const char * opt,
int ver,
int sys,
nav_t * nav )
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readrnxnavb()

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

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readrnxobs()

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

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readrnxobsb()

int readrnxobsb ( FILE * fp,
const char * opt,
int ver,
int * tsys,
char tobs[][MAXOBSTYPE][4],
int * flag,
obsd_t * data,
sta_t * sta )
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readrnxt()

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.

Parameters
[in]fileFile path (wild-card * expanded) ("": stdin)
[in]rcvReceiver number for obs data
[in]tsObservation time start (ts.time==0: no limit)
[in]teObservation time end (te.time==0: no limit)
[in]tintObservation time interval (s) (0:all)
[in]optRINEX options ("": no option)
[in,out]obsObservation data (NULL: no input)
[in,out]navNavigation data (NULL: no input)
[in,out]staStation parameters (NULL: no input)
Returns
Status (1:ok, 0:no data, -1:error)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ restslips()

void restslips ( uint8_t slips[][5+5],
obsd_t * data )
static

Definition at line 1040 of file mrtk_rinex.c.

References obsd_t::LLI, LLI_SLIP, and obsd_t::sat.

Referenced by readrnxobs().

Here is the caller graph for this function:

◆ sat2code()

int sat2code ( int sat,
char * code )
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ saveslips()

void saveslips ( uint8_t slips[][5+5],
obsd_t * data )
static

Definition at line 1031 of file mrtk_rinex.c.

References obsd_t::LLI, LLI_SLIP, and obsd_t::sat.

Referenced by readrnxobs().

Here is the caller graph for this function:

◆ set_index()

void set_index ( int ver,
int sys,
const char * opt,
char tobs[MAXOBSTYPE][4],
sigind_t * ind )
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_sysmask()

int set_sysmask ( const char * opt)
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().

Here is the caller graph for this function:

◆ setstr()

void setstr ( char * dst,
const char * src,
int n )
static

Definition at line 102 of file mrtk_rinex.c.

Referenced by decode_obsh(), and readrnxt().

Here is the caller graph for this function:

◆ sisa_index()

int sisa_index ( double value)
static

Definition at line 203 of file mrtk_rinex.c.

Referenced by decode_eph().

Here is the caller graph for this function:

◆ sisa_value()

double sisa_value ( int sisa)
static

Definition at line 187 of file mrtk_rinex.c.

Referenced by outrnxnavb().

Here is the caller graph for this function:

◆ snr_val()

uint16_t snr_val ( int sat,
double snr )
static

Definition at line 880 of file mrtk_rinex.c.

References SNR_UNIT, and trace().

Referenced by decode_obsdata().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ timestr_rnx()

void timestr_rnx ( char * str)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ uraindex()

int uraindex ( double value)
static

Definition at line 177 of file mrtk_rinex.c.

References ura_eph.

Referenced by decode_eph(), and decode_seph().

Here is the caller graph for this function:

◆ uravalue()

double uravalue ( int sva)
static

Definition at line 175 of file mrtk_rinex.c.

References ura_nominal.

Referenced by outrnxhnavb(), and outrnxnavb().

Here is the caller graph for this function:

Variable Documentation

◆ navsys

const int navsys[]
static
Initial value:
= {
0x01 , 0x04 , 0x08 , 0x10 , 0x02 , 0x20 , 0x40 , 0}

Definition at line 78 of file mrtk_rinex.c.

◆ obscodes

const char obscodes[] = "CLDS"
static

Definition at line 82 of file mrtk_rinex.c.

◆ syscodes

const char syscodes[] = "GREJSCI"
static

Definition at line 80 of file mrtk_rinex.c.

Referenced by decode_obsh(), outobstype_ver3(), and outrnx_phase_shift().

◆ ura_eph

const double ura_eph[]
static
Initial value:
= {
2.4, 3.4, 4.85, 6.85, 9.65, 13.65, 24.0, 48.0,
96.0, 192.0, 384.0, 768.0, 1536.0, 3072.0, 6144.0, 0.0}

Definition at line 84 of file mrtk_rinex.c.

Referenced by uraindex(), uraindex(), uraindex(), and uraindex().

◆ ura_nominal

const double ura_nominal[]
static
Initial value:
= {
2.0, 2.8, 4.0, 5.7, 8.0, 11.3, 16.0, 32.0,
64.0, 128.0, 256.0, 512.0, 1024.0, 2048.0, 4096.0, 8192.0}

Definition at line 87 of file mrtk_rinex.c.

Referenced by uravalue().