open-space-toolkit-astrodynamics 5.1.5__py310-none-any.whl → 5.2.0__py310-none-any.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.
- {open_space_toolkit_astrodynamics-5.1.5.dist-info → open_space_toolkit_astrodynamics-5.2.0.dist-info}/METADATA +1 -1
- open_space_toolkit_astrodynamics-5.2.0.dist-info/RECORD +96 -0
- ostk/__init__.py +1 -0
- ostk/astrodynamics/OpenSpaceToolkitAstrodynamicsPy.cpython-310-x86_64-linux-gnu.so +0 -0
- ostk/astrodynamics/converters.py +44 -6
- ostk/astrodynamics/libopen-space-toolkit-astrodynamics.so.5 +0 -0
- ostk/astrodynamics/pytrajectory/pystate.py +1 -3
- ostk/astrodynamics/test/access/__init__.py +1 -0
- ostk/astrodynamics/test/access/test_generator.py +248 -0
- ostk/astrodynamics/test/conjunction/messages/ccsds/__init__.py +1 -0
- ostk/astrodynamics/test/conjunction/messages/ccsds/conftest.py +325 -0
- ostk/astrodynamics/test/conjunction/messages/ccsds/data/cdm.json +303 -0
- ostk/astrodynamics/test/conjunction/messages/ccsds/test_cdm.py +416 -0
- ostk/astrodynamics/test/dynamics/__init__.py +1 -0
- ostk/astrodynamics/test/dynamics/test_atmospheric_drag.py +128 -0
- ostk/astrodynamics/test/dynamics/test_central_body_gravity.py +58 -0
- ostk/astrodynamics/test/dynamics/test_dynamics.py +50 -0
- ostk/astrodynamics/test/dynamics/test_position_derivative.py +51 -0
- ostk/astrodynamics/test/dynamics/test_third_body_gravity.py +67 -0
- ostk/astrodynamics/test/dynamics/test_thruster.py +142 -0
- ostk/astrodynamics/test/event_condition/test_angular_condition.py +113 -0
- ostk/astrodynamics/test/event_condition/test_boolean_condition.py +55 -0
- ostk/astrodynamics/test/event_condition/test_coe_condition.py +87 -0
- ostk/astrodynamics/test/event_condition/test_instant_condition.py +48 -0
- ostk/astrodynamics/test/event_condition/test_logical_condition.py +120 -0
- ostk/astrodynamics/test/event_condition/test_real_condition.py +50 -0
- ostk/astrodynamics/test/flight/__init__.py +1 -0
- ostk/astrodynamics/test/flight/profile/__init__.py +1 -0
- ostk/astrodynamics/test/flight/profile/test_state.py +144 -0
- ostk/astrodynamics/test/flight/system/__init__.py +1 -0
- ostk/astrodynamics/test/flight/system/test_propulsion_system.py +46 -0
- ostk/astrodynamics/test/flight/system/test_satellite_system.py +91 -0
- ostk/astrodynamics/test/flight/system/test_satellite_system_builder.py +71 -0
- ostk/astrodynamics/test/flight/test_profile.py +153 -0
- ostk/astrodynamics/test/flight/test_system.py +55 -0
- ostk/astrodynamics/test/guidance_law/test_constant_thrust.py +91 -0
- ostk/astrodynamics/test/guidance_law/test_qlaw.py +139 -0
- ostk/astrodynamics/test/solvers/__init__.py +1 -0
- ostk/astrodynamics/test/solvers/test_finite_difference_solver.py +181 -0
- ostk/astrodynamics/test/solvers/test_temporal_condition_solver.py +153 -0
- ostk/astrodynamics/test/test_access.py +2 -6
- ostk/astrodynamics/test/test_converters.py +213 -6
- ostk/astrodynamics/test/test_viewer.py +1 -2
- ostk/astrodynamics/test/trajectory/__init__.py +1 -0
- ostk/astrodynamics/test/trajectory/orbit/__init__.py +1 -0
- ostk/astrodynamics/test/trajectory/orbit/messages/__init__.py +1 -0
- ostk/astrodynamics/test/trajectory/orbit/messages/spacex/__init__.py +1 -0
- ostk/astrodynamics/test/trajectory/orbit/messages/spacex/conftest.py +18 -0
- ostk/astrodynamics/test/trajectory/orbit/messages/spacex/data/opm_1.yaml +44 -0
- ostk/astrodynamics/test/trajectory/orbit/messages/spacex/test_opm.py +108 -0
- ostk/astrodynamics/test/trajectory/orbit/models/__init__.py +1 -0
- ostk/astrodynamics/test/trajectory/orbit/models/kepler/__init__.py +1 -0
- ostk/astrodynamics/test/trajectory/orbit/models/kepler/test_brouwer_lyddane_mean.py +65 -0
- ostk/astrodynamics/test/trajectory/orbit/models/kepler/test_brouwer_lyddane_mean_long.py +102 -0
- ostk/astrodynamics/test/trajectory/orbit/models/kepler/test_brouwer_lyddane_mean_short.py +102 -0
- ostk/astrodynamics/test/trajectory/orbit/models/kepler/test_coe.py +167 -0
- ostk/astrodynamics/test/trajectory/orbit/models/sgp4/__init__.py +1 -0
- ostk/astrodynamics/test/trajectory/orbit/models/sgp4/test_tle.py +331 -0
- ostk/astrodynamics/test/trajectory/orbit/models/test_kepler.py +130 -0
- ostk/astrodynamics/test/trajectory/orbit/models/test_propagated.py +195 -0
- ostk/astrodynamics/test/trajectory/orbit/models/test_sgp4.py +1 -0
- ostk/astrodynamics/test/trajectory/orbit/models/test_tabulated.py +380 -0
- ostk/astrodynamics/test/trajectory/orbit/test_model.py +1 -0
- ostk/astrodynamics/test/trajectory/orbit/test_pass.py +55 -0
- ostk/astrodynamics/test/trajectory/state/coordinates_subset/test_angular_velocity.py +30 -0
- ostk/astrodynamics/test/trajectory/state/coordinates_subset/test_attitude_quaternion.py +18 -0
- ostk/astrodynamics/test/trajectory/state/coordinates_subset/test_cartesian_position.py +107 -0
- ostk/astrodynamics/test/trajectory/state/coordinates_subset/test_cartesian_velocity.py +115 -0
- ostk/astrodynamics/test/trajectory/state/test_coordinates_broker.py +84 -0
- ostk/astrodynamics/test/trajectory/state/test_coordinates_subset.py +43 -0
- ostk/astrodynamics/test/trajectory/state/test_numerical_solver.py +314 -0
- ostk/astrodynamics/test/trajectory/test_local_orbital_frame_direction.py +81 -0
- ostk/astrodynamics/test/trajectory/test_local_orbital_frame_factory.py +64 -0
- ostk/astrodynamics/test/trajectory/test_model.py +1 -0
- ostk/astrodynamics/test/trajectory/test_orbit.py +92 -0
- ostk/astrodynamics/test/trajectory/test_propagator.py +402 -0
- ostk/astrodynamics/test/trajectory/test_segment.py +288 -0
- ostk/astrodynamics/test/trajectory/test_sequence.py +459 -0
- ostk/astrodynamics/test/trajectory/test_state.py +223 -0
- ostk/astrodynamics/test/trajectory/test_state_builder.py +171 -0
- ostk/astrodynamics/viewer.py +1 -3
- open_space_toolkit_astrodynamics-5.1.5.dist-info/RECORD +0 -25
- {open_space_toolkit_astrodynamics-5.1.5.dist-info → open_space_toolkit_astrodynamics-5.2.0.dist-info}/WHEEL +0 -0
- {open_space_toolkit_astrodynamics-5.1.5.dist-info → open_space_toolkit_astrodynamics-5.2.0.dist-info}/top_level.txt +0 -0
- {open_space_toolkit_astrodynamics-5.1.5.dist-info → open_space_toolkit_astrodynamics-5.2.0.dist-info}/zip-safe +0 -0
@@ -0,0 +1,171 @@
|
|
1
|
+
# Apache License 2.0
|
2
|
+
|
3
|
+
import pytest
|
4
|
+
|
5
|
+
import numpy as np
|
6
|
+
|
7
|
+
from ostk.physics.time import Instant
|
8
|
+
from ostk.physics.time import DateTime
|
9
|
+
from ostk.physics.time import Scale
|
10
|
+
from ostk.physics.coordinate import Frame
|
11
|
+
|
12
|
+
from ostk.astrodynamics.trajectory import (
|
13
|
+
State,
|
14
|
+
StateBuilder,
|
15
|
+
)
|
16
|
+
from ostk.astrodynamics.trajectory.state import (
|
17
|
+
CoordinatesBroker,
|
18
|
+
CoordinatesSubset,
|
19
|
+
)
|
20
|
+
from ostk.astrodynamics.trajectory.state.coordinates_subset import (
|
21
|
+
CartesianPosition,
|
22
|
+
CartesianVelocity,
|
23
|
+
)
|
24
|
+
|
25
|
+
|
26
|
+
@pytest.fixture()
|
27
|
+
def instant() -> Instant:
|
28
|
+
return Instant.date_time(DateTime(2018, 1, 1, 0, 0, 0), Scale.UTC)
|
29
|
+
|
30
|
+
|
31
|
+
@pytest.fixture
|
32
|
+
def frame() -> Frame:
|
33
|
+
return Frame.GCRF()
|
34
|
+
|
35
|
+
|
36
|
+
@pytest.fixture
|
37
|
+
def coordinates_subsets() -> list[CoordinatesSubset]:
|
38
|
+
return [CartesianPosition.default(), CartesianVelocity.default()]
|
39
|
+
|
40
|
+
|
41
|
+
@pytest.fixture
|
42
|
+
def coordinates() -> list[float]:
|
43
|
+
return [1.0, 2.0, 3.0, 4.0, 5.0, 6.0]
|
44
|
+
|
45
|
+
|
46
|
+
@pytest.fixture
|
47
|
+
def coordinates_broker(
|
48
|
+
coordinates_subsets: list[CoordinatesSubset],
|
49
|
+
) -> CoordinatesBroker:
|
50
|
+
return CoordinatesBroker(coordinates_subsets)
|
51
|
+
|
52
|
+
|
53
|
+
@pytest.fixture
|
54
|
+
def state(
|
55
|
+
instant: Instant,
|
56
|
+
coordinates: list[float],
|
57
|
+
frame: Frame,
|
58
|
+
coordinates_broker: CoordinatesBroker,
|
59
|
+
) -> State:
|
60
|
+
return State(instant, coordinates, frame, coordinates_broker)
|
61
|
+
|
62
|
+
|
63
|
+
@pytest.fixture
|
64
|
+
def state_builder(frame: Frame, coordinates_broker: CoordinatesBroker) -> State:
|
65
|
+
return StateBuilder(frame, coordinates_broker)
|
66
|
+
|
67
|
+
|
68
|
+
class TestStateBuilder:
|
69
|
+
def test_broker_constructor(
|
70
|
+
self,
|
71
|
+
frame: Frame,
|
72
|
+
coordinates_broker: CoordinatesBroker,
|
73
|
+
):
|
74
|
+
builder = StateBuilder(frame, coordinates_broker)
|
75
|
+
assert builder is not None
|
76
|
+
assert isinstance(builder, StateBuilder)
|
77
|
+
assert builder.is_defined()
|
78
|
+
|
79
|
+
def test_subsets_constructor(
|
80
|
+
self,
|
81
|
+
frame: Frame,
|
82
|
+
coordinates_subsets: list[CoordinatesSubset],
|
83
|
+
):
|
84
|
+
builder = StateBuilder(frame, coordinates_subsets)
|
85
|
+
assert builder is not None
|
86
|
+
assert isinstance(builder, StateBuilder)
|
87
|
+
assert builder.is_defined()
|
88
|
+
|
89
|
+
def test_state_constructor(
|
90
|
+
self,
|
91
|
+
state: State,
|
92
|
+
):
|
93
|
+
builder = StateBuilder(state)
|
94
|
+
assert builder is not None
|
95
|
+
assert isinstance(builder, StateBuilder)
|
96
|
+
assert builder.is_defined()
|
97
|
+
|
98
|
+
def test_comparators(self, state_builder: StateBuilder):
|
99
|
+
assert (state_builder == state_builder) is True
|
100
|
+
assert (state_builder != state_builder) is False
|
101
|
+
|
102
|
+
def test_operators(
|
103
|
+
self,
|
104
|
+
state_builder: StateBuilder,
|
105
|
+
):
|
106
|
+
added_builder: StateBuilder = state_builder + CoordinatesSubset.mass()
|
107
|
+
assert isinstance(added_builder, StateBuilder)
|
108
|
+
assert state_builder != added_builder
|
109
|
+
|
110
|
+
subtracted_builder: StateBuilder = state_builder - CartesianPosition.default()
|
111
|
+
assert isinstance(subtracted_builder, StateBuilder)
|
112
|
+
assert state_builder != subtracted_builder
|
113
|
+
|
114
|
+
def test_build(
|
115
|
+
self,
|
116
|
+
instant: Instant,
|
117
|
+
state_builder: StateBuilder,
|
118
|
+
):
|
119
|
+
coordinates = [1, 2, 3, 1, 2, 3]
|
120
|
+
state: State = state_builder.build(instant, coordinates)
|
121
|
+
|
122
|
+
assert state is not None
|
123
|
+
assert isinstance(state, State)
|
124
|
+
assert state.is_defined()
|
125
|
+
assert state.get_instant() == instant
|
126
|
+
assert (state.get_coordinates() == coordinates).all()
|
127
|
+
assert state.get_frame() == state_builder.get_frame()
|
128
|
+
assert state.get_coordinates_subsets() == state_builder.get_coordinates_subsets()
|
129
|
+
|
130
|
+
def test_reduce(
|
131
|
+
self,
|
132
|
+
state: State,
|
133
|
+
):
|
134
|
+
builder = StateBuilder(state.get_frame(), [CartesianPosition.default()])
|
135
|
+
reduced_state: State = builder.reduce(state)
|
136
|
+
|
137
|
+
assert isinstance(reduced_state, State)
|
138
|
+
assert state != reduced_state
|
139
|
+
|
140
|
+
def test_expand(
|
141
|
+
self,
|
142
|
+
state: State,
|
143
|
+
):
|
144
|
+
builder = StateBuilder(
|
145
|
+
state.get_frame(),
|
146
|
+
[
|
147
|
+
CartesianPosition.default(),
|
148
|
+
CartesianVelocity.default(),
|
149
|
+
CoordinatesSubset.mass(),
|
150
|
+
],
|
151
|
+
)
|
152
|
+
default_state: State = State(
|
153
|
+
state.get_instant(),
|
154
|
+
[100],
|
155
|
+
state.get_frame(),
|
156
|
+
CoordinatesBroker([CoordinatesSubset.mass()]),
|
157
|
+
)
|
158
|
+
expanded_state: State = builder.expand(state, default_state)
|
159
|
+
|
160
|
+
assert isinstance(expanded_state, State)
|
161
|
+
assert state != expanded_state
|
162
|
+
assert default_state != expanded_state
|
163
|
+
|
164
|
+
def test_getters(
|
165
|
+
self,
|
166
|
+
state_builder: StateBuilder,
|
167
|
+
frame: Frame,
|
168
|
+
coordinates_broker: CoordinatesBroker,
|
169
|
+
):
|
170
|
+
assert state_builder.get_frame() == frame
|
171
|
+
assert state_builder.get_coordinates_subsets() == coordinates_broker.get_subsets()
|
ostk/astrodynamics/viewer.py
CHANGED
@@ -231,9 +231,7 @@ def _generate_sampled_orientation(states: list[State]) -> cesiumpy.SampledProper
|
|
231
231
|
samples=[
|
232
232
|
(
|
233
233
|
coerce_to_datetime(state.get_instant()),
|
234
|
-
_cesium_from_ostk_quaternion(
|
235
|
-
state.in_frame(Frame.ITRF()).get_attitude()
|
236
|
-
),
|
234
|
+
_cesium_from_ostk_quaternion(state.in_frame(Frame.ITRF()).get_attitude()),
|
237
235
|
None,
|
238
236
|
)
|
239
237
|
for state in states
|
@@ -1,25 +0,0 @@
|
|
1
|
-
ostk/astrodynamics/OpenSpaceToolkitAstrodynamicsPy.cpython-310-x86_64-linux-gnu.so,sha256=Tf44Q-URNgqWuGYyRDlzCrtvn2bJ7dryKXw_zvW1DOY,1984280
|
2
|
-
ostk/astrodynamics/__init__.py,sha256=3gWyqFIbhAfcdeMhmfBPQPlPQTmaOzm-6flkJe745Zk,251
|
3
|
-
ostk/astrodynamics/converters.py,sha256=WIOxUOFGrdFDIKfu0-N8jmCF0GOMMsw2aB_Wy0eXHAQ,3500
|
4
|
-
ostk/astrodynamics/display.py,sha256=y9FnoQbPFGM6LzkUdgXgeqtuVGhv57GuTKbeDdcFPgw,6306
|
5
|
-
ostk/astrodynamics/libopen-space-toolkit-astrodynamics.so.5,sha256=iNP_YTGSYYFffRaQNGY5-V17l2tqSH-OmLqQnQQ_lLA,93370440
|
6
|
-
ostk/astrodynamics/utilities.py,sha256=NbeKN_CtcCRHIinhoNWTEosBMR7xc924S-ZFD97mduw,4478
|
7
|
-
ostk/astrodynamics/viewer.py,sha256=AYVm4FIaedpdEvxUb36LSISKYNVnNaQtIDuEqrzLTqI,8948
|
8
|
-
ostk/astrodynamics/pytrajectory/__init__.py,sha256=epnVn2PwdQkUDZ1msqBRO5nEZIOUBIq-IfK3IlNPijE,21
|
9
|
-
ostk/astrodynamics/pytrajectory/pystate.py,sha256=pRWsDnGp23wqXIldaUskYvfbrO3ZsuZSSr4x5Hp-PYY,1067
|
10
|
-
ostk/astrodynamics/test/__init__.py,sha256=epnVn2PwdQkUDZ1msqBRO5nEZIOUBIq-IfK3IlNPijE,21
|
11
|
-
ostk/astrodynamics/test/conftest.py,sha256=J3SbQibnMVaPktAF6Z6cwVCa7xhW3uXpkOJRom6YtCo,2719
|
12
|
-
ostk/astrodynamics/test/test_access.py,sha256=s0Lt4MOdcHJasxNuDiDhZJZU-BsY4xBTFYkG4PnXk84,3987
|
13
|
-
ostk/astrodynamics/test/test_converters.py,sha256=E5PxWL9AzzCgyBZ2C_0MGpz8sXUW30GJv-LGM7LO5nA,5859
|
14
|
-
ostk/astrodynamics/test/test_display.py,sha256=8YeiYRYMpokzqprbRoDBI_xhHI5B8uxcdSzmqmF3AIc,3738
|
15
|
-
ostk/astrodynamics/test/test_event_condition.py,sha256=mhMTH7wAoYFWRYt_8l2d1vjNPrFhVjMAEET4INLCVXY,1472
|
16
|
-
ostk/astrodynamics/test/test_import.py,sha256=stS8jK9HiXyzRWjtDvaTqUrzCrOVnYVX5CkmQf7MJsA,1201
|
17
|
-
ostk/astrodynamics/test/test_root_solver.py,sha256=hQ8O6g-WP49gZH_H3Rdufv0F0gQorpzJyIcjBGGUQ34,1831
|
18
|
-
ostk/astrodynamics/test/test_trajectory.py,sha256=pvv4GQsvtU0XfWYk-F-oQNgo8ciFQBgzeJ4FojZDW-A,1364
|
19
|
-
ostk/astrodynamics/test/test_utilities.py,sha256=edAPLXNMflCPa0gzhU4e05pa6HbAq7UV0JzMMRx3VlQ,3252
|
20
|
-
ostk/astrodynamics/test/test_viewer.py,sha256=x_U6kmxaw_8JtamTbzNj0U-VCFAskWOL87eezv02uAE,3969
|
21
|
-
open_space_toolkit_astrodynamics-5.1.5.dist-info/METADATA,sha256=Y5PCQAQ1GlsvU8W12tBkRCz62RRtk5B50xYY4Iq-3Ys,1777
|
22
|
-
open_space_toolkit_astrodynamics-5.1.5.dist-info/WHEEL,sha256=XkTLBzO5wFUCdDVOL_PmxLzXmVEkMy5iQkBhGoKUwtk,94
|
23
|
-
open_space_toolkit_astrodynamics-5.1.5.dist-info/top_level.txt,sha256=zOR18699uDYnafgarhL8WU_LmTZY_5NVqutv-flp_x4,5
|
24
|
-
open_space_toolkit_astrodynamics-5.1.5.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
25
|
-
open_space_toolkit_astrodynamics-5.1.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|