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

MRTKLIB Observation Module — Implementation. More...

#include "mrtklib/mrtk_obs.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "mrtklib/mrtk_nav.h"
#include "mrtklib/mrtk_opt.h"
#include "mrtklib/mrtk_trace.h"
Include dependency graph for mrtk_obs.c:

Go to the source code of this file.

Classes

struct  sig_priority_entry_t

Macros

#define PI   3.1415926535897932 /* pi */
#define R2D   (180.0 / PI) /* rad to deg */
#define SYS_NONE   0x00 /* navigation system: none */
#define SYS_GPS   0x01 /* navigation system: GPS */
#define SYS_SBS   0x02 /* navigation system: SBAS */
#define SYS_GLO   0x04 /* navigation system: GLONASS */
#define SYS_GAL   0x08 /* navigation system: Galileo */
#define SYS_QZS   0x10 /* navigation system: QZSS */
#define SYS_CMP   0x20 /* navigation system: BeiDou */
#define SYS_IRN   0x40 /* navigation system: NavIC */
#define SYS_LEO   0x80 /* navigation system: LEO */
#define SYS_BD2   0x100 /* navigation system: BeiDou-2 */
#define SYS_ALL   0xFF /* navigation system: all */
#define MAXFREQ   7 /* max NFREQ */
#define FREQ1   1.57542E9 /* L1/E1/B1C frequency (Hz) */
#define FREQ2   1.22760E9 /* L2 frequency (Hz) */
#define FREQ5   1.17645E9 /* L5/E5a/B2a frequency (Hz) */
#define FREQ6   1.27875E9 /* E6/L6 frequency (Hz) */
#define FREQ7   1.20714E9 /* E5b frequency (Hz) */
#define FREQ8   1.191795E9 /* E5a+b frequency (Hz) */
#define FREQ9   2.492028E9 /* S frequency (Hz) */
#define FREQ1_GLO   1.60200E9 /* GLONASS G1 base frequency (Hz) */
#define DFRQ1_GLO   0.56250E6 /* GLONASS G1 bias frequency (Hz/n) */
#define FREQ2_GLO   1.24600E9 /* GLONASS G2 base frequency (Hz) */
#define DFRQ2_GLO   0.43750E6 /* GLONASS G2 bias frequency (Hz/n) */
#define FREQ3_GLO   1.202025E9 /* GLONASS G3 frequency (Hz) */
#define FREQ1a_GLO   1.600995E9 /* GLONASS G1a frequency (Hz) */
#define FREQ2a_GLO   1.248060E9 /* GLONASS G2a frequency (Hz) */
#define FREQ1_CMP   1.561098E9 /* BDS B1I frequency (Hz) */
#define FREQ2_CMP   1.20714E9 /* BDS B2I/B2b frequency (Hz) */
#define FREQ3_CMP   1.26852E9 /* BDS B3 frequency (Hz) */

Functions

int satsys (int sat, int *prn)
double timediff (gtime_t t1, gtime_t t2)
double time2gpst (gtime_t t, int *week)
static int cmpobs (const void *p1, const void *p2)
int testsnr (int base, int idx, double el, double snr, const snrmask_t *mask)
 Test SNR mask.
int testelmask (const double *azel, const int16_t *elmask)
 Test elevation mask.
uint8_t obs2code (const char *obs)
 Convert obs code type string to obs code.
char * code2obs (uint8_t code)
 Convert obs code to obs code string.
int code2freq_num (uint8_t code)
 Extract frequency number from obs code.
int code2freq_idx (int sys, uint8_t code)
 Convert system and obs code to frequency index (obsdef-based).
double code2freq (int sys, uint8_t code, int fcn)
 Convert system and obs code to carrier frequency.
double sat2freq (int sat, uint8_t code, const nav_t *nav)
 Convert satellite and obs code to carrier frequency.
int getcodepri (int sys, uint8_t code, const char *opt)
 Get code priority for multiple codes in a frequency.
