Skip to main content

Module tec

Module tec 

Source
Expand description

Dual-frequency Total Electron Content estimation helpers.

This module starts with the absolute, noisy code-derived slant TEC estimate. It uses the dual-frequency code geometry-free combination P1 - P2 and the dispersive ionospheric group-delay relationship delay_m = 40.308e16 * TECU * (1 / f1^2 - 1 / f2^2), where carrier frequencies are in hertz and one TECU is 1e16 electrons per square meter.

use sidereon_core::constants::{C_M_S, F_L1_HZ, F_L2_HZ};
use sidereon_core::precise_positioning::{
    estimate_tec, DualFrequencyObservation, TecConfig, TecEpoch, TecObservation,
    TEC_GROUP_DELAY_COEFFICIENT,
};

fn observation(_epoch: usize, slant_tec_tecu: f64, phase_bias_tecu: f64) -> DualFrequencyObservation {
    let denominator = TEC_GROUP_DELAY_COEFFICIENT
        * (1.0 / (F_L1_HZ * F_L1_HZ) - 1.0 / (F_L2_HZ * F_L2_HZ));
    let code_geometry_free_m = denominator * slant_tec_tecu;
    let phase_geometry_free_m = -denominator * (slant_tec_tecu + phase_bias_tecu);
    DualFrequencyObservation {
        satellite_id: "G01".to_string(),
        ambiguity_id: "G01".to_string(),
        p1_m: 0.0,
        p2_m: -code_geometry_free_m,
        phi1_cyc: phase_geometry_free_m / (C_M_S / F_L1_HZ),
        phi2_cyc: 0.0,
        f1_hz: F_L1_HZ,
        f2_hz: F_L2_HZ,
        lli1: None,
        lli2: None,
    }
}

let epochs = (0..2)
    .map(|epoch| TecEpoch {
        time_s: epoch as f64 * 30.0,
        receiver_latitude_rad: 0.0,
        receiver_longitude_rad: 0.0,
        observations: vec![TecObservation {
            observation: observation(epoch, 20.0, 5.0),
            elevation_rad: 60.0_f64.to_radians(),
            azimuth_rad: 90.0_f64.to_radians(),
        }],
    })
    .collect::<Vec<_>>();
let tec = estimate_tec(&epochs, TecConfig::default())?;
assert_eq!(tec.arcs.len(), 1);
assert_eq!(tec.arcs[0].samples.len(), 2);

Structs§

CodeSlantTecEstimate
Code geometry-free slant TEC estimate for one dual-frequency observation.
IonosphericPiercePoint
Ionospheric pierce point on the configured thin shell.
LeveledTecSample
One leveled TEC sample emitted for a continuous arc.
PhaseSlantTecEstimate
Phase geometry-free slant TEC estimate for one dual-frequency observation.
TecConfig
Configuration for thin-shell TEC estimation.
TecEpoch
One epoch of dual-frequency TEC observations.
TecEstimate
TEC estimates for all continuous satellite arcs in a stream.
TecEstimateSample
One leveled TEC estimate at one epoch for one satellite.
TecLevelingResult
Result of phase-code leveling across one continuous satellite arc.
TecLevelingSample
One dual-frequency slant TEC sample used by phase-code leveling.
TecObservation
One satellite’s dual-frequency TEC observation with topocentric geometry.
TecSatelliteArc
TEC estimates for one satellite continuous arc.

Enums§

TecError
Error produced while estimating dual-frequency TEC.

Constants§

DEFAULT_IONOSPHERIC_SHELL_HEIGHT_M
Default single-layer ionospheric shell height in meters.
ELECTRONS_PER_TECU_M2
Electrons per square meter represented by one TECU.
TEC_GROUP_DELAY_COEFFICIENT
Ionospheric group-delay coefficient for TECU inputs.

Functions§

code_geometry_free_m
Compute the code geometry-free combination P1 - P2, in meters.
estimate_code_slant_tec
Estimate absolute code-derived slant TEC for one dual-frequency observation.
estimate_phase_slant_tec
Estimate biased phase-derived slant TEC for one dual-frequency observation.
estimate_tec
Estimate TEC over a time-ordered stream of dual-frequency epochs.
ionospheric_pierce_point
Compute the ionospheric pierce point for a receiver and satellite look angle.
level_slant_tec_arc
Level a continuous arc of code and phase slant TEC samples.
phase_geometry_free_m
Compute the carrier phase geometry-free combination L1 - L2, in meters.
slant_tec_from_code_geometry_free_m
Convert a code geometry-free delay in meters into slant TEC in TECU.
slant_tec_from_phase_geometry_free_m
Convert a phase geometry-free delay in meters into biased slant TEC in TECU.
thin_shell_mapping_function
Thin-shell obliquity factor mapping vertical TEC to slant TEC.
vertical_tec_from_slant_tec
Convert slant TEC to vertical TEC with the configured thin-shell mapping.