|
MRTKLIB 0.7.14
Modernized GNSS Positioning Library
|
#include "mrtklib/mrtk_spp.h"#include <math.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include "mrtklib/mrtk_atmos.h"#include "mrtklib/mrtk_coords.h"#include "mrtklib/mrtk_eph.h"#include "mrtklib/mrtk_mat.h"#include "mrtklib/mrtk_trace.h"Go to the source code of this file.
Macros | |
| #define | SYS_NONE 0x00 |
| #define | SYS_GPS 0x01 |
| #define | SYS_SBS 0x02 |
| #define | SYS_GLO 0x04 |
| #define | SYS_GAL 0x08 |
| #define | SYS_QZS 0x10 |
| #define | SYS_CMP 0x20 |
| #define | SYS_IRN 0x40 |
| #define | SYS_BD2 0x100 |
| #define | SQR(x) |
| #define | NT 7 /* # of estimated time system (gps,glo,gal,bds3,irn,qzs,bds2) */ |
| #define | NX (3 + NT) /* # of estimated parameters */ |
| #define | MAXITR 10 /* max number of iteration for point pos */ |
| #define | ERR_CBIAS 0.3 /* code bias error Std (m) */ |
| #define | ERR_TDCP 0.03 /* #116 P4: TDCP phase-rate error Std (m/s) */ |
| #define | MIN_EL (5.0 * D2R) /* min elevation for measurement error (rad) */ |
Functions | |
| static double | varerr (const prcopt_t *opt, double el, double snr, int sys) |
| static double | gettgd (int sat, const nav_t *nav, int type) |
| static int | iflc_freq2_idx (const obsd_t *obs, const nav_t *nav, const prcopt_t *opt) |
| static int | snrmask (const obsd_t *obs, const double *azel, const prcopt_t *opt) |
| static double | prange (const obsd_t *obs, const nav_t *nav, const prcopt_t *opt, double *var) |
| static int | rescode (int iter, const obsd_t *obs, int n, const double *rs, const double *dts, const double *vare, const int *svh, const nav_t *nav, const double *x, const prcopt_t *opt, double *v, double *H, double *var, double *azel, int *vsat, double *resp, int *ns, const int *outp) |
| static int | valsol (const double *azel, const int *vsat, int n, const prcopt_t *opt, const double *v, int nv, int nx, char *msg) |
| static void | exclsat (const obsd_t *obs, const double *resp, const prcopt_t *opt, int n, const int *vsat, int *outp) |
| static double | igg3_weight (double rt, double k0, double k1) |
| static int | cmp_dbl (const void *a, const void *b) |
| static double | median_abs (const double *x, int n, double *work) |
| static int | estpos (const obsd_t *obs, int n, const double *rs, const double *dts, const double *vare, const int *svh, const nav_t *nav, const prcopt_t *opt, sol_t *sol, double *azel, int *vsat, double *resp, char *msg) |
| static int | raim_fde (const obsd_t *obs, int n, const double *rs, const double *dts, const double *vare, const int *svh, const nav_t *nav, const prcopt_t *opt, sol_t *sol, double *azel, int *vsat, double *resp, char *msg) |
| static void | spp_detslp (const obsd_t *obs, int n, const ssat_t *ssat, double thresdop, int *slip) |
| static int | resdop (const obsd_t *obs, int n, const double *rs, const double *dts, const nav_t *nav, const double *rr, const double *x, const double *azel, const int *vsat, double err, const ssat_t *ssat, const int *slip, int tdcp, double *v, double *H) |
| static int | estvel (const obsd_t *obs, int n, const double *rs, const double *dts, const nav_t *nav, const prcopt_t *opt, sol_t *sol, const double *azel, const int *vsat, const ssat_t *ssat, const int *slip) |
| int | pntpos (mrtk_ctx_t *ctx, const obsd_t *obs, int n, const nav_t *nav, const prcopt_t *opt, sol_t *sol, double *azel, ssat_t *ssat, char *msg) |
| Compute receiver position, velocity, clock bias by single-point positioning with pseudorange and doppler observables. | |
Variables | |
| static const double | CLIGHT = 299792458.0 |
| static const double | D2R = 3.1415926535897932 / 180.0 |
| static const double | R2D = 180.0 / 3.1415926535897932 |
| static const double | OMGE = 7.2921151467E-5 |
| static const double | FREQ1 = 1.57542E9 |
| static const double | FREQ2 = 1.22760E9 |
| static const double | FREQ5 = 1.17645E9 |
| static const double | FREQ7 = 1.20714E9 |
| static const double | FREQ9 = 2.492028E9 |
| static const double | FREQ1_GLO = 1.60200E9 |
| static const double | FREQ2_GLO = 1.24600E9 |
| static const double | FREQ1_CMP = 1.561098E9 |
| static const double | FREQ2_CMP = 1.20714E9 |
| static const double | EFACT_GPS = 1.0 |
| static const double | EFACT_GLO = 1.5 |
| static const double | EFACT_SBS = 3.0 |
| const double | chisqr [100] |
| #define ERR_CBIAS 0.3 /* code bias error Std (m) */ |
Definition at line 77 of file mrtk_spp.c.
Referenced by prange().
| #define ERR_TDCP 0.03 /* #116 P4: TDCP phase-rate error Std (m/s) */ |
Definition at line 78 of file mrtk_spp.c.
Referenced by resdop().
| #define MAXITR 10 /* max number of iteration for point pos */ |
Definition at line 76 of file mrtk_spp.c.
| #define MIN_EL (5.0 * D2R) /* min elevation for measurement error (rad) */ |
Definition at line 79 of file mrtk_spp.c.
| #define NT 7 /* # of estimated time system (gps,glo,gal,bds3,irn,qzs,bds2) */ |
Definition at line 74 of file mrtk_spp.c.
| #define NX (3 + NT) /* # of estimated parameters */ |
Definition at line 75 of file mrtk_spp.c.
| #define SQR | ( | x | ) |
Definition at line 72 of file mrtk_spp.c.
Referenced by prange(), raim_fde(), rescode(), and varerr().
| #define SYS_BD2 0x100 |
Definition at line 57 of file mrtk_spp.c.
| #define SYS_CMP 0x20 |
Definition at line 55 of file mrtk_spp.c.
| #define SYS_GAL 0x08 |
Definition at line 53 of file mrtk_spp.c.
| #define SYS_GLO 0x04 |
Definition at line 52 of file mrtk_spp.c.
| #define SYS_GPS 0x01 |
Definition at line 50 of file mrtk_spp.c.
| #define SYS_IRN 0x40 |
Definition at line 56 of file mrtk_spp.c.
| #define SYS_NONE 0x00 |
Definition at line 49 of file mrtk_spp.c.
| #define SYS_QZS 0x10 |
Definition at line 54 of file mrtk_spp.c.
| #define SYS_SBS 0x02 |
Definition at line 51 of file mrtk_spp.c.
|
static |
Definition at line 469 of file mrtk_spp.c.
Referenced by median_abs().
|
static |
Definition at line 486 of file mrtk_spp.c.
References sol_t::age, CLIGHT, sol_t::dtr, EPHOPT_SBAS, exclsat(), free, igg3_weight(), lsq(), mat(), MAXITR, MAXSAT, median_abs(), norm(), sol_t::ns, NT, NX, prcopt_t::posopt, sol_t::qr, sol_t::ratio, prcopt_t::rejeminsat, prcopt_t::rejethres, rescode(), prcopt_t::robust, prcopt_t::robustk, sol_t::rr, prcopt_t::sateph, SOLQ_SBAS, SOLQ_SINGLE, sol_t::stat, sol_t::time, timeadd(), trace(), sol_t::type, and valsol().
Referenced by pntpos(), and raim_fde().
|
static |
Definition at line 810 of file mrtk_spp.c.
References prcopt_t::err, free, lsq(), mat(), matcpy(), MAXITR, norm(), sol_t::qv, resdop(), sol_t::rr, prcopt_t::tdcp, and trace().
Referenced by pntpos().
|
static |
Definition at line 430 of file mrtk_spp.c.
References MAXOBS, MAXSAT, prcopt_t::rejethres, obsd_t::sat, and trace().
Referenced by estpos().
|
static |
Definition at line 106 of file mrtk_spp.c.
References CLIGHT, geph_t::dtaun, nav_s::eph, nav_s::geph, nav_s::n, nav_s::ng, eph_t::sat, geph_t::sat, satsys(), SYS_GLO, and eph_t::tgd.
Referenced by prange().
Definition at line 133 of file mrtk_spp.c.
References obsd_t::code, CORR_IGS, CORR_QZS_CLAS, prcopt_t::correction, prcopt_t::ionoopt, IONOOPT_IFLC, obsd_t::P, obsd_t::sat, sat2freq(), satsys(), SYS_GAL, and SYS_SBS.
Referenced by prange(), and snrmask().
|
static |
Definition at line 457 of file mrtk_spp.c.
Referenced by estpos().
|
static |
Definition at line 474 of file mrtk_spp.c.
References cmp_dbl().
Referenced by estpos().
| int pntpos | ( | mrtk_ctx_t * | ctx, |
| const obsd_t * | obs, | ||
| int | n, | ||
| const nav_t * | nav, | ||
| const prcopt_t * | opt, | ||
| sol_t * | sol, | ||
| double * | azel, | ||
| ssat_t * | ssat, | ||
| char * | msg ) |
Compute receiver position, velocity, clock bias by single-point positioning with pseudorange and doppler observables.
| [in] | ctx | Runtime context (NULL = use global) |
| [in] | obs | Observation data |
| [in] | n | Number of observation data |
| [in] | nav | Navigation data |
| [in] | opt | Processing options |
| [in,out] | sol | Solution |
| [in,out] | azel | Azimuth/elevation angle (rad) (NULL: no output) |
| [in,out] | ssat | Satellite status (NULL: no output) |
| [out] | msg | Error message for error exit |
Definition at line 865 of file mrtk_spp.c.
References ssat_t::azel, DTTOL, estpos(), estvel(), free, prcopt_t::ionoopt, IONOOPT_BRDC, IONOOPT_IFLC, obsd_t::L, mat(), matcpy(), MAXOBS, MAXSAT, prcopt_t::mode, prcopt_t::nf, norm(), PMODE_SINGLE, prcopt_t::posopt, raim_fde(), ssat_t::resc, ssat_t::resp, sol_t::rr, obsd_t::sat, prcopt_t::sateph, satposs(), obsd_t::SNR, ssat_t::snr, SOLQ_NONE, ssat_t::sph, spp_detslp(), ssat_t::spt, sol_t::stat, prcopt_t::tdcp, prcopt_t::tdcpjump, prcopt_t::thresdop, gtime_t::time, obsd_t::time, sol_t::time, time_str(), timediff(), trace(), prcopt_t::tropopt, TROPOPT_SAAS, ssat_t::vs, and zeros().
Referenced by avepos(), rtkpos(), rtksvrthread(), and setopt_apppos().
Definition at line 162 of file mrtk_spp.c.
References nav_s::cbias, obsd_t::code, CODE_L1C, CODE_L1P, CODE_L2C, CODE_L2I, ERR_CBIAS, getseleph(), gettgd(), iflc_freq2_idx(), prcopt_t::ionoopt, IONOOPT_IFLC, obsd_t::P, obsd_t::sat, sat2freq(), satsys(), SQR, SYS_CMP, SYS_GAL, SYS_GLO, SYS_GPS, SYS_IRN, and SYS_QZS.
Referenced by rescode().
|
static |
Definition at line 608 of file mrtk_spp.c.
References estpos(), free, imat(), malloc, mat(), matcpy(), obsd_t::sat, satno2id(), SQR, time2str(), time_str(), trace(), and zeros().
Referenced by pntpos().
|
static |
Definition at line 256 of file mrtk_spp.c.
References CLIGHT, ecef2pos(), prcopt_t::elmin, FREQ1, geodist(), ionocorr(), prcopt_t::ionoopt, MAXOBS, MAXSAT, NT, NX, prange(), R2D, obsd_t::sat, sat2freq(), satazel(), satexclude(), satsys_bd2(), SNR_UNIT, snrmask(), SQR, SYS_BD2, SYS_CMP, SYS_GAL, SYS_GLO, SYS_IRN, SYS_QZS, obsd_t::time, time_str(), trace(), tropcorr(), prcopt_t::tropopt, and varerr().
Referenced by estpos().
|
static |
Definition at line 743 of file mrtk_spp.c.
References CLIGHT, obsd_t::D, dot(), DTTOL, ecef2pos(), ERR_TDCP, obsd_t::L, matmul(), MAXOBS, norm(), OMGE, obsd_t::sat, sat2freq(), ssat_t::sph, timediff(), trace(), and xyz2enu().
Referenced by estvel().
Definition at line 149 of file mrtk_spp.c.
References iflc_freq2_idx(), prcopt_t::ionoopt, IONOOPT_IFLC, obsd_t::SNR, SNR_UNIT, prcopt_t::snrmask, and testsnr().
Referenced by rescode().
|
static |
Definition at line 706 of file mrtk_spp.c.
References obsd_t::D, DTTOL, obsd_t::L, obsd_t::LLI, MAXOBS, obsd_t::sat, ssat_t::sph, and timediff().
Referenced by pntpos().
|
static |
Definition at line 395 of file mrtk_spp.c.
References chisqr, dops(), dot(), prcopt_t::elmin, prcopt_t::ign_chierr, prcopt_t::maxgdop, MAXOBS, and trace().
Referenced by estpos().
|
static |
Definition at line 82 of file mrtk_spp.c.
References EFACT_GLO, EFACT_GPS, EFACT_SBS, prcopt_t::err, prcopt_t::ionoopt, IONOOPT_IFLC, MIN_EL, SQR, SYS_GLO, and SYS_SBS.
Referenced by rescode().
| const double chisqr[100] |
Definition at line 62 of file mrtk_spp.c.
|
static |
Definition at line 30 of file mrtk_spp.c.
|
static |
Definition at line 31 of file mrtk_spp.c.
|
static |
Definition at line 46 of file mrtk_spp.c.
|
static |
Definition at line 45 of file mrtk_spp.c.
|
static |
Definition at line 47 of file mrtk_spp.c.
|
static |
Definition at line 35 of file mrtk_spp.c.
|
static |
Definition at line 42 of file mrtk_spp.c.
|
static |
Definition at line 40 of file mrtk_spp.c.
|
static |
Definition at line 36 of file mrtk_spp.c.
|
static |
Definition at line 43 of file mrtk_spp.c.
|
static |
Definition at line 41 of file mrtk_spp.c.
|
static |
Definition at line 37 of file mrtk_spp.c.
|
static |
Definition at line 38 of file mrtk_spp.c.
|
static |
Definition at line 39 of file mrtk_spp.c.
|
static |
Definition at line 33 of file mrtk_spp.c.
|
static |
Definition at line 32 of file mrtk_spp.c.