#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
fn default_sv_clock() -> bool {
true
}
fn default_group_delay() -> bool {
true
}
fn default_ionospheric_bias() -> bool {
true
}
fn default_tropospheric_bias() -> bool {
true
}
fn default_earth_rot() -> bool {
true
}
fn default_relativistic_clock() -> bool {
true
}
fn default_relativistic_path() -> bool {
true
}
fn default_phase_windup() -> bool {
false
}
fn default_solid_tides() -> bool {
false
}
#[derive(Copy, Clone, Debug, PartialEq)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct Modeling {
#[cfg_attr(feature = "serde", serde(default = "default_sv_clock"))]
pub sv_clock_bias: bool,
#[cfg_attr(feature = "serde", serde(default = "default_group_delay"))]
pub sv_total_group_delay: bool,
#[cfg_attr(feature = "serde", serde(default = "default_relativistic_clock"))]
pub relativistic_clock_bias: bool,
#[cfg_attr(feature = "serde", serde(default = "default_relativistic_path"))]
pub relativistic_path_range: bool,
#[cfg_attr(feature = "serde", serde(default = "default_tropospheric_bias"))]
pub tropospheric_bias: bool,
#[cfg_attr(feature = "serde", serde(default = "default_ionospheric_bias"))]
pub ionospheric_bias: bool,
#[cfg_attr(feature = "serde", serde(default = "default_earth_rot"))]
pub earth_rotation: bool,
#[cfg_attr(feature = "serde", serde(default = "default_phase_windup"))]
pub phase_windup: bool,
#[cfg_attr(feature = "serde", serde(default = "default_solid_tides"))]
pub solid_tides: bool,
}
impl Default for Modeling {
fn default() -> Self {
Self {
sv_clock_bias: default_sv_clock(),
solid_tides: default_solid_tides(),
earth_rotation: default_earth_rot(),
phase_windup: default_phase_windup(),
sv_total_group_delay: default_group_delay(),
ionospheric_bias: default_ionospheric_bias(),
tropospheric_bias: default_tropospheric_bias(),
relativistic_clock_bias: default_relativistic_clock(),
relativistic_path_range: default_relativistic_path(),
}
}
}
impl Modeling {
pub fn no_modeling() -> Modeling {
Modeling {
sv_clock_bias: false,
sv_total_group_delay: false,
relativistic_clock_bias: false,
relativistic_path_range: false,
tropospheric_bias: false,
ionospheric_bias: false,
earth_rotation: false,
phase_windup: false,
solid_tides: false,
}
}
}