tatc 3.2.2__tar.gz → 3.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. {tatc-3.2.2/src/tatc.egg-info → tatc-3.3.0}/PKG-INFO +2 -1
  2. {tatc-3.2.2 → tatc-3.3.0}/pyproject.toml +2 -1
  3. {tatc-3.2.2 → tatc-3.3.0}/src/tatc/__init__.py +1 -1
  4. {tatc-3.2.2 → tatc-3.3.0}/src/tatc/analysis/coverage.py +5 -3
  5. {tatc-3.2.2 → tatc-3.3.0}/src/tatc/analysis/ro_coverage.py +45 -24
  6. {tatc-3.2.2 → tatc-3.3.0}/src/tatc/analysis/track.py +14 -10
  7. {tatc-3.2.2 → tatc-3.3.0}/src/tatc/schemas/__init__.py +9 -1
  8. {tatc-3.2.2 → tatc-3.3.0}/src/tatc/schemas/orbit.py +152 -0
  9. {tatc-3.2.2 → tatc-3.3.0}/src/tatc/schemas/satellite.py +88 -1
  10. {tatc-3.2.2 → tatc-3.3.0/src/tatc.egg-info}/PKG-INFO +2 -1
  11. {tatc-3.2.2 → tatc-3.3.0}/src/tatc.egg-info/requires.txt +1 -0
  12. {tatc-3.2.2 → tatc-3.3.0}/LICENSE +0 -0
  13. {tatc-3.2.2 → tatc-3.3.0}/README.md +0 -0
  14. {tatc-3.2.2 → tatc-3.3.0}/setup.cfg +0 -0
  15. {tatc-3.2.2 → tatc-3.3.0}/src/tatc/analysis/__init__.py +0 -0
  16. {tatc-3.2.2 → tatc-3.3.0}/src/tatc/analysis/dop.py +0 -0
  17. {tatc-3.2.2 → tatc-3.3.0}/src/tatc/analysis/latency.py +0 -0
  18. {tatc-3.2.2 → tatc-3.3.0}/src/tatc/constants.py +0 -0
  19. {tatc-3.2.2 → tatc-3.3.0}/src/tatc/generation/__init__.py +0 -0
  20. {tatc-3.2.2 → tatc-3.3.0}/src/tatc/generation/cells.py +0 -0
  21. {tatc-3.2.2 → tatc-3.3.0}/src/tatc/generation/points.py +0 -0
  22. {tatc-3.2.2 → tatc-3.3.0}/src/tatc/resources/de421.bsp +0 -0
  23. {tatc-3.2.2 → tatc-3.3.0}/src/tatc/schemas/architecture.py +0 -0
  24. {tatc-3.2.2 → tatc-3.3.0}/src/tatc/schemas/instrument.py +0 -0
  25. {tatc-3.2.2 → tatc-3.3.0}/src/tatc/schemas/point.py +0 -0
  26. {tatc-3.2.2 → tatc-3.3.0}/src/tatc/utils.py +0 -0
  27. {tatc-3.2.2 → tatc-3.3.0}/src/tatc.egg-info/SOURCES.txt +0 -0
  28. {tatc-3.2.2 → tatc-3.3.0}/src/tatc.egg-info/dependency_links.txt +0 -0
  29. {tatc-3.2.2 → tatc-3.3.0}/src/tatc.egg-info/top_level.txt +0 -0
  30. {tatc-3.2.2 → tatc-3.3.0}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tatc
3
- Version: 3.2.2
3
+ Version: 3.3.0
4
4
  Summary: Tradespace Analysis Toolkit for Constellations (TAT-C)
5
5
  Author-email: "Paul T. Grogan" <paul.grogan@asu.edu>
6
6
  License: BSD License
@@ -40,6 +40,7 @@ Requires-Dist: sphinx-rtd-theme; extra == "docs"
40
40
  Provides-Extra: examples
41
41
  Requires-Dist: ipykernel; extra == "examples"
42
42
  Requires-Dist: matplotlib; extra == "examples"
43
+ Requires-Dist: cartopy; extra == "examples"
43
44
  Provides-Extra: osse
44
45
  Requires-Dist: netcdf4; extra == "osse"
45
46
  Requires-Dist: pydap; extra == "osse"
@@ -63,7 +63,8 @@ docs = [
63
63
  ]
64
64
  examples = [
65
65
  "ipykernel",
66
- "matplotlib"
66
+ "matplotlib",
67
+ "cartopy"
67
68
  ]
68
69
  osse = [
69
70
  "netcdf4",
@@ -9,4 +9,4 @@ from . import constants
9
9
  from . import utils
10
10
  from . import resources
11
11
 
12
- __version__ = "3.2.2"
12
+ __version__ = "3.3.0"
@@ -269,9 +269,9 @@ def _get_empty_coverage_frame(omit_solar: bool) -> gpd.GeoDataFrame:
269
269
  def collect_observations(
270
270
  point: Point,
271
271
  satellite: Satellite,
272
- instrument: Instrument,
273
272
  start: datetime,
274
273
  end: datetime,
274
+ instrument_index: int = 0,
275
275
  omit_solar: bool = True,
276
276
  ) -> gpd.GeoDataFrame:
277
277
  """
@@ -283,6 +283,7 @@ def collect_observations(
283
283
  instrument (Instrument): The observing instrument.
284
284
  start (datetime.datetime): Start of analysis period.
285
285
  end (datetime.datetime): End of analysis period.
286
+ instrument_index (int): The index of the observing instrument in satellite.
286
287
  omit_solar (bool): `True`, to omit solar angles to improve
287
288
  computational efficiency; otherwise `False`.
288
289
 
@@ -300,6 +301,7 @@ def collect_observations(
300
301
  sat.at(timescale.from_datetime(start))
301
302
  ).elevation.m
302
303
  # compute the minimum altitude angle required for observation
304
+ instrument = satellite.instruments[instrument_index]
303
305
  min_elevation_angle = compute_min_elevation_angle(
304
306
  satellite_altitude,
305
307
  instrument.field_of_regard,
@@ -376,12 +378,12 @@ def collect_multi_observations(
376
378
  geopandas.GeoDataFrame: The data frame with all recorded observations.
377
379
  """
378
380
  gdfs = [
379
- collect_observations(point, satellite, instrument, start, end, omit_solar)
381
+ collect_observations(point, satellite, start, end, instrument_index, omit_solar)
380
382
  for constellation in (
381
383
  satellites if isinstance(satellites, list) else [satellites]
382
384
  )
383
385
  for satellite in (constellation.generate_members())
384
- for instrument in satellite.instruments
386
+ for instrument_index in range(len(satellite.instruments))
385
387
  ]
386
388
  # concatenate into one data frame, sort by start time, and re-index
387
389
  return pd.concat(gdfs).sort_values("start").reset_index(drop=True)
@@ -24,8 +24,10 @@ def _collect_ro_series(
24
24
  transmitter: Satellite,
25
25
  ts: Time,
26
26
  rx_pv: ICRF,
27
+ rx_v_u: List[float],
27
28
  rx_n_u: List[float],
28
- max_azimuth: float,
29
+ rx_b_u: List[float],
30
+ max_yaw: float,
29
31
  range_elevation: Tuple[float],
30
32
  ):
31
33
  # construct transmitter
@@ -97,30 +99,34 @@ def _collect_ro_series(
97
99
  tp_sign = np.sign(
98
100
  np.einsum("ij,ij->j", tp_p - tx_pv.position.m, tp_p - rx_pv.position.m)
99
101
  )
100
- # relative transmitter position from receiver in receiver orbit plane
101
- rx_tx_p_rx_plane = rx_tx_pv.position.m - np.einsum(
102
+ # relative transmitter position from receiver in plane normal to receiver orbit
103
+ rx_tx_p_rx_n_plane = rx_tx_pv.position.m - np.einsum(
102
104
  "ij,j->ij", rx_n_u, np.einsum("ij,ij->j", rx_n_u, rx_tx_pv.position.m)
103
105
  )
104
- # transmitter azimuth angle in receiver body-fixed frame
105
- rx_tx_azimuth = np.degrees(
106
- np.arccos(
107
- np.divide(
108
- np.einsum("ij,ij->j", rx_tx_p_rx_plane, rx_pv.velocity.m_per_s),
109
- np.multiply(
110
- np.linalg.norm(rx_tx_p_rx_plane, axis=0),
111
- np.linalg.norm(rx_pv.velocity.m_per_s, axis=0),
112
- ),
113
- )
106
+ # relative transmitter position from receiver in plane binormal to receiver orbit
107
+ rx_tx_p_rx_t_plane = rx_tx_pv.position.m - np.einsum(
108
+ "ij,j->ij", rx_b_u, np.einsum("ij,ij->j", rx_b_u, rx_tx_pv.position.m)
109
+ )
110
+ # transmitter pitch angle in receiver body-fixed frame
111
+ rx_tx_pitch = np.degrees(
112
+ np.arctan2(
113
+ np.einsum("ij,ij->j", rx_tx_p_rx_n_plane, rx_b_u),
114
+ np.einsum("ij,ij->j", rx_tx_p_rx_n_plane, rx_v_u),
115
+ )
116
+ )
117
+ # transmitter yaw angle in receiver body-fixed frame
118
+ rx_tx_yaw = np.degrees(
119
+ np.arctan2(
120
+ np.einsum("ij,ij->j", rx_tx_p_rx_t_plane, rx_n_u),
121
+ np.einsum("ij,ij->j", rx_tx_p_rx_t_plane, rx_v_u),
114
122
  )
115
123
  )
116
124
  # occultation observations
117
125
  occ_obs = []
118
126
  # occultation arc
119
127
  occ_arc = None
120
- # valid if tangent point intersects and transmitter view angle below maximum
121
- valid = np.logical_and(
122
- tp_sign < 0, rx_tx_azimuth % (180 - max_azimuth) < max_azimuth
123
- )
128
+ # valid if tangent point intersects and yaw angle below maximum
129
+ valid = np.logical_and(tp_sign < 0, np.abs(rx_tx_yaw) % (180 - max_yaw) < max_yaw)
124
130
  # events occur when validity changes value
125
131
  is_event = np.diff(valid)
126
132
  # loop over valid times
@@ -143,7 +149,7 @@ def _collect_ro_series(
143
149
  # start of new RO observation
144
150
  occ_arc = {
145
151
  "tx": tx.name,
146
- "is_rising": rx_tx_azimuth[j] < max_azimuth,
152
+ "is_rising": rx_tx_pitch[j] > -90,
147
153
  "points": [],
148
154
  }
149
155
 
@@ -154,7 +160,8 @@ def _collect_ro_series(
154
160
  {
155
161
  "time": ts[j].utc_datetime(),
156
162
  "tangent_point": tpp_geo,
157
- "rx_tx_azimuth": rx_tx_azimuth[j] % (180 - max_azimuth),
163
+ "rx_tx_pitch": rx_tx_pitch[j],
164
+ "rx_tx_yaw": rx_tx_yaw[j],
158
165
  "tp_tx_azimuth": tp_tx_azmimuth,
159
166
  }
160
167
  )
@@ -174,7 +181,7 @@ def collect_ro_observations(
174
181
  transmitters: Union[Satellite, List[Satellite]],
175
182
  times: List[datetime],
176
183
  sample_elevation: float = 0,
177
- max_azimuth: float = 65,
184
+ max_yaw: float = 65,
178
185
  range_elevation: Tuple[float] = (-200e3, 60e3),
179
186
  ) -> gpd.GeoDataFrame:
180
187
  """
@@ -185,7 +192,7 @@ def collect_ro_observations(
185
192
  transmitters (typing.Union[Satellite,typing.List[Satellite]]): the satellite(s) with a RO transmitter.
186
193
  times (typing.List[datetime.datetime]): The list of datetimes to sample.
187
194
  sample_elevation: (float): the elevation (m) at which to sample observation attributes.
188
- max_azimuth (float): the maximum transmitter azimuth angle (from receiver body-fixed frame) for a valid obsevation.
195
+ max_yaw (float): the maximum transmitter yaw angle (from receiver body-fixed frame) for a valid obsevation.
189
196
  range_elevation: (typing.Tuple[float]): the lower and upper bound on tangent point elevation (m) for a valid observation.
190
197
  """
191
198
  # construct receiver
@@ -195,18 +202,31 @@ def collect_ro_observations(
195
202
  ts = timescale.from_datetimes(times)
196
203
  # receiver position, velocity
197
204
  rx_pv = rx.at(ts)
198
- # unit vector normal to receiver orbit plane
205
+ # unit vector tangent to receiver orbit plane (VNB x-axis)
206
+ rx_v_u = np.divide(
207
+ rx_pv.velocity.m_per_s, np.linalg.norm(rx_pv.velocity.m_per_s, axis=0)
208
+ )
209
+ # unit vector normal to receiver orbit plane (VNB y-axis)
199
210
  rx_n_u = np.einsum(
200
211
  "iik->ik",
201
212
  np.cross(rx_pv.position.m.T[:, None, :], rx_pv.velocity.m_per_s.T[None, :, :]),
202
213
  ).T
203
214
  rx_n_u = np.divide(rx_n_u, np.linalg.norm(rx_n_u, axis=0))
215
+ # unit vector orthogonal to receiver orbit plane (VNB z-axis)
216
+ rx_b_u = np.divide(rx_pv.position.m, np.linalg.norm(rx_pv.position.m, axis=0))
204
217
  # generate observations
205
218
  obs = list(
206
219
  chain.from_iterable(
207
220
  [
208
221
  _collect_ro_series(
209
- transmitter, ts, rx_pv, rx_n_u, max_azimuth, range_elevation
222
+ transmitter,
223
+ ts,
224
+ rx_pv,
225
+ rx_v_u,
226
+ rx_n_u,
227
+ rx_b_u,
228
+ max_yaw,
229
+ range_elevation,
210
230
  )
211
231
  for transmitter in (
212
232
  transmitters if isinstance(transmitters, list) else [transmitters]
@@ -236,7 +256,8 @@ def collect_ro_observations(
236
256
  o["points"][sample_index]["tangent_point"].latitude.degrees,
237
257
  o["points"][sample_index]["tangent_point"].elevation.m,
238
258
  ),
239
- "rx_tx_azimuth": o["points"][sample_index]["rx_tx_azimuth"],
259
+ "rx_tx_pitch": o["points"][sample_index]["rx_tx_pitch"],
260
+ "rx_tx_yaw": o["points"][sample_index]["rx_tx_yaw"],
240
261
  "tp_tx_azimuth": o["points"][sample_index]["tp_tx_azimuth"],
241
262
  "start": o["points"][0]["time"],
242
263
  "end": o["points"][-1]["time"],
@@ -72,8 +72,8 @@ class OrbitOutput(str, Enum):
72
72
 
73
73
  def collect_orbit_track(
74
74
  satellite: Satellite,
75
- instrument: Instrument,
76
75
  times: List[datetime],
76
+ instrument_index: int = 0,
77
77
  elevation: float = 0,
78
78
  mask: Optional[Union[Polygon, MultiPolygon]] = None,
79
79
  coordinates: OrbitCoordinate = OrbitCoordinate.WGS84,
@@ -84,8 +84,8 @@ def collect_orbit_track(
84
84
 
85
85
  Args:
86
86
  satellite (Satellite): The observing satellite.
87
- instrument (Instrument): The observing instrument.
88
87
  times (typing.List[datetime.datetime]): The list of times to sample.
88
+ instrument_index (int): The index of the observing instrument in satellite.
89
89
  elevation (float): The elevation (meters) above the datum in the
90
90
  WGS 84 coordinate system for which to calculate swath width.
91
91
  mask (Polygon or MultiPolygon): An optional mask to constrain results.
@@ -97,6 +97,8 @@ def collect_orbit_track(
97
97
  """
98
98
  if len(times) == 0:
99
99
  return _get_empty_orbit_track()
100
+ # select the observing instrument
101
+ instrument = satellite.instruments[instrument_index]
100
102
  # convert orbit to tle
101
103
  orbit = satellite.orbit.to_tle()
102
104
  # construct a satellite for propagation
@@ -218,8 +220,8 @@ def _get_utm_epsg_code(point: Point, swath_width: float) -> str:
218
220
 
219
221
  def collect_ground_track(
220
222
  satellite: Satellite,
221
- instrument: Instrument,
222
223
  times: List[datetime],
224
+ instrument_index: int = 0,
223
225
  elevation: float = 0,
224
226
  mask: Optional[Union[Polygon, MultiPolygon]] = None,
225
227
  crs: str = "EPSG:4087",
@@ -229,7 +231,7 @@ def collect_ground_track(
229
231
 
230
232
  Args:
231
233
  satellite (Satellite): The observing satellite.
232
- instrument (Instrument): The observing instrument.
234
+ instrument_index (int): The index of the observing instrument in satellite.
233
235
  times (typing.List[datetime.datetime]): The list of datetimes to sample.
234
236
  elevation (float): The elevation (meters) above the datum in the
235
237
  WGS 84 coordinate system for which to calculate ground track.
@@ -243,8 +245,8 @@ def collect_ground_track(
243
245
  Returns:
244
246
  geopandas.GeoDataFrame: The data frame of collected ground track results.
245
247
  """
246
- # first, compute the orbit track of the satellite
247
- gdf = collect_orbit_track(satellite, instrument, times, elevation, mask)
248
+ # compute the orbit track of the satellite
249
+ gdf = collect_orbit_track(satellite, times, instrument_index, elevation, mask)
248
250
  if gdf.empty:
249
251
  return gdf
250
252
  # project points to specified elevation
@@ -328,8 +330,8 @@ def collect_ground_track(
328
330
 
329
331
  def compute_ground_track(
330
332
  satellite: Satellite,
331
- instrument: Instrument,
332
333
  times: List[datetime],
334
+ instrument_index: int = 0,
333
335
  elevation: float = 0,
334
336
  mask: Optional[Union[Polygon, MultiPolygon]] = None,
335
337
  crs: str = "EPSG:4087",
@@ -340,7 +342,7 @@ def compute_ground_track(
340
342
 
341
343
  Args:
342
344
  satellite (Satellite): The observing satellite.
343
- instrument (Instrument): The observing instrument.
345
+ instrument_index (int): The index of the observing instrument in satellite.
344
346
  times (typing.List[datetime.datetime]): The list of datetimes to sample.
345
347
  elevation (float): The elevation (meters) above the datum in the
346
348
  WGS 84 coordinate system for which to calculate ground track.
@@ -359,14 +361,16 @@ def compute_ground_track(
359
361
  GeoDataFrame: The data frame of aggregated ground track results.
360
362
  """
361
363
  if method == "point":
362
- track = collect_ground_track(satellite, instrument, times, elevation, None, crs)
364
+ track = collect_ground_track(
365
+ satellite, times, instrument_index, elevation, None, crs
366
+ )
363
367
  # filter to valid observations and dissolve
364
368
  track = track[track.valid_obs].dissolve()
365
369
  if mask is not None:
366
370
  track = gpd.clip(track, mask).reset_index(drop=True)
367
371
  return track
368
372
  if method == "line":
369
- track = collect_orbit_track(satellite, instrument, times, elevation, None)
373
+ track = collect_orbit_track(satellite, times, instrument_index, elevation, None)
370
374
  # assign track identifiers to group contiguous observation periods
371
375
  track["track_id"] = (
372
376
  (track.valid_obs != track.valid_obs.shift()).astype("int").cumsum()
@@ -4,7 +4,14 @@ Defines object schemas.
4
4
 
5
5
  from .architecture import Architecture
6
6
  from .instrument import Instrument
7
- from .orbit import TwoLineElements, CircularOrbit, SunSynchronousOrbit, KeplerianOrbit
7
+ from .orbit import (
8
+ TwoLineElements,
9
+ CircularOrbit,
10
+ SunSynchronousOrbit,
11
+ KeplerianOrbit,
12
+ MolniyaOrbit,
13
+ TundraOrbit,
14
+ )
8
15
  from .point import Point, GroundStation
9
16
  from .satellite import (
10
17
  Satellite,
@@ -12,4 +19,5 @@ from .satellite import (
12
19
  WalkerConfiguration,
13
20
  WalkerConstellation,
14
21
  MOGConstellation,
22
+ SOCConstellation,
15
23
  )
@@ -626,3 +626,155 @@ class KeplerianOrbit(CircularOrbit):
626
626
  )
627
627
  tle1, tle2 = exporter.export_tle(satrec)
628
628
  return TwoLineElements(tle=[tle1.replace("\x00", "U"), tle2])
629
+
630
+
631
+ class MolniyaOrbit(OrbitBase):
632
+ """
633
+ Orbit defined by Molniya parameters. The altitude parameter is considered the altitude at perigee.
634
+ """
635
+
636
+ type: Literal["molniya"] = Field("molniya", description="Orbit type discriminator.")
637
+ inclination: float = Field(0, description="Inclination (degrees).", ge=0, lt=180)
638
+ right_ascension_ascending_node: float = Field(
639
+ 0, description="Right ascension of ascending node (degrees).", ge=0, lt=360
640
+ )
641
+ orbital_period: float = Field(43080, description="Orbital period (seconds).", gt=0)
642
+ perigee_argument: float = Field(
643
+ 0, description="Perigee argument (degrees).", ge=0, lt=360
644
+ )
645
+
646
+ def get_semimajor_axis(self) -> float:
647
+ gravitational_constant = 6.6743e-11
648
+ earth_mass = 5.9736e24
649
+
650
+ return np.cbrt(
651
+ gravitational_constant
652
+ * earth_mass
653
+ * (self.orbital_period**2)
654
+ / (4 * (np.pi**2))
655
+ )
656
+
657
+ def get_eccentricity(self) -> float:
658
+ """
659
+ Gets the eccentricity (float between 0 and 1).
660
+
661
+ Returns:
662
+ float: the eccentricity
663
+ """
664
+ semimajor_axis = self.get_semimajor_axis()
665
+ return (
666
+ semimajor_axis - (self.altitude + constants.EARTH_EQUATORIAL_RADIUS)
667
+ ) / semimajor_axis
668
+
669
+ def get_mean_anomaly(self) -> float:
670
+ """
671
+ Gets the mean anomaly (decimal degrees).
672
+
673
+ Returns:
674
+ float: the mean anomaly
675
+ """
676
+ return utils.true_anomaly_to_mean_anomaly(
677
+ self.true_anomaly, self.get_eccentricity()
678
+ )
679
+
680
+ def get_derived_orbit(
681
+ self, delta_mean_anomaly: float, delta_raan: float
682
+ ) -> MolniyaOrbit:
683
+ """
684
+ Gets a derived orbit with perturbations to the mean anomaly and right
685
+ ascension of ascending node.
686
+
687
+ Args:
688
+ delta_mean_anomaly (float): Delta mean anomaly (degrees).
689
+ delta_raan (float): Delta right ascension of ascending node (degrees).
690
+
691
+ Returns:
692
+ Molniya Orbit: the derived orbit
693
+ """
694
+ true_anomaly = utils.mean_anomaly_to_true_anomaly(
695
+ np.mod(self.get_mean_anomaly() + delta_mean_anomaly, 360),
696
+ eccentricity=self.get_eccentricity(),
697
+ )
698
+ raan = np.mod(self.right_ascension_ascending_node + delta_raan, 360)
699
+ return MolniyaOrbit(
700
+ altitude=self.altitude,
701
+ true_anomaly=true_anomaly,
702
+ epoch=self.epoch,
703
+ inclination=self.inclination,
704
+ right_ascension_ascending_node=raan,
705
+ eccentricity=self.get_eccentricity(),
706
+ perigee_argument=self.perigee_argument,
707
+ )
708
+
709
+ def to_tle(self) -> TwoLineElements:
710
+ """
711
+ Converts this orbit to a two line elements representation.
712
+
713
+ Returns:
714
+ TwoLineElements: the two line elements orbit
715
+ """
716
+ satrec = Satrec()
717
+ satrec.sgp4init(
718
+ WGS72,
719
+ "i",
720
+ 0,
721
+ (self.epoch - datetime(1949, 12, 31, tzinfo=timezone.utc))
722
+ / timedelta(days=1),
723
+ 0,
724
+ 0.0,
725
+ 0.0,
726
+ self.get_eccentricity(),
727
+ np.radians(self.perigee_argument),
728
+ np.radians(self.inclination),
729
+ np.radians(self.get_mean_anomaly()),
730
+ 2 * np.pi / (self.orbital_period / 60),
731
+ np.radians(self.right_ascension_ascending_node),
732
+ )
733
+ tle1, tle2 = exporter.export_tle(satrec)
734
+ return TwoLineElements(tle=[tle1.replace("\x00", "U"), tle2])
735
+
736
+
737
+ class TundraOrbit(MolniyaOrbit):
738
+ """
739
+ Orbit defined by Tundra parameters, inherits the Molniya class.
740
+ """
741
+
742
+ type: Literal["tundra"] = Field("tundra", description="Orbit type discriminator.")
743
+ inclination: float = Field(63.4, description="Inclination (degrees).", ge=0, lt=180)
744
+ orbital_period: float = Field(86400, description="Orbital period (seconds).", gt=0)
745
+ perigee_argument: float = Field(
746
+ 270, description="Perigee argument (degrees).", ge=0, lt=360
747
+ )
748
+ eccentricity: float = Field(0.2, description="Eccentricity.", ge=0)
749
+
750
+ def get_eccentricity(self):
751
+ return self.eccentricity
752
+
753
+ def get_derived_orbit(
754
+ self, delta_mean_anomaly: float, delta_raan: float
755
+ ) -> TundraOrbit:
756
+ """
757
+ Gets a derived orbit with perturbations to the mean anomaly and right
758
+ ascension of ascending node.
759
+
760
+ Args:
761
+ delta_mean_anomaly (float): Delta mean anomaly (degrees).
762
+ delta_raan (float): Delta right ascension of ascending node (degrees).
763
+
764
+ Returns:
765
+ Tundra Orbit: the derived orbit
766
+ """
767
+ true_anomaly = utils.mean_anomaly_to_true_anomaly(
768
+ np.mod(self.get_mean_anomaly() + delta_mean_anomaly, 360),
769
+ eccentricity=self.get_eccentricity(),
770
+ )
771
+ raan = np.mod(self.right_ascension_ascending_node + delta_raan, 360)
772
+ return TundraOrbit(
773
+ altitude=self.altitude,
774
+ true_anomaly=true_anomaly,
775
+ epoch=self.epoch,
776
+ inclination=self.inclination,
777
+ right_ascension_ascending_node=raan,
778
+ eccentricity=self.eccentricity,
779
+ perigee_argument=self.perigee_argument,
780
+ )
@@ -16,7 +16,11 @@ import numpy as np
16
16
  from pydantic import BaseModel, Field, model_validator
17
17
  from typing_extensions import Literal
18
18
 
19
- from tatc.utils import zero_pad
19
+ from tatc.utils import (
20
+ zero_pad,
21
+ swath_width_to_field_of_regard,
22
+ compute_min_elevation_angle,
23
+ )
20
24
  from ..constants import EARTH_MEAN_RADIUS
21
25
  from .instrument import Instrument
22
26
  from .orbit import TwoLineElements, CircularOrbit, SunSynchronousOrbit, KeplerianOrbit
@@ -387,3 +391,86 @@ class MOGConstellation(Satellite):
387
391
  )
388
392
  for i, orbit in enumerate(orbits)
389
393
  ]
394
+
395
+
396
+ class SOCConstellation(Satellite):
397
+ """
398
+ A constellation that arranges member satellites following the streets of coverage pattern.
399
+
400
+ Based on Joshua F. Anderson, Michel-Alexandre Cardin, and Paul T. Grogan (2022).
401
+ "Design and analysis of flexible multi-layer staged deployment for satellite
402
+ mega-constellations under demand uncertainty"
403
+ Acta Astronautica, vol. 198,
404
+ pp. 179-193. doi: 10.1016/j.actaastro.2022.05.022
405
+ """
406
+
407
+ type: Literal["soc"] = Field("soc", description="Space system type discriminator.")
408
+ orbit: CircularOrbit = Field(
409
+ ..., description="Reference circular orbit for this constellation."
410
+ )
411
+ swath_width: float = Field(
412
+ ..., description="Observation diameter (meters) at specified elevation.", gt=0
413
+ )
414
+ packing_distance: float = Field(
415
+ ..., description="Relative distance between footprint centers", gt=0, le=1
416
+ )
417
+
418
+ def generate_walker(self) -> WalkerConstellation:
419
+ """
420
+ Generate a WalkerConstellation fitting the Streets of Coverage description.
421
+
422
+ Returns:
423
+ WalkerConstellation: the member satellites following the Walker pattern.
424
+ """
425
+ # compute min elevation angle
426
+ e = compute_min_elevation_angle(
427
+ altitude=self.orbit.altitude,
428
+ field_of_regard=swath_width_to_field_of_regard(
429
+ altitude=self.orbit.altitude, swath_width=self.swath_width
430
+ ),
431
+ )
432
+
433
+ # nadir angle (degrees) [Eq. (19) in Anderson et al. (2022)]
434
+ eta = math.degrees(
435
+ math.asin(
436
+ (EARTH_MEAN_RADIUS / (EARTH_MEAN_RADIUS + self.orbit.altitude))
437
+ * math.cos(math.radians(e))
438
+ )
439
+ )
440
+
441
+ # compute gamma (earth central angle) [Eq. (20) in Anderson et al. (2022)]
442
+ gamma = 90 - e - eta
443
+
444
+ # satellite footprint radius (km) [Eq. (21) in Anderson et al. (2022)]
445
+ r_foot = EARTH_MEAN_RADIUS * math.sin(math.radians(gamma))
446
+
447
+ # distance between adjacent footprint centers (km) [Eq. (23) in Anderson et al. (2022)]
448
+ d_f = 2 * r_foot * self.packing_distance
449
+
450
+ # distance between adjacent planes (km) [Eq. (24) in Anderson et al. (2022)]
451
+ d_p = math.sqrt(3) * r_foot * self.packing_distance
452
+
453
+ # angle (degrees) between footprint centers [Eq. (25) in Anderson et al. (2022)]
454
+ gamma_f = 2 * math.asin((0.5 * d_f) / (EARTH_MEAN_RADIUS))
455
+
456
+ # number of satellites per plane [Eq. (26) in Anderson et al. (2022)]
457
+ satellites_per_plane = math.ceil((2 * math.pi) / gamma_f)
458
+
459
+ # angle (degrees) between adjacent planes [Eq. (27) in Anderson et al. (2022)]
460
+ gamma_p = 2 * math.asin((0.5 * d_p) / (EARTH_MEAN_RADIUS))
461
+
462
+ # number of planes [Eq. (28) in Anderson et al. (2022)]
463
+ number_planes = math.ceil((2 * math.pi) / gamma_p)
464
+
465
+ number_satellites = satellites_per_plane * number_planes
466
+
467
+ return WalkerConstellation(
468
+ name=self.name,
469
+ orbit=self.orbit,
470
+ instruments=self.instruments,
471
+ number_satellites=number_satellites,
472
+ number_planes=number_planes,
473
+ )
474
+
475
+ def generate_members(self) -> List[Satellite]:
476
+ return self.generate_walker().generate_members()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tatc
3
- Version: 3.2.2
3
+ Version: 3.3.0
4
4
  Summary: Tradespace Analysis Toolkit for Constellations (TAT-C)
5
5
  Author-email: "Paul T. Grogan" <paul.grogan@asu.edu>
6
6
  License: BSD License
@@ -40,6 +40,7 @@ Requires-Dist: sphinx-rtd-theme; extra == "docs"
40
40
  Provides-Extra: examples
41
41
  Requires-Dist: ipykernel; extra == "examples"
42
42
  Requires-Dist: matplotlib; extra == "examples"
43
+ Requires-Dist: cartopy; extra == "examples"
43
44
  Provides-Extra: osse
44
45
  Requires-Dist: netcdf4; extra == "osse"
45
46
  Requires-Dist: pydap; extra == "osse"
@@ -27,6 +27,7 @@ sphinx-rtd-theme
27
27
  [examples]
28
28
  ipykernel
29
29
  matplotlib
30
+ cartopy
30
31
 
31
32
  [osse]
32
33
  netcdf4
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes