nyx_space/od/ground_station/
builtin.rs

1/*
2    Nyx, blazing fast astrodynamics
3    Copyright (C) 2018-onwards Christopher Rabotin <christopher.rabotin@gmail.com>
4
5    This program is free software: you can redistribute it and/or modify
6    it under the terms of the GNU Affero General Public License as published
7    by the Free Software Foundation, either version 3 of the License, or
8    (at your option) any later version.
9
10    This program is distributed in the hope that it will be useful,
11    but WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13    GNU Affero General Public License for more details.
14
15    You should have received a copy of the GNU Affero General Public License
16    along with this program.  If not, see <https://www.gnu.org/licenses/>.
17*/
18
19use super::*;
20
21impl GroundStation {
22    pub fn dss65_madrid(
23        elevation_mask: f64,
24        range_noise_km: StochasticNoise,
25        doppler_noise_km_s: StochasticNoise,
26        iau_earth: Frame,
27    ) -> Self {
28        let mut measurement_types = IndexSet::new();
29        measurement_types.insert(MeasurementType::Range);
30        measurement_types.insert(MeasurementType::Doppler);
31
32        let mut stochastics = IndexMap::new();
33        stochastics.insert(MeasurementType::Range, range_noise_km);
34        stochastics.insert(MeasurementType::Doppler, doppler_noise_km_s);
35
36        Self {
37            name: "Madrid".to_string(),
38            elevation_mask_deg: elevation_mask,
39            latitude_deg: 40.427_222,
40            longitude_deg: 4.250_556,
41            height_km: 0.834_939,
42            frame: iau_earth,
43            measurement_types,
44            integration_time: None,
45            light_time_correction: false,
46            timestamp_noise_s: None,
47            stochastic_noises: Some(stochastics),
48        }
49    }
50
51    pub fn dss34_canberra(
52        elevation_mask: f64,
53        range_noise_km: StochasticNoise,
54        doppler_noise_km_s: StochasticNoise,
55        iau_earth: Frame,
56    ) -> Self {
57        let mut measurement_types = IndexSet::new();
58        measurement_types.insert(MeasurementType::Range);
59        measurement_types.insert(MeasurementType::Doppler);
60
61        let mut stochastics = IndexMap::new();
62        stochastics.insert(MeasurementType::Range, range_noise_km);
63        stochastics.insert(MeasurementType::Doppler, doppler_noise_km_s);
64
65        Self {
66            name: "Canberra".to_string(),
67            elevation_mask_deg: elevation_mask,
68            latitude_deg: -35.398_333,
69            longitude_deg: 148.981_944,
70            height_km: 0.691_750,
71            frame: iau_earth,
72            measurement_types,
73            integration_time: None,
74            light_time_correction: false,
75            timestamp_noise_s: None,
76            stochastic_noises: Some(stochastics),
77        }
78    }
79
80    pub fn dss13_goldstone(
81        elevation_mask: f64,
82        range_noise_km: StochasticNoise,
83        doppler_noise_km_s: StochasticNoise,
84        iau_earth: Frame,
85    ) -> Self {
86        let mut measurement_types = IndexSet::new();
87        measurement_types.insert(MeasurementType::Range);
88        measurement_types.insert(MeasurementType::Doppler);
89
90        let mut stochastics = IndexMap::new();
91        stochastics.insert(MeasurementType::Range, range_noise_km);
92        stochastics.insert(MeasurementType::Doppler, doppler_noise_km_s);
93
94        Self {
95            name: "Goldstone".to_string(),
96            elevation_mask_deg: elevation_mask,
97            latitude_deg: 35.247_164,
98            longitude_deg: 243.205,
99            height_km: 1.071_149_04,
100            frame: iau_earth,
101            measurement_types,
102            integration_time: None,
103            light_time_correction: false,
104            timestamp_noise_s: None,
105            stochastic_noises: Some(stochastics),
106        }
107    }
108}