27static const double CLIGHT = 299792458.0;
36extern int satsys(
int sat,
int* prn);
37extern double code2freq(
int sys, uint8_t code,
int fcn);
43 {
CODE_L1C,
CODE_L1P,
CODE_L1W,
CODE_L1Y,
CODE_L1M, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
44 {
CODE_L2C,
CODE_L2D,
CODE_L2S,
CODE_L2L,
CODE_L2X,
CODE_L2P,
CODE_L2W,
CODE_L2Y,
CODE_L2M, 0, 0, 0, 0, 0, 0, 0},
45 {
CODE_L5I,
CODE_L5Q,
CODE_L5X, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
46static const uint8_t
fcb_sig_gal[3][16] = {{
CODE_L1B,
CODE_L1C,
CODE_L1X, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
47 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
48 {
CODE_L5I,
CODE_L5Q,
CODE_L5X, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
49static const uint8_t
fcb_sig_qzs[3][16] = {{
CODE_L1C,
CODE_L1S,
CODE_L1L,
CODE_L1X, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
50 {
CODE_L2S,
CODE_L2L,
CODE_L2X, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
51 {
CODE_L5I,
CODE_L5Q,
CODE_L5X, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
53 {
CODE_L2I,
CODE_L2Q,
CODE_L2X,
CODE_L1D,
CODE_L1P,
CODE_L1X, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
54 {
CODE_L5D,
CODE_L5P,
CODE_L5X, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
63 double ep1[6], ep2[6], bias[3] = {0}, std[3] = {0}, cyc2m;
64 char buff[1024], str[32], *p;
68 const uint8_t (*sigs)[16];
73 trace(NULL, 3,
"readfcbf: file=%s\n", file);
75 if (!(fp = fopen(file,
"r"))) {
76 trace(NULL, 2,
"fcb parameters file open error: %s\n", file);
79 while (fgets(buff,
sizeof(buff), fp)) {
80 memset(&bia, 0x00,
sizeof(
bia_t));
82 if ((p = strchr(buff,
'#'))) {
86 "%lf/%lf/%lf %lf:%lf:%lf %lf/%lf/%lf %lf:%lf:%lf %s"
87 "%lf %lf %lf %lf %lf %lf",
88 ep1, ep1 + 1, ep1 + 2, ep1 + 3, ep1 + 4, ep1 + 5, ep2, ep2 + 1, ep2 + 2, ep2 + 3, ep2 + 4, ep2 + 5,
89 str, bias, std, bias + 1, std + 1, bias + 2, std + 2) < 17) {
115 for (i = 0; i < 3; i++) {
116 for (j = 0; j < 16; j++) {
117 if (sigs[i][j] > 0) {
118 bia.
code[0] = sigs[i][j];
120 bia.
val = bias[i] * cyc2m;
121 bia.
valstd = std[i] * cyc2m;
140 trace(NULL, 3,
"readfcb : file=%s\n", file);
143 if (!(efiles[i] = (
char*)
malloc(1024))) {
144 for (i--; i >= 0; i--) {
152 for (i = 0; i < n; i++) {
176 for (j = 0; j <
MAXCODE; j++) {
177 for (i = 0; i <
MAXSAT; i++) {
181 for (i = 0; i <
MAXSAT; i++) {
182 for (j = 0; j < fcbsp->
sat.
npb[i]; j++) {
183 bias = &fcbsp->
sat.
pb[i][j];
188 osb->
vspb[i][bias->
code[0] - 1] = 1;
void addbia(const bia_t *bia, bia_t **ary, int *n, int *nmax)
Add a bias entry to the bias array.
MRTKLIB Bias SINEX Module — BIAS-SINEX data types and I/O functions.
int satsys(int sat, int *prn)
int udfcb_sat(osb_t *osb, gtime_t gt, int mode)
Update satellite FCB structure with current biases.
static const uint8_t fcb_sig_qzs[3][16]
static const uint8_t fcb_sig_gal[3][16]
static biass_t * getfcbs(void)
double code2freq(int sys, uint8_t code, int fcn)
int readfcb(const char *file)
Read FCB (Fractional Cycle Bias) file.
static const uint8_t fcb_sig_cmp[3][16]
int satid2no(const char *id)
static int readfcbf(const char *file)
static const uint8_t fcb_sig_gps[3][16]
MRTKLIB FCB Module — Fractional Cycle Bias data types and functions.
int expath(const char *path, char *paths[], int nmax)
Expand file path with wild-card (*) in file.
MRTKLIB System Module — OS/filesystem utility functions.
gtime_t epoch2time(const double *ep)
Convert calendar day/time to gtime_t struct.
double timediff(gtime_t t1, gtime_t t2)
Compute time difference (t1 - t2).
void trace(mrtk_ctx_t *ctx, int level, const char *format,...)
Output trace message.
MRTKLIB Trace Module — debug trace and logging functions.
GNSS time representation.
int vspb[MAXSAT][MAXCODE]
double spb[MAXSAT][MAXCODE]