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

VRS-RTK positioning engine. More...

#include "mrtklib/mrtk_vrs.h"
#include <math.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include "mrtklib/mrtk_antenna.h"
#include "mrtklib/mrtk_atmos.h"
#include "mrtklib/mrtk_clas.h"
#include "mrtklib/mrtk_const.h"
#include "mrtklib/mrtk_context.h"
#include "mrtklib/mrtk_coords.h"
#include "mrtklib/mrtk_eph.h"
#include "mrtklib/mrtk_foundation.h"
#include "mrtklib/mrtk_lambda.h"
#include "mrtklib/mrtk_mat.h"
#include "mrtklib/mrtk_nav.h"
#include "mrtklib/mrtk_obs.h"
#include "mrtklib/mrtk_opt.h"
#include "mrtklib/mrtk_rtkpos.h"
#include "mrtklib/mrtk_sol.h"
#include "mrtklib/mrtk_tides.h"
#include "mrtklib/mrtk_time.h"
#include "mrtklib/mrtk_trace.h"
Include dependency graph for mrtk_vrs.c:

Go to the source code of this file.

Macros

#define MAXREF   2 /* max iteration of searching reference sat */
#define SQR(x)
#define MAXITER   20 /* max iteration of PAR */
#define SQRT(x)
#define MIN(x, y)
#define ROUND(x)
#define VAR_POS   SQR(30.0) /* initial variance of receiver pos ((m)^2) */
#define VAR_VEL   SQR(1.0) /* initial variance of receiver acc ((m/s)^2) */
#define VAR_ACC   SQR(1.0) /* initial variance of receiver acc ((m/ss)^2) */
#define VAR_HWBIAS   SQR(1.0) /* initial variance of h/w bias ((m/MHz)^2) */
#define VAR_GRA   SQR(0.001) /* initial variance of gradient (m^2) */
#define INIT_ZWD   0.15 /* initial zwd (m) */
#define PRN_HWBIAS   1E-6 /* process noise of h/w bias (m/MHz/sqrt(s)) */
#define GAP_RESION   120 /* gap to reset ionosphere parameters (epochs) */
#define MAXACC   30.0 /* max accel for doppler slip detection (m/s^2) */
#define VAR_HOLDAMB   0.001 /* constraint to hold ambiguity (cycle^2) */
#define TTOL_MOVEB   (1.0 + 2 * DTTOL)
#define POSL1   1 /* L1 single freq positioning */
#define POSL1L2   2 /* L1+L2 dual freq positioning */
#define POSL1L5   3 /* L1+L5 dual freq positioning */
#define POSL1L2L5   4 /* L1+L2+L5 triple freq positioning */
#define POSL1L5_L2   5 /* L1+L5(or L2) dual freq positioning */
#define LAM_CARR_L1   (CLIGHT / FREQ1)
#define LAM_CARR_L2   (CLIGHT / FREQ2)
#define LAM_CARR_L5   (CLIGHT / FREQ5)
#define NF(opt)
#define NP(opt)
#define NI(opt)
#define NT(opt)
#define NL(opt)
#define NB(opt)
#define NR(opt)
#define NX(opt)
#define II(s, opt)
#define IT(r, opt)
#define IL(f, opt)
#define IB(s, f, opt)
#define ITT(opt)

Enumerations

enum  ddres_order { FST = 1 , SND , TRD }

Functions

