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

ISB (inter-system bias) and L2C phase shift corrections. More...

#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "mrtklib/mrtk_clas.h"
#include "mrtklib/mrtk_const.h"
#include "mrtklib/mrtk_foundation.h"
#include "mrtklib/mrtk_nav.h"
#include "mrtklib/mrtk_obs.h"
#include "mrtklib/mrtk_opt.h"
#include "mrtklib/mrtk_sys.h"
#include "mrtklib/mrtk_trace.h"
Include dependency graph for mrtk_clas_isb.c:

Go to the source code of this file.

Macros

#define NINCISB   256 /* ISB data realloc increment */

Functions

static void setstr (char *dst, const char *src, int n)
static int code2sys (char code)
static int sys2isbidx (int sys)
static void chop_isb (char *str)
static int addisbdata (nav_t *nav, const isb_t *data)
static int readisbf (const char *file, nav_t *nav)
int readisb (const char *file, nav_t *nav)
 Read ISB correction table from file.
void setisb (const nav_t *nav, const char *rectype0, const char *rectype1, sta_t *sta0, sta_t *sta1)
 Set ISB corrections for rover and reference stations.
void chk_isb (int sysno, const prcopt_t *opt, const sta_t *sta, double y[5][2])
 Get ISB correction values for a satellite system.
static void trim_str (char *str)
int readL2C (const char *file, nav_t *nav)
 Read L2C 1/4 cycle phase shift table from file.
int isL2C (int code)
 Check if observation code is L2C.

Detailed Description

ISB (inter-system bias) and L2C phase shift corrections.

References: [1] claslib (https://github.com/mf-arai/claslib) — upstream isb.c

Notes:

  • Ported from upstream claslib isb.c with minimal changes.
  • ISB corrects inter-system receiver biases between GPS/GLO/GAL/QZS.
  • L2C corrects 1/4 cycle phase shift on certain GPS L2C satellites.

Definition in file mrtk_clas_isb.c.

Macro Definition Documentation

◆ NINCISB

#define NINCISB   256 /* ISB data realloc increment */

Definition at line 41 of file mrtk_clas_isb.c.

Referenced by addisbdata().

Function Documentation

◆ addisbdata()

int addisbdata ( nav_t * nav,
const isb_t * data )
static

Definition at line 130 of file mrtk_clas_isb.c.

References free, nav_s::isb, nav_s::ni, nav_s::nimax, NINCISB, and trace().

Referenced by readisbf().

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

◆ chk_isb()

void chk_isb ( int sysno,
const prcopt_t * opt,
const sta_t * sta,
double y[5][2] )
extern

Get ISB correction values for a satellite system.

Parameters
[in]sysnoSatellite system code (SYS_GPS, etc.)
[in]optProcessing options
[in]staStation data with ISB values
[out]yISB corrections [NFREQ][2] (0:phase, 1:code) (m)

Definition at line 451 of file mrtk_clas_isb.c.

References prcopt_t::isb, sta_t::isb, ISBOPT_TABLE, and sys2isbidx().

Referenced by clas_osr_zdres().

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

◆ chop_isb()

void chop_isb ( char * str)
static

Definition at line 119 of file mrtk_clas_isb.c.

Referenced by readisbf().

Here is the caller graph for this function:

◆ code2sys()

int code2sys ( char code)
static

Definition at line 71 of file mrtk_clas_isb.c.

References SYS_CMP, SYS_GAL, SYS_GLO, SYS_GPS, SYS_NONE, and SYS_QZS.

Referenced by readisbf().

Here is the caller graph for this function:

◆ isL2C()

int isL2C ( int code)
extern

Check if observation code is L2C.

Parameters
[in]codeObservation code (CODE_???)
Returns
1 if L2C, 0 otherwise

Definition at line 546 of file mrtk_clas_isb.c.

References CODE_L2L, CODE_L2S, and CODE_L2X.

Referenced by clas_osr_zdres(), and zdres().

Here is the caller graph for this function:

◆ readisb()

int readisb ( const char * file,
nav_t * nav )
extern

Read ISB correction table from file.

Parameters
[in]fileISB table file path (wild-card * expanded)
[in,out]navNavigation data (isb array populated)
Returns
Status (1:ok, 0:error)

Definition at line 308 of file mrtk_clas_isb.c.

References expath(), free, malloc, MAXEXFILE, nav_s::ni, nav_s::nimax, readisbf(), and trace().

Referenced by execses().

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

◆ readisbf()

int readisbf ( const char * file,
nav_t * nav )
static

Definition at line 153 of file mrtk_clas_isb.c.

References addisbdata(), chop_isb(), CLIGHT, code2sys(), isb_t::gsb, nav_s::isb, nav_s::ni, setstr(), isb_t::sta_name, isb_t::sta_name_base, str2num(), sys2isbidx(), and trace().

Referenced by readisb().

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

◆ readL2C()

int readL2C ( const char * file,
nav_t * nav )
extern

Read L2C 1/4 cycle phase shift table from file.

Parameters
[in]fileL2C phase shift table file path
[in,out]navNavigation data (sfts populated)
Returns
Status (0:ok, -1:error)

Definition at line 489 of file mrtk_clas_isb.c.

References sft_t::bias, MAXRECTYP, sft_t::n, PHASE_CYCLE, sft_t::rectyp, nav_s::sfts, str2num(), trace(), and trim_str().

Referenced by execses().

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

◆ setisb()

void setisb ( const nav_t * nav,
const char * rectype0,
const char * rectype1,
sta_t * sta0,
sta_t * sta1 )
extern

Set ISB corrections for rover and reference stations.

Parameters
[in]navNavigation data (contains isb table)
[in]rectype0Rover receiver type
[in]rectype1Reference receiver type
[out]sta0Rover station (isb field populated)
[out]sta1Reference station (isb field populated, can be NULL)

Definition at line 340 of file mrtk_clas_isb.c.

References isb_t::gsb, nav_s::isb, sta_t::isb, nav_s::ni, NSYS, isb_t::sta_name, isb_t::sta_name_base, and trace().

Referenced by execses().

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

◆ setstr()

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

Definition at line 49 of file mrtk_clas_isb.c.

Referenced by readisbf().

Here is the caller graph for this function:

◆ sys2isbidx()

int sys2isbidx ( int sys)
static

Definition at line 94 of file mrtk_clas_isb.c.

References NSYSCMP, NSYSGAL, NSYSGLO, NSYSGPS, NSYSQZS, SYS_CMP, SYS_GAL, SYS_GLO, SYS_GPS, and SYS_QZS.

Referenced by chk_isb(), and readisbf().

Here is the caller graph for this function:

◆ trim_str()

void trim_str ( char * str)
static

Definition at line 476 of file mrtk_clas_isb.c.

Referenced by readL2C().

Here is the caller graph for this function: