sidereon_core/tolerances.rs
1//! Shared named numerical tolerances for GNSS modeling kernels.
2//!
3//! These names preserve existing numeric thresholds while making their
4//! semantics explicit at call sites.
5
6pub use crate::astro::tolerances::PIVOT_EPSILON;
7
8/// Frequency difference accepted when checking that two observations use the
9/// same configured carrier frequency.
10pub const FREQUENCY_MATCH_EPS_HZ: f64 = 1.0e-6;
11
12/// Frequency denominator threshold below which carrier combinations are
13/// considered degenerate.
14pub const FREQUENCY_DENOMINATOR_EPS_HZ: f64 = 1.0;
15
16/// Whole-second epoch-lattice tolerance used by SP3 merge/decimation.
17pub const WHOLE_SECOND_EPS_S: f64 = 1.0e-6;
18
19/// Threshold below which a fitted eccentricity uses the circular fast path.
20pub const ECCENTRICITY_ZERO_EPS: f64 = 1.0e-12;
21
22/// Degenerate vector-norm threshold for geometry setup.
23pub const VECTOR_NORM_ZERO_EPS: f64 = PIVOT_EPSILON;
24
25/// Satellite-yaw singularity threshold in radians.
26pub const YAW_SINGULARITY_EPS_RAD: f64 = 1.0e-12;
27
28/// GLONASS fixed-step residual-time loop tolerance.
29pub const GLONASS_TIME_EPS_S: f64 = 1.0e-9;
30
31/// Signal Doppler-grid endpoint tolerance.
32pub const DOPPLER_GRID_EDGE_EPS_HZ: f64 = 1.0e-9;
33
34/// SBAS IGP coordinate equality tolerance in degrees for grid merge/lookups.
35pub const SBAS_IGP_COORD_EPS_DEG: f64 = 1.0e-9;
36
37/// Relative carrier-frequency tolerance for PPP code-bias observable checks;
38/// scaled by the larger compared frequency to preserve the existing bound.
39pub const PPP_FREQUENCY_REL_EPS: f64 = 1.0e-12;
40
41/// Absolute carrier-frequency tolerance floor for PPP observable matching and
42/// GLONASS channel inference, covering decimal lookup/parse roundoff in Hz.
43pub const PPP_FREQUENCY_ABS_EPS_HZ: f64 = 1.0e-3;
44
45/// RTKLIB LAMBDA reduction permutation hysteresis.
46pub const LAMBDA_REDUCTION_EPS: f64 = 1.0e-6;
47
48/// Reduced-orbit trust-region solve convergence tolerance.
49pub const REDUCED_ORBIT_SOLVER_TOL: f64 = 1.0e-12;
50
51/// Reduced-orbit eccentric-anomaly Newton-step convergence threshold.
52pub const REDUCED_ORBIT_KEPLER_STEP_EPS_RAD: f64 = 1.0e-14;