MRTKLIB 0.7.14
Modernized GNSS Positioning Library
Loading...
Searching...
No Matches
mrtk_nav.h File Reference

MRTKLIB Navigation Module — Navigation data types and satellite/nav utility functions. More...

Include dependency graph for mrtk_nav.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  pcv_t
struct  pcvs_t
struct  peph_t
struct  pclk_t
struct  tec_t
struct  sbsmsg_t
struct  sbs_t
struct  sbsfcorr_t
struct  sbslcorr_t
struct  sbssatp_t
struct  sbssat_t
struct  sbsigp_t
struct  sbsigpband_t
struct  sbsion_t
struct  dgps_t
struct  ssr_t
struct  osb_t
struct  miono_sat_t
struct  miono_area_t
struct  miono_region_t
struct  pppiono_corr_t
struct  pppiono_t
struct  spos_t
struct  ion_t
struct  trp_t
struct  siteion_t
struct  sitetrp_t
struct  stat_t
struct  sstat_t
struct  lclopt_t
struct  blkinf_t
struct  lclblock_t
struct  isb_t
struct  sft_t
struct  sta_t
struct  nav_s

Macros

#define ISBOPT_OFF   0 /* ISB option: correction off */
#define ISBOPT_TABLE   1 /* ISB option: table file */
#define MAXRECTYP   100 /* max number of receiver types */
#define PHASE_CYCLE   (-0.25) /* default L2C 1/4 cycle phase shift */

Typedefs

typedef struct nav_s nav_t

Functions

int satno (int sys, int prn)
 Convert satellite system+prn/slot number to satellite number.
int satsys (int sat, int *prn)
 Convert satellite number to satellite system.
int satid2no (const char *id)
 Convert satellite id to satellite number.
void satno2id (int sat, char *id)
 Convert satellite number to satellite id.
double sat2freq (int sat, uint8_t code, const nav_t *nav)
 Convert satellite and obs code to carrier frequency.
int satsys_bd2 (int sat, int *prn)
 Distinguish BDS-2 from BDS-3.
int set_bds2prn (const char *str)
 Set the BDS-2 satellites in BeiDou PRN 1-18.
int is_bds2prn (int prn)
 Test whether a BeiDou PRN is BDS-2 (see set_bds2prn()).
int set_bds3igso (const char *str)
 Set the BDS-3 IGSO satellites (excluded as PPP-AR reference satellite).
int is_bds3igso (int prn)
 Test whether a BeiDou PRN is listed as BDS-3 IGSO (see set_bds3igso()).
int bds_gen (int prn)
 BeiDou generation of a PRN.
int freq_idx2freq_num (int sys, int freq_idx)
 Convert frequency index to frequency number using obsdef table.
int freq_num2freq_idx (int sys, int freq_num)
 Convert frequency number to frequency index using obsdef table.
double freq_num2freq (int sys, int freq_num, int fcn)
 Convert frequency number to frequency in Hz.
int freq_num2ant_idx (int sys, int freq_num)
 Convert frequency number to antenna PCV index.
int freq_idx2ant_idx (int sys, int freq_idx)
 Convert frequency index to antenna PCV index.
void set_obsdef (int sys, const int *freq_nums)
 Rearrange obsdef table for a satellite system by frequency numbers.
void reset_obsdef (void)
 Reset all obsdef tables to their pristine default frequency layout.
void apply_pppsig (const int *pppsig)
 Apply PPP signal selection options to obsdef tables.
void apply_claslib_ppprtk_obsdef (void)
 Apply the upstream claslib PPP-RTK observation slot layout.
void uniqnav (nav_t *nav)
 Unique ephemerides in navigation data.
int readnav (const char *file, nav_t *nav)
 Read navigation data from file.
int savenav (const char *file, const nav_t *nav)
 Save navigation data to file.
void freenav (nav_t *nav, int opt)
 Free navigation data memory.
int satpos (gtime_t time, gtime_t teph, int sat, int ephopt, const nav_t *nav, double *rs, double *dts, double *var, int *svh)
 Compute satellite position, velocity and clock.
void satposs (gtime_t teph, const obsd_t *obs, int n, const nav_t *nav, int ephopt, double *rs, double *dts, double *var, int *svh)
 Compute satellite positions, velocities and clocks.
