open-space-toolkit-astrodynamics 16.4.0__py312-none-manylinux2014_x86_64.whl → 16.6.0__py312-none-manylinux2014_x86_64.whl

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: open-space-toolkit-astrodynamics
3
- Version: 16.4.0
3
+ Version: 16.6.0
4
4
  Summary: Orbit, attitude, access.
5
5
  Author: Open Space Collective
6
6
  Author-email: contact@open-space-collective.org
@@ -14,7 +14,7 @@ Description-Content-Type: text/markdown
14
14
  Requires-Dist: open-space-toolkit-core~=5.0
15
15
  Requires-Dist: open-space-toolkit-io~=4.0
16
16
  Requires-Dist: open-space-toolkit-mathematics~=4.3
17
- Requires-Dist: open-space-toolkit-physics~=12.0
17
+ Requires-Dist: open-space-toolkit-physics~=12.5
18
18
 
19
19
  # Open Space Toolkit ▸ Astrodynamics
20
20
 
@@ -1,17 +1,18 @@
1
1
  ostk/__init__.py,sha256=epnVn2PwdQkUDZ1msqBRO5nEZIOUBIq-IfK3IlNPijE,21
2
- ostk/astrodynamics/OpenSpaceToolkitAstrodynamicsPy.cpython-312-x86_64-linux-gnu.so,sha256=rKV9pnDo_E0u3WKEAZxbrKf88iQwwmKfdAkZhGKURPE,2931096
2
+ ostk/astrodynamics/OpenSpaceToolkitAstrodynamicsPy.cpython-312-x86_64-linux-gnu.so,sha256=AUUY0o28AKrBGdqzso02rIBnNieSgyhZUPs1ZoR7K4Q,2980280
3
3
  ostk/astrodynamics/__init__.py,sha256=3gWyqFIbhAfcdeMhmfBPQPlPQTmaOzm-6flkJe745Zk,251
4
- ostk/astrodynamics/__init__.pyi,sha256=yra1eOjSDP9GZAvKAQL9oa5OV3F5GwVNgitG7abHKUw,32191
4
+ ostk/astrodynamics/__init__.pyi,sha256=LWi_Djo3IvG45L1CPNFMG_NiBX2kCEkdXarbsZiWkDU,32224
5
5
  ostk/astrodynamics/access.pyi,sha256=t2CF0TU6_6ow_rkV_I4rVKap7ZIdC4jYKL3WkTDHRXg,25157
6
6
  ostk/astrodynamics/converters.py,sha256=luPh30qMp9bzEkN7hUccmxlLf7zRp_AzqmBe8IUjPhU,3314
7
7
  ostk/astrodynamics/converters.pyi,sha256=HrZFyizkc6Hv_K38ZKZ80fX_bAxd6keA_NFWNQygvbs,1745
8
8
  ostk/astrodynamics/dataframe.py,sha256=v-36rBHKdf7kQw1jdvJWrvkR-ZjW5DKRchtTEJWhdxk,25012
9
9
  ostk/astrodynamics/display.py,sha256=LZESZgx2wlrFO4cwAGMb3VPJfdtcjNgCgKFrqot0NYU,6339
10
10
  ostk/astrodynamics/dynamics.pyi,sha256=gZ95KoGex4SB-1z6yMrngkZN1Ir9X6bEmrZgdLxq1ZE,13270
11
+ ostk/astrodynamics/eclipse.pyi,sha256=Q8fzdukA7fyxbUM3wjEXAHukT-Ovl4FM00NbjsMPnUM,3211
11
12
  ostk/astrodynamics/estimator.pyi,sha256=MnahWzp8aACxrNKWlYRsgQr5zpBxogNr-yPm7hJob5k,14000
12
13
  ostk/astrodynamics/event_condition.pyi,sha256=2c_1Sq7tkYKeAA_aRWBi43KDQXXxu6EMSmUpEWz_Fa4,45814
13
14
  ostk/astrodynamics/guidance_law.pyi,sha256=rVmbpV2Y5FsIXejaInxINS67nVHmTIxVEkhaDIn17SA,12171
14
- ostk/astrodynamics/libopen-space-toolkit-astrodynamics.so.16,sha256=gKpOOUeoJaV672LCVXJyxvQIehEfH7ryLCKMz2zGbss,124068944
15
+ ostk/astrodynamics/libopen-space-toolkit-astrodynamics.so.16,sha256=e_OjX3u2cQPMWRSpomiXE-RQZ5rc5iDrqC6H-EGqtKc,127427864
15
16
  ostk/astrodynamics/solver.pyi,sha256=sPqyYPXBfFGC24dzzYyFyt01VfMAlWQ5_gh_RpeaBFk,17734
16
17
  ostk/astrodynamics/utilities.py,sha256=y8mr3M46J5z-GhS1oIEnuEJA6otwcyJ9YDhvn_5JxHM,6976
17
18
  ostk/astrodynamics/viewer.py,sha256=SlKyOWKjaF3V9HFB3I7ZgHy7n_GLeHTWM9q2wXkpxe8,27077
@@ -58,8 +59,10 @@ ostk/astrodynamics/test/dynamics/test_third_body_gravity.py,sha256=7xBOKbVio-zZ2
58
59
  ostk/astrodynamics/test/dynamics/test_thruster.py,sha256=cCJtKWuNcRHmcreCv7BajwuJnHCat9m88OHh_o0cB7w,4383
59
60
  ostk/astrodynamics/test/dynamics/data/Tabulated_Earth_Gravity.csv,sha256=jJWOMJcQ83Vy1Wrb9PTh3ffOdoDF98kk6w5b-_E0uWg,47419
60
61
  ostk/astrodynamics/test/dynamics/data/Tabulated_Earth_Gravity_Truth.csv,sha256=f4x-zmxZADxD_doAbACt24k36VSTp3rSIJiSzuSroKs,8377
62
+ ostk/astrodynamics/test/eclipse/__init__.py,sha256=epnVn2PwdQkUDZ1msqBRO5nEZIOUBIq-IfK3IlNPijE,21
63
+ ostk/astrodynamics/test/eclipse/test_generator.py,sha256=oT7H7KAt1wwy7gJNVeUSvMukB7KG-leEJREgqpX_H_A,4194
61
64
  ostk/astrodynamics/test/estimator/test_orbit_determination_solver.py,sha256=Vg_yN3DFLcwa-AfPX0zJaY70rFK1TB8xc3e9wZrKq6M,7493
62
- ostk/astrodynamics/test/estimator/test_tle_solver.py,sha256=hANdRtaVvlOShXeyUqMpDk7kJINxdwstZodxJzAAWwk,7277
65
+ ostk/astrodynamics/test/estimator/test_tle_solver.py,sha256=KP_dxT6IRVObFwgTB9Lou7rmJHaxjHGCZ_WRdiPyUaQ,7277
63
66
  ostk/astrodynamics/test/event_condition/test_angular_condition.py,sha256=MDRwjU5zXIRBaIFZA3jG3hcnyIIFo_0QyBRtNIfH2aQ,3119
64
67
  ostk/astrodynamics/test/event_condition/test_boolean_condition.py,sha256=Ng6FLKD8XoUHUz6-gi3wvrYhSGNSB_iJ_n89ajN4O3s,1580
65
68
  ostk/astrodynamics/test/event_condition/test_brouwer_lyddane_mean_long_condition.py,sha256=H5tXsj-oQRxaLS3CWvtFruUZp1LnvQGu4id3mBu4RJc,4440
@@ -86,7 +89,7 @@ ostk/astrodynamics/test/trajectory/__init__.py,sha256=epnVn2PwdQkUDZ1msqBRO5nEZI
86
89
  ostk/astrodynamics/test/trajectory/test_local_orbital_frame_direction.py,sha256=d72J50UGG9m0Atei0UQ8sITU1WdJmws5xgUiacLZMbw,2515
87
90
  ostk/astrodynamics/test/trajectory/test_local_orbital_frame_factory.py,sha256=s1V-zCd2SDEW6Ia6KmXTNiLwakJ5XjeSjlGat-hZTd0,3431
88
91
  ostk/astrodynamics/test/trajectory/test_model.py,sha256=epnVn2PwdQkUDZ1msqBRO5nEZIOUBIq-IfK3IlNPijE,21
89
- ostk/astrodynamics/test/trajectory/test_orbit.py,sha256=vp7gDMtjO7nqERe0yq1OQZ0p4QRtxGTjGKN5-I3LWZM,6739
92
+ ostk/astrodynamics/test/trajectory/test_orbit.py,sha256=EwqQejhcSqYhKPCAkjxyBLgEc82fOhrh1zrJ86RGO9Q,7011
90
93
  ostk/astrodynamics/test/trajectory/test_propagator.py,sha256=ALjMvzndO9r6dVVXllk0iqu61tEoqu2j25MtzEitDIQ,14076
91
94
  ostk/astrodynamics/test/trajectory/test_segment.py,sha256=aXdF5CpNLwN_hKRU5sG3ID3hJR-NZ1_kgtNA-xHMBkM,12223
92
95
  ostk/astrodynamics/test/trajectory/test_sequence.py,sha256=4piYpMZ9C_eCXxaOcdz2We67wZxhsNBnETgKwvq6dl0,15083
@@ -105,6 +108,7 @@ ostk/astrodynamics/test/trajectory/orbit/message/spacex/test_opm.py,sha256=Z9jdj
105
108
  ostk/astrodynamics/test/trajectory/orbit/message/spacex/data/opm_1.yaml,sha256=DqIdfLCPD9oV4qDvgq35fIT8Gb8zgtrHr5Nx53InSQM,1363
106
109
  ostk/astrodynamics/test/trajectory/orbit/models/__init__.py,sha256=epnVn2PwdQkUDZ1msqBRO5nEZIOUBIq-IfK3IlNPijE,21
107
110
  ostk/astrodynamics/test/trajectory/orbit/models/test_kepler.py,sha256=zgMf98cFi2lBIFGQxxskTjxsmOqxy8LPvARLTUM9YX0,3366
111
+ ostk/astrodynamics/test/trajectory/orbit/models/test_modified_equinoctial.py,sha256=MWVMISdtjMzsQX7klogN2AvGF8oE6EZ6vy7AmXv2GNE,3821
108
112
  ostk/astrodynamics/test/trajectory/orbit/models/test_propagated.py,sha256=j_DEg2wwqYVqqzCai0IpmJu8L00ZZfhYcDYFx80Oa24,7140
109
113
  ostk/astrodynamics/test/trajectory/orbit/models/test_sgp4.py,sha256=epnVn2PwdQkUDZ1msqBRO5nEZIOUBIq-IfK3IlNPijE,21
110
114
  ostk/astrodynamics/test/trajectory/orbit/models/test_tabulated.py,sha256=kNSHwdz-IiTU4ThtmovGvEYs8QyH9i3uPQFz3L6OHxw,11025
@@ -123,19 +127,19 @@ ostk/astrodynamics/test/trajectory/state/coordinate_subset/test_attitude_quatern
123
127
  ostk/astrodynamics/test/trajectory/state/coordinate_subset/test_cartesian_acceleration.py,sha256=1p37_FYN85d9SrOqO3iCkNecovJJayhnFeZ4QCOw2ao,3528
124
128
  ostk/astrodynamics/test/trajectory/state/coordinate_subset/test_cartesian_position.py,sha256=XvHdk1KjacTwtkgx2jUAc9I9N3nvjPDv03FAanpv8jQ,2702
125
129
  ostk/astrodynamics/test/trajectory/state/coordinate_subset/test_cartesian_velocity.py,sha256=-kd5TZO5TICihbkqDTew2i_tDpggdpe3Yf23046FATM,3057
126
- ostk/astrodynamics/trajectory/__init__.pyi,sha256=rp38g9mSH8W-mqYnrZRKw35LGYa1fEKx2vk5y7xTcrI,76429
130
+ ostk/astrodynamics/trajectory/__init__.pyi,sha256=-s4X3sfSfXmJuYgtfMnD2kOtb8KwpYs7bfpLRBWc7fY,76705
127
131
  ostk/astrodynamics/trajectory/model.pyi,sha256=SIneZx3pQ6XAo6iBccr4B1OsATbs1PEsCngtaTvja00,10473
128
132
  ostk/astrodynamics/trajectory/orbit/__init__.pyi,sha256=wbuRK7Yp_NYBr3ta5-NpnJYMX4baUl7yIlUWhaRlR4o,12899
129
133
  ostk/astrodynamics/trajectory/orbit/message/__init__.pyi,sha256=-GNBlYPrsjelhKxWorYQYhIWzFsibiIQNZvMXjhRpfM,77
130
134
  ostk/astrodynamics/trajectory/orbit/message/spacex.pyi,sha256=fnUVJGWlSPo8AmLVuu08LubsAuVGo-gFaT86yd4f4CI,10558
131
- ostk/astrodynamics/trajectory/orbit/model/__init__.pyi,sha256=DYgjafm4rMV9Cqzg6dciwqsJdzuyE8JJgzW8up8qUeE,20370
135
+ ostk/astrodynamics/trajectory/orbit/model/__init__.pyi,sha256=rCMHBy4lRfGVsBD3Eq4RHQn1RVPP-mufld6Mm1gNubc,26415
132
136
  ostk/astrodynamics/trajectory/orbit/model/brouwerLyddaneMean.pyi,sha256=t1jbWsK8JgXkx-l_WSg96xfEG9fsddZ_CjqLpC3GBVY,5874
133
137
  ostk/astrodynamics/trajectory/orbit/model/kepler.pyi,sha256=OZMznHuU7e6m1rfqtOgXbgBguimv4tg1RRvxRFQVAlw,27171
134
138
  ostk/astrodynamics/trajectory/orbit/model/sgp4.pyi,sha256=OhFzoPPQHlYy7m3LiZ8TXF89M4uBTfNk6tGsBEp0sjI,14235
135
139
  ostk/astrodynamics/trajectory/state/__init__.pyi,sha256=bq__Fii35czVrTeNxc9eQVjXdqwbbQxUdNQWK3vLrMo,17649
136
140
  ostk/astrodynamics/trajectory/state/coordinate_subset.pyi,sha256=kYMfMwEjCqO1NepMYFT4QS6kIPBkVL6sGCLeLbogcMw,10176
137
- open_space_toolkit_astrodynamics-16.4.0.dist-info/METADATA,sha256=hmk7loB1mnnlXQ39BmWfd3MqBhiTKzoK0D1jIkGlVfk,1913
138
- open_space_toolkit_astrodynamics-16.4.0.dist-info/WHEEL,sha256=tvQN4EssnAByDSzh20GD_9hfZWs7a8R0KWC1BBXumw0,110
139
- open_space_toolkit_astrodynamics-16.4.0.dist-info/top_level.txt,sha256=zOR18699uDYnafgarhL8WU_LmTZY_5NVqutv-flp_x4,5
140
- open_space_toolkit_astrodynamics-16.4.0.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
141
- open_space_toolkit_astrodynamics-16.4.0.dist-info/RECORD,,
141
+ open_space_toolkit_astrodynamics-16.6.0.dist-info/METADATA,sha256=7dmYmJCE0AAQ0OghKxxbwGKn5qDjl_j75V0A6Cfh1fo,1913
142
+ open_space_toolkit_astrodynamics-16.6.0.dist-info/WHEEL,sha256=tvQN4EssnAByDSzh20GD_9hfZWs7a8R0KWC1BBXumw0,110
143
+ open_space_toolkit_astrodynamics-16.6.0.dist-info/top_level.txt,sha256=zOR18699uDYnafgarhL8WU_LmTZY_5NVqutv-flp_x4,5
144
+ open_space_toolkit_astrodynamics-16.6.0.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
145
+ open_space_toolkit_astrodynamics-16.6.0.dist-info/RECORD,,
@@ -5,8 +5,8 @@ from ostk.astrodynamics.trajectory import State as PyState
5
5
  from ostk import core as OpenSpaceToolkitCorePy
