|
MRTKLIB 0.7.14
Modernized GNSS Positioning Library
|
CLAS grid interpolation for troposphere and STEC. More...
#include <math.h>#include <stdlib.h>#include <string.h>#include "mrtklib/mrtk_clas.h"#include "mrtklib/mrtk_const.h"#include "mrtklib/mrtk_geoid.h"#include "mrtklib/mrtk_mat.h"#include "mrtklib/mrtk_station.h"#include "mrtklib/mrtk_time.h"#include "mrtklib/mrtk_trace.h"Go to the source code of this file.
Classes | |
| struct | grid_info |
Macros | |
| #define | MAX_GRID_CACHE 20 /* candidate grids sorted by distance */ |
| #define | MAX_DIST 120.0 /* max distance to grid (km) */ |
| #define | MAXAGESSR_TROP 120.0 /* max age of trop correction (s) */ |
| #define | MAXAGESSR_IONO 120.0 /* max age of iono correction (s) */ |
| #define | SQR(x) |
| #define | MIN(x, y) |
| #define | MAX(x, y) |
Functions | |
| static double | Interp1 (const double *x, const double *y, int nx, int ny, double xi) |
| static int | get_mops (const double lat, const double doy, double *pre, double *temp, double *wpre, double *ltemp, double *wvap) |
| static double | get_Tdv (const double lat, const double Hs, const double Ps) |
| static double | get_Twv (const double Ts, const double es) |
| int | get_stTv (gtime_t t, const double lat, const double hs, const double hg, double *tdv, double *twv) |
| static int | pickup_candidates_of_grid (const clas_ctx_t *ctx, grid_info *gridinfo, const int network, const double *pos, int ch) |
| static int | find_grid_surround_pos (grid_info **gridindex, int n, grid_info *gridinfo) |
| static void | calc_3points_weight (double *weight, const double *pos, grid_info **gridindex) |
| static int | is_exists_inside (const double *pos, int n, grid_info **gridindex, grid_info *nearestgrid) |
| static void | calc_grid_weight (double *weight, const double *pos, int n, grid_info **gridindex) |
| static void | output_selected_grid (const double *pos, int n, grid_info **gridindex, double *weight) |
| int | clas_get_grid_index (clas_ctx_t *ctx, const double *pos, clas_grid_t *grid, int gridsel, gtime_t obstime) |
| Select surrounding grid points and compute interpolation weights. | |
| static int | stec_data (stec_t *stec, gtime_t time, int sat, double *iono, double *rate, double *rms, double *quality, int *slip) |
| int | clas_stec_grid_data (clas_corr_t *corr, const int *index, gtime_t time, int sat, int n, const double *weight, const double *Gmat, const double *Emat, double *iono, double *rate, double *var, int *brk) |
| Interpolate STEC (ionosphere delay) from grid points. | |
| static int | trop_data (zwd_t *z, gtime_t time, double *ztd, double *zwd, double *quality, int idx, int *valid) |
| int | clas_trop_grid_data (clas_corr_t *corr, const int *index, gtime_t time, int n, const double *weight, const double *Gmat, const double *Emat, double *zwd, double *ztd, int *tbrk) |
| Interpolate troposphere delay from grid points. | |
| void | clas_init_oload (clas_ctx_t *ctx) |
| Initialize ocean loading data in context. | |
| int | readblqgrid (const char *file, clas_ctx_t *ctx) |
| Read BLQ ocean tide loading parameters for CLAS grid points. | |
CLAS grid interpolation for troposphere and STEC.
References: [1] IS-QZSS-L6-006, QZSS L6 Signal CLAS IF Specification
History: 2026/03/02 1.0 ported from claslib grid.c / stec.c / rtkcmn.c
Definition in file mrtk_clas_grid.c.
| #define MAX | ( | x, | |
| y ) |
Definition at line 51 of file mrtk_clas_grid.c.
Referenced by pickup_candidates_of_grid().
| #define MAX_DIST 120.0 /* max distance to grid (km) */ |
Definition at line 45 of file mrtk_clas_grid.c.
Referenced by pickup_candidates_of_grid().
| #define MAX_GRID_CACHE 20 /* candidate grids sorted by distance */ |
Definition at line 44 of file mrtk_clas_grid.c.
Referenced by clas_get_grid_index(), and pickup_candidates_of_grid().
| #define MAXAGESSR_IONO 120.0 /* max age of iono correction (s) */ |
Definition at line 47 of file mrtk_clas_grid.c.
Referenced by stec_data().
| #define MAXAGESSR_TROP 120.0 /* max age of trop correction (s) */ |
Definition at line 46 of file mrtk_clas_grid.c.
Referenced by trop_data().
| #define MIN | ( | x, | |
| y ) |
Definition at line 50 of file mrtk_clas_grid.c.
Referenced by pickup_candidates_of_grid().
| #define SQR | ( | x | ) |
Definition at line 49 of file mrtk_clas_grid.c.
Referenced by clas_stec_grid_data().
|
static |
Definition at line 340 of file mrtk_clas_grid.c.
References free, mat(), matinv(), matmul(), grid_info::pos, R2D, trace(), and tracemat().
Referenced by calc_grid_weight().
|
static |
Definition at line 395 of file mrtk_clas_grid.c.
References calc_3points_weight(), and grid_info::weight.
Referenced by clas_get_grid_index().
|
extern |
Select surrounding grid points and compute interpolation weights.
| [in,out] | ctx | CLAS context (grid_pos, grid_stat) |
| [in] | pos | Receiver position {lat,lon,hgt} (rad,m) |
| [out] | grid | Interpolation result (weights, indices, matrix) |
| [in] | gridsel | Grid selection threshold (m), 0=always multi-grid |
| [in] | obstime | Observation time (reserved) |
Definition at line 459 of file mrtk_clas_grid.c.
References calc_grid_weight(), CLAS_CH_NUM, clas_grid_t::Emat, find_grid_surround_pos(), free, clas_grid_t::Gmat, clas_grid_t::index, grid_info::index, is_exists_inside(), mat(), matcpy(), matinv(), MAX_GRID_CACHE, clas_grid_t::network, grid_info::network, clas_grid_t::num, output_selected_grid(), pickup_candidates_of_grid(), grid_info::pos, R2D, trace(), tracemat(), and clas_grid_t::weight.
Referenced by clas_ssr2osr(), and ppp_rtk_pos().
|
extern |
Initialize ocean loading data in context.
| [in,out] | ctx | CLAS context |
Definition at line 824 of file mrtk_clas_grid.c.
References CLAS_MAX_NETWORK, clas_oload_t::gridnum, and clas_ctx_t::oload.
|
extern |
Interpolate STEC (ionosphere delay) from grid points.
| [in] | corr | Merged correction snapshot |
| [in] | index | Selected grid point indices |
| [in] | time | Time (GPST) |
| [in] | sat | Satellite number |
| [in] | n | Number of grids (1-4) |
| [in] | weight | Interpolation weights |
| [in] | Gmat | Interpolation matrix (4x4, can be NULL) |
| [in] | Emat | Basis vector (4x1, can be NULL) |
| [out] | iono | Interpolated L1 ionosphere delay (m) |
| [out] | rate | Interpolated ionosphere rate (m/s) |
| [out] | var | Interpolated variance (m^2) |
| [out] | brk | Slip break flag |
Definition at line 588 of file mrtk_clas_grid.c.
References dot(), free, mat(), matmul(), SQR, clas_corr_t::stec, and stec_data().
Referenced by clas_osr_corrmeas().
|
extern |
Interpolate troposphere delay from grid points.
| [in] | corr | Merged correction snapshot |
| [in] | index | Selected grid point indices |
| [in] | time | Time (GPST) |
| [in] | n | Number of grids (1-4) |
| [in] | weight | Interpolation weights |
| [in] | Gmat | Interpolation matrix (4x4, can be NULL) |
| [in] | Emat | Basis vector (4x1, can be NULL) |
| [out] | zwd | Interpolated zenith wet delay |
| [out] | ztd | Interpolated zenith total delay |
| [out] | tbrk | Validity flag (0=all valid, 1=partial) |
Definition at line 749 of file mrtk_clas_grid.c.
References dot(), free, imat(), mat(), matmul(), trop_data(), and clas_corr_t::zwd.
Referenced by clas_osr_zdres().
Definition at line 267 of file mrtk_clas_grid.c.
References D2R, dot(), grid_info::network, norm(), grid_info::pos, and trace().
Referenced by clas_get_grid_index().
|
static |
Definition at line 88 of file mrtk_clas_grid.c.
References Interp1(), PI, and R2D.
Referenced by get_stTv().
| int get_stTv | ( | gtime_t | t, |
| const double | lat, | ||
| const double | hs, | ||
| const double | hg, | ||
| double * | tdv, | ||
| double * | twv ) |
Definition at line 163 of file mrtk_clas_grid.c.
References get_mops(), get_Tdv(), get_Twv(), and time2doy().
Referenced by clas_osr_prectrop(), and trop_data().
|
static |
Definition at line 145 of file mrtk_clas_grid.c.
Referenced by get_stTv().
|
static |
Definition at line 150 of file mrtk_clas_grid.c.
Referenced by get_stTv().
|
static |
Definition at line 73 of file mrtk_clas_grid.c.
Referenced by get_mops().
|
static |
Definition at line 371 of file mrtk_clas_grid.c.
References grid_info::index, grid_info::network, grid_info::pos, trace(), and grid_info::weight.
Referenced by clas_get_grid_index().
|
static |
Definition at line 413 of file mrtk_clas_grid.c.
References D2R, grid_info::index, grid_info::network, and trace().
Referenced by clas_get_grid_index().
|
static |
Definition at line 199 of file mrtk_clas_grid.c.
References CLAS_MAX_GP, CLAS_MAX_NETWORK, D2R, clas_ctx_t::grid_pos, clas_ctx_t::grid_stat, grid_info::index, MAX, MAX_DIST, MAX_GRID_CACHE, MIN, grid_info::network, norm(), grid_info::pos, RE_WGS84, trace(), and grid_info::weight.
Referenced by clas_get_grid_index().
|
extern |
Read BLQ ocean tide loading parameters for CLAS grid points.
| [in] | file | BLQ grid file |
| [in,out] | ctx | CLAS context (oload[] populated) |
Definition at line 839 of file mrtk_clas_grid.c.
References CLAS_MAX_GP, CLAS_MAX_NETWORK, clas_oload_t::gridnum, clas_oload_t::odisp, clas_ctx_t::oload, clas_oload_t::pos, readblqrecord(), and trace().
Referenced by execses().
|
static |
Definition at line 537 of file mrtk_clas_grid.c.
References stec_t::data, stecd_t::iono, MAXAGESSR_IONO, stec_t::n, stecd_t::quality, stecd_t::rate, stecd_t::rms, stecd_t::sat, stecd_t::slip, stecd_t::time, time_str(), timediff(), and trace().
Referenced by clas_stec_grid_data().
|
static |
Definition at line 698 of file mrtk_clas_grid.c.
References CSSR_INVALID_VALUE, D2R, zwd_t::data, geoidh(), get_stTv(), MAXAGESSR_TROP, zwd_t::n, zwd_t::pos, zwdd_t::quality, zwdd_t::time, time_str(), timediff(), trace(), zwdd_t::valid, zwdd_t::ztd, and zwdd_t::zwd.
Referenced by clas_trop_grid_data().