int peph2pos (gtime_t time, int sat, const nav_t *nav, int opt, double *rs, double *dts, double *var)
 Compute satellite position/clock with precise ephemeris/clock.
void satantoff (gtime_t time, const double *rs, int sat, const nav_t *nav, double *dant)
 Compute satellite antenna phase center offset in ecef.
void readsp3 (const char *file, nav_t *nav, int opt)
 Read sp3 precise ephemeris file.
int readsap (const char *file, gtime_t time, nav_t *nav)
 Read satellite antenna parameters.
int readdcb (const char *file, nav_t *nav, const sta_t *sta)
 Read differential code bias (DCB) parameters.
int satexclude (int sat, double var, int svh, const struct prcopt_t *opt)
 Test excluded satellite.

Detailed Description

MRTKLIB Navigation Module — Navigation data types and satellite/nav utility functions.

This header provides the core navigation data structures extracted from rtklib.h with zero algorithmic changes. It includes pcv_t, peph_t, pclk_t, TEC/SBAS/SSR types, the central nav_t aggregation struct, and satellite number/system conversion functions.

Note
Functions declared here are implemented in mrtk_nav.c.

Definition in file mrtk_nav.h.

Macro Definition Documentation

◆ ISBOPT_OFF

#define ISBOPT_OFF   0 /* ISB option: correction off */

Definition at line 348 of file mrtk_nav.h.

◆ ISBOPT_TABLE

#define ISBOPT_TABLE   1 /* ISB option: table file */

Definition at line 349 of file mrtk_nav.h.

Referenced by chk_isb(), clas_osr_zdres(), execses(), and zdres().

◆ MAXRECTYP

#define MAXRECTYP   100 /* max number of receiver types */

Definition at line 350 of file mrtk_nav.h.

Referenced by readL2C().

◆ PHASE_CYCLE

#define PHASE_CYCLE   (-0.25) /* default L2C 1/4 cycle phase shift */

Definition at line 351 of file mrtk_nav.h.

Referenced by readL2C().

Typedef Documentation

◆ nav_t

typedef struct nav_s nav_t

Function Documentation

◆ apply_claslib_ppprtk_obsdef()

void apply_claslib_ppprtk_obsdef ( void )

Apply the upstream claslib PPP-RTK observation slot layout.

Definition at line 635 of file mrtk_nav.c.

References MAXFREQ, set_obsdef(), SYS_GAL, SYS_GPS, and SYS_QZS.

Here is the call graph for this function:

◆ apply_pppsig()

void apply_pppsig ( const int * pppsig)

Apply PPP signal selection options to obsdef tables.

Parameters
[in]pppsigSignal selection array [5]: GPS,QZS,GAL,BDS2,BDS3

Definition at line 539 of file mrtk_nav.c.

References MAXFREQ, set_obsdef(), SYS_BD2, SYS_CMP, SYS_GAL, SYS_GPS, and SYS_QZS.

Here is the call graph for this function:

◆ bds_gen()

int bds_gen ( int prn)

BeiDou generation of a PRN.

Parameters
[in]prnBeiDou PRN
Returns
BDSGEN_2, BDSGEN_3, or 0 (invalid PRN)

Definition at line 273 of file mrtk_nav.c.

References bdsgen_, BDSGEN_3, MAXPRNCMP, MINPRNBDS3, and MINPRNCMP.

Referenced by is_bds2prn().

Here is the caller graph for this function:

◆ freenav()

void freenav ( nav_t * nav,
int opt )

Free navigation data memory.

Parameters
[in,out]navNavigation data
[in]optOption (0x01:eph, 0x02:geph, 0x04:seph, 0x08:peph, 0x10:pclk, 0x20:alm, 0x40:tec)

Definition at line 1118 of file mrtk_nav.c.

References nav_s::alm, nav_s::eph, nav_s::eph_prev, free, nav_s::geph, nav_s::n, nav_s::na, nav_s::namax, nav_s::nc, nav_s::ncmax, nav_s::ne, nav_s::nemax, nav_s::ng, nav_s::ngmax, nav_s::nmax, nav_s::ns, nav_s::nsmax, nav_s::nt, nav_s::ntmax, nav_s::pclk, nav_s::peph, nav_s::pppiono, nav_s::seph, and nav_s::tec.

◆ freq_idx2ant_idx()

int freq_idx2ant_idx ( int sys,
int freq_idx )

Convert frequency index to antenna PCV index.

Parameters
[in]sysSatellite system (SYS_???)
[in]freq_idxFrequency index (0,1,2,...)
Returns
Antenna PCV index (0..NFREQPCV-1) (NFREQPCV: error)

Definition at line 743 of file mrtk_nav.c.

References freq_idx2freq_num(), and freq_num2ant_idx().

Referenced by corr_meas().

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

◆ freq_idx2freq_num()

int freq_idx2freq_num ( int sys,
int freq_idx )

Convert frequency index to frequency number using obsdef table.

Parameters
[in]sysSatellite system (SYS_???)
[in]freq_idxFrequency index (0,1,2,...)
Returns
Frequency number (1,2,5,...) (0: error)

Definition at line 649 of file mrtk_nav.c.

References obsdef_t::freq_num, get_obsdef(), and MAXFREQ.

Referenced by ddres(), freq_idx2ant_idx(), and sat_lambda().

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

◆ freq_num2ant_idx()

int freq_num2ant_idx ( int sys,
int freq_num )

Convert frequency number to antenna PCV index.

Parameters
[in]sysSatellite system (SYS_???)
[in]freq_numFrequency number (1,2,5,...)
Returns
Antenna PCV index (0..NFREQPCV-1) (NFREQPCV: error)

Definition at line 710 of file mrtk_nav.c.

References NFREQPCV, SYS_BD2, SYS_CMP, SYS_GAL, SYS_GLO, SYS_GPS, SYS_QZS, and SYS_SBS.

Referenced by freq_idx2ant_idx().

Here is the caller graph for this function:

◆ freq_num2freq()

double freq_num2freq ( int sys,
int freq_num,
int fcn )

Convert frequency number to frequency in Hz.

Parameters
[in]sysSatellite system (SYS_???)
[in]freq_numFrequency number (1,2,5,...)
[in]fcnGLONASS frequency channel number (-7..6)
Returns
Frequency (Hz) (0.0: error)

Definition at line 680 of file mrtk_nav.c.

References DFRQ1_GLO, DFRQ2_GLO, obsdef_t::freq_hz, get_obsdef(), MAXFREQ, and SYS_GLO.

Referenced by code2freq(), and sat_lambda().

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

◆ freq_num2freq_idx()

int freq_num2freq_idx ( int sys,
int freq_num )

Convert frequency number to frequency index using obsdef table.

Parameters
[in]sysSatellite system (SYS_???)
[in]freq_numFrequency number (1,2,5,...)
Returns
Frequency index (0,1,2,...) (-1: error)

Definition at line 661 of file mrtk_nav.c.

References get_obsdef(), and MAXFREQ.

Referenced by code2freq_idx().

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

◆ is_bds2prn()

int is_bds2prn ( int prn)

Test whether a BeiDou PRN is BDS-2 (see set_bds2prn()).

Parameters
[in]prnBeiDou PRN
Returns
1: BDS-2, 0: BDS-3 or out of range

Definition at line 249 of file mrtk_nav.c.

References bds_gen(), and BDSGEN_2.

Referenced by satno(), and satsys_bd2().

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

◆ is_bds3igso()

int is_bds3igso ( int prn)

Test whether a BeiDou PRN is listed as BDS-3 IGSO (see set_bds3igso()).

Parameters
[in]prnBeiDou PRN
Returns
1: listed, 0: not listed or out of range

Definition at line 267 of file mrtk_nav.c.

References bds3igso_, MAXPRNCMP, and MINPRNCMP.

Referenced by is_bds3_igso().

Here is the caller graph for this function:

◆ peph2pos()

int peph2pos ( gtime_t time,
int sat,
const nav_t * nav,
int opt,
double * rs,
double * dts,
double * var )

Compute satellite position/clock with precise ephemeris/clock.

Parameters
[in]timeTime (GPST)
[in]satSatellite number
[in]navNavigation data
[in]optSat position option (0:center of mass, 1:antenna phase center)
[out]rsSat position and velocity (ecef) {x,y,z,vx,vy,vz} (m|m/s)
[out]dtsSat clock {bias,drift} (s|s/s)
[out]varSat position and clock error variance (m^2) (NULL: no output)
Returns
Status (1:ok, 0:error or data outage)

Definition at line 864 of file mrtk_peph.c.

References CLIGHT, dot(), MAXSAT, pephclk(), pephpos(), satantoff(), time_str(), timeadd(), and trace().

Referenced by satpos().

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

◆ readdcb()

int readdcb ( const char * file,
nav_t * nav,
const sta_t * sta )

Read differential code bias (DCB) parameters.

Parameters
[in]fileDCB parameters file (wild-card * expanded)
[in,out]navNavigation data
[in]staStation info data to import receiver DCB (NULL: no use)
Returns
Status (1:ok, 0:error)

Definition at line 583 of file mrtk_peph.c.

References nav_s::cbias, expath(), free, malloc, MAXEXFILE, MAXSAT, readdcbf(), and trace().

Referenced by execses().

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

◆ readnav()

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

Read navigation data from file.

Parameters
[in]fileFile path
[out]navNavigation data
Returns
Status (1:ok, 0:no file)

Definition at line 985 of file mrtk_nav.c.

References eph_t::A, geph_t::acc, geph_t::age, eph_t::cic, eph_t::cis, eph_t::code, eph_t::crc, eph_t::crs, eph_t::cuc, eph_t::cus, eph_t::deln, geph_t::dtaun, eph_t::e, nav_s::eph, eph_t::f0, eph_t::f1, eph_t::f2, eph_t::fit, eph_t::flag, geph_t::frq, geph_t::gamn, nav_s::geph, eph_t::i0, eph_t::idot, eph_t::iodc, eph_t::iode, geph_t::iode, nav_s::ion_gps, eph_t::M0, eph_t::omg, eph_t::OMG0, eph_t::OMGd, geph_t::pos, eph_t::sat, geph_t::sat, satid2no(), satsys(), eph_t::sva, geph_t::sva, eph_t::svh, geph_t::svh, SYS_GLO, geph_t::taun, eph_t::tgd, gtime_t::time, eph_t::toc, eph_t::toe, geph_t::toe, eph_t::toes, geph_t::tof, trace(), eph_t::ttr, nav_s::utc_gps, and geph_t::vel.

Here is the call graph for this function:

◆ readsap()

int readsap ( const char * file,
gtime_t time,
nav_t * nav )

Read satellite antenna parameters.

Parameters
[in]fileAntenna parameter file
[in]timeTime (GPST)
[in,out]navNavigation data
Returns
Status (1:ok, 0:error)

Definition at line 508 of file mrtk_peph.c.

References free, MAXSAT, pcvs_t::pcv, nav_s::pcvs, readpcv(), searchpcv(), time_str(), and trace().

Here is the call graph for this function:

◆ readsp3()

void readsp3 ( const char * file,
nav_t * nav,
int opt )

Read sp3 precise ephemeris file.

Parameters
[in]fileSP3 precise ephemeris file (wild-card * expanded)
[in,out]navNavigation data
[in]optOptions (1:only observed + 2:only predicted + 4:not combined)

Definition at line 450 of file mrtk_peph.c.

References combpeph(), expath(), free, malloc, MAXEXFILE, MAXSAT, nav_s::ne, readsp3b(), readsp3h(), and trace().

Referenced by decodefile(), and readpreceph().

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

◆ reset_obsdef()

void reset_obsdef ( void )

Reset all obsdef tables to their pristine default frequency layout.

Note
#186: restores the full multi-band tables so a repeated/changed signal selection (e.g. an rtkrcv restart, or switching to correction=igs which skips apply_pppsig()) does not inherit a previously trimmed layout.

Definition at line 483 of file mrtk_nav.c.

References obsdef_BD2, obsdef_BD2_def, obsdef_BDS, obsdef_BDS_def, obsdef_GAL, obsdef_GAL_def, obsdef_GLO, obsdef_GLO_def, obsdef_GPS, obsdef_GPS_def, obsdef_IRN, obsdef_IRN_def, obsdef_QZS, obsdef_QZS_def, obsdef_SBS, obsdef_SBS_def, and save_obsdef_defaults().

Here is the call graph for this function:

◆ sat2freq()

double sat2freq ( int sat,
uint8_t code,
const nav_t * nav )

Convert satellite and obs code to carrier frequency.

Parameters
[in]satSatellite number
[in]codeObs code (CODE_???)
[in]navNavigation data for GLONASS (NULL: not used)
Returns
Carrier frequency (Hz) (0.0: error)

Definition at line 244 of file mrtk_obs.c.

◆ satantoff()

void satantoff ( gtime_t time,
const double * rs,
int sat,
const nav_t * nav,
double * dant )

Compute satellite antenna phase center offset in ecef.

Parameters
[in]timeTime (GPST)
[in]rsSatellite position and velocity (ecef) {x,y,z,vx,vy,vz} (m|m/s)
[in]satSatellite number
[in]navNavigation data
[out]dantSatellite antenna phase center offset (ecef) {dx,dy,dz} (m)

Definition at line 785 of file mrtk_peph.c.

References CODE_L1C, CODE_L2C, cross3(), freq_idx2ant_idx(), freq_idx2freq_num(), freq_num2freq(), gpst2utc(), normv3(), pcv_t::off, nav_s::pcvs, sat2freq(), satsys_bd2(), SQR, sunmoonpos(), SYS_GLO, time_str(), and trace().

Referenced by peph2pos(), and satpos_ssr().

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

◆ satexclude()

int satexclude ( int sat,
double var,
int svh,
const struct prcopt_t * opt )

Test excluded satellite.

Parameters
[in]satSatellite number
[in]varVariance of ephemeris (m^2)
[in]svhSV health flag (-1: correction not available)
[in]optProcessing options (NULL: not used)
Returns
Status (1:excluded, 0:not excluded)

Definition at line 1169 of file mrtk_nav.c.

References prcopt_t::exsats, MAX_VAR_EPH, prcopt_t::navsys, satsys(), SYS_CMP, SYS_GLO, SYS_QZS, and trace().

Referenced by ppp_res(), rescode(), zdres(), and zdres().

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

◆ satid2no()

int satid2no ( const char * id)

Convert satellite id to satellite number.

Parameters
[in]idSatellite id (nn, Gnn, Rnn, Enn, Jnn, Cnn, Inn or Snn)
Returns
Satellite number (0: error)

Definition at line 753 of file mrtk_nav.c.

Referenced by readnav().

Here is the caller graph for this function:

◆ satno()

int satno ( int sys,
int prn )

Convert satellite system+prn/slot number to satellite number.

Parameters
[in]sysSatellite system (SYS_GPS, SYS_GLO, ...)
[in]prnSatellite prn/slot number
Returns
Satellite number (0: error)

Definition at line 58 of file mrtk_nav.c.

References is_bds2prn(), MAXPRNCMP, MAXPRNGAL, MAXPRNGLO, MAXPRNGPS, MAXPRNIRN, MAXPRNLEO, MAXPRNQZS, MAXPRNSBS, MINPRNBDS3, MINPRNCMP, MINPRNGAL, MINPRNGLO, MINPRNGPS, MINPRNIRN, MINPRNLEO, MINPRNQZS, MINPRNSBS, NSATCMP, NSATGAL, NSATGLO, NSATGPS, NSATIRN, NSATLEO, NSATQZS, SYS_BD2, SYS_CMP, SYS_GAL, SYS_GLO, SYS_GPS, SYS_IRN, SYS_LEO, SYS_QZS, and SYS_SBS.

Referenced by convsbs(), decode_alm_gps(), decode_alm_qzs(), decode_bdsephemerisb(), decode_bdsnav(), decode_bnx_01_01(), decode_bnx_01_02(), decode_bnx_01_03(), decode_bnx_01_04(), decode_bnx_01_05(), decode_bnx_01_06(), decode_bnx_01_07(), decode_bnx_01_14(), decode_bnx_7f_05(), decode_creseph(), decode_cresgloeph(), decode_cresgloraw(), decode_cresraw(), decode_cresraw2(), decode_eph(), decode_gal_fnav_eph(), decode_gal_inav_eph(), decode_galephemerisb(), decode_galinavephemerisb(), decode_galnav(), decode_gloephem(), decode_gloephemerisb(), decode_glonav(), decode_glostr_eph(), decode_gpsephemb(), decode_gpsnav(), decode_lcliono(), decode_lD(), decode_navicephemerisb(), decode_nD(), decode_nd(), decode_NE(), decode_NN(), decode_qzsrawl6(), decode_qzssephemerisb(), decode_qzssrawephemb(), decode_qzssrawsubframeb(), decode_rangeb(), decode_rangecmpb(), decode_rawephemb(), decode_repb(), decode_rgeb(), decode_rged(), decode_rxmraw(), decode_rxmrawx(), decode_rxmsfrb(), decode_rxmsfrbx(), decode_sbstype1(), decode_sbstype9(), decode_SI(), decode_ss2eph(), decode_ss2meas(), decode_ssr1(), decode_ssr2(), decode_ssr3(), decode_ssr4(), decode_ssr5(), decode_ssr6(), decode_ssr7(), decode_stat(), decode_stqbds(), decode_stqglo(), decode_stqgloe(), decode_stqgps(), decode_stqraw(), decode_stqrawx(), decode_trkd5(), decode_trkmeas(), decode_trksfrbx(), decode_type1(), decode_type1002(), decode_type1004(), decode_type1010(), decode_type1012(), decode_type1019(), decode_type1020(), decode_type1041(), decode_type1042(), decode_type1044(), decode_type1045(), decode_type1046(), decode_type17(), decode_type18(), decode_type19(), decode_WE(), decode_xf5raw(), decode_xf7eph(), DecodeBeidouEphemeris(), DecodeGalileoEphemeris(), DecodeGPSEphemeris(), DecodeQZSSEphemeris(), DecodeType17(), encode_lcliono(), nextsat(), outrnx_glo_fcn(), readrnxnavb(), readsp3b(), readsp3h(), satid2no(), save_msm_obs(), svid2sat(), svmask2nsatlist(), svmask2sat(), tle_pos(), and update_glofcn().

Here is the call graph for this function:

◆ satno2id()

void satno2id ( int sat,
char * id )

Convert satellite number to satellite id.

Parameters
[in]satSatellite number
[out]idSatellite id (Gnn, Rnn, Enn, Jnn, Cnn, Inn or nnn)

Definition at line 817 of file mrtk_nav.c.

Referenced by savenav().

Here is the caller graph for this function:

◆ satpos()

int satpos ( gtime_t time,
gtime_t teph,
int sat,
int ephopt,
const nav_t * nav,
double * rs,
double * dts,
double * var,
int * svh )

Compute satellite position, velocity and clock.

Parameters
[in]timeTime (GPST)
[in]tephTime to select ephemeris (GPST)
[in]satSatellite number
[in]ephoptEphemeris option (EPHOPT_???)
[in]navNavigation data
[out]rsSat position and velocity (ecef) {x,y,z,vx,vy,vz} (m|m/s)
[out]dtsSat clock {bias,drift} (s|s/s)
[out]varSat position and clock error variance (m^2)
[out]svhSat health flag (-1:correction not available)
Returns
Status (1:ok, 0:error)

Definition at line 891 of file mrtk_eph.c.

References EPHOPT_BRDC, EPHOPT_PREC, EPHOPT_SBAS, EPHOPT_SSRAPC, EPHOPT_SSRCOM, ephpos(), peph2pos(), satpos_sbas(), satpos_ssr(), time_str(), and trace().

Referenced by satposs(), and windupcorr().

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

◆ satposs()

void satposs ( gtime_t teph,
const obsd_t * obs,
int n,
const nav_t * nav,
int ephopt,
double * rs,
double * dts,
double * var,
int * svh )

Compute satellite positions, velocities and clocks.

Parameters
[in]tephTime to select ephemeris (GPST)
[in]obsObservation data
[in]nNumber of observation data
[in]navNavigation data
[in]ephoptEphemeris option (EPHOPT_???)
[out]rsSatellite positions and velocities (ecef)
[out]dtsSatellite clocks
[out]varSat position and clock error variances (m^2)
[out]svhSat health flag (-1:correction not available)

Definition at line 940 of file mrtk_eph.c.

References CLIGHT, ephclk(), MAXOBS, satpos(), SQR, STD_BRDCCLK, time_str(), timeadd(), and trace().

Referenced by clas_ssr2osr(), intpres(), intpres(), pntpos(), ppp_rtk_pos(), relpos(), and relposvrs().

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

◆ satsys()

int satsys ( int sat,
int * prn )

Convert satellite number to satellite system.

Parameters
[in]satSatellite number (1-MAXSAT)
[in,out]prnSatellite prn/slot number (NULL: no output)
Returns
Satellite system (SYS_GPS, SYS_GLO, ...)

Definition at line 117 of file mrtk_nav.c.

Referenced by readnav(), satexclude(), satno2id(), and satsys_bd2().

Here is the caller graph for this function:

◆ satsys_bd2()

int satsys_bd2 ( int sat,
int * prn )

Distinguish BDS-2 from BDS-3.

Parameters
[in]satSatellite number
[out]prnPRN number (NULL: not output)
Returns
Satellite system (SYS_CMP for BDS-3, SYS_BD2 for BDS-2)

Definition at line 159 of file mrtk_nav.c.

References is_bds2prn(), satsys(), SYS_BD2, SYS_CMP, and SYS_NONE.

Referenced by decode_obsdata(), rescode(), and sat2freq().

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

◆ savenav()

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

Save navigation data to file.

Parameters
[in]fileFile path
[in]navNavigation data
Returns
Status (1:ok, 0:file open error)

Definition at line 1058 of file mrtk_nav.c.

References eph_t::A, geph_t::acc, geph_t::age, eph_t::cic, eph_t::cis, eph_t::code, eph_t::crc, eph_t::crs, eph_t::cuc, eph_t::cus, eph_t::deln, geph_t::dtaun, eph_t::e, nav_s::eph, eph_t::f0, eph_t::f1, eph_t::f2, eph_t::fit, eph_t::flag, geph_t::frq, geph_t::gamn, nav_s::geph, eph_t::i0, eph_t::idot, eph_t::iodc, eph_t::iode, geph_t::iode, nav_s::ion_gps, eph_t::M0, MAXPRNGLO, MAXSAT, eph_t::omg, eph_t::OMG0, eph_t::OMGd, geph_t::pos, eph_t::sat, geph_t::sat, satno2id(), eph_t::sva, geph_t::sva, eph_t::svh, geph_t::svh, geph_t::taun, eph_t::tgd, gtime_t::time, eph_t::toc, eph_t::toe, geph_t::toe, eph_t::toes, geph_t::tof, trace(), eph_t::ttr, nav_s::utc_gps, and geph_t::vel.

Here is the call graph for this function:

◆ set_bds2prn()

int set_bds2prn ( const char * str)

Set the BDS-2 satellites in BeiDou PRN 1-18.

Since the BeiDou PRN reassignment (2026-04-10 to 04-21) BDS-3 satellites are also on PRN 1-18. A PRN 1-18 is BDS-2 only when listed here; PRN >= 19 is always BDS-3. The setting is process-global and affects satsys_bd2(), satno(SYS_BD2, prn) and all their callers, including RINEX reading.

Parameters
[in]strSatellite list, e.g. "C09,C10" or "C01-C18" ("" or NULL: no BDS-2)
Returns
Number of satellites set (-1: invalid list; no BDS-2 is set)

Definition at line 231 of file mrtk_nav.c.

References bdsgen_, BDSGEN_2, BDSGEN_3, MAXPRNCMP, MINPRNBDS3, MINPRNCMP, NBDSTBL, and parse_bdslist().

Referenced by set_bdsopt().

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

◆ set_bds3igso()

int set_bds3igso ( const char * str)

Set the BDS-3 IGSO satellites (excluded as PPP-AR reference satellite).

Parameters
[in]strSatellite list, e.g. "C06-C08" or "C38,C39,C40" ("" or NULL: C06-C08)
Returns
Number of satellites set (-1: invalid list; the default C06-C08 is set)

Definition at line 251 of file mrtk_nav.c.

References bds3igso_, MAXPRNCMP, NBDSTBL, and parse_bdslist().

Referenced by set_bdsopt().

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

◆ set_obsdef()

void set_obsdef ( int sys,
const int * freq_nums )

Rearrange obsdef table for a satellite system by frequency numbers.

Parameters
[in]sysSatellite system (SYS_???)
[in]freq_numsArray of frequency numbers [MAXFREQ] (0=unused)

Definition at line 502 of file mrtk_nav.c.

References obsdef_t::freq_hz, obsdef_t::freq_num, get_obsdef(), get_obsdef_default(), MAXFREQ, and save_obsdef_defaults().

Referenced by apply_claslib_ppprtk_obsdef(), apply_pppsig(), and mrtk_sigcfg_to_obsdef().

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

◆ uniqnav()

void uniqnav ( nav_t * nav)

Unique ephemerides in navigation data.

Parameters
[in,out]navNavigation data

Definition at line 971 of file mrtk_nav.c.

References nav_s::n, nav_s::ng, nav_s::ns, trace(), uniqeph(), uniqgeph(), and uniqseph().

Referenced by readobsnav().

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