6
6
  from ostk.core import container
7
7
  from ostk.core import filesystem
8
- import ostk.core.type
9
8
  from ostk.core import type
9
+ import ostk.core.type
10
10
  from ostk import io as OpenSpaceToolkitIOPy
11
11
  from ostk.io import URL
12
12
  from ostk.io import ip
@@ -19,8 +19,8 @@ import ostk.physics
19
19
  from ostk.physics import Environment
20
20
  from ostk.physics import Manager
21
21
  from ostk.physics import Unit
22
- from ostk.physics import coordinate
23
22
  import ostk.physics.coordinate
23
+ from ostk.physics import coordinate
24
24
  import ostk.physics.coordinate.spherical
25
25
  from ostk.physics import environment
26
26
  import ostk.physics.environment.object
@@ -34,6 +34,7 @@ from . import conjunction
34
34
  from . import converters
35
35
  from . import data
36
36
  from . import dynamics
37
+ from . import eclipse
37
38
  from . import estimator
38
39
  from . import event_condition
39
40
  from . import flight
@@ -41,7 +42,7 @@ from . import guidance_law
41
42
  from . import pytrajectory
42
43
  from . import solver
43
44
  from . import trajectory
44
- __all__ = ['Access', 'Dynamics', 'Environment', 'EventCondition', 'GuidanceLaw', 'Manager', 'OpenSpaceToolkitAstrodynamicsPy', 'OpenSpaceToolkitCorePy', 'OpenSpaceToolkitIOPy', 'OpenSpaceToolkitMathematicsPy', 'OpenSpaceToolkitPhysicsPy', 'PyState', 'RootSolver', 'Trajectory', 'URL', 'Unit', 'access', 'conjunction', 'container', 'converters', 'coordinate', 'curve_fitting', 'data', 'dynamics', 'environment', 'estimator', 'event_condition', 'filesystem', 'flight', 'geometry', 'guidance_law', 'ip', 'object', 'pytrajectory', 'solver', 'time', 'trajectory', 'type', 'unit']
45
+ __all__ = ['Access', 'Dynamics', 'Environment', 'EventCondition', 'GuidanceLaw', 'Manager', 'OpenSpaceToolkitAstrodynamicsPy', 'OpenSpaceToolkitCorePy', 'OpenSpaceToolkitIOPy', 'OpenSpaceToolkitMathematicsPy', 'OpenSpaceToolkitPhysicsPy', 'PyState', 'RootSolver', 'Trajectory', 'URL', 'Unit', 'access', 'conjunction', 'container', 'converters', 'coordinate', 'curve_fitting', 'data', 'dynamics', 'eclipse', 'environment', 'estimator', 'event_condition', 'filesystem', 'flight', 'geometry', 'guidance_law', 'ip', 'object', 'pytrajectory', 'solver', 'time', 'trajectory', 'type', 'unit']
45
46
  class Access:
46
47
  """
47
48
 
@@ -0,0 +1,70 @@
1
+ from __future__ import annotations
2
+ import ostk.astrodynamics
3
+ import ostk.core.type
4
+ import ostk.physics
5
+ import ostk.physics.environment.utility
6
+ import ostk.physics.time
7
+ import typing
8
+ __all__ = ['Generator']
9
+ class Generator:
10
+ """
11
+
12
+ An eclipse generator.
13
+
14
+ """
15
+ @typing.overload
16
+ def __init__(self, environment: ostk.physics.Environment = ..., search_step_size: ostk.physics.time.Duration = ..., search_tolerance: ostk.physics.time.Duration = ...) -> None:
17
+ """
18
+ Constructor.
19
+
20
+ Args:
21
+ environment (Environment): The Environment to use during the search. Defaults to the Environment.default().
22
+ search_step_size (Duration): The step size to use during the search. Defaults to Duration.seconds(60.0).
23
+ search_tolerance (Duration): The tolerance to use during the search. Defaults to Duration.milliseconds(1.0).
24
+ """
25
+ @typing.overload
26
+ def __init__(self) -> None:
27
+ """
28
+ Default constructor with default parameters.
29
+ """
30
+ def generate(self, trajectory: ostk.astrodynamics.Trajectory, analysis_interval: ostk.physics.time.Interval, occulted_celestial_object_name: ostk.core.type.String = 'Sun', occulting_celestial_object_name: ostk.core.type.String = 'Earth') -> list[ostk.physics.environment.utility.Eclipse]:
31
+ """
32
+ Generate eclipses for a given trajectory over the provided analysis interval.
33
+
34
+ Args:
35
+ trajectory (Trajectory): The trajectory to search for eclipses.
36
+ analysis_interval (Interval): The analysis interval.
37
+ occulted_celestial_object_name (str): The name of the occulted celestial object. Defaults to "Sun".
38
+ occulting_celestial_object_name (str): The name of the occulting celestial object. Defaults to "Earth".
39
+
40
+ Returns:
41
+ Array[Eclipse]: Array of eclipses found within the analysis interval.
42
+ """
43
+ def get_environment(self) -> ostk.physics.Environment:
44
+ """
45
+ Get the environment.
46
+
47
+ Returns:
48
+ Environment: The environment used during the search.
49
+ """
50
+ def get_search_step_size(self) -> ostk.physics.time.Duration:
51
+ """
52
+ Get the search step size.
53
+
54
+ Returns:
55
+ Duration: The step size used during the search.
56
+ """
57
+ def get_search_tolerance(self) -> ostk.physics.time.Duration:
58
+ """
59
+ Get the search tolerance.
60
+
61
+ Returns:
62
+ Duration: The tolerance used during the search.
63
+ """
64
+ def is_defined(self) -> bool:
65
+ """
66
+ Check if eclipse generator is defined.
67
+
68
+ Returns:
69
+ bool: True if eclipse generator is defined, False otherwise.
70
+ """
@@ -0,0 +1 @@
1
+ # Apache License 2.0
@@ -0,0 +1,138 @@
1
+ # Apache License 2.0
2
+
3
+ import pytest
4
+
5
+ from ostk.physics.unit import Length
6
+ from ostk.physics.unit import Angle
7
+ from ostk.physics.time import DateTime
8
+ from ostk.physics.time import Scale
9
+ from ostk.physics.time import Duration
10
+ from ostk.physics.time import Instant
11
+ from ostk.physics.time import Interval
12
+ from ostk.physics import Environment
13
+ from ostk.physics.environment.object import Celestial
14
+ from ostk.physics.environment.utility import Eclipse
15
+ from ostk.physics.environment.utility import EclipsePhase
16
+
17
+ from ostk.astrodynamics import Trajectory
18
+ from ostk.astrodynamics.trajectory import Orbit
19
+ from ostk.astrodynamics.trajectory.orbit.model import Kepler
20
+ from ostk.astrodynamics.trajectory.orbit.model.kepler import COE
21
+ from ostk.astrodynamics.eclipse import Generator
22
+
23
+
24
+ @pytest.fixture
25
+ def environment() -> Environment:
26
+ return Environment.default()
27
+
28
+
29
+ @pytest.fixture
30
+ def earth(environment: Environment) -> Celestial:
31
+ return environment.access_celestial_object_with_name("Earth")
32
+
33
+
34
+ @pytest.fixture
35
+ def search_step_size() -> Duration:
36
+ return Duration.seconds(30.0)
37
+
38
+
39
+ @pytest.fixture
40
+ def search_tolerance() -> Duration:
41
+ return Duration.milliseconds(10.0)
42
+
43
+
44
+ @pytest.fixture
45
+ def generator(
46
+ environment: Environment,
47
+ search_step_size: Duration,
48
+ search_tolerance: Duration,
49
+ ) -> Generator:
50
+ return Generator(
51
+ environment=environment,
52
+ search_step_size=search_step_size,
53
+ search_tolerance=search_tolerance,
54
+ )
55
+
56
+
57
+ @pytest.fixture
58
+ def trajectory(earth: Celestial) -> Trajectory:
59
+ return Orbit(
60
+ model=Kepler(
61
+ coe=COE(
62
+ semi_major_axis=Length.kilometers(6700.0),
63
+ eccentricity=0.0,
64
+ inclination=Angle.degrees(0.0),
65
+ raan=Angle.degrees(0.0),
66
+ aop=Angle.degrees(0.0),
67
+ true_anomaly=Angle.degrees(0.0),
68
+ ),
69
+ epoch=Instant.date_time(DateTime(2000, 1, 1, 0, 0, 0), Scale.UTC),
70
+ celestial_object=earth,
71
+ perturbation_type=Kepler.PerturbationType.No,
72
+ ),
73
+ celestial_object=earth,
74
+ )
75
+
76
+
77
+ @pytest.fixture
78
+ def analysis_interval() -> Interval:
79
+ return Interval.closed(
80
+ Instant.date_time(DateTime(2000, 1, 1, 14, 0, 0), Scale.UTC),
81
+ Instant.date_time(DateTime(2000, 1, 1, 17, 0, 0), Scale.UTC),
82
+ )
83
+
84
+
85
+ class TestGenerator:
86
+ def test_constructor_and_properties_success(
87
+ self,
88
+ environment: Environment,
89
+ search_step_size: Duration,
90
+ search_tolerance: Duration,
91
+ ):
92
+ generator: Generator = Generator(
93
+ environment=environment,
94
+ search_step_size=search_step_size,
95
+ search_tolerance=search_tolerance,
96
+ )
97
+
98
+ assert generator is not None
99
+ assert isinstance(generator, Generator)
100
+ assert generator.is_defined() is True
101
+ assert generator.get_environment().is_defined()
102
+ assert generator.get_search_step_size() == search_step_size
103
+ assert generator.get_search_tolerance() == search_tolerance
104
+
105
+ def test_default_constructor_and_properties_success(self):
106
+ generator: Generator = Generator()
107
+ assert generator is not None
108
+ assert isinstance(generator, Generator)
109
+ assert generator.is_defined() is True
110
+
111
+ def test_generate_success(
112
+ self,
113
+ generator: Generator,
114
+ trajectory: Trajectory,
115
+ analysis_interval: Interval,
116
+ ):
117
+ eclipses: list[Eclipse] = generator.generate(
118
+ trajectory=trajectory,
119
+ analysis_interval=analysis_interval,
120
+ occulted_celestial_object_name="Sun",
121
+ occulting_celestial_object_name="Earth",
122
+ )
123
+
124
+ assert eclipses is not None
125
+ assert isinstance(eclipses, list)
126
+ assert len(eclipses) > 0
127
+
128
+ # Check that all returned objects are Eclipse instances
129
+ for eclipse in eclipses:
130
+ assert isinstance(eclipse, Eclipse)
131
+
132
+ # Check eclipse phases
133
+ phases: list[EclipsePhase] = eclipse.get_phases()
134
+ assert isinstance(phases, list)
135
+ assert len(phases) > 0
136
+
137
+ for phase in phases:
138
+ assert isinstance(phase, EclipsePhase)
@@ -203,11 +203,11 @@ class TestTLESolver:
203
203
  initial_state_with_b_star: tuple[State, float],
204
204
  observations: list[State],
205
205
  ):
206
- # Convert observations to TEME frame
207
- teme_observations = [obs.in_frame(Frame.TEME()) for obs in observations]
206
+ # Convert observations to ITRF frame
207
+ itrf_observations = [obs.in_frame(Frame.ITRF()) for obs in observations]
208
208
 
209
209
  analysis: TLESolver.Analysis = tle_solver.estimate(
210
- initial_guess=initial_state_with_b_star, observations=teme_observations
210
+ initial_guess=initial_state_with_b_star, observations=itrf_observations
211
211
  )
212
212
  assert isinstance(analysis, TLESolver.Analysis)
213
213
  assert isinstance(analysis.estimated_tle, TLE)
@@ -0,0 +1,135 @@
1
+ # Apache License 2.0
2
+
3
+ import pytest
4
+
5
+ from ostk.physics.unit import Length, Angle, Derived
6
+ from ostk.physics.coordinate import Position, Velocity, Frame
7
+ from ostk.physics.environment.object.celestial import Earth
8
+
9
+ from ostk.astrodynamics.trajectory.orbit.model import ModifiedEquinoctial
10
+ from ostk.astrodynamics.trajectory.orbit.model.kepler import COE
11
+
12
+
13
+ @pytest.fixture
14
+ def earth_gravitational_parameter() -> Derived:
15
+ return Earth.default().get_gravitational_parameter()
16
+
17
+
18
+ @pytest.fixture
19
+ def gcrf() -> Frame:
20
+ return Frame.GCRF()
21
+
22
+
23
+ @pytest.fixture
24
+ def meoe_default_values():
25
+ return {
26
+ "p": Length.kilometers(7500.0),
27
+ "f": 0.01,
28
+ "g": 0.02,
29
+ "h": 0.03,
30
+ "k": 0.04,
31
+ "L": Angle.degrees(45.0),
32
+ }
33
+
34
+
35
+ @pytest.fixture
36
+ def reference_coe() -> COE:
37
+ sma_ref = Length.kilometers(7000.0)
38
+ ecc_ref = 0.0 # Circular
39
+ inc_ref = Angle.degrees(28.5)
40
+ raan_ref = Angle.degrees(10.0)
41
+ aop_ref = Angle.degrees(0.0) # Typically undefined for circular, set to 0 for COE
42
+ ta_ref = Angle.degrees(45.0) # Argument of latitude
43
+
44
+ return COE(sma_ref, ecc_ref, inc_ref, raan_ref, aop_ref, ta_ref)
45
+
46
+
47
+ @pytest.fixture
48
+ def reference_cartesian_state(
49
+ reference_coe: COE,
50
+ earth_gravitational_parameter: Derived,
51
+ gcrf: Frame,
52
+ ) -> tuple[Position, Velocity]:
53
+ return reference_coe.get_cartesian_state(
54
+ earth_gravitational_parameter,
55
+ gcrf,
56
+ )
57
+
58
+
59
+ @pytest.fixture
60
+ def meoe_object(meoe_default_values) -> ModifiedEquinoctial:
61
+ return ModifiedEquinoctial(
62
+ meoe_default_values["p"],
63
+ meoe_default_values["f"],
64
+ meoe_default_values["g"],
65
+ meoe_default_values["h"],
66
+ meoe_default_values["k"],
67
+ meoe_default_values["L"],
68
+ )
69
+
70
+
71
+ class TestModifiedEquinoctial:
72
+
73
+ def test_constructor_and_getters(
74
+ self,
75
+ meoe_object: ModifiedEquinoctial,
76
+ meoe_default_values,
77
+ ):
78
+ assert meoe_object.is_defined()
79
+ assert meoe_object.get_semi_latus_rectum() == meoe_default_values["p"]
80
+ assert meoe_object.get_eccentricity_x() == meoe_default_values["f"]
81
+ assert meoe_object.get_eccentricity_y() == meoe_default_values["g"]
82
+ assert meoe_object.get_node_x() == meoe_default_values["h"]
83
+ assert meoe_object.get_node_y() == meoe_default_values["k"]
84
+ assert meoe_object.get_true_longitude() == meoe_default_values["L"]
85
+
86
+ def test_undefined_state(self):
87
+ meoe_undefined = ModifiedEquinoctial.undefined()
88
+ assert not meoe_undefined.is_defined()
89
+
90
+ def test_get_si_vector(
91
+ self,
92
+ meoe_object: ModifiedEquinoctial,
93
+ ):
94
+ si_vector = meoe_object.get_si_vector()
95
+ assert len(si_vector) == 6
96
+
97
+ def test_cartesian(
98
+ self,
99
+ reference_cartesian_state: tuple[Position, Velocity],
100
+ earth_gravitational_parameter: Derived,
101
+ ):
102
+ assert (
103
+ ModifiedEquinoctial.cartesian(
104
+ reference_cartesian_state,
105
+ earth_gravitational_parameter,
106
+ )
107
+ is not None
108
+ )
109
+
110
+ def test_get_cartesian_state(
111
+ self,
112
+ meoe_object: ModifiedEquinoctial,
113
+ gcrf: Frame,
114
+ earth_gravitational_parameter: Derived,
115
+ ):
116
+ assert (
117
+ meoe_object.get_cartesian_state(
118
+ earth_gravitational_parameter,
119
+ gcrf,
120
+ )
121
+ is not None
122
+ )
123
+
124
+ def test_coe_method_general_elliptical(self):
125
+ """Test COE method with general elliptical orbit."""
126
+ sma = Length.kilometers(24396.137)
127
+ ecc = 0.7308
128
+ inc = Angle.degrees(7.0)
129
+ raan = Angle.degrees(0.0)
130
+ aop = Angle.degrees(90.0)
131
+ ta = Angle.degrees(0.0)
132
+
133
+ coe = COE(sma, ecc, inc, raan, aop, ta)
134
+
135
+ assert ModifiedEquinoctial.coe(coe) is not None
@@ -3,6 +3,7 @@
3
3
  import pytest
4
4
 
5
5
  from ostk.physics.environment.object.celestial import Earth
6
+ from ostk.physics.environment.object import Celestial
6
7
  from ostk.physics.unit import Length, Angle
7
8
  from ostk.physics.time import Scale, Instant, DateTime, Time, Duration, Interval
8
9
 
@@ -58,6 +59,12 @@ class TestOrbit:
58
59
  assert state is not None
59
60
  assert isinstance(state, State)
60
61
 
62
+ def test_access_celestial_object(self, orbit: Orbit):
63
+ celestial_object = orbit.access_celestial_object()
64
+
65
+ assert celestial_object is not None
66
+ assert isinstance(celestial_object, Celestial)
67
+
61
68
  @pytest.mark.parametrize(
62
69
  "frame_type",
63
70
  [
@@ -601,6 +601,13 @@ class Orbit(ostk.astrodynamics.Trajectory):
601
601
  ...
602
602
  def __str__(self) -> str:
603
603
  ...
604
+ def access_celestial_object(self) -> ostk.physics.environment.object.Celestial:
605
+ """
606
+ Access the celestial object.
607
+
608
+ Returns:
609
+ Celestial: The celestial object.
610
+ """
604
611
  def access_kepler_model(self) -> ...:
605
612
  """
606
613
  Access the Kepler orbit model.
@@ -1,4 +1,5 @@
1
1
  from __future__ import annotations
2
+ import numpy
2
3
  import ostk.astrodynamics.trajectory
3
4
  import ostk.astrodynamics.trajectory.orbit
4
5
  import ostk.core.type
@@ -11,7 +12,7 @@ import typing
11
12
  from . import brouwerLyddaneMean
12
13
  from . import kepler
13
14
  from . import sgp4
14
- __all__ = ['BrouwerLyddaneMean', 'Kepler', 'Propagated', 'SGP4', 'Tabulated', 'brouwerLyddaneMean', 'kepler', 'sgp4']
15
+ __all__ = ['BrouwerLyddaneMean', 'Kepler', 'ModifiedEquinoctial', 'Propagated', 'SGP4', 'Tabulated', 'brouwerLyddaneMean', 'kepler', 'sgp4']
15
16
  class BrouwerLyddaneMean(kepler.COE):
16
17
  """
17
18
 
@@ -253,6 +254,144 @@ class Kepler(ostk.astrodynamics.trajectory.orbit.OrbitModel):
253
254
  Returns:
254
255
  bool: True if the `Kepler` model is defined, False otherwise.
255
256
  """
257
+ class ModifiedEquinoctial:
258
+ """
259
+
260
+ Modified Equinoctial Orbital Elements (ModifiedEquinoctial).
261
+
262
+ The Modified Equinoctial Orbital Elements (ModifiedEquinoctial) provide a non-singular representation of an orbit,
263
+ useful for a wide range of eccentricities and inclinations (except for i = 180 deg).
264
+
265
+ Elements:
266
+ p: semi-latus rectum (m)
267
+ f: x-component of eccentricity vector (e * cos(RAAN + AOP))
268
+ g: y-component of eccentricity vector (e * sin(RAAN + AOP))
269
+ h: x-component of node vector (tan(i/2) * cos(RAAN))
270
+ k: y-component of node vector (tan(i/2) * sin(RAAN))
271
+ L: true longitude (RAAN + AOP + True Anomaly) (rad)
272
+
273
+
274
+ """
275
+ __hash__: typing.ClassVar[None] = None
276
+ @staticmethod
277
+ def cartesian(cartesian_state: tuple[ostk.physics.coordinate.Position, ostk.physics.coordinate.Velocity], gravitational_parameter: ostk.physics.unit.Derived) -> ModifiedEquinoctial:
278
+ """
279
+ Create ModifiedEquinoctial from Cartesian state (position, velocity).
280
+
281
+ Args:
282
+ cartesian_state (tuple[Position, Velocity]): Cartesian state (Position, Velocity). Must be in an inertial frame.
283
+ gravitational_parameter (Derived): Gravitational parameter of the central body.
284
+
285
+ Returns:
286
+ ModifiedEquinoctial: ModifiedEquinoctial object.
287
+ """
288
+ @staticmethod
289
+ def coe(coe: kepler.COE) -> ModifiedEquinoctial:
290
+ """
291
+ Create Modified Equinoctial elements from Classical Orbital Elements (COE).
292
+
293
+ Args:
294
+ coe (COE): Classical Orbital Elements.
295
+
296
+ Returns:
297
+ ModifiedEquinoctial: Modified Equinoctial Elements.
298
+ """
299
+ @staticmethod
300
+ def undefined() -> ModifiedEquinoctial:
301
+ """
302
+ Create an undefined ModifiedEquinoctial object.
303
+
304
+ Returns:
305
+ ModifiedEquinoctial: Undefined ModifiedEquinoctial object.
306
+ """
307
+ def __eq__(self, arg0: ModifiedEquinoctial) -> bool:
308
+ ...
309
+ def __init__(self, semi_latus_rectum: ostk.physics.unit.Length, eccentricity_x: ostk.core.type.Real, eccentricity_y: ostk.core.type.Real, node_x: ostk.core.type.Real, node_y: ostk.core.type.Real, true_longitude: ostk.physics.unit.Angle) -> None:
310
+ """
311
+ Constructor.
312
+
313
+ Args:
314
+ semi_latus_rectum (Length): Semi-latus rectum.
315
+ eccentricity_x (float): x-component of eccentricity vector.
316
+ eccentricity_y (float): y-component of eccentricity vector.
317
+ node_x (float): x-component of node vector.
318
+ node_y (float): y-component of node vector.
319
+ true_longitude (Angle): True longitude.
320
+ """
321
+ def __ne__(self, arg0: ModifiedEquinoctial) -> bool:
322
+ ...
323
+ def __repr__(self) -> str:
324
+ ...
325
+ def __str__(self) -> str:
326
+ ...
327
+ def get_cartesian_state(self, gravitational_parameter: ostk.physics.unit.Derived, frame: ostk.physics.coordinate.Frame) -> tuple[ostk.physics.coordinate.Position, ostk.physics.coordinate.Velocity]:
328
+ """
329
+ Get Cartesian state (position, velocity) from ModifiedEquinoctial.
330
+
331
+ Args:
332
+ gravitational_parameter (Derived): Gravitational parameter of the central body.
333
+ frame (Frame): The reference frame for the output Cartesian state. Must be an inertial frame.
334
+
335
+ Returns:
336
+ tuple[Position, Velocity]: Position and Velocity.
337
+ """
338
+ def get_eccentricity_x(self) -> ostk.core.type.Real:
339
+ """
340
+ Get x-component of eccentricity vector (f).
341
+
342
+ Returns:
343
+ float: f component.
344
+ """
345
+ def get_eccentricity_y(self) -> ostk.core.type.Real:
346
+ """
347
+ Get y-component of eccentricity vector (g).
348
+
349
+ Returns:
350
+ float: g component.
351
+ """
352
+ def get_node_x(self) -> ostk.core.type.Real:
353
+ """
354
+ Get x-component of node vector (h).
355
+
356
+ Returns:
357
+ float: h component.
358
+ """
359
+ def get_node_y(self) -> ostk.core.type.Real:
360
+ """
361
+ Get y-component of node vector (k).
362
+
363
+ Returns:
364
+ float: k component.
365
+ """
366
+ def get_semi_latus_rectum(self) -> ostk.physics.unit.Length:
367
+ """
368
+ Get semi-latus rectum (p).
369
+
370
+ Returns:
371
+ Length: Semi-latus rectum.
372
+ """
373
+ def get_si_vector(self) -> numpy.ndarray[numpy.float64[6, 1]]:
374
+ """
375
+ Get ModifiedEquinoctial elements as a 6D vector in SI units.
376
+ [p (m), f, g, h, k, L (rad)]
377
+
378
+ Returns:
379
+ numpy.ndarray: 6D vector of elements in SI units.
380
+ """
381
+ def get_true_longitude(self) -> ostk.physics.unit.Angle:
382
+ """
383
+ Get true longitude (L).
384
+
385
+ Returns:
386
+ Angle: True longitude.
387
+ """
388
+ def is_defined(self) -> bool:
389
+ """
390
+ Check if ModifiedEquinoctial is defined.
391
+
392
+ Returns:
393
+ bool: True if ModifiedEquinoctial is defined.
394
+ """
256
395
  class Propagated(ostk.astrodynamics.trajectory.orbit.OrbitModel):
257
396
  """
258
397