static uint8_t obs_code_for_freq_vrs (int sat, int f)
static double sat_lambda (int sat, int f, const nav_t *nav)
static void clearsatcorr (void)
static void errmsg (rtk_t *rtk, const char *format,...)
static double varerr (int sat, int sys, double el, double bl, double dt, int f, const prcopt_t *opt)
static double baseline (const double *ru, const double *rb, double *dr)
static void initx (rtk_t *rtk, double xi, double var, int i)
static int selsat (const obsd_t *obs, double *azel, int nu, int *nr, const prcopt_t *opt, int *sat, int *iu, int *ir, int ch)
static int selfreqpair (const int sat, const prcopt_t *opt, const obsd_t *obs)
static void udpos (rtk_t *rtk, const obsd_t *obs, double tt)
static void udion (rtk_t *rtk, double tt, double bl, const obsd_t *obs, int ns)
static void udtrop (rtk_t *rtk, double tt, double bl)
static void udrcvbias (rtk_t *rtk, double tt)
static double gfmeasL1L2 (const obsd_t *obs, const nav_t *nav)
static double gfmeasL1L5 (const obsd_t *obs, const nav_t *nav)
static void detslp_ll (rtk_t *rtk, const obsd_t *obs, int n)
static void detslp_gf (rtk_t *rtk, const obsd_t *obs, int n, const nav_t *nav)
static void udbias_ppp (rtk_t *rtk, double tt, const obsd_t *obs, int n, const nav_t *nav)
static void udstate (rtk_t *rtk, const obsd_t *obs, int nu, const nav_t *nav)
static void zdres_sat (int base, double r, const obsd_t *obs, const nav_t *nav, const double *azel, const double *dant, const prcopt_t *opt, double *y)
static int zdres (rtk_t *rtk, int base, const obsd_t *obs, int n, const double *rs, const double *dts, const int *svh, const nav_t *nav, const double *rr, const prcopt_t *opt, int index, double *y, double *e, double *azel)
static int validobs (int *iu, int *ir, int jj, int f, int nf, double *y)
static void ddcov (const int *nb, int n, const double *Ri, const double *Rj, int nv, double *R)
static double prectrop (gtime_t time, const double *pos, int r, const double *azel, const prcopt_t *opt, const double *x, double *dtdx)
static double gloicbcorr (int sat1, int sat2, const prcopt_t *opt, double lam1, double lam2, int f)
static int test_sys (int sys, int m, int qzsmodear, int code)
static int check_same_fac (const obsd_t *obs, int ir[][MAXSAT])
static int get_iriu_index (int sati, int ns, const int *sat)
static int valid_zd_sig (rtk_t *rtk, const obsd_t *obs, const nav_t *nav, double *y, int nf, int f, int j, int m, int ch, int sati, int iu[][MAXSAT], int ir[][MAXSAT], int sat[][MAXSAT], int *ff, int *ns, int *satj, int *jj, int *sysi, int *sysj, double *lami, double *lamj)
static void set_init_pb (rtk_t *rtk, const nav_t *nav, const obsd_t *obs, int n, int f, int satj)
static int ddres (rtk_t *rtk, const nav_t *nav, double *dt, const double *x, const double *P, const obsd_t *obs, int n, int sat[][MAXSAT], double *y, double *e, double *azel, int iu[][MAXSAT], int ir[][MAXSAT], int *ns, double *v, double *H, double *R, int *vflg, int niter, int order)
static double intpres (gtime_t time, const obsd_t *obs, int n, const nav_t *nav, rtk_t *rtk, int ch, double *y)
static int ddmat (rtk_t *rtk, double *D)
static void restamb (rtk_t *rtk, const double *bias, int nb, double *xa)
static void holdamb (rtk_t *rtk, const double *xa)
static int resamb_LAMBDA (rtk_t *rtk, double *bias, double *xa)
static void elsort (rtk_t *rtk, const obsd_t *obs, int *isat, double *el, const int n)
static double sddop (const rtk_t *rtk, const double *H, const int *vflg, const double elmask, const int nv)
static double zddop (const rtk_t *rtk, const double *azel, const obsd_t *obs, const double elmask, const int n)
static double calpdop (const rtk_t *rtk, const double *H, const double *azel, const int *vflg, const obsd_t *obs, const double elmask, const int n, const int nv)
static void resetfilterflag (nav_t *nav)
static void check_vrs_facility (nav_t *nav, const obsd_t *obs, int nu, int *nr, int l6mrg)
static int residual_test (rtk_t *rtk, const int *vflg, const double *v, const double *Q, int *iv, const int m, int *ns, const int flg)
static int filter2_ (rtk_t *rtk, const double *x, const double *P, const double *H, const double *v, const double *R, const int n, const int m, double *xp, double *Pp, double *Qp, const int *vflg, const int flg)
static int filter2 (rtk_t *rtk, double *x, double *P, double *Q, const double *H, const double *v, const double *R, const int n, const int m, const int *vflg, const int flg)
int relposvrs (rtk_t *rtk, const obsd_t *obs, int nu, int *nr, nav_t *nav)
 VRS-RTK relative positioning.

Variables

static const double lam_carr [3] = { (CLIGHT / FREQ1) , (CLIGHT / FREQ2) , (CLIGHT / FREQ5) }
static const double chisqr [100]
static const double qfrtk [6][60]
static double vrs_chisq = 0.0

Detailed Description

VRS-RTK positioning engine.

Notes:

  • Ported from upstream claslib/src/rtkvrs.c with zero algorithmic changes.
  • VRS uses double-differenced RTK with LAMBDA PAR and fix-and-hold.
  • VRS observations are pre-generated by ssr2osr utility.

Definition in file mrtk_vrs.c.

Macro Definition Documentation

◆ GAP_RESION

#define GAP_RESION   120 /* gap to reset ionosphere parameters (epochs) */

Definition at line 67 of file mrtk_vrs.c.

◆ IB

#define IB ( s,
f,
opt )
Value:
(NR(opt) + MAXSAT * (f) + (s) - 1) /* phase bias (s:satno,f:freq) */
#define MAXSAT
Definition mrtk_coords.c:45
#define NR(opt)
Definition mrtk_ppp.c:222

Definition at line 103 of file mrtk_vrs.c.

Referenced by ddres(), holdamb(), restamb(), set_init_pb(), and udbias_ppp().

◆ II

#define II ( s,
opt )
Value:
(NP(opt) + (s) - 1) /* ionos (s:satellite no) */
#define NP(opt)
Definition mrtk_ppp.c:212

Definition at line 100 of file mrtk_vrs.c.

Referenced by ddres(), relposvrs(), and udion().

◆ IL

#define IL ( f,
opt )
Value:
(NP(opt) + NI(opt) + NT(opt) + (f)) /* receiver h/w bias */
#define NI(opt)
Definition mrtk_ppp.c:219
#define NT(opt)

Definition at line 102 of file mrtk_vrs.c.

Referenced by ddres(), and udrcvbias().

◆ INIT_ZWD

#define INIT_ZWD   0.15 /* initial zwd (m) */

Definition at line 64 of file mrtk_vrs.c.

◆ IT

#define IT ( r,
opt )
Value:
(NP(opt) + NI(opt) + NT(opt) / 2 * (r)) /* tropos (r:0=rov,1:ref) */

Definition at line 101 of file mrtk_vrs.c.

Referenced by ddres(), prectrop(), and udtrop().

◆ ITT

#define ITT ( opt)
Value:
(NP(opt) + NI(opt)) /* tropos (r:0=rov,1:ref) */

Definition at line 104 of file mrtk_vrs.c.

Referenced by relposvrs().

◆ LAM_CARR_L1

#define LAM_CARR_L1   (CLIGHT / FREQ1)

Definition at line 83 of file mrtk_vrs.c.

◆ LAM_CARR_L2

#define LAM_CARR_L2   (CLIGHT / FREQ2)

Definition at line 84 of file mrtk_vrs.c.

◆ LAM_CARR_L5

#define LAM_CARR_L5   (CLIGHT / FREQ5)

Definition at line 85 of file mrtk_vrs.c.

◆ MAXACC

#define MAXACC   30.0 /* max accel for doppler slip detection (m/s^2) */

Definition at line 68 of file mrtk_vrs.c.

◆ MAXITER

#define MAXITER   20 /* max iteration of PAR */

Definition at line 54 of file mrtk_vrs.c.

◆ MAXREF

#define MAXREF   2 /* max iteration of searching reference sat */

Definition at line 51 of file mrtk_vrs.c.

◆ MIN

#define MIN ( x,
y )
Value:
((x) <= (y) ? (x) : (y))

Definition at line 56 of file mrtk_vrs.c.

◆ NB

#define NB ( opt)
Value:
((opt)->mode <= PMODE_DGPS ? 0 : MAXSAT * NF(opt))
#define PMODE_DGPS
Definition mrtk_opt.h:46
#define NF(opt)
Definition mrtk_ppp.c:211

Definition at line 95 of file mrtk_vrs.c.

◆ NF

#define NF ( opt)
Value:
((opt)->ionoopt == IONOOPT_IFLC ? 1 : (opt)->nf)
#define IONOOPT_IFLC
Definition mrtk_opt.h:95

Definition at line 90 of file mrtk_vrs.c.

Referenced by ddmat(), ddres(), holdamb(), intpres(), restamb(), udbias_ppp(), varerr(), zdres(), and zdres_sat().

◆ NI

#define NI ( opt)
Value:
((((opt)->ionoopt != IONOOPT_EST) && ((opt)->ionoopt != IONOOPT_EST_ADPT)) ? 0 : MAXSAT)
#define IONOOPT_EST
Definition mrtk_opt.h:96
#define IONOOPT_EST_ADPT
Definition mrtk_opt.h:100

Definition at line 92 of file mrtk_vrs.c.

◆ NL

#define NL ( opt)
Value:
((opt)->glomodear != 2 ? 0 : NFREQGLO)
#define NFREQGLO

Definition at line 94 of file mrtk_vrs.c.

◆ NP

#define NP ( opt)
Value:
((opt)->dynamics == 0 ? 3 : 9)

Definition at line 91 of file mrtk_vrs.c.

Referenced by relposvrs(), residual_test(), and udpos().

◆ NR

#define NR ( opt)
Value:
(NP(opt) + NI(opt) + NT(opt) + NL(opt))
#define NL(opt)

Definition at line 96 of file mrtk_vrs.c.

◆ NT

#define NT ( opt)
Value:
((opt)->tropopt < TROPOPT_EST ? 0 : ((opt)->tropopt < TROPOPT_ESTG ? 2 : 6))
#define TROPOPT_EST
Definition mrtk_opt.h:105
#define TROPOPT_ESTG
Definition mrtk_opt.h:106

Definition at line 93 of file mrtk_vrs.c.

◆ NX

#define NX ( opt)
Value:
(NR(opt) + NB(opt))
#define NB(opt)
Definition mrtk_ppp.c:223

Definition at line 97 of file mrtk_vrs.c.

◆ POSL1

#define POSL1   1 /* L1 single freq positioning */

Definition at line 76 of file mrtk_vrs.c.

◆ POSL1L2

#define POSL1L2   2 /* L1+L2 dual freq positioning */

Definition at line 77 of file mrtk_vrs.c.

◆ POSL1L2L5

#define POSL1L2L5   4 /* L1+L2+L5 triple freq positioning */

Definition at line 79 of file mrtk_vrs.c.

◆ POSL1L5

#define POSL1L5   3 /* L1+L5 dual freq positioning */

Definition at line 78 of file mrtk_vrs.c.

◆ POSL1L5_L2

#define POSL1L5_L2   5 /* L1+L5(or L2) dual freq positioning */

Definition at line 80 of file mrtk_vrs.c.

◆ PRN_HWBIAS

#define PRN_HWBIAS   1E-6 /* process noise of h/w bias (m/MHz/sqrt(s)) */

Definition at line 66 of file mrtk_vrs.c.

◆ ROUND

#define ROUND ( x)
Value:
(int)floor((x) + 0.5)

Definition at line 57 of file mrtk_vrs.c.

◆ SQR

#define SQR ( x)
Value:
((x) * (x))

Definition at line 53 of file mrtk_vrs.c.

Referenced by ddres(), relposvrs(), residual_test(), udion(), udpos(), udrcvbias(), and udtrop().

◆ SQRT

#define SQRT ( x)
Value:
((x) <= 0.0 ? 0.0 : sqrt(x))

Definition at line 55 of file mrtk_vrs.c.

◆ TTOL_MOVEB

#define TTOL_MOVEB   (1.0 + 2 * DTTOL)

Definition at line 72 of file mrtk_vrs.c.

◆ VAR_ACC

#define VAR_ACC   SQR(1.0) /* initial variance of receiver acc ((m/ss)^2) */

Definition at line 61 of file mrtk_vrs.c.

◆ VAR_GRA

#define VAR_GRA   SQR(0.001) /* initial variance of gradient (m^2) */

Definition at line 63 of file mrtk_vrs.c.

◆ VAR_HOLDAMB

#define VAR_HOLDAMB   0.001 /* constraint to hold ambiguity (cycle^2) */

Definition at line 70 of file mrtk_vrs.c.

◆ VAR_HWBIAS

#define VAR_HWBIAS   SQR(1.0) /* initial variance of h/w bias ((m/MHz)^2) */

Definition at line 62 of file mrtk_vrs.c.

◆ VAR_POS

#define VAR_POS   SQR(30.0) /* initial variance of receiver pos ((m)^2) */

Definition at line 59 of file mrtk_vrs.c.

◆ VAR_VEL

#define VAR_VEL   SQR(1.0) /* initial variance of receiver acc ((m/s)^2) */

Definition at line 60 of file mrtk_vrs.c.

Enumeration Type Documentation

◆ ddres_order

Enumerator
FST 
SND 
TRD 

Definition at line 106 of file mrtk_vrs.c.

Function Documentation

◆ baseline()

double baseline ( const double * ru,
const double * rb,
double * dr )
static

Definition at line 244 of file mrtk_vrs.c.

References norm().

Referenced by ddres(), and udstate().

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

◆ calpdop()

double calpdop ( const rtk_t * rtk,
const double * H,
const double * azel,
const int * vflg,
const obsd_t * obs,
const double elmask,
const int n,
const int nv )
static

Definition at line 1879 of file mrtk_vrs.c.

References rtk_t::opt, prcopt_t::refdop, sddop(), and zddop().

Referenced by relposvrs().

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

◆ check_same_fac()

int check_same_fac ( const obsd_t * obs,
int ir[][MAXSAT] )
static

Definition at line 1061 of file mrtk_vrs.c.

References MAXSAT.

Referenced by ddres().

Here is the caller graph for this function:

◆ check_vrs_facility()

void check_vrs_facility ( nav_t * nav,
const obsd_t * obs,
int nu,
int * nr,
int l6mrg )
static

Definition at line 1897 of file mrtk_vrs.c.

References obsd_t::facility, nav_s::filreset, SSR_CH_NUM, and trace().

Referenced by relposvrs().

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

◆ clearsatcorr()

void clearsatcorr ( void )
static

Definition at line 190 of file mrtk_vrs.c.

Referenced by resetfilterflag().

Here is the caller graph for this function:

◆ ddcov()

void ddcov ( const int * nb,
int n,
const double * Ri,
const double * Rj,
int nv,
double * R )
static

Definition at line 989 of file mrtk_vrs.c.

References trace(), and tracemat().

Referenced by ddres().

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

◆ ddmat()

int ddmat ( rtk_t * rtk,
double * D )
static

Definition at line 1527 of file mrtk_vrs.c.

References ssat_t::azel, prcopt_t::bdsmodear, ssat_t::code, prcopt_t::elmaskar, ssat_t::fix, prcopt_t::glomodear, ssat_t::lock, MAXSAT, rtk_t::na, NF, rtk_t::nx, rtk_t::opt, prcopt_t::qzsmodear, ssat_t::slip, rtk_t::ssat, ssat_t::sys, test_sys(), trace(), tracemat(), ssat_t::vsat, and rtk_t::x.

Referenced by resamb_LAMBDA().

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

◆ ddres()

int ddres ( rtk_t * rtk,
const nav_t * nav,
double * dt,
const double * x,
const double * P,
const obsd_t * obs,
int n,
int sat[][MAXSAT],
double * y,
double * e,
double * azel,
int iu[][MAXSAT],
int ir[][MAXSAT],
int * ns,
double * v,
double * H,
double * R,
int * vflg,
int niter,
int order )
static

Definition at line 1152 of file mrtk_vrs.c.

References baseline(), check_same_fac(), CLIGHT, ssat_t::code, ddcov(), ecef2pos(), free, FST, get_iriu_index(), gloicbcorr(), prcopt_t::glomodear, IB, II, IL, ionmapf(), prcopt_t::ionoopt, IONOOPT_EST, IONOOPT_EST_ADPT, IONOOPT_IFLC, IT, prcopt_t::l6mrg, lam_carr, mat(), MAXREF, MAXSAT, prcopt_t::mode, NF, NFREQGLO, rtk_t::nx, rtk_t::opt, PMODE_DGPS, prcopt_t::posopt, pre_use_ch, prectrop(), prcopt_t::qzsmodear, rtk_t::rb, refsat, refsat2, ssat_t::resc, ssat_t::resp, obsd_t::sat, set_init_pb(), rtk_t::sol, SQR, rtk_t::ssat, SSR_CH_NUM, ssat_t::sys, SYS_GLO, SYS_QZS, test_sys(), sol_t::time, time2gpst(), time_str(), trace(), prcopt_t::tropopt, TROPOPT_EST, TROPOPT_ESTG, use_ch, valid_zd_sig(), validobs(), validobs(), varerr(), and ssat_t::vsat.

Referenced by relposvrs().

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

◆ detslp_gf()

void detslp_gf ( rtk_t * rtk,
const obsd_t * obs,
int n,
const nav_t * nav )
static

Definition at line 697 of file mrtk_vrs.c.

References ssat_t::gf, gfmeasL1L2(), gfmeasL1L5(), MAXOBS, prcopt_t::nf, rtk_t::opt, obsd_t::sat, ssat_t::slip, rtk_t::ssat, prcopt_t::thresslip, and trace().

Referenced by udbias_ppp().

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

◆ detslp_ll()

void detslp_ll ( rtk_t * rtk,
const obsd_t * obs,
int n )
static

Definition at line 680 of file mrtk_vrs.c.

References MAXOBS, prcopt_t::nf, rtk_t::opt, obsd_t::sat, ssat_t::slip, rtk_t::ssat, and trace().

Referenced by udbias_ppp().

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

◆ elsort()

void elsort ( rtk_t * rtk,
const obsd_t * obs,
int * isat,
double * el,
const int n )
static

Definition at line 1794 of file mrtk_vrs.c.

References ssat_t::azel, obsd_t::sat, and rtk_t::ssat.

Referenced by relposvrs().

Here is the caller graph for this function:

◆ errmsg()

void errmsg ( rtk_t * rtk,
const char * format,
... )
static

Definition at line 193 of file mrtk_vrs.c.

References rtk_t::errbuf, MAXERRMSG, rtk_t::neb, rtk_t::sol, sol_t::time, time2str(), and trace().

Referenced by holdamb(), relposvrs(), and resamb_LAMBDA().

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

◆ filter2()

int filter2 ( rtk_t * rtk,
double * x,
double * P,
double * Q,
const double * H,
const double * v,
const double * R,
const int n,
const int m,
const int * vflg,
const int flg )
static

Definition at line 2115 of file mrtk_vrs.c.

References filter2_(), free, imat(), prcopt_t::ionoopt, IONOOPT_EST_ADPT, mat(), rtk_t::opt, and prcopt_t::prnadpt.

Referenced by relposvrs().

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

◆ filter2_()

int filter2_ ( rtk_t * rtk,
const double * x,
const double * P,
const double * H,
const double * v,
const double * R,
const int n,
const int m,
double * xp,
double * Pp,
double * Qp,
const int * vflg,
const int flg )
static

Definition at line 2039 of file mrtk_vrs.c.

References eye(), free, imat(), prcopt_t::ionoopt, IONOOPT_EST_ADPT, mat(), matcpy(), matinv(), matmul(), rtk_t::opt, prcopt_t::prnadpt, Qp, residual_test(), trace(), and vrs_chisq.

Referenced by filter2().

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

◆ get_iriu_index()

int get_iriu_index ( int sati,
int ns,
const int * sat )
static

Definition at line 1065 of file mrtk_vrs.c.

Referenced by ddres(), and valid_zd_sig().

Here is the caller graph for this function:

◆ gfmeasL1L2()

double gfmeasL1L2 ( const obsd_t * obs,
const nav_t * nav )
static

Definition at line 661 of file mrtk_vrs.c.

References obsd_t::L, obsd_t::sat, and sat_lambda().

Referenced by detslp_gf().

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

◆ gfmeasL1L5()

double gfmeasL1L5 ( const obsd_t * obs,
const nav_t * nav )
static

Definition at line 670 of file mrtk_vrs.c.

References obsd_t::L, obsd_t::sat, and sat_lambda().

Referenced by detslp_gf().

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

◆ gloicbcorr()

double gloicbcorr ( int sat1,
int sat2,
const prcopt_t * opt,
double lam1,
double lam2,
int f )
static

Definition at line 1031 of file mrtk_vrs.c.

References CLIGHT, DFRQ1_GLO, DFRQ2_GLO, exterr_t::ena, prcopt_t::exterr, exterr_t::gloicb, prcopt_t::nf, and NFREQGLO.

Referenced by ddres().

Here is the caller graph for this function:

◆ holdamb()

void holdamb ( rtk_t * rtk,
const double * xa )
static

Definition at line 1625 of file mrtk_vrs.c.

References ssat_t::azel, ssat_t::code, prcopt_t::elmaskhold, errmsg(), filter(), ssat_t::fix, free, IB, mat(), MAXSAT, rtk_t::na, NF, rtk_t::nx, rtk_t::opt, rtk_t::P, prcopt_t::qzsmodear, rtk_t::ssat, ssat_t::sys, test_sys(), trace(), prcopt_t::varholdamb, ssat_t::vsat, rtk_t::x, and zeros().

Referenced by relposvrs().

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

◆ initx()

void initx ( rtk_t * rtk,
double xi,
double var,
int i )
static

Definition at line 252 of file mrtk_vrs.c.

References rtk_t::nx, rtk_t::P, and rtk_t::x.

Referenced by relposvrs(), set_init_pb(), udbias_ppp(), udion(), udpos(), udrcvbias(), and udtrop().

Here is the caller graph for this function:

◆ intpres()

double intpres ( gtime_t time,
const obsd_t * obs,
int n,
const nav_t * nav,
rtk_t * rtk,
int ch,
double * y )
static

Definition at line 1478 of file mrtk_vrs.c.

References DTTOL, MAXOBS, prcopt_t::maxtdiff, NF, rtk_t::opt, rtk_t::rb, prcopt_t::sateph, satposs(), SSR_CH_NUM, timediff(), trace(), and zdres().

Referenced by relposvrs().

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

◆ obs_code_for_freq_vrs()

uint8_t obs_code_for_freq_vrs ( int sat,
int f )
static

Definition at line 153 of file mrtk_vrs.c.

References CODE_L1C, CODE_L2I, CODE_L2S, CODE_L2W, CODE_L5Q, CODE_L6I, CODE_L7I, satsys(), SYS_CMP, SYS_GAL, SYS_GPS, and SYS_QZS.

Referenced by sat_lambda().

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

◆ prectrop()

double prectrop ( gtime_t time,
const double * pos,
int r,
const double * azel,
const prcopt_t * opt,
const double * x,
double * dtdx )
static

Definition at line 1008 of file mrtk_vrs.c.

References IT, tropmapf(), prcopt_t::tropopt, and TROPOPT_ESTG.

Referenced by ddres().

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

◆ relposvrs()

int relposvrs ( rtk_t * rtk,
const obsd_t * obs,
int nu,
int * nr,
nav_t * nav )
extern

VRS-RTK relative positioning.

Performs double-differenced RTK positioning using rover observations and pre-generated virtual reference station observations with CLAS SSR orbit/clock corrections.

Parameters
[in,out]rtkRTK control/result struct
[in]obsObservation data (rover + VRS base, sorted by rcv)
[in]nuNumber of rover observations (rcv=1)
[in]nrNumber of base observations per channel [nr[0], nr[1]]
[in,out]navNavigation data (SSR corrections)
Returns
1 if solution updated, 0 otherwise

Definition at line 2163 of file mrtk_vrs.c.

References prcopt_t::afgainion, prcopt_t::afgainpva, prcopt_t::armaxdelsat, ARMODE_FIXHOLD, calpdop(), check_vrs_facility(), cntdiffp, ddres(), prcopt_t::elmaskar, prcopt_t::elmaskhold, elsort(), errmsg(), nav_s::filreset, filter2(), ssat_t::fix, prcopt_t::forgetion, prcopt_t::forgetpva, free, FST, holdamb(), II, INIT_ZWD, initx(), prcopt_t::intpref, intpres(), nav_s::invtrop, prcopt_t::ionoopt, IONOOPT_EST_ADPT, IONOOPT_IFLC, ITT, obsd_t::L, prcopt_t::l6mrg, ssat_t::lock, mat(), matcpy(), prcopt_t::maxdiffp, MAXOBS, prcopt_t::maxpdopar, prcopt_t::maxpdophold, MAXREF, MAXSAT, prcopt_t::minfix, prcopt_t::mode, prcopt_t::modear, rtk_t::na, prcopt_t::nf, rtk_t::nfix, prcopt_t::niter, norm(), NP, NR, sol_t::ns, rtk_t::nx, rtk_t::opt, ssat_t::outc, rtk_t::P, rtk_t::Pa, ssat_t::ph, PMODE_DGPS, PMODE_FIXED, prcopt_t::poserrcnt, prcopt_t::posopt, prcopt_t::prn, prcopt_t::prnadpt, ssat_t::pt, rtk_t::Q, Qp, sol_t::qr, R2D, sol_t::ratio, rtk_t::rb, obsd_t::rcv, prcopt_t::regularly, resamb_LAMBDA(), resamb_LAMBDA(), resetfilterflag(), sol_t::rr, prcopt_t::ru, obsd_t::sat, prcopt_t::sateph, satposs(), satsys(), selsat(), ssat_t::slip, ssat_t::slipc, SND, obsd_t::SNR, ssat_t::snr, rtk_t::sol, SOLQ_DGPS, SOLQ_FIX, SOLQ_FLOAT, SOLQ_NONE, SOLQ_SINGLE, SQR, rtk_t::ssat, SSR_CH_NUM, sol_t::stat, prcopt_t::std, ssat_t::sys, gtime_t::time, obsd_t::time, sol_t::time, time2gpst(), time_str(), timediff(), trace(), tracemat(), TRD, prcopt_t::tropopt, TROPOPT_EST, TROPOPT_ESTG, udstate(), vrs_chisq, ssat_t::vsat, rtk_t::x, rtk_t::xa, zdres(), and zeros().

Referenced by rtkpos().

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

◆ resamb_LAMBDA()

int resamb_LAMBDA ( rtk_t * rtk,
double * bias,
double * xa )
static

Definition at line 1672 of file mrtk_vrs.c.

References prcopt_t::alphaar, ARMODE_OFF, ddmat(), errmsg(), free, lambda(), mat(), matinv(), matmul(), prcopt_t::mode, prcopt_t::modear, rtk_t::na, rtk_t::nx, rtk_t::opt, rtk_t::P, rtk_t::Pa, PMODE_DGPS, qfrtk, sol_t::ratio, restamb(), rtk_t::sol, prcopt_t::thresar, trace(), tracemat(), rtk_t::x, rtk_t::xa, and zeros().

Referenced by relposvrs().

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

◆ resetfilterflag()

void resetfilterflag ( nav_t * nav)
static

Definition at line 1892 of file mrtk_vrs.c.

References clearsatcorr(), and nav_s::filreset.

Referenced by relposvrs().

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

◆ residual_test()

int residual_test ( rtk_t * rtk,
const int * vflg,
const double * v,
const double * Q,
int * iv,
const int m,
int * ns,
const int flg )
static

Definition at line 1918 of file mrtk_vrs.c.

References chisqr, free, FREQ1, FREQ2, lam_carr, prcopt_t::maxinno_ext, MAXSAT, prcopt_t::nf, NP, rtk_t::opt, ssat_t::outc, ssat_t::rejc, SQR, rtk_t::ssat, trace(), vrs_chisq, ssat_t::vsat, and zeros().

Referenced by filter2_().

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

◆ restamb()

void restamb ( rtk_t * rtk,
const double * bias,
int nb,
double * xa )
static

Definition at line 1591 of file mrtk_vrs.c.

References ssat_t::code, ssat_t::fix, IB, MAXSAT, rtk_t::na, NF, rtk_t::nx, rtk_t::opt, prcopt_t::qzsmodear, rtk_t::ssat, ssat_t::sys, test_sys(), trace(), rtk_t::x, and rtk_t::xa.

Referenced by resamb_LAMBDA().

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

◆ sat_lambda()

double sat_lambda ( int sat,
int f,
const nav_t * nav )
static

Definition at line 181 of file mrtk_vrs.c.

References CLIGHT, obs_code_for_freq_vrs(), and sat2freq().

Referenced by gfmeasL1L2(), gfmeasL1L5(), set_init_pb(), udbias_ppp(), valid_zd_sig(), zdres(), and zdres_sat().

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

◆ sddop()

double sddop ( const rtk_t * rtk,
const double * H,
const int * vflg,
const double elmask,
const int nv )
static

Definition at line 1827 of file mrtk_vrs.c.

References ssat_t::azel, free, mat(), matinv(), matmul(), rtk_t::nx, rtk_t::ssat, and ssat_t::vsat.

Referenced by calpdop().

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

◆ selfreqpair()

int selfreqpair ( const int sat,
const prcopt_t * opt,
const obsd_t * obs )
static

Definition at line 291 of file mrtk_vrs.c.

References obsd_t::L, obsd_t::P, POSL1, POSL1L2L5, POSL1L5, POSL1L5_L2, prcopt_t::posopt, satsys(), and SYS_GAL.

Referenced by udion(), and zdres_sat().

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

◆ selsat()

int selsat ( const obsd_t * obs,
double * azel,
int nu,
int * nr,
const prcopt_t * opt,
int * sat,
int * iu,
int * ir,
int ch )
static

Definition at line 260 of file mrtk_vrs.c.

References prcopt_t::elmin, MAXSAT, obsd_t::sat, timediff(), and trace().

Referenced by relposvrs().

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

◆ set_init_pb()

void set_init_pb ( rtk_t * rtk,
const nav_t * nav,
const obsd_t * obs,
int n,
int f,
int satj )
static

Definition at line 1109 of file mrtk_vrs.c.

References rtk_t::com_bias, free, IB, initx(), obsd_t::L, ssat_t::lock, prcopt_t::minlock, rtk_t::opt, obsd_t::P, ssat_t::pbreset, obsd_t::sat, sat_lambda(), SQR, rtk_t::ssat, prcopt_t::std, trace(), rtk_t::x, and zeros().

Referenced by ddres().

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

◆ test_sys()

int test_sys ( int sys,
int m,
int qzsmodear,
int code )
static

Definition at line 1043 of file mrtk_vrs.c.

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

Referenced by ddres(), holdamb(), restamb(), and valid_zd_sig().

Here is the caller graph for this function:

◆ udbias_ppp()

void udbias_ppp ( rtk_t * rtk,
double tt,
const obsd_t * obs,
int n,
const nav_t * nav )
static

Definition at line 736 of file mrtk_vrs.c.

References ARMODE_INST, rtk_t::com_bias, detslp_gf(), detslp_ll(), free, IB, initx(), prcopt_t::ionoopt, IONOOPT_IFLC, obsd_t::L, ssat_t::lock, MAXOBS, prcopt_t::maxout, MAXSAT, prcopt_t::minlock, prcopt_t::modear, NF, prcopt_t::nf, rtk_t::nx, rtk_t::opt, ssat_t::outc, obsd_t::P, rtk_t::P, ssat_t::pbreset, prcopt_t::prn, obsd_t::sat, sat_lambda(), ssat_t::slip, SQR, rtk_t::ssat, prcopt_t::std, trace(), rtk_t::x, and zeros().

Referenced by udstate().

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

◆ udion()

void udion ( rtk_t * rtk,
double tt,
double bl,
const obsd_t * obs,
int ns )
static

Definition at line 556 of file mrtk_vrs.c.

References ssat_t::azel, II, initx(), prcopt_t::ionoopt, IONOOPT_EST_ADPT, prcopt_t::maxout, MAXSAT, prcopt_t::nf, rtk_t::nx, rtk_t::opt, ssat_t::outc, rtk_t::P, prcopt_t::prn, prcopt_t::prnionomax, rtk_t::Q, obsd_t::sat, selfreqpair(), SQR, rtk_t::ssat, prcopt_t::std, trace(), and rtk_t::x.

Referenced by udstate().

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

◆ udpos()

void udpos ( rtk_t * rtk,
const obsd_t * obs,
double tt )
static

Definition at line 313 of file mrtk_vrs.c.

References prcopt_t::beta, covecef(), prcopt_t::dynamics, ecef2pos(), eye(), free, initx(), prcopt_t::ionoopt, IONOOPT_EST, mat(), matcpy(), matmul(), MAXSAT, prcopt_t::mode, norm(), NP, rtk_t::nx, rtk_t::opt, rtk_t::P, PMODE_FIXED, prcopt_t::prn, prcopt_t::prnadpt, rtk_t::Q, sol_t::rr, prcopt_t::ru, rtk_t::sol, SQR, prcopt_t::stats_prnposith, prcopt_t::stats_prnpositv, trace(), VAR_ACC, VAR_POS, VAR_VEL, and rtk_t::x.

Referenced by udstate().

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

◆ udrcvbias()

void udrcvbias ( rtk_t * rtk,
double tt )
static

Definition at line 641 of file mrtk_vrs.c.

References IL, initx(), prcopt_t::minfix, rtk_t::na, rtk_t::nfix, NFREQGLO, rtk_t::nx, rtk_t::opt, rtk_t::P, rtk_t::Pa, PRN_HWBIAS, sol_t::ratio, rtk_t::sol, SQR, prcopt_t::thresar, trace(), VAR_HWBIAS, rtk_t::x, and rtk_t::xa.

Referenced by udstate().

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

◆ udstate()

void udstate ( rtk_t * rtk,
const obsd_t * obs,
int nu,
const nav_t * nav )
static

Definition at line 830 of file mrtk_vrs.c.

References baseline(), prcopt_t::glomodear, prcopt_t::ionoopt, IONOOPT_EST, prcopt_t::mode, prcopt_t::navsys, rtk_t::opt, PMODE_DGPS, rtk_t::rb, SYS_GLO, trace(), prcopt_t::tropopt, TROPOPT_EST, rtk_t::tt, udbias_ppp(), udion(), udpos(), udrcvbias(), udtrop(), and rtk_t::x.

Referenced by relposvrs().

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

◆ udtrop()

void udtrop ( rtk_t * rtk,
double tt,
double bl )
static

Definition at line 613 of file mrtk_vrs.c.

References INIT_ZWD, initx(), IT, rtk_t::nx, rtk_t::opt, rtk_t::P, prcopt_t::prn, SQR, prcopt_t::std, trace(), prcopt_t::tropopt, TROPOPT_ESTG, rtk_t::tt, VAR_GRA, and rtk_t::x.

Referenced by udstate().

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

◆ valid_zd_sig()

int valid_zd_sig ( rtk_t * rtk,
const obsd_t * obs,
const nav_t * nav,
double * y,
int nf,
int f,
int j,
int m,
int ch,
int sati,
int iu[][MAXSAT],
int ir[][MAXSAT],
int sat[][MAXSAT],
int * ff,
int * ns,
int * satj,
int * jj,
int * sysi,
int * sysj,
double * lami,
double * lamj )
static

Definition at line 1075 of file mrtk_vrs.c.

References ssat_t::code, get_iriu_index(), MAXSAT, rtk_t::opt, prcopt_t::qzsmodear, obsd_t::sat, sat_lambda(), rtk_t::ssat, ssat_t::sys, test_sys(), and validobs().

Referenced by ddres().

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

◆ validobs()

int validobs ( int * iu,
int * ir,
int jj,
int f,
int nf,
double * y )
static

Definition at line 974 of file mrtk_vrs.c.

Referenced by ddres(), and valid_zd_sig().

Here is the caller graph for this function:

◆ varerr()

double varerr ( int sat,
int sys,
double el,
double bl,
double dt,
int f,
const prcopt_t * opt )
static

Definition at line 208 of file mrtk_vrs.c.

References exterr_t::cerr, CLIGHT, EFACT_GLO, EFACT_GPS, EFACT_SBS, exterr_t::ena, prcopt_t::eratio, prcopt_t::err, prcopt_t::exterr, prcopt_t::ionoopt, IONOOPT_IFLC, NF, exterr_t::perr, prcopt_t::sclkstab, SYS_GAL, SYS_GLO, and SYS_SBS.

Referenced by ddres().

Here is the caller graph for this function:

◆ zddop()

double zddop ( const rtk_t * rtk,
const double * azel,
const obsd_t * obs,
const double elmask,
const int n )
static

Definition at line 1856 of file mrtk_vrs.c.

References dops(), free, mat(), obsd_t::sat, rtk_t::ssat, and ssat_t::vsat.

Referenced by calpdop().

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

◆ zdres()

int zdres ( rtk_t * rtk,
int base,
const obsd_t * obs,
int n,
const double * rs,
const double * dts,
const int * svh,
const nav_t * nav,
const double * rr,
const prcopt_t * opt,
int index,
double * y,
double * e,
double * azel )
static

Definition at line 895 of file mrtk_vrs.c.

References prcopt_t::antdel, antmodel(), sft_t::bias, CLIGHT, D2R, ecef2pos(), prcopt_t::elmin, nav_s::erp, geodist(), gpst2utc(), ISBOPT_TABLE, isL2C(), sft_t::n, NF, NFREQPCV, norm(), prcopt_t::odisp, prcopt_t::pcvr, prcopt_t::phasshft, prcopt_t::posopt, R2D, sft_t::rectyp, prcopt_t::rectype, sat_lambda(), satazel(), satexclude(), nav_s::sfts, prcopt_t::tidecorr, tidedisp(), trace(), tracemat(), tropmapf(), tropmodel(), and zdres_sat().

Referenced by intpres(), and relposvrs().

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

◆ zdres_sat()

void zdres_sat ( int base,
double r,
const obsd_t * obs,
const nav_t * nav,
const double * azel,
const double * dant,
const prcopt_t * opt,
double * y )
static

Definition at line 857 of file mrtk_vrs.c.

References obsd_t::L, NF, obsd_t::P, obsd_t::sat, sat_lambda(), selfreqpair(), obsd_t::SNR, prcopt_t::snrmask, and testsnr().

Referenced by zdres().

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

Variable Documentation

◆ chisqr

const double chisqr[100]
static
Initial value:
= {
10.8, 13.8, 16.3, 18.5, 20.5, 22.5, 24.3, 26.1, 27.9, 29.6, 31.3, 32.9, 34.5, 36.1, 37.7, 39.3, 40.8,
42.3, 43.8, 45.3, 46.8, 48.3, 49.7, 51.2, 52.6, 54.1, 55.5, 56.9, 58.3, 59.7, 61.1, 62.5, 63.9, 65.2,
66.6, 68.0, 69.3, 70.7, 72.1, 73.4, 74.7, 76.0, 77.3, 78.6, 80.0, 81.4, 82.7, 84.0, 85.4, 86.7, 88.0,
89.3, 90.6, 91.9, 93.3, 94.7, 96.0, 97.4, 98.7, 100, 101, 102, 103, 104, 105, 107, 108, 109,
110, 111, 112, 113, 114, 115, 116, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142}

Definition at line 109 of file mrtk_vrs.c.

◆ lam_carr

const double lam_carr[3] = { (CLIGHT / FREQ1) , (CLIGHT / FREQ2) , (CLIGHT / FREQ5) }
static

Definition at line 87 of file mrtk_vrs.c.

◆ qfrtk

const double qfrtk[6][60]
static

Definition at line 118 of file mrtk_vrs.c.

Referenced by resamb_LAMBDA().

◆ vrs_chisq

double vrs_chisq = 0.0
static

Definition at line 187 of file mrtk_vrs.c.

Referenced by filter2_(), relposvrs(), and residual_test().