int sortobs (obs_t *obs)
 Sort observation data by time, receiver, and satellite.
void signal_replace (obsd_t *obs, int idx, char f, char *c)
 Replace signal type in observation data.
int screent (gtime_t time, gtime_t ts, gtime_t te, double tint)
 Screen data by time range and interval.
void freeobs (obs_t *obs)
 Free observation data memory.
double mrtk_band2freq_hz (mrtk_band_t band)
 Convert physical band to base carrier frequency (Hz).
mrtk_band_t mrtk_rinex_freq_to_band (int sys, int rinex_freq_id)
 Convert RINEX frequency digit to physical band for a given system.
void mrtk_use_claslib_qzs_l1_priority (int on)
 Toggle the claslib-compatible QZSS L1 signal priority (C>S>L>X>Z).
const uint8_t * mrtk_get_signal_priority (int sys, mrtk_band_t band)
 Get priority-ordered code list for a (system, band) pair.
int mrtk_band_to_freq_num (int sys, mrtk_band_t band)
 Convert physical band back to RINEX frequency number for a given system.
int mrtk_parse_signal_str (const char *str, int *sys, mrtk_band_t *band, uint8_t *code)
 Parse a RINEX3-style signal string (e.g., "G1C") into components.
static int sys2sigcfg_idx (int sys)
int mrtk_sigcfg_from_signals (const char **sigs, int nsig, mrtk_sigcfg_t *cfg, int *nf)
 Build per-constellation signal config from a signal string array.
int mrtk_sigcfg_to_obsdef (const mrtk_sigcfg_t *cfg)
 Apply signal config to obsdef tables (bridge to existing system).
int mrtk_sigcfg_freq_idx (int sys, uint8_t code, const mrtk_sigcfg_t *cfg, int nex)
 Resolve the observation slot for a decoded (sys, code) from sigcfg.

Variables

static char * obscodes []
static const sig_priority_entry_t SIG_PRIORITY_TABLE []
static const uint8_t QZS_L1_PRIORITY_CLASLIB [MRTK_MAX_SIG_PRIORITY]
static int qzs_l1_claslib = 0

Detailed Description

MRTKLIB Observation Module — Implementation.

All functions and static data in this file are cut-and-paste extractions from the legacy rtkcmn.c with zero algorithmic changes.

Definition in file mrtk_obs.c.

Macro Definition Documentation

◆ DFRQ1_GLO

#define DFRQ1_GLO   0.56250E6 /* GLONASS G1 bias frequency (Hz/n) */

Definition at line 75 of file mrtk_obs.c.

Referenced by decode_xf5raw(), freq_num2freq(), gen_obs_glo(), and gloicbcorr().

◆ DFRQ2_GLO

#define DFRQ2_GLO   0.43750E6 /* GLONASS G2 bias frequency (Hz/n) */

Definition at line 77 of file mrtk_obs.c.

Referenced by freq_num2freq(), gen_obs_glo(), and gloicbcorr().

◆ FREQ1

◆ FREQ1_CMP

#define FREQ1_CMP   1.561098E9 /* BDS B1I frequency (Hz) */

Definition at line 81 of file mrtk_obs.c.

Referenced by mrtk_band2freq_hz().

◆ FREQ1_GLO

#define FREQ1_GLO   1.60200E9 /* GLONASS G1 base frequency (Hz) */

Definition at line 74 of file mrtk_obs.c.

Referenced by decode_xf5raw(), gen_obs_glo(), and mrtk_band2freq_hz().

◆ FREQ1a_GLO

#define FREQ1a_GLO   1.600995E9 /* GLONASS G1a frequency (Hz) */

Definition at line 79 of file mrtk_obs.c.

◆ FREQ2

◆ FREQ2_CMP

#define FREQ2_CMP   1.20714E9 /* BDS B2I/B2b frequency (Hz) */

Definition at line 82 of file mrtk_obs.c.

Referenced by mrtk_band2freq_hz().

◆ FREQ2_GLO

