MRTKLIB 0.7.14
Modernized GNSS Positioning Library
Loading...
Searching...
No Matches
mrtk_fcb.c File Reference
#include "mrtklib/mrtk_fcb.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "mrtklib/mrtk_bias_sinex.h"
#include "mrtklib/mrtk_sys.h"
#include "mrtklib/mrtk_trace.h"
Include dependency graph for mrtk_fcb.c:

Go to the source code of this file.

Macros

#define SYS_GPS   0x01
#define SYS_GAL   0x08
#define SYS_QZS   0x10
#define SYS_CMP   0x20

Functions

int satid2no (const char *id)
int satsys (int sat, int *prn)
double code2freq (int sys, uint8_t code, int fcn)
static biass_t * getfcbs (void)
static int readfcbf (const char *file)
int readfcb (const char *file)
 Read FCB (Fractional Cycle Bias) file.
int udfcb_sat (osb_t *osb, gtime_t gt, int mode)
 Update satellite FCB structure with current biases.

Variables

static const double CLIGHT = 299792458.0
static biass_t fcbs = {0}
static const uint8_t fcb_sig_gps [3][16]
static const uint8_t fcb_sig_gal [3][16]
static const uint8_t fcb_sig_qzs [3][16]
static const uint8_t fcb_sig_cmp [3][16]

Macro Definition Documentation

◆ SYS_CMP

#define SYS_CMP   0x20

Definition at line 32 of file mrtk_fcb.c.

◆ SYS_GAL

#define SYS_GAL   0x08

Definition at line 30 of file mrtk_fcb.c.

◆ SYS_GPS

#define SYS_GPS   0x01

Definition at line 29 of file mrtk_fcb.c.

◆ SYS_QZS

#define SYS_QZS   0x10

Definition at line 31 of file mrtk_fcb.c.

Function Documentation

◆ code2freq()

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

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(), and save_msm_obs().

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

◆ getfcbs()

biass_t * getfcbs ( void )
static

Definition at line 58 of file mrtk_fcb.c.

References fcbs.

Referenced by readfcbf(), and udfcb_sat().

Here is the caller graph for this function:

◆ readfcb()

int readfcb ( const char * file)

Read FCB (Fractional Cycle Bias) file.

Parameters
[in]fileFCB file path (wild-card * expanded)
Returns
Status (1: success, 0: failure)

Definition at line 136 of file mrtk_fcb.c.

References expath(), free, malloc, MAXEXFILE, readfcbf(), and trace().

Referenced by udbiass().

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

◆ readfcbf()

int readfcbf ( const char * file)
static

Definition at line 61 of file mrtk_fcb.c.

References addbia(), CLIGHT, bia_t::code, code2freq(), epoch2time(), fcb_sig_cmp, fcb_sig_gal, fcb_sig_gps, fcb_sig_qzs, getfcbs(), biasat_t::npb, biasat_t::npbmax, biasat_t::pb, biass_t::sat, satid2no(), satsys(), SYS_CMP, SYS_GAL, SYS_GPS, SYS_QZS, bia_t::t0, bia_t::t1, trace(), bia_t::type, bia_t::val, and bia_t::valstd.

Referenced by readfcb().

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

◆ satid2no()

int satid2no ( const char * id)
extern

Definition at line 753 of file mrtk_nav.c.

Referenced by readfcbf().

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.

Referenced by readfcbf().

Here is the caller graph for this function:

◆ udfcb_sat()

int udfcb_sat ( osb_t * osb,
gtime_t gt,
int mode )

Update satellite FCB structure with current biases.

Parameters
[out]osbFCB structure to update
[in]gtCurrent time
[in]modeMode (0: current, 1: all)
Returns
Number of updated biases

Definition at line 169 of file mrtk_fcb.c.

References bia_t::code, CODE_NONE, getfcbs(), osb_t::gt, MAXCODE, MAXSAT, biasat_t::npb, biasat_t::pb, biass_t::sat, osb_t::spb, bia_t::t0, bia_t::t1, timediff(), bia_t::val, and osb_t::vspb.

Referenced by udbiass().

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

Variable Documentation

◆ CLIGHT

const double CLIGHT = 299792458.0
static

Definition at line 27 of file mrtk_fcb.c.

◆ fcb_sig_cmp

const uint8_t fcb_sig_cmp[3][16]
static
Initial value:
= {
{CODE_L2I, CODE_L2Q, CODE_L2X, CODE_L1D, CODE_L1P, CODE_L1X, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{CODE_L5D, CODE_L5P, CODE_L5X, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{CODE_L6I, CODE_L6Q, CODE_L6X, 0, 0, 0, 0, 0}}
#define CODE_L2Q
#define CODE_L2X
#define CODE_L5X
#define CODE_L2I
#define CODE_L6I
#define CODE_L6X
#define CODE_L5P
#define CODE_L5D
#define CODE_L1D
#define CODE_L1P
#define CODE_L6Q
#define CODE_L1X

Definition at line 52 of file mrtk_fcb.c.

Referenced by readfcbf().

◆ fcb_sig_gal

const uint8_t fcb_sig_gal[3][16]
static
Initial value:
= {{CODE_L1B, CODE_L1C, CODE_L1X, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{CODE_L5I, CODE_L5Q, CODE_L5X, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}
#define CODE_L5Q
#define CODE_L5I
#define CODE_L1C
#define CODE_L1B

Definition at line 46 of file mrtk_fcb.c.

Referenced by readfcbf().

◆ fcb_sig_gps

const uint8_t fcb_sig_gps[3][16]
static
Initial value:
= {
{CODE_L1C, CODE_L1P, CODE_L1W, CODE_L1Y, CODE_L1M, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{CODE_L5I, CODE_L5Q, CODE_L5X, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}
#define CODE_L2P
#define CODE_L2C
#define CODE_L1Y
#define CODE_L2S
#define CODE_L1W
#define CODE_L1M
#define CODE_L2W
#define CODE_L2L
#define CODE_L2D
#define CODE_L2Y
#define CODE_L2M

Definition at line 42 of file mrtk_fcb.c.

Referenced by readfcbf().

◆ fcb_sig_qzs

const uint8_t fcb_sig_qzs[3][16]
static
Initial value:
= {{CODE_L1C, CODE_L1S, CODE_L1L, CODE_L1X, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{CODE_L2S, CODE_L2L, CODE_L2X, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{CODE_L5I, CODE_L5Q, CODE_L5X, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}
#define CODE_L1S
#define CODE_L1L

Definition at line 49 of file mrtk_fcb.c.

Referenced by readfcbf().

◆ fcbs

biass_t fcbs = {0}
static

Definition at line 39 of file mrtk_fcb.c.

Referenced by getfcbs().