|
MRTKLIB 0.7.14
Modernized GNSS Positioning Library
|
#include "mrtklib/mrtk_ppp_ar.h"#include <math.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include "mrtklib/mrtk_const.h"#include "mrtklib/mrtk_context.h"#include "mrtklib/mrtk_lambda.h"#include "mrtklib/mrtk_madoca.h"#include "mrtklib/mrtk_mat.h"#include "mrtklib/mrtk_obs.h"#include "mrtklib/mrtk_sys.h"#include "mrtklib/mrtk_trace.h"Go to the source code of this file.
Macros | |
| #define | MIN_AMB_RES 4 /* min number of ambiguities for ILS-AR */ |
| #define | CONST_AMB 0.01 /* constraint to fixed ambiguity */ |
| #define | CONST_AMB_BDS 0.05 /* constraint to fixed ambiguity for BDS2,BDS3 */ |
| #define | CONST_AMB_BDS_B2a 0.10 /* constraint to fixed ambiguity for BDS3 B2a */ |
| #define | CONST_AMB_GAL_E6 0.10 /* constraint to fixed ambiguity for GAL E6 */ |
| #define | CONST_AMB_EWL 0.10 /* constraint to fixed ewl ambiguity for GPS,BDS */ |
| #define | MAX_STD_FIX 0.15 /* max std-dev (3d-pos) to fix solution */ |
| #define | MIN_MATCH_RATE 0.10 /* min match rate between the first and second candidates to fix solution */ |
| #define | REL_MATCH_RATE 0.90 /* match rate between the first and second candidates to relax threshold */ |
| #define | MAX_FRAC_WL_FIX 0.20 /* max fraction to fix wide-lane ambiguity (cycle) */ |
| #define | MAX_STD_WL_FIX 1.00 /* max std-dev to fix wide-lane ambiguity (cycle) */ |
| #define | STEP_EWL 3 |
| #define | STEP_WL 2 |
| #define | STEP_NL 1 |
| #define | MIN(x, y) |
| #define | MAX(x, y) |
| #define | SQR(x) |
| #define | ROUND(x) |
| #define | SWAP_I(x, y) |
| #define | SWAP_D(x, y) |
| #define | NF(opt) |
| #define | NP(opt) |
| #define | NC(opt) |
| #define | NI(opt) |
| #define | N3(opt) |
| #define | N4(opt) |
| #define | NR(opt) |
| #define | IT(opt) |
| #define | IB(s, f, opt) |
Functions | |
| int | satsys (int sat, int *prn) |
| int | satsys_bd2 (int sat, int *prn) |
| void | satno2id (int sat, char *id) |
| int | satid2no (const char *id) |
| char * | time_str (gtime_t t, int n) |
| void | time2str (gtime_t t, char *s, int n) |
| void | time2epoch (gtime_t t, double *ep) |
| gtime_t | epoch2time (const double *ep) |
| gtime_t | timeadd (gtime_t t, double sec) |
| double | timediff (gtime_t t1, gtime_t t2) |
| double | norm (const double *a, int n) |
| void | matcpy (double *A, const double *B, int n, int m) |
| void | matmul (const char *tr, int n, int k, int m, double alpha, const double *A, const double *B, double beta, double *C) |
| double * | mat (int n, int m) |
| double * | zeros (int n, int m) |
| int | filter (double *x, double *P, const double *H, const double *v, const double *R, int n, int m) |
| int | lambda (int n, int m, const double *a, const double *Q, double *F, double *s) |
| unsigned int | tickget (void) |
| int | freq_idx2freq_num (int sys, int freq_idx) |
| double | freq_num2freq (int sys, int freq_num, int fcn) |
| static int | NT (const prcopt_t *opt) |
| static void | get_wavelength (int sat, double *lam) |
| static int | is_bds3_igso (int sat) |
| static int | exc_sat_sd (rtk_t *rtk, const obsd_t *obs, int exc, double el, int nf, int sys) |
| static int | gen_sat_sd (rtk_t *rtk, const obsd_t *obs, int n, const int *exc, const double *azel, int nf, int *sat1, int *sat2, double *el1, double *el2) |
| static void | write_trace_amb (rtk_t *rtk, const double *a, const double *Q, int na, const int *sat1s, const int *sat2s, const int *frqs, const char label[5][10], int step) |
| static void | write_trace_sd_amb (rtk_t *rtk, const double *x, const double *P, const int *sat1, const int *sat2, int ns, int nf, int *sat1s, int *sat2s, int *frqs, double *a, int post, int step) |
| static int | search_amb_ewl (rtk_t *rtk, const double *x, const double *P, const int *sat1, const int *sat2, int ns, int nf, int *sat1s, int *sat2s, int *frqs, double *a, double *N, double *D) |
| static int | search_amb_wl (rtk_t *rtk, const double *x, const double *P, int *sat1, int *sat2, int ns, int nf, int *sat1s, int *sat2s, int *frqs, double *a, double *N, double *D) |
| static int | gen_sd_matrix_n1 (rtk_t *rtk, const double *x, const double *P, const int *sat1, const int *sat2, int ns, int nf, int *sat1s, int *sat2s, int *frqs, double *a, double *Q, double *D) |
| static int | search_amb_lambda (rtk_t *rtk, const obsd_t *obs, int n, const double *azel, const int *sat1s, const int *sat2s, const int *frq, const double *x, const double *P, const double *D, const double *Q, const double *a, double *N, int na, int *exc_sat_flag) |
| static int | update_states (double *x, double *P, const double *D, int nx, const double *N, const double *a, int na, const int *sats, const int *frqs, int step) |
| static int | exc_sat_par (rtk_t *rtk, int *sat1, int *sat2, const double *el1, const double *el2, int ns, const int *exc_sat_flag) |
| static int | ppp_amb_ILS (rtk_t *rtk, const obsd_t *obs, int n, int *exc, const nav_t *nav, const double *azel, double *x, double *P) |
| int | ppp_ar (mrtk_ctx_t *ctx, rtk_t *rtk, const obsd_t *obs, int n, int *exc, const nav_t *nav, const double *azel, double *x, double *P) |
| Ambiguity resolution in PPP. | |
| #define CONST_AMB 0.01 /* constraint to fixed ambiguity */ |
Definition at line 77 of file mrtk_ppp_ar.c.
Referenced by update_states().
| #define CONST_AMB_BDS 0.05 /* constraint to fixed ambiguity for BDS2,BDS3 */ |
Definition at line 78 of file mrtk_ppp_ar.c.
Referenced by update_states().
| #define CONST_AMB_BDS_B2a 0.10 /* constraint to fixed ambiguity for BDS3 B2a */ |
Definition at line 79 of file mrtk_ppp_ar.c.
Referenced by update_states().
| #define CONST_AMB_EWL 0.10 /* constraint to fixed ewl ambiguity for GPS,BDS */ |
Definition at line 81 of file mrtk_ppp_ar.c.
Referenced by update_states().
| #define CONST_AMB_GAL_E6 0.10 /* constraint to fixed ambiguity for GAL E6 */ |
Definition at line 80 of file mrtk_ppp_ar.c.
Referenced by update_states().
| #define IB | ( | s, | |
| f, | |||
| opt ) |
Definition at line 123 of file mrtk_ppp_ar.c.
Referenced by gen_sd_matrix_n1(), search_amb_ewl(), search_amb_wl(), and write_trace_sd_amb().
| #define IT | ( | opt | ) |
Definition at line 122 of file mrtk_ppp_ar.c.
| #define MAX | ( | x, | |
| y ) |
Definition at line 93 of file mrtk_ppp_ar.c.
Referenced by exc_sat_sd(), and gen_sat_sd().
| #define MAX_FRAC_WL_FIX 0.20 /* max fraction to fix wide-lane ambiguity (cycle) */ |
Definition at line 85 of file mrtk_ppp_ar.c.
Referenced by search_amb_ewl(), and search_amb_wl().
| #define MAX_STD_FIX 0.15 /* max std-dev (3d-pos) to fix solution */ |
Definition at line 82 of file mrtk_ppp_ar.c.
Referenced by ppp_amb_ILS().
| #define MAX_STD_WL_FIX 1.00 /* max std-dev to fix wide-lane ambiguity (cycle) */ |
Definition at line 86 of file mrtk_ppp_ar.c.
Referenced by search_amb_ewl(), and search_amb_wl().
| #define MIN | ( | x, | |
| y ) |
Definition at line 92 of file mrtk_ppp_ar.c.
Referenced by search_amb_lambda().
| #define MIN_AMB_RES 4 /* min number of ambiguities for ILS-AR */ |
Definition at line 76 of file mrtk_ppp_ar.c.
Referenced by ppp_amb_ILS(), and search_amb_lambda().
| #define MIN_MATCH_RATE 0.10 /* min match rate between the first and second candidates to fix solution */ |
Definition at line 83 of file mrtk_ppp_ar.c.
Referenced by search_amb_lambda().
| #define N3 | ( | opt | ) |
Definition at line 119 of file mrtk_ppp_ar.c.
| #define N4 | ( | opt | ) |
Definition at line 120 of file mrtk_ppp_ar.c.
| #define NC | ( | opt | ) |
Definition at line 112 of file mrtk_ppp_ar.c.
| #define NF | ( | opt | ) |
Definition at line 110 of file mrtk_ppp_ar.c.
| #define NI | ( | opt | ) |
Definition at line 118 of file mrtk_ppp_ar.c.
| #define NP | ( | opt | ) |
Definition at line 111 of file mrtk_ppp_ar.c.
| #define NR | ( | opt | ) |
Definition at line 121 of file mrtk_ppp_ar.c.
| #define REL_MATCH_RATE 0.90 /* match rate between the first and second candidates to relax threshold */ |
Definition at line 84 of file mrtk_ppp_ar.c.
Referenced by search_amb_lambda().
| #define ROUND | ( | x | ) |
Definition at line 95 of file mrtk_ppp_ar.c.
Referenced by search_amb_ewl(), search_amb_wl(), and write_trace_amb().
| #define SQR | ( | x | ) |
Definition at line 94 of file mrtk_ppp_ar.c.
Referenced by search_amb_ewl(), search_amb_wl(), and update_states().
| #define STEP_EWL 3 |
Definition at line 88 of file mrtk_ppp_ar.c.
Referenced by ppp_amb_ILS(), and update_states().
| #define STEP_NL 1 |
Definition at line 90 of file mrtk_ppp_ar.c.
Referenced by ppp_amb_ILS().
| #define STEP_WL 2 |
Definition at line 89 of file mrtk_ppp_ar.c.
Referenced by ppp_amb_ILS().
| #define SWAP_D | ( | x, | |
| y ) |
Definition at line 102 of file mrtk_ppp_ar.c.
Referenced by gen_sat_sd().
| #define SWAP_I | ( | x, | |
| y ) |
Definition at line 96 of file mrtk_ppp_ar.c.
Referenced by gen_sat_sd().
|
extern |
Definition at line 113 of file mrtk_time.c.
Referenced by write_trace_amb().
|
static |
Definition at line 804 of file mrtk_ppp_ar.c.
References is_bds3_igso(), PI, R2D, satno2id(), satsys_bd2(), SYS_BD2, SYS_CMP, SYS_QZS, and trace().
Referenced by ppp_amb_ILS().
Definition at line 150 of file mrtk_ppp_ar.c.
References prcopt_t::arsys, prcopt_t::elmaskar, prcopt_t::elmin, MAX, rtk_t::opt, R2D, obsd_t::sat, satsys(), satsys_bd2(), rtk_t::ssat, trace(), and ssat_t::vsat.
Referenced by gen_sat_sd().
|
extern |
Definition at line 524 of file mrtk_mat.c.
Referenced by update_states().
|
extern |
Definition at line 649 of file mrtk_nav.c.
Referenced by get_wavelength(), and update_states().
|
extern |
Definition at line 680 of file mrtk_nav.c.
Referenced by get_wavelength().
|
static |
Definition at line 177 of file mrtk_ppp_ar.c.
References prcopt_t::arsys, prcopt_t::elmaskar, prcopt_t::elmin, exc_sat_sd(), is_bds3_igso(), obsd_t::L, MAX, MAXOBS, rtk_t::opt, R2D, obsd_t::sat, satno2id(), SWAP_D, SWAP_I, SYS_BD2, SYS_CMP, SYS_GAL, SYS_GPS, SYS_QZS, and trace().
Referenced by ppp_amb_ILS().
|
static |
Definition at line 580 of file mrtk_ppp_ar.c.
References get_wavelength(), IB, MAXOBS, rtk_t::nx, rtk_t::opt, prcopt_t::pppopt, satno2id(), tickget(), trace(), and write_trace_amb().
Referenced by ppp_amb_ILS().
|
static |
Definition at line 126 of file mrtk_ppp_ar.c.
References CLIGHT, freq_idx2freq_num(), freq_num2freq(), and satsys_bd2().
Referenced by gen_sd_matrix_n1(), search_amb_ewl(), search_amb_wl(), and write_trace_sd_amb().
|
static |
Definition at line 141 of file mrtk_ppp_ar.c.
References is_bds3igso(), satsys_bd2(), and SYS_CMP.
Referenced by exc_sat_par(), and gen_sat_sd().
|
extern |
Definition at line 225 of file mrtk_lambda.c.
Referenced by search_amb_lambda().
|
extern |
Definition at line 76 of file mrtk_mat.c.
Referenced by ppp_amb_ILS(), and write_trace_sd_amb().
|
extern |
Definition at line 205 of file mrtk_mat.c.
Referenced by ppp_amb_ILS().
|
extern |
Definition at line 310 of file mrtk_mat.c.
Referenced by write_trace_sd_amb().
|
extern |
Definition at line 165 of file mrtk_mat.c.
Referenced by ppp_amb_ILS().
|
inlinestatic |
Definition at line 113 of file mrtk_ppp_ar.c.
References prcopt_t::tropopt, and TROPOPT_EST.
|
static |
Definition at line 854 of file mrtk_ppp_ar.c.
References sol_t::age, prcopt_t::armaxiter, exc_sat_par(), ssat_t::fix, free, gen_sat_sd(), gen_sd_matrix_n1(), mat(), matcpy(), MAX_STD_FIX, MAXOBS, MAXSAT, MIN_AMB_RES, prcopt_t::nf, norm(), rtk_t::nx, rtk_t::opt, prcopt_t::pppopt, search_amb_ewl(), search_amb_lambda(), search_amb_wl(), rtk_t::sol, rtk_t::ssat, STEP_EWL, STEP_NL, STEP_WL, prcopt_t::thresar, tickget(), sol_t::time, time2str(), trace(), update_states(), write_trace_sd_amb(), and zeros().
Referenced by ppp_ar().
|
extern |
Ambiguity resolution in PPP.
| [in] | ctx | Runtime context (NULL = use global) |
| [in,out] | rtk | RTK control/result struct |
| [in] | obs | Observation data |
| [in] | n | Number of observation data |
| [in,out] | exc | Satellite exclusion flags |
| [in] | nav | Navigation data |
| [in] | azel | Azimuth/elevation angles (rad) |
| [in,out] | x | Float states |
| [in,out] | P | Float covariance |
Definition at line 1003 of file mrtk_ppp_ar.c.
References ARMODE_CONT, prcopt_t::ionoopt, IONOOPT_EST, rtk_t::opt, and ppp_amb_ILS().
Referenced by pppos().
|
extern |
Definition at line 753 of file mrtk_nav.c.
|
extern |
Definition at line 817 of file mrtk_nav.c.
Referenced by exc_sat_par(), gen_sat_sd(), gen_sd_matrix_n1(), search_amb_ewl(), search_amb_lambda(), search_amb_wl(), and write_trace_amb().
|
extern |
Definition at line 117 of file mrtk_nav.c.
Referenced by exc_sat_sd().
|
extern |
Definition at line 159 of file mrtk_nav.c.
Referenced by exc_sat_par(), exc_sat_sd(), get_wavelength(), is_bds3_igso(), and update_states().
|
static |
Definition at line 413 of file mrtk_ppp_ar.c.
References ssat_t::fix, get_wavelength(), IB, MAX_FRAC_WL_FIX, MAX_STD_WL_FIX, prcopt_t::nf, rtk_t::nx, rtk_t::opt, prcopt_t::pppopt, ROUND, satno2id(), SQR, rtk_t::ssat, and trace().
Referenced by ppp_amb_ILS().
|
static |
Definition at line 647 of file mrtk_ppp_ar.c.
References ssat_t::fix, lambda(), MAXSAT, MIN, MIN_AMB_RES, MIN_MATCH_RATE, rtk_t::opt, prcopt_t::pppopt, sol_t::ratio, REL_MATCH_RATE, satno2id(), rtk_t::sol, rtk_t::ssat, prcopt_t::thresar, tickget(), sol_t::time, time2str(), and trace().
Referenced by ppp_amb_ILS().
|
static |
Definition at line 499 of file mrtk_ppp_ar.c.
References ssat_t::fix, get_wavelength(), IB, MAX_FRAC_WL_FIX, MAX_STD_WL_FIX, rtk_t::nx, rtk_t::opt, prcopt_t::pppopt, ROUND, satno2id(), SQR, rtk_t::ssat, and trace().
Referenced by ppp_amb_ILS().
|
extern |
Definition at line 566 of file mrtk_time.c.
Referenced by gen_sd_matrix_n1(), ppp_amb_ILS(), search_amb_lambda(), and update_states().
|
extern |
Definition at line 136 of file mrtk_time.c.
Referenced by write_trace_amb().
|
extern |
Definition at line 507 of file mrtk_time.c.
Referenced by ppp_amb_ILS(), and search_amb_lambda().
|
extern |
Definition at line 530 of file mrtk_time.c.
Referenced by write_trace_amb().
Definition at line 265 of file mrtk_time.c.
Referenced by write_trace_amb().
Definition at line 279 of file mrtk_time.c.
Referenced by write_trace_amb().
|
static |
Definition at line 738 of file mrtk_ppp_ar.c.
References CONST_AMB, CONST_AMB_BDS, CONST_AMB_BDS_B2a, CONST_AMB_EWL, CONST_AMB_GAL_E6, filter(), free, freq_idx2freq_num(), MAXOBS, satsys_bd2(), SQR, STEP_EWL, SYS_BD2, SYS_CMP, SYS_GAL, SYS_GPS, SYS_QZS, tickget(), trace(), and zeros().
Referenced by ppp_amb_ILS().
|
static |
Definition at line 266 of file mrtk_ppp_ar.c.
References epoch2time(), ROUND, satno2id(), rtk_t::sol, sol_t::time, time2epoch(), time_str(), timeadd(), timediff(), and trace().
Referenced by gen_sd_matrix_n1(), and write_trace_sd_amb().
|
static |
Definition at line 287 of file mrtk_ppp_ar.c.
References free, get_wavelength(), IB, mat(), matmul(), rtk_t::nx, rtk_t::opt, prcopt_t::pppopt, trace(), write_trace_amb(), and zeros().
Referenced by ppp_amb_ILS().
|
extern |
Definition at line 108 of file mrtk_mat.c.
Referenced by ppp_amb_ILS(), update_states(), and write_trace_sd_amb().