#define FREQ2_GLO   1.24600E9 /* GLONASS G2 base frequency (Hz) */

Definition at line 76 of file mrtk_obs.c.

Referenced by gen_obs_glo(), and mrtk_band2freq_hz().

◆ FREQ2a_GLO

#define FREQ2a_GLO   1.248060E9 /* GLONASS G2a frequency (Hz) */

Definition at line 80 of file mrtk_obs.c.

◆ FREQ3_CMP

#define FREQ3_CMP   1.26852E9 /* BDS B3 frequency (Hz) */

Definition at line 83 of file mrtk_obs.c.

Referenced by mrtk_band2freq_hz().

◆ FREQ3_GLO

#define FREQ3_GLO   1.202025E9 /* GLONASS G3 frequency (Hz) */

Definition at line 78 of file mrtk_obs.c.

Referenced by mrtk_band2freq_hz().

◆ FREQ5

#define FREQ5   1.17645E9 /* L5/E5a/B2a frequency (Hz) */

Definition at line 69 of file mrtk_obs.c.

Referenced by has_code2lam(), mrtk_band2freq_hz(), and sat_lambda().

◆ FREQ6

#define FREQ6   1.27875E9 /* E6/L6 frequency (Hz) */

Definition at line 70 of file mrtk_obs.c.

Referenced by has_code2lam(), mrtk_band2freq_hz(), and sat_lambda().

◆ FREQ7

#define FREQ7   1.20714E9 /* E5b frequency (Hz) */

Definition at line 71 of file mrtk_obs.c.

Referenced by has_code2lam(), mrtk_band2freq_hz(), and sat_lambda().

◆ FREQ8

#define FREQ8   1.191795E9 /* E5a+b frequency (Hz) */

Definition at line 72 of file mrtk_obs.c.

Referenced by has_code2lam(), mrtk_band2freq_hz(), and sat_lambda().

◆ FREQ9

#define FREQ9   2.492028E9 /* S frequency (Hz) */

Definition at line 73 of file mrtk_obs.c.

Referenced by mrtk_band2freq_hz().

◆ MAXFREQ

#define MAXFREQ   7 /* max NFREQ */

◆ PI

#define PI   3.1415926535897932 /* pi */

Definition at line 50 of file mrtk_obs.c.

◆ R2D

◆ SYS_ALL

#define SYS_ALL   0xFF /* navigation system: all */

Definition at line 63 of file mrtk_obs.c.

Referenced by outrnxnavh(), and set_sysmask().

◆ SYS_BD2

#define SYS_BD2   0x100 /* navigation system: BeiDou-2 */

◆ SYS_CMP

#define SYS_CMP   0x20 /* navigation system: BeiDou */

Definition at line 59 of file mrtk_obs.c.

◆ SYS_GAL

#define SYS_GAL   0x08 /* navigation system: Galileo */

Definition at line 57 of file mrtk_obs.c.

◆ SYS_GLO

#define SYS_GLO   0x04 /* navigation system: GLONASS */

Definition at line 56 of file mrtk_obs.c.

◆ SYS_GPS

#define SYS_GPS   0x01 /* navigation system: GPS */

Definition at line 54 of file mrtk_obs.c.

◆ SYS_IRN

#define SYS_IRN   0x40 /* navigation system: NavIC */

Definition at line 60 of file mrtk_obs.c.

◆ SYS_LEO

#define SYS_LEO   0x80 /* navigation system: LEO */

Definition at line 61 of file mrtk_obs.c.

Referenced by code2sys(), satid2no(), satno(), satno2id(), and satsys().

◆ SYS_NONE

#define SYS_NONE   0x00 /* navigation system: none */

Definition at line 53 of file mrtk_obs.c.

◆ SYS_QZS

#define SYS_QZS   0x10 /* navigation system: QZSS */

Definition at line 58 of file mrtk_obs.c.

◆ SYS_SBS

#define SYS_SBS   0x02 /* navigation system: SBAS */

Definition at line 55 of file mrtk_obs.c.

Function Documentation

◆ cmpobs()

int cmpobs ( const void * p1,
const void * p2 )
static

Definition at line 107 of file mrtk_obs.c.

References DTTOL, obsd_t::rcv, obsd_t::sat, gtime_t::time, obsd_t::time, and timediff().

Referenced by sortobs().

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

◆ code2freq()

double code2freq ( int sys,
uint8_t code,
int fcn )
extern

Convert system and obs code to carrier frequency.

Parameters
[in]sysSatellite system (SYS_???)
[in]codeObs code (CODE_???)
[in]fcnFrequency channel number for GLONASS
Returns
Carrier frequency (Hz) (0.0: error)

Definition at line 236 of file mrtk_obs.c.

References code2freq_num(), and freq_num2freq().

Referenced by decode_bnx_7f_05_obs(), decode_measepoch(), decode_rxmrawx(), decode_type1010(), decode_type1012(), decode_xd(), decode_xP(), decode_xp(), gen_msm_sat(), gen_msm_sig(), readfcbf(), sat2freq(), and save_msm_obs().

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

◆ code2freq_idx()

int code2freq_idx ( int sys,
uint8_t code )
extern

Convert system and obs code to frequency index (obsdef-based).

Parameters
[in]sysSatellite system (SYS_???)
[in]codeObs code (CODE_???)
Returns
Frequency index (-1: error)

Definition at line 225 of file mrtk_obs.c.

References code2freq_num(), and freq_num2freq_idx().

Referenced by code_on_same_freq(), decode_bnx_7f_05_obs(), decode_track_stat(), mrtk_sigcfg_freq_idx(), save_msm_obs(), set_index(), setopt_obstype(), sig2idx(), sig2idx(), sig_idx(), and sort_obstype().

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

◆ code2freq_num()

int code2freq_num ( uint8_t code)
extern

Extract frequency number from obs code.

Parameters
[in]codeObs code (CODE_???)
Returns
Frequency number (1,2,5,...) (0: error)

Definition at line 201 of file mrtk_obs.c.

References code2obs().

Referenced by clas_osr_zdres(), code2freq(), code2freq_idx(), getcodepri(), and mrtk_sigcfg_freq_idx().

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

◆ code2obs()

char * code2obs ( uint8_t code)
extern

Convert obs code to obs code string.

Parameters
[in]codeObs code (CODE_???)
Returns
Obs code string ("1C","1P",...)

Definition at line 190 of file mrtk_obs.c.

References CODE_NONE, MAXCODE, and obscodes.

Referenced by code2freq_num(), code2sigs(), corr_meas(), decode_mcssr_cb(), detslp_code(), detslp_code(), getcodepri(), obsindex(), ppp_note_autosig(), ppp_res(), sat_lambda(), scan_file(), set_index(), setopt_obstype(), signal_replace(), and to_sigid().

Here is the caller graph for this function:

◆ freeobs()

void freeobs ( obs_t * obs)
extern

Free observation data memory.

Parameters
[in,out]obsObservation data

Definition at line 433 of file mrtk_obs.c.

References obs_t::data, free, obs_t::n, and obs_t::nmax.

◆ getcodepri()

int getcodepri ( int sys,
uint8_t code,
const char * opt )
extern

Get code priority for multiple codes in a frequency.

Parameters
[in]sysSystem (SYS_???)
[in]codeObs code (CODE_???)
[in]optCode options (NULL:no option)
Returns
Priority (15:highest-1:lowest, 0:error)

Definition at line 276 of file mrtk_obs.c.

References code2freq_num(), code2obs(), MRTK_BAND_UNKNOWN, mrtk_get_signal_priority(), MRTK_MAX_SIG_PRIORITY, mrtk_rinex_freq_to_band(), SYS_BD2, SYS_CMP, SYS_GAL, SYS_GLO, SYS_GPS, SYS_IRN, SYS_QZS, and SYS_SBS.

Referenced by decode_bnx_7f_05_obs(), set_index(), sigindex(), and sort_obstype().

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

◆ mrtk_band2freq_hz()

double mrtk_band2freq_hz ( mrtk_band_t band)
extern

◆ mrtk_band_to_freq_num()

int mrtk_band_to_freq_num ( int sys,
mrtk_band_t band )
extern

Convert physical band back to RINEX frequency number for a given system.

Parameters
[in]sysSatellite system (SYS_???)
[in]bandPhysical frequency band
Returns
RINEX frequency number (1,2,5,...) or 0 on error

Definition at line 938 of file mrtk_obs.c.

References MRTK_BAND_BDS_B1C, MRTK_BAND_BDS_B1I, MRTK_BAND_BDS_B2a, MRTK_BAND_BDS_B2ab, MRTK_BAND_BDS_B2b, MRTK_BAND_BDS_B3, MRTK_BAND_GAL_E1, MRTK_BAND_GAL_E5a, MRTK_BAND_GAL_E5ab, MRTK_BAND_GAL_E5b, MRTK_BAND_GAL_E6, MRTK_BAND_GLO_G1, MRTK_BAND_GLO_G2, MRTK_BAND_GLO_G3, MRTK_BAND_GPS_L1, MRTK_BAND_GPS_L2, MRTK_BAND_GPS_L5, MRTK_BAND_IRN_L5, MRTK_BAND_IRN_S, MRTK_BAND_QZS_L1, MRTK_BAND_QZS_L2, MRTK_BAND_QZS_L5, MRTK_BAND_QZS_L6, MRTK_BAND_SBS_L1, MRTK_BAND_SBS_L5, SYS_CMP, SYS_GAL, SYS_GLO, SYS_GPS, SYS_IRN, SYS_QZS, and SYS_SBS.

Referenced by mrtk_sigcfg_freq_idx(), and mrtk_sigcfg_to_obsdef().

Here is the caller graph for this function:

◆ mrtk_get_signal_priority()

const uint8_t * mrtk_get_signal_priority ( int sys,
mrtk_band_t band )
extern

Get priority-ordered code list for a (system, band) pair.

Parameters
[in]sysSatellite system (SYS_???)
[in]bandPhysical frequency band
Returns
Pointer to priority-ordered code array (MRTK_MAX_SIG_PRIORITY elements), or NULL if no match

Definition at line 914 of file mrtk_obs.c.

References MRTK_BAND_MAX, MRTK_BAND_QZS_L1, MRTK_BAND_UNKNOWN, qzs_l1_claslib, QZS_L1_PRIORITY_CLASLIB, SIG_PRIORITY_TABLE, and SYS_QZS.

Referenced by getcodepri().

Here is the caller graph for this function:

◆ mrtk_parse_signal_str()

int mrtk_parse_signal_str ( const char * str,
int * sys,
mrtk_band_t * band,
uint8_t * code )
extern

Parse a RINEX3-style signal string (e.g., "G1C") into components.

Parameters
[in]strSignal string (3 chars: {sys}{freq}{attr})
[out]sysSatellite system (SYS_???)
[out]bandPhysical frequency band
[out]codeObservation code (CODE_???)
Returns
0: success, -1: error

Definition at line 1039 of file mrtk_obs.c.

References CODE_NONE, MRTK_BAND_UNKNOWN, mrtk_rinex_freq_to_band(), obs2code(), SYS_CMP, SYS_GAL, SYS_GLO, SYS_GPS, SYS_IRN, SYS_QZS, and SYS_SBS.

Referenced by mrtk_sigcfg_from_signals().

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

◆ mrtk_rinex_freq_to_band()

mrtk_band_t mrtk_rinex_freq_to_band ( int sys,
int rinex_freq_id )
extern

Convert RINEX frequency digit to physical band for a given system.

Parameters
[in]sysSatellite system (SYS_???)
[in]rinex_freq_idRINEX frequency digit (1,2,3,4,5,6,7,8,9)
Returns
Physical band (MRTK_BAND_UNKNOWN on error)

Definition at line 806 of file mrtk_obs.c.

References MRTK_BAND_BDS_B1C, MRTK_BAND_BDS_B1I, MRTK_BAND_BDS_B2a, MRTK_BAND_BDS_B2ab, MRTK_BAND_BDS_B2b, MRTK_BAND_BDS_B3, MRTK_BAND_GAL_E1, MRTK_BAND_GAL_E5a, MRTK_BAND_GAL_E5ab, MRTK_BAND_GAL_E5b, MRTK_BAND_GAL_E6, MRTK_BAND_GLO_G1, MRTK_BAND_GLO_G2, MRTK_BAND_GLO_G3, MRTK_BAND_GPS_L1, MRTK_BAND_GPS_L2, MRTK_BAND_GPS_L5, MRTK_BAND_IRN_L5, MRTK_BAND_IRN_S, MRTK_BAND_QZS_L1, MRTK_BAND_QZS_L2, MRTK_BAND_QZS_L5, MRTK_BAND_QZS_L6, MRTK_BAND_SBS_L1, MRTK_BAND_SBS_L5, MRTK_BAND_UNKNOWN, SYS_CMP, SYS_GAL, SYS_GLO, SYS_GPS, SYS_IRN, SYS_QZS, and SYS_SBS.

Referenced by getcodepri(), and mrtk_parse_signal_str().

Here is the caller graph for this function:

◆ mrtk_sigcfg_freq_idx()

int mrtk_sigcfg_freq_idx ( int sys,
uint8_t code,
const mrtk_sigcfg_t * cfg,
int nex )
extern

Resolve the observation slot for a decoded (sys, code) from sigcfg.

#189: lets [positioning].signals (sigcfg) drive raw-decoder code selection, so e.g. GLONASS L2C/A can be placed in the iono-free 2nd frequency without the legacy -RL2C receiver option. obsdef is band-level (cannot distinguish L2C from L2P); sigcfg carries the per-band preferred code, which this consults.

Parameters
[in]sysSatellite system (SYS_???)
[in]codeObservation code (CODE_???) just decoded
[in]cfgPer-constellation signal config array [MRTK_NSYS]
[in]nexNumber of extra observation slots available (NEXOBS)
Returns
main slot 0..NFREQ-1 (code selected for its band); -1 to drop (code not selected, or its band not configured for this system); MRTK_SIGCFG_NOOPINION if this system has no sigcfg entry.

Definition at line 1224 of file mrtk_obs.c.

References mrtk_signal_t::band, code2freq_idx(), code2freq_num(), mrtk_band_to_freq_num(), MRTK_SIGCFG_NOOPINION, mrtk_sigcfg_t::nsig, mrtk_signal_t::preferred_code, mrtk_sigcfg_t::sig, and sys2sigcfg_idx().

Referenced by sig2idx().

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

◆ mrtk_sigcfg_from_signals()

int mrtk_sigcfg_from_signals ( const char ** sigs,
int nsig,
mrtk_sigcfg_t * cfg,
int * nf )
extern

Build per-constellation signal config from a signal string array.

Parameters
[in]sigsArray of signal strings (e.g., "G1C", "E5Q")
[in]nsigNumber of signal strings
[out]cfgPer-constellation signal config array [MRTK_NSYS]
[out]nfDerived number of frequencies (max signals per constellation)
Returns
0: success, -1: error

Definition at line 1128 of file mrtk_obs.c.

References mrtk_signal_t::band, MRTK_MAXSIG_PER_SYS, MRTK_NSYS, mrtk_parse_signal_str(), mrtk_sigcfg_t::nsig, mrtk_signal_t::preferred_code, mrtk_sigcfg_t::sig, sys2sigcfg_idx(), and trace().

Referenced by buff2sysopts().

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

◆ mrtk_sigcfg_to_obsdef()

int mrtk_sigcfg_to_obsdef ( const mrtk_sigcfg_t * cfg)
extern

Apply signal config to obsdef tables (bridge to existing system).

Parameters
[in]cfgPer-constellation signal config array [MRTK_NSYS]
Returns
0: success, -1: error

Definition at line 1187 of file mrtk_obs.c.

References MAXFREQ, mrtk_band_to_freq_num(), MRTK_NSYS, mrtk_sigcfg_t::nsig, set_obsdef(), SYS_CMP, SYS_GAL, SYS_GLO, SYS_GPS, SYS_IRN, SYS_QZS, SYS_SBS, and trace().

Referenced by buff2sysopts().

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

◆ mrtk_use_claslib_qzs_l1_priority()

void mrtk_use_claslib_qzs_l1_priority ( int on)
extern

Toggle the claslib-compatible QZSS L1 signal priority (C>S>L>X>Z).

Enable only for CLAS processing; upstream claslib and MADOCALIB disagree on the QZSS L1 order, so the claslib order must not affect other engines.

Parameters
[in]on1: claslib order, 0: MRTK default order

Definition at line 906 of file mrtk_obs.c.

References qzs_l1_claslib.

◆ obs2code()

uint8_t obs2code ( const char * obs)
extern

Convert obs code type string to obs code.

Parameters
[in]obsObs code string ("1C","1P","1Y",...)
Returns
Obs code (CODE_???)

Definition at line 173 of file mrtk_obs.c.

References CODE_NONE, and obscodes.

Referenced by mrtk_parse_signal_str(), outrnx_phase_shift(), readbsnx(), save_msm_obs(), set_index(), and setopt_phshift().

Here is the caller graph for this function:

◆ sat2freq()

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

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.

References code2freq(), geph_t::frq, nav_s::geph, nav_s::glo_fcn, nav_s::ng, geph_t::sat, satsys_bd2(), and SYS_GLO.

Referenced by corr_meas(), decode_cresgloraw(), decode_rangeb(), decode_rangecmpb(), gfmeas(), gfobs(), iflc_freq2_idx(), miono_delay(), mwmeas(), ppp_res(), prange(), rescode(), resdop(), sat_lambda(), sat_wavelengths(), satantoff(), udbias(), udbias_ppp(), udiono_ppp(), and zdres_sat().

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

◆ satsys()

int satsys ( int sat,
int * prn )
extern

Definition at line 117 of file mrtk_nav.c.

◆ screent()

int screent ( gtime_t time,
gtime_t ts,
gtime_t te,
double tint )
extern

Screen data by time range and interval.

Parameters
[in]timeTime to check (GPST)
[in]tsStart time (GPST) (ts.time==0: no start limit)
[in]teEnd time (GPST) (te.time==0: no end limit)
[in]tintTime interval (s) (0.0: no interval limit)
Returns
1:on, 0:off

Definition at line 424 of file mrtk_obs.c.

References DTTOL, gtime_t::time, time2gpst(), and timediff().

Referenced by avepos(), convnav(), convsbs(), inputsol(), outsolexs(), outsols(), readbnxfp(), readmsgs(), readrnxobs(), and readsolstatdata().

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

◆ signal_replace()

void signal_replace ( obsd_t * obs,
int idx,
char f,
char * c )
extern

Replace signal type in observation data.

Parameters
[in,out]obsObservation data record
[in]idxFrequency index
[in]fFrequency character
[in,out]cSignal code string

Definition at line 388 of file mrtk_obs.c.

References obsd_t::code, code2obs(), obsd_t::D, obsd_t::L, obsd_t::LLI, obsd_t::P, and obsd_t::SNR.

Here is the call graph for this function:

◆ sortobs()

int sortobs ( obs_t * obs)
extern

Sort observation data by time, receiver, and satellite.

Parameters
[in,out]obsObservation data to sort
Returns
Number of epochs

Definition at line 350 of file mrtk_obs.c.

References cmpobs(), obs_t::data, DTTOL, obs_t::n, obsd_t::rcv, obsd_t::sat, obsd_t::time, timediff(), and trace().

Referenced by readobsnav(), and update_obs().

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

◆ sys2sigcfg_idx()

int sys2sigcfg_idx ( int sys)
static

Definition at line 1097 of file mrtk_obs.c.

References SYS_CMP, SYS_GAL, SYS_GLO, SYS_GPS, SYS_IRN, SYS_QZS, and SYS_SBS.

Referenced by mrtk_sigcfg_freq_idx(), and mrtk_sigcfg_from_signals().

Here is the caller graph for this function:

◆ testelmask()

int testelmask ( const double * azel,
const int16_t * elmask )
extern

Test elevation mask.

Parameters
[in]azelAzimuth/elevation angle {az,el} (rad)
[in]elmaskElevation mask vector (360 x 1) (0.1 deg)
Returns
Status (1:masked, 0:unmasked)

Definition at line 160 of file mrtk_obs.c.

References R2D.

Referenced by zdres().

Here is the caller graph for this function:

◆ testsnr()

int testsnr ( int base,
int idx,
double el,
double snr,
const snrmask_t * mask )
extern

Test SNR mask.

Parameters
[in]baseRover or base-station (0:rover, 1:base station)
[in]idxFrequency index (0:L1, 1:L2, 2:L3,...)
[in]elElevation angle (rad)
[in]snrC/N0 (dBHz)
[in]maskSNR mask
Returns
Status (1:masked, 0:unmasked)

Definition at line 132 of file mrtk_obs.c.

References snrmask_t::ena, snrmask_t::mask, and R2D.

Referenced by clas_osr_zdres(), corr_meas(), snrmask(), zdres_sat(), and zdres_sat().

Here is the caller graph for this function:

◆ time2gpst()

double time2gpst ( gtime_t t,
int * week )
extern

Definition at line 181 of file mrtk_time.c.

Referenced by screent().

Here is the caller graph for this function:

◆ timediff()

double timediff ( gtime_t t1,
gtime_t t2 )
extern

Definition at line 279 of file mrtk_time.c.

Referenced by cmpobs(), screent(), and sortobs().

Here is the caller graph for this function:

Variable Documentation

◆ obscodes

char* obscodes[]
static
Initial value:
= {
"", "1C", "1P", "1W", "1Y", "1M", "1N", "1S", "1L", "1E",
"1A", "1B", "1X", "1Z", "2C", "2D", "2S", "2L", "2X", "2P",
"2W", "2Y", "2M", "2N", "5I", "5Q", "5X", "7I", "7Q", "7X",
"6A", "6B", "6C", "6X", "6Z", "6S", "6L", "8L", "8Q", "8X",
"2I", "2Q", "6I", "6Q", "3I", "3Q", "3X", "1I", "1Q", "5A",
"5B", "5C", "9A", "9B", "9C", "9X", "1D", "5D", "5P", "5Z",
"6E", "7D", "7P", "7Z", "8D", "8P", "4A", "4B", "4X", "6D",
"6P", ""
}

Definition at line 89 of file mrtk_obs.c.

Referenced by code2obs(), obs2code(), and set_index().

◆ qzs_l1_claslib

int qzs_l1_claslib = 0
static

Definition at line 901 of file mrtk_obs.c.

Referenced by mrtk_get_signal_priority(), and mrtk_use_claslib_qzs_l1_priority().

◆ QZS_L1_PRIORITY_CLASLIB

const uint8_t QZS_L1_PRIORITY_CLASLIB[MRTK_MAX_SIG_PRIORITY]
static
Initial value:
= {
}
#define CODE_L1S
#define CODE_L1L
#define CODE_L1C
#define CODE_L1Z
#define CODE_L1X

Definition at line 898 of file mrtk_obs.c.

Referenced by mrtk_get_signal_priority().

◆ SIG_PRIORITY_TABLE

const sig_priority_entry_t SIG_PRIORITY_TABLE[]
static

Definition at line 453 of file mrtk_obs.c.

Referenced by mrtk_get_signal_priority().