|
MRTKLIB 0.7.14
Modernized GNSS Positioning Library
|
CLAS SSR-to-OSR (Observation Space Representation) conversion. More...
#include <math.h>#include <stdlib.h>#include <string.h>#include "mrtklib/mrtk_antenna.h"#include "mrtklib/mrtk_astro.h"#include "mrtklib/mrtk_atmos.h"#include "mrtklib/mrtk_clas.h"#include "mrtklib/mrtk_const.h"#include "mrtklib/mrtk_coords.h"#include "mrtklib/mrtk_eph.h"#include "mrtklib/mrtk_geoid.h"#include "mrtklib/mrtk_mat.h"#include "mrtklib/mrtk_nav.h"#include "mrtklib/mrtk_obs.h"#include "mrtklib/mrtk_opt.h"#include "mrtklib/mrtk_ppp_rtk.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"Go to the source code of this file.
Macros | |
| #define | SQR(x) |
| #define | NF_RTK(opt) |
| #define | NP_RTK(opt) |
| #define | NI_RTK(opt) |
| #define | NR_RTK(opt) |
| #define | IB_RTK(s, f, opt) |
| #define | GME 3.986004415E+14 |
| #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 | MAXAGESSR_SIS 60.0 /* max age of ssr orbit/clock (s) */ |
| #define | MAXECORSSR_SIS 10.0 /* max orbit correction (m) */ |
| #define | MAXCCORSSR_SIS (1E-6 * CLIGHT) /* max clock correction (m) */ |
Functions | |
| static int | NT_RTK (const prcopt_t *opt) |
| static int | code_on_same_freq (int sys, uint8_t code1, uint8_t code2) |
| Check if two obs codes are on the same frequency band. | |
| static int | pcv_slot_has_data (const pcv_t *pcv, int slot) |
| static int | claslib_pcv_slot (const pcv_t *pcv, int f) |
| static double | shapiro (const double *rsat, const double *rrcv) |
| Compute Shapiro (relativistic) time delay correction. | |
| static void | windupcorr (gtime_t time, const double *rs, const double *rr, double *phw) |
| Compute phase windup correction. | |
| double | sat2freq (int sat, uint8_t code, const nav_t *nav) |
| static void | sat_wavelengths (int sat, const obsd_t *obs, const nav_t *nav, double *lam) |
| Fill wavelength array for a satellite from observation codes. | |
| static int | count_nsig (const int smode[MAXCODE]) |
| Count non-zero entries in a signal mode array (equivalent to nsig). | |
| void | clas_osr_ctx_init (clas_osr_ctx_t *ctx) |
| Initialize OSR conversion context (zero all persistent state). | |
| double | clas_osr_prectrop (gtime_t time, const double *pos, const double *azel, double zwd, double ztd) |
| Precise troposphere model for CLAS (MOPS standard + mapping function). | |
| int | clas_osr_selfreqpair (int sat, const prcopt_t *opt, const obsd_t *obs) |
| Select frequency pair for multi-frequency processing. | |
| void | clas_osr_compensatedisp (clas_corr_t *corr, const int *index, const obsd_t *obs, int sat, double iono, const double *pb, double *compL, int *pbreset, const prcopt_t *opt, ssat_t ssat, int ch, clas_osr_ctx_t *osr_ctx, const nav_t *nav) |
| Compensate time variation of signal bias and ionosphere delay. | |
| int | clas_osr_corrmeas (const obsd_t *obs, nav_t *nav, const double *pos, const double *azel, const prcopt_t *opt, clas_grid_t *grid, clas_corr_t *corr, ssat_t ssat, int *brk, clas_osrd_t *osr, int *pbreset, int ch, clas_osr_ctx_t *osr_ctx) |
| Assemble per-satellite ionosphere/bias/antenna corrections. | |
| static void | ocean_tide_clasgrid (gtime_t tut, const clas_oload_t *oload, const int *index, int nn, const double *E, const double *Emat, const double *Gmat, const double *weight, double *dr) |
| Compute ocean tide loading displacement using CLAS grid interpolation. | |
| int | clas_osr_satcorr_update (gtime_t time, gtime_t teph, int sat, const prcopt_t *opt, const nav_t *nav, int ch, clas_osr_ctx_t *ctx) |
| Update per-satellite SIS correction state for IODE adjustment. | |
| static double | clas_osr_adjust_cpc (gtime_t teph, int sat, const ssr_t *ssr, int sig, double cpc, double *sis, int *flag, int ch, clas_osr_ctx_t *ctx) |
| Adjust carrier-phase correction for SIS discontinuity. | |
| static double | clas_osr_adjust_prc (gtime_t teph, int sat, const ssr_t *ssr, int sig, double prc, double *sis, int *flag, int ch, clas_osr_ctx_t *ctx) |
| Adjust pseudorange correction for SIS discontinuity. | |
| static void | clas_osr_adjust_r_dts (double *retr, double *retdts, gtime_t teph, int sat, nav_t *nav, const double *rr, gtime_t dts_time, int ch, clas_osr_ctx_t *ctx) |
| Recompute geometric range and clock on IODE change. | |
| int | clas_osr_zdres (const obsd_t *obs, int n, const double *rs, const double *dts, const double *vare, const int *svh, nav_t *nav, double *x, double *y, double *e, double *azel, rtk_t *rtk, int osrlog, clas_osr_ctx_t *osr_ctx, clas_grid_t *grid, clas_corr_t *corr, ssat_t *ssat, prcopt_t *opt, sol_t *sol, clas_osrd_t *osr, int ch) |
| Compute zero-differenced phase/code residuals with CLAS corrections. | |
| int | clas_ssr2osr (rtk_t *rtk, obsd_t *obs, int n, nav_t *nav, clas_osrd_t *osr, int mode, clas_ctx_t *clas) |
| Convert compact SSR corrections to observation-space representations. | |
Variables | |
| static const unsigned char | obsfreqs [] |
CLAS SSR-to-OSR (Observation Space Representation) conversion.
References: [1] claslib cssr2osr.c – upstream SSR->OSR implementation [2] IS-QZSS-L6-003 – CLAS Compact SSR Specification
Notes:
Definition in file mrtk_clas_osr.c.
| #define GME 3.986004415E+14 |
Earth gravitational constant (m^3/s^2) – for Shapiro correction
Definition at line 76 of file mrtk_clas_osr.c.
| #define IB_RTK | ( | s, | |
| f, | |||
| opt ) |
Definition at line 73 of file mrtk_clas_osr.c.
Referenced by clas_osr_zdres(), set_init_pb(), and udbias_ppp().
| #define MAXAGESSR_SIS 60.0 /* max age of ssr orbit/clock (s) */ |
Definition at line 781 of file mrtk_clas_osr.c.
Referenced by clas_osr_satcorr_update().
| #define MAXCCORSSR_SIS (1E-6 * CLIGHT) /* max clock correction (m) */ |
Definition at line 783 of file mrtk_clas_osr.c.
Referenced by clas_osr_satcorr_update().
| #define MAXECORSSR_SIS 10.0 /* max orbit correction (m) */ |
Definition at line 782 of file mrtk_clas_osr.c.
Referenced by clas_osr_satcorr_update().
| #define NF_RTK | ( | opt | ) |
Definition at line 64 of file mrtk_clas_osr.c.
| #define NI_RTK | ( | opt | ) |
Definition at line 66 of file mrtk_clas_osr.c.
| #define NP_RTK | ( | opt | ) |
Definition at line 65 of file mrtk_clas_osr.c.
Referenced by residual_test().
| #define NR_RTK | ( | opt | ) |
| #define POSL1 1 /* L1 single freq positioning */ |
Frequency pair selection modes (upstream claslib rtklib.h)
Definition at line 113 of file mrtk_clas_osr.c.
Referenced by clas_osr_selfreqpair(), and selfreqpair().
| #define POSL1L2 2 /* L1+L2 dual freq positioning */ |
Definition at line 114 of file mrtk_clas_osr.c.
Referenced by clas_osr_selfreqpair().
| #define POSL1L2L5 4 /* L1+L2+L5 triple freq positioning */ |
Definition at line 116 of file mrtk_clas_osr.c.
Referenced by clas_osr_selfreqpair(), and selfreqpair().
| #define POSL1L5 3 /* L1+L5 dual freq positioning */ |
Definition at line 115 of file mrtk_clas_osr.c.
Referenced by clas_osr_selfreqpair(), and selfreqpair().
| #define POSL1L5_L2 5 /* L1+L5(or L2) dual freq positioning */ |
Definition at line 117 of file mrtk_clas_osr.c.
Referenced by clas_osr_selfreqpair(), and selfreqpair().
| #define SQR | ( | x | ) |
Definition at line 61 of file mrtk_clas_osr.c.
Referenced by clas_osr_compensatedisp().
|
static |
Adjust carrier-phase correction for SIS discontinuity.
When phase bias TOW differs from current SIS TOW by exactly 30s, subtracts the SIS discontinuity from CPC to maintain phase continuity.
Definition at line 928 of file mrtk_clas_osr.c.
References cpc, clas_satcorr_t::currsis, clas_satcorr_t::currtow, ssr_t::iode, clas_satcorr_t::previode, clas_satcorr_t::prevtow, clas_osr_ctx_t::satcorr, ssr_t::t0, time2gpst(), and trace().
Referenced by clas_osr_zdres().
|
static |
Adjust pseudorange correction for SIS discontinuity.
Same logic as adjust_cpc but applied to PRC.
Definition at line 965 of file mrtk_clas_osr.c.
References clas_satcorr_t::currsis, clas_satcorr_t::currtow, ssr_t::iode, clas_satcorr_t::previode, clas_osr_ctx_t::satcorr, ssr_t::t0, time2gpst(), and trace().
Referenced by clas_osr_zdres().
|
static |
Recompute geometric range and clock on IODE change.
When IODE changes at an SSR boundary, the broadcast ephemeris has changed. This recomputes the geometric range using the previous IODE's ephemeris to maintain consistency.
Definition at line 999 of file mrtk_clas_osr.c.
References CLIGHT, cross3(), ssr_t::dclk, ssr_t::deph, eph2clk(), ephpos(), geodist(), normv3(), clas_satcorr_t::previode, clas_osr_ctx_t::satcorr, satsys(), seleph(), nav_s::ssr_ch, SYS_CMP, SYS_GAL, SYS_GPS, SYS_QZS, time2gpst(), timeadd(), and trace().
Referenced by clas_osr_zdres().
| void clas_osr_compensatedisp | ( | clas_corr_t * | corr, |
| const int * | index, | ||
| const obsd_t * | obs, | ||
| int | sat, | ||
| double | iono, | ||
| const double * | pb, | ||
| double * | compL, | ||
| int * | pbreset, | ||
| const prcopt_t * | opt, | ||
| ssat_t | ssat, | ||
| int | ch, | ||
| clas_osr_ctx_t * | osr_ctx, | ||
| const nav_t * | nav ) |
Compensate time variation of signal bias and ionosphere delay.
Ported from upstream claslib compensatedisp(). All static variables replaced by clas_osr_ctx_t members (comp_*).
| [in] | corr | Merged correction snapshot |
| [in] | index | Grid point indices |
| [in] | obs | Observation for this satellite |
| [in] | sat | Satellite number |
| [in] | iono | Ionosphere delay (m) |
| [in] | pb | Phase biases per frequency |
| [out] | compL | Compensation output per frequency |
| [in,out] | pbreset | Phase bias reset flags |
| [in] | opt | Processing options |
| [in] | ssat | Satellite status |
| [in] | ch | SSR channel (0 in MRTKLIB) |
| [in,out] | osr_ctx | OSR context for persistent state |
| [in] | nav | Navigation data (for wavelengths) |
Definition at line 430 of file mrtk_clas_osr.c.
References CLAS_CSSRINVALID, stec_t::data, FREQ1, FREQ2, obsd_t::L, MAXSAT, stec_t::n, prcopt_t::nf, obsfreqs, osr_ctx, prcopt_t::posopt, stecd_t::sat, sat_wavelengths(), ssat_t::slip, clas_corr_t::smode, SQR, clas_corr_t::stec, obsd_t::time, stecd_t::time, and timediff().
Referenced by clas_osr_corrmeas().
| int clas_osr_corrmeas | ( | const obsd_t * | obs, |
| nav_t * | nav, | ||
| const double * | pos, | ||
| const double * | azel, | ||
| const prcopt_t * | opt, | ||
| clas_grid_t * | grid, | ||
| clas_corr_t * | corr, | ||
| ssat_t | ssat, | ||
| int * | brk, | ||
| clas_osrd_t * | osr, | ||
| int * | pbreset, | ||
| int | ch, | ||
| clas_osr_ctx_t * | osr_ctx ) |
Assemble per-satellite ionosphere/bias/antenna corrections.
Ported from upstream claslib corrmeas(). Decodes phase and code biases from SSR corrections, applies STEC grid interpolation for ionosphere, performs consistency checks, and computes receiver antenna correction.
| [in] | obs | Observation for this satellite |
| [in,out] | nav | Navigation data |
| [in] | pos | Receiver position {lat,lon,hgt} (rad,m) |
| [in] | azel | Azimuth/elevation for this satellite |
| [in] | opt | Processing options |
| [in] | grid | Grid interpolation state |
| [in] | corr | Merged correction snapshot |
| [in] | ssat | Satellite status |
| [out] | brk | Slip break flag |
| [out] | osr | OSR output for this satellite |
| [in,out] | pbreset | Phase bias reset flags |
| [in] | ch | SSR channel (0 in MRTKLIB) |
| [in,out] | osr_ctx | OSR context |
Definition at line 582 of file mrtk_clas_osr.c.
References prcopt_t::antdel, antmodel(), clas_osrd_t::antr, clas_osrd_t::cbias, ssr_t::cbias, CLAS_CSSRINVALID, CLAS_MAXAGESSR_BIAS, clas_osr_compensatedisp(), clas_stec_grid_data(), claslib_pcv_slot(), obsd_t::code, code_on_same_freq(), clas_osrd_t::compL, count_nsig(), stec_t::data, clas_grid_t::Emat, clas_grid_t::Gmat, clas_grid_t::index, clas_osrd_t::iono, MAXCODE, stec_t::n, prcopt_t::nf, NFREQPCV, clas_grid_t::num, osr_ctx, clas_osrd_t::pbias, ssr_t::pbias, prcopt_t::pcvr, ssat_t::phw, prcopt_t::posopt, obsd_t::sat, stecd_t::sat, sat_wavelengths(), satsys(), clas_corr_t::smode, nav_s::ssr_ch, clas_corr_t::stec, ssr_t::t0, obsd_t::time, stecd_t::time, time2gpst(), time_str(), timediff(), trace(), clas_grid_t::weight, and clas_osrd_t::wupL.
Referenced by clas_osr_zdres().
| void clas_osr_ctx_init | ( | clas_osr_ctx_t * | ctx | ) |
Initialize OSR conversion context (zero all persistent state).
Initialize OSR conversion context.
| [out] | ctx | OSR context to initialize |
Definition at line 297 of file mrtk_clas_osr.c.
References CLAS_CH_NUM, clas_satcorr_t::currtow, clas_osr_ctx_t::initialized, MAXSAT, clas_satcorr_t::prev_orb_tow, clas_satcorr_t::previode, clas_satcorr_t::prevtow, and clas_osr_ctx_t::satcorr.
Referenced by clas_ssr2osr().
| double clas_osr_prectrop | ( | gtime_t | time, |
| const double * | pos, | ||
| const double * | azel, | ||
| double | zwd, | ||
| double | ztd ) |
Precise troposphere model for CLAS (MOPS standard + mapping function).
Computes slant tropospheric delay from zenith wet and total delays obtained from CLAS grid interpolation.
| [in] | time | Observation time |
| [in] | pos | Receiver position {lat,lon,hgt} (rad,m) |
| [in] | azel | Azimuth/elevation {az,el} (rad) |
| [in] | zwd | Zenith wet delay from grid (m) |
| [in] | ztd | Zenith total delay from grid (m) |
Definition at line 328 of file mrtk_clas_osr.c.
References geoidh(), get_stTv(), and tropmapf().
Referenced by clas_osr_zdres().
| int clas_osr_satcorr_update | ( | gtime_t | time, |
| gtime_t | teph, | ||
| int | sat, | ||
| const prcopt_t * | opt, | ||
| const nav_t * | nav, | ||
| int | ch, | ||
| clas_osr_ctx_t * | ctx ) |
Update per-satellite SIS correction state for IODE adjustment.
Compute zero-differenced phase/code residuals with CLAS corrections.
Tracks orbit/clock corrections and detects 5-second/25-second SSR boundary transitions. Computes currsis = SIS discontinuity for adjust_cpc/adjust_prc.
Ported from upstream satpos_ssr_sis() in ephemeris.c.
Definition at line 793 of file mrtk_clas_osr.c.
References clas_satcorr_t::clk, cross3(), clas_satcorr_t::currsis, clas_satcorr_t::currtow, ssr_t::dclk, ssr_t::ddeph, ssr_t::deph, dot(), ephpos(), ssr_t::hrclk, ssr_t::iod, ssr_t::iode, MAXAGESSR_SIS, MAXCCORSSR_SIS, MAXECORSSR_SIS, norm(), normv3(), clas_satcorr_t::orb, prcopt_t::posopt, clas_satcorr_t::prev_orb_tow, clas_satcorr_t::previode, clas_satcorr_t::prevsis, clas_satcorr_t::prevtow, clas_osr_ctx_t::satcorr, clas_osr_ctx_t::saved_rr, nav_s::ssr_ch, ssr_t::t0, gtime_t::time, time2gpst(), timediff(), clas_satcorr_t::tow, trace(), and ssr_t::udi.
Referenced by ppp_rtk_pos().
Select frequency pair for multi-frequency processing.
Returns a bitmask indicating which secondary frequencies to use alongside L1. The selection depends on the satellite system and the processing options posopt[10] (GPS) and posopt[12] (QZS).
Note: MRTKLIB's prcopt_t.posopt[] is 6 elements (indices 0-5) while upstream claslib uses indices up to 12. For forward compatibility the indices 10/12 are checked against the array size; if out of range, default to L1+L2.
| [in] | sat | Satellite number |
| [in] | opt | Processing options |
| [in] | obs | Observation data for this satellite |
Definition at line 368 of file mrtk_clas_osr.c.
References obsd_t::L, obsd_t::P, POSL1, POSL1L2, POSL1L2L5, POSL1L5, POSL1L5_L2, prcopt_t::posopt, satsys(), SYS_GAL, SYS_GPS, and SYS_QZS.
Referenced by clas_osr_zdres(), and udion().
| int clas_osr_zdres | ( | const obsd_t * | obs, |
| int | n, | ||
| const double * | rs, | ||
| const double * | dts, | ||
| const double * | vare, | ||
| const int * | svh, | ||
| nav_t * | nav, | ||
| double * | x, | ||
| double * | y, | ||
| double * | e, | ||
| double * | azel, | ||
| rtk_t * | rtk, | ||
| int | osrlog, | ||
| clas_osr_ctx_t * | osr_ctx, | ||
| clas_grid_t * | grid, | ||
| clas_corr_t * | corr, | ||
| ssat_t * | ssat, | ||
| prcopt_t * | opt, | ||
| sol_t * | sol, | ||
| clas_osrd_t * | osr, | ||
| int | ch ) |
Compute zero-differenced phase/code residuals with CLAS corrections.
Ported from upstream claslib zdres(). This is the ENA_PPP_RTK path (always enabled). CSSR2OSR_VRS path is removed.
Key differences from upstream:
| [in] | obs | Observation data for epoch |
| [in] | n | Number of observations |
| [in] | rs | Satellite positions+velocities (6*n) |
| [in] | dts | Satellite clock corrections (2*n) |
| [in] | vare | Satellite position variances (n) |
| [in] | svh | Satellite health flags (n) |
| [in,out] | nav | Navigation data |
| [in,out] | x | State vector (position extracted from [0:2]) |
| [out] | y | Residuals (n*nf*2), can be NULL |
| [out] | e | Line-of-sight vectors (3*n) |
| [out] | azel | Azimuth/elevation (2*n) |
| [in] | rtk | RTK control struct |
| [in] | osrlog | Enable OSR logging |
| [in,out] | osr_ctx | OSR context for persistent state |
| [in] | grid | Grid interpolation state |
| [in] | corr | Merged correction snapshot |
| [in,out] | ssat | Satellite status array |
| [in] | opt | Processing options |
| [in,out] | sol | Solution struct |
| [out] | osr | OSR output per satellite |
| [in] | ch | SSR channel (0 in MRTKLIB) |
Definition at line 1080 of file mrtk_clas_osr.c.
References clas_osrd_t::antr, sft_t::bias, clas_osrd_t::c, clas_osrd_t::cbias, chk_isb(), CLAS_CSSRINVALID, nav_s::clas_ctx, clas_osr_adjust_cpc(), clas_osr_adjust_prc(), clas_osr_adjust_r_dts(), clas_osr_corrmeas(), clas_osr_prectrop(), clas_osr_selfreqpair(), clas_trop_grid_data(), CLIGHT, clas_osrd_t::clk, obsd_t::code, ssat_t::code, code2freq_num(), clas_osrd_t::compL, clas_osrd_t::CPC, ecef2pos(), prcopt_t::elmin, clas_grid_t::Emat, nav_s::erp, nav_s::filreset, free, FREQ1, FREQ2, geodist(), geterp(), clas_grid_t::Gmat, gpst2utc(), clas_oload_t::gridnum, IB_RTK, clas_grid_t::index, clas_osrd_t::iono, prcopt_t::isb, ISBOPT_TABLE, isL2C(), obsd_t::L, malloc, MAXOBS, MAXSAT, erp_t::n, sft_t::n, clas_grid_t::network, prcopt_t::nf, norm(), clas_grid_t::num, ocean_tide_clasgrid(), prcopt_t::odisp, clas_ctx_t::oload, clas_osrd_t::orb, osr_ctx, obsd_t::P, clas_osrd_t::p, clas_osrd_t::pbias, prcopt_t::phasshft, ssat_t::phw, prcopt_t::posopt, clas_osrd_t::PRC, R2D, sft_t::rectyp, prcopt_t::rectype, clas_osrd_t::relatv, clas_osrd_t::sat, obsd_t::sat, sat_wavelengths(), satazel(), satsys(), nav_s::sfts, shapiro(), clas_osrd_t::sis, clas_corr_t::smode, prcopt_t::snrmask, nav_s::ssr_ch, nav_s::stas, SYS_GAL, ssr_t::t0, testsnr(), prcopt_t::tidecorr, tidedisp(), obsd_t::time, sol_t::time, time2gpst(), time_str(), timeadd(), timediff(), trace(), clas_osrd_t::trop, utc2gpst(), clas_grid_t::weight, windupcorr(), clas_osrd_t::wupL, and xyz2enu().
Referenced by clas_ssr2osr(), and ppp_rtk_pos().
| int clas_ssr2osr | ( | rtk_t * | rtk, |
| obsd_t * | obs, | ||
| int | n, | ||
| nav_t * | nav, | ||
| clas_osrd_t * | osr, | ||
| int | mode, | ||
| clas_ctx_t * | clas ) |
Convert compact SSR corrections to observation-space representations.
This is the top-level wrapper that sets up satellite state, grid/CSSR corrections, then calls clas_osr_zdres() to compute per-satellite residuals.
| [in,out] | rtk | RTK control structure |
| [in,out] | obs | Observation data array (may be modified) |
| [in] | n | Number of observations |
| [in,out] | nav | Navigation data (SSR corrections applied here) |
| [out] | osr | OSR output per satellite |
| [in] | mode | 0=normal, unused (upstream compat) |
| [in] | clas | CLAS decoder context (replaces upstream globals) |
Definition at line 1493 of file mrtk_clas_osr.c.
References sol_t::age, clas_osrd_t::c, clas_bank_get_close(), clas_check_grid_status(), clas_get_grid_index(), clas_osr_ctx_init(), clas_osr_zdres(), clas_update_global(), clas_update_local(), obsd_t::code, clas_ctx_t::current, ecef2pos(), EPHOPT_SSRAPC, ssat_t::fix, free, clas_ctx_t::grid, obsd_t::L, clas_ctx_t::l6buf, obsd_t::LLI, mat(), MAXOBS, MAXSAT, prcopt_t::mode, clas_grid_t::network, prcopt_t::nf, norm(), rtk_t::opt, osr_ctx, obsd_t::P, clas_osrd_t::p, ssat_t::ph, PMODE_SSR2OSR_FIXED, prcopt_t::posopt, ssat_t::pt, obsd_t::rcv, sol_t::rr, prcopt_t::ru, clas_osrd_t::sat, obsd_t::sat, sat_wavelengths(), satposs(), satsys(), set_ssr_ch_idx(), ssat_t::slip, ssat_t::slipc, clas_corr_t::smode, obsd_t::SNR, ssat_t::snr, SNR_UNIT, rtk_t::sol, SOLQ_SINGLE, rtk_t::ssat, nav_s::ssr_ch, sol_t::stat, ssat_t::sys, ssr_t::t0, clas_l6buf_t::time, obsd_t::time, timediff(), trace(), ssat_t::vsat, rtk_t::x, and zeros().
Referenced by rtkpos().
|
static |
Definition at line 104 of file mrtk_clas_osr.c.
References pcv_slot_has_data().
Referenced by clas_osr_corrmeas().
|
static |
Check if two obs codes are on the same frequency band.
CLAS corrections use combined tracking codes (e.g. L2X = L2C M+L), while receivers report specific codes (e.g. L2W, L2L). These are equivalent for bias correction purposes since CLAS biases are frequency-band level, not tracking-mode specific.
| [in] | sys | Satellite system (SYS_GPS, SYS_GAL, etc.) |
| [in] | code1 | First obs code (CODE_L??) |
| [in] | code2 | Second obs code (CODE_L??) |
Definition at line 91 of file mrtk_clas_osr.c.
References code2freq_idx().
Referenced by clas_osr_corrmeas().
|
static |
Count non-zero entries in a signal mode array (equivalent to nsig).
| [in] | smode | Signal mode array for one satellite |
Definition at line 279 of file mrtk_clas_osr.c.
References MAXCODE.
Referenced by clas_osr_corrmeas().
|
inlinestatic |
Definition at line 67 of file mrtk_clas_osr.c.
References prcopt_t::tropopt, TROPOPT_EST, and TROPOPT_ESTG.
|
static |
Compute ocean tide loading displacement using CLAS grid interpolation.
Evaluates tide_oload() at each surrounding grid point, then interpolates using bilinear (Gmat/Emat) or weighted average. Ported from upstream claslib ppp.c:ocean_tide_clasgrid().
| [in] | tut | Time in UT |
| [in] | oload | Ocean loading data for the selected network |
| [in] | index | Grid point indices (from clas_grid_t) |
| [in] | nn | Number of grid points (1-4) |
| [in] | E | ENU rotation matrix (3x3) |
| [in] | Emat | Interpolation basis vector (4x1, can be NULL) |
| [in] | Gmat | Interpolation matrix (4x4, can be NULL) |
| [in] | weight | Interpolation weights (4x1) |
| [out] | dr | Displacement (ECEF, m) — accumulated |
Definition at line 736 of file mrtk_clas_osr.c.
References dot(), matmul(), clas_oload_t::odisp, tide_oload(), and trace().
Referenced by clas_osr_zdres().
|
static |
Definition at line 100 of file mrtk_clas_osr.c.
References NFREQPCV, norm(), pcv_t::off, and pcv_t::var.
Referenced by claslib_pcv_slot().
|
extern |
Definition at line 244 of file mrtk_obs.c.
References code2freq(), geph_t::frq, nav_s::geph, nav_s::glo_fcn, nav_s::ng, geph_t::sat, satsys_bd2(), and SYS_GLO.
Referenced by decode_cresgloraw(), decode_rangeb(), decode_rangecmpb(), gfobs(), iflc_freq2_idx(), prange(), rescode(), resdop(), sat_lambda(), sat_wavelengths(), satantoff(), udbias(), and zdres_sat().
Fill wavelength array for a satellite from observation codes.
| [in] | sat | Satellite number |
| [in] | obs | Observation data for this satellite |
| [in] | nav | Navigation data (for GLONASS FCN) |
| [out] | lam | Wavelength array [NFREQ+NEXOBS] |
Definition at line 261 of file mrtk_clas_osr.c.
References CLIGHT, obsd_t::code, and sat2freq().
Referenced by clas_osr_compensatedisp(), clas_osr_corrmeas(), clas_osr_zdres(), and clas_ssr2osr().
|
static |
Compute Shapiro (relativistic) time delay correction.
| [in] | rsat | Satellite position (ECEF) (m) |
| [in] | rrcv | Receiver position (ECEF) (m) |
Definition at line 142 of file mrtk_clas_osr.c.
References CLIGHT, GME, and norm().
Referenced by clas_osr_zdres().
|
static |
Compute phase windup correction.
| [in] | time | Time (GPST) |
| [in] | rs | Satellite position + velocity (ECEF, 6 elements) |
| [in] | rr | Receiver position (ECEF, 3 elements) |
| [in,out] | phw | Phase windup correction (cycle), previous value as input |
Definition at line 169 of file mrtk_clas_osr.c.
References cross3(), dot(), ecef2pos(), gpst2utc(), norm(), normv3(), OMGE, PI, satpos(), sunmoonpos(), and xyz2enu().
Referenced by clas_osr_zdres().
|
static |
CSSR signal mode to frequency band mapping table. Index = signal tracking mode code, value = 1:L1,2:L2,3:L5,4:L6,5:L7,6:L8
Definition at line 122 of file mrtk_clas_osr.c.
Referenced by clas_osr_compensatedisp().