open-space-toolkit-astrodynamics 1.2.0__py310-none-any.whl → 4.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-1.2.0.dist-info → open_space_toolkit_astrodynamics-4.2.0.dist-info}/METADATA +2 -2
- open_space_toolkit_astrodynamics-4.2.0.dist-info/RECORD +25 -0
- ostk/astrodynamics/OpenSpaceToolkitAstrodynamicsPy.cpython-310-x86_64-linux-gnu.so +0 -0
- ostk/astrodynamics/__init__.py +6 -0
- ostk/astrodynamics/{libopen-space-toolkit-astrodynamics.so.1 → libopen-space-toolkit-astrodynamics.so.4} +0 -0
- ostk/astrodynamics/pytrajectory/pystate.py +36 -0
- ostk/astrodynamics/test/test_access.py +2 -6
- ostk/astrodynamics/test/test_converters.py +1 -3
- ostk/astrodynamics/test/test_event_condition.py +24 -41
- ostk/astrodynamics/test/test_import.py +3 -3
- ostk/astrodynamics/test/test_viewer.py +1 -2
- ostk/astrodynamics/viewer.py +1 -1
- open_space_toolkit_astrodynamics-1.2.0.dist-info/RECORD +0 -72
- ostk/astrodynamics/test/access/__init__.py +0 -1
- ostk/astrodynamics/test/access/test_generator.py +0 -248
- ostk/astrodynamics/test/conjunction/messages/ccsds/__init__.py +0 -1
- ostk/astrodynamics/test/conjunction/messages/ccsds/conftest.py +0 -325
- ostk/astrodynamics/test/conjunction/messages/ccsds/data/cdm.json +0 -303
- ostk/astrodynamics/test/conjunction/messages/ccsds/test_cdm.py +0 -418
- ostk/astrodynamics/test/event_condition/test_coe_condition.py +0 -95
- ostk/astrodynamics/test/event_condition/test_conjunctive.py +0 -64
- ostk/astrodynamics/test/event_condition/test_disjunctive.py +0 -63
- ostk/astrodynamics/test/event_condition/test_duration_condition.py +0 -36
- ostk/astrodynamics/test/event_condition/test_logical_connective.py +0 -37
- ostk/astrodynamics/test/flight/__init__.py +0 -1
- ostk/astrodynamics/test/flight/profile/__init__.py +0 -1
- ostk/astrodynamics/test/flight/profile/test_state.py +0 -144
- ostk/astrodynamics/test/flight/system/__init__.py +0 -1
- ostk/astrodynamics/test/flight/system/dynamics/__init__.py +0 -1
- ostk/astrodynamics/test/flight/system/dynamics/test_atmospheric_drag.py +0 -86
- ostk/astrodynamics/test/flight/system/dynamics/test_central_body_gravity.py +0 -57
- ostk/astrodynamics/test/flight/system/dynamics/test_position_derivative.py +0 -49
- ostk/astrodynamics/test/flight/system/dynamics/test_third_body_gravity.py +0 -65
- ostk/astrodynamics/test/flight/system/test_satellite_system.py +0 -77
- ostk/astrodynamics/test/flight/test_profile.py +0 -147
- ostk/astrodynamics/test/flight/test_system.py +0 -55
- ostk/astrodynamics/test/solvers/__init__.py +0 -1
- ostk/astrodynamics/test/solvers/test_temporal_condition_solver.py +0 -153
- ostk/astrodynamics/test/test_numerical_solver.py +0 -248
- ostk/astrodynamics/test/trajectory/__init__.py +0 -1
- ostk/astrodynamics/test/trajectory/orbit/__init__.py +0 -1
- ostk/astrodynamics/test/trajectory/orbit/messages/__init__.py +0 -1
- ostk/astrodynamics/test/trajectory/orbit/messages/spacex/__init__.py +0 -1
- ostk/astrodynamics/test/trajectory/orbit/messages/spacex/conftest.py +0 -18
- ostk/astrodynamics/test/trajectory/orbit/messages/spacex/data/opm_1.yaml +0 -44
- ostk/astrodynamics/test/trajectory/orbit/messages/spacex/test_opm.py +0 -108
- ostk/astrodynamics/test/trajectory/orbit/models/__init__.py +0 -1
- ostk/astrodynamics/test/trajectory/orbit/models/kepler/__init__.py +0 -1
- ostk/astrodynamics/test/trajectory/orbit/models/kepler/test_coe.py +0 -108
- ostk/astrodynamics/test/trajectory/orbit/models/sgp4/__init__.py +0 -1
- ostk/astrodynamics/test/trajectory/orbit/models/sgp4/test_tle.py +0 -332
- ostk/astrodynamics/test/trajectory/orbit/models/test_kepler.py +0 -130
- ostk/astrodynamics/test/trajectory/orbit/models/test_propagated.py +0 -197
- ostk/astrodynamics/test/trajectory/orbit/models/test_sgp4.py +0 -1
- ostk/astrodynamics/test/trajectory/orbit/models/test_tabulated.py +0 -383
- ostk/astrodynamics/test/trajectory/orbit/test_model.py +0 -1
- ostk/astrodynamics/test/trajectory/orbit/test_pass.py +0 -55
- ostk/astrodynamics/test/trajectory/test_model.py +0 -1
- ostk/astrodynamics/test/trajectory/test_orbit.py +0 -92
- ostk/astrodynamics/test/trajectory/test_propagator.py +0 -233
- ostk/astrodynamics/test/trajectory/test_state.py +0 -70
- {open_space_toolkit_astrodynamics-1.2.0.dist-info → open_space_toolkit_astrodynamics-4.2.0.dist-info}/WHEEL +0 -0
- {open_space_toolkit_astrodynamics-1.2.0.dist-info → open_space_toolkit_astrodynamics-4.2.0.dist-info}/top_level.txt +0 -0
- {open_space_toolkit_astrodynamics-1.2.0.dist-info → open_space_toolkit_astrodynamics-4.2.0.dist-info}/zip-safe +0 -0
- /ostk/{__init__.py → astrodynamics/pytrajectory/__init__.py} +0 -0
@@ -1,92 +0,0 @@
|
|
1
|
-
# Apache License 2.0
|
2
|
-
|
3
|
-
import pytest
|
4
|
-
|
5
|
-
from ostk.physics import Environment
|
6
|
-
from ostk.physics.units import Length, Angle
|
7
|
-
from ostk.physics.time import Scale, Instant, DateTime, Time
|
8
|
-
|
9
|
-
from ostk.astrodynamics.trajectory import Orbit, State
|
10
|
-
from ostk.astrodynamics.trajectory.orbit.models import SGP4
|
11
|
-
from ostk.astrodynamics.trajectory.orbit.models.sgp4 import TLE
|
12
|
-
|
13
|
-
|
14
|
-
@pytest.fixture
|
15
|
-
def earth():
|
16
|
-
return Environment.default().access_celestial_object_with_name("Earth")
|
17
|
-
|
18
|
-
|
19
|
-
class TestOrbit:
|
20
|
-
def test_trajectory_orbit_constructors(self, earth):
|
21
|
-
# Construct Two-Line Element set
|
22
|
-
tle = TLE(
|
23
|
-
"1 25544U 98067A 18231.17878740 .00000187 00000-0 10196-4 0 9994",
|
24
|
-
"2 25544 51.6447 64.7824 0005971 73.1467 36.4366 15.53848234128316",
|
25
|
-
)
|
26
|
-
|
27
|
-
# Construct orbit using SGP4 model
|
28
|
-
orbit = Orbit(SGP4(tle), earth)
|
29
|
-
|
30
|
-
assert orbit is not None
|
31
|
-
assert isinstance(orbit, Orbit)
|
32
|
-
assert orbit.is_defined()
|
33
|
-
|
34
|
-
# Construct get state at current epoch
|
35
|
-
state: State = orbit.get_state_at(Instant.now())
|
36
|
-
|
37
|
-
assert state is not None
|
38
|
-
assert isinstance(state, State)
|
39
|
-
|
40
|
-
def test_trajectory_orbit_circular(self, earth):
|
41
|
-
epoch = Instant.date_time(DateTime(2018, 1, 1, 0, 0, 0), Scale.UTC)
|
42
|
-
altitude = Length.kilometers(500.0)
|
43
|
-
inclination = Angle.degrees(45.0)
|
44
|
-
|
45
|
-
orbit: Orbit = Orbit.circular(epoch, altitude, inclination, earth)
|
46
|
-
|
47
|
-
def test_trajectory_orbit_equatorial(self, earth):
|
48
|
-
epoch = Instant.date_time(DateTime(2018, 1, 1, 0, 0, 0), Scale.UTC)
|
49
|
-
apoapsis_altitude = Length.kilometers(500.1)
|
50
|
-
periapsis_altitude = Length.kilometers(499.9)
|
51
|
-
|
52
|
-
orbit: Orbit = Orbit.equatorial(
|
53
|
-
epoch, apoapsis_altitude, periapsis_altitude, earth
|
54
|
-
)
|
55
|
-
|
56
|
-
assert orbit is not None
|
57
|
-
assert isinstance(orbit, Orbit)
|
58
|
-
assert orbit.is_defined()
|
59
|
-
|
60
|
-
def test_trajectory_orbit_circular_equatorial(self, earth):
|
61
|
-
epoch = Instant.date_time(DateTime(2018, 1, 1, 0, 0, 0), Scale.UTC)
|
62
|
-
altitude = Length.kilometers(500.0)
|
63
|
-
|
64
|
-
orbit: Orbit = Orbit.circular_equatorial(epoch, altitude, earth)
|
65
|
-
|
66
|
-
assert orbit is not None
|
67
|
-
assert isinstance(orbit, Orbit)
|
68
|
-
assert orbit.is_defined()
|
69
|
-
|
70
|
-
def test_trajectory_orbit_geo_synchronous(self, earth):
|
71
|
-
epoch = Instant.date_time(DateTime(2018, 1, 1, 0, 0, 0), Scale.UTC)
|
72
|
-
inclination = Angle.degrees(45.0)
|
73
|
-
longitude = Angle.degrees(45.0)
|
74
|
-
|
75
|
-
orbit: Orbit = Orbit.geo_synchronous(epoch, inclination, longitude, earth)
|
76
|
-
|
77
|
-
assert orbit is not None
|
78
|
-
assert isinstance(orbit, Orbit)
|
79
|
-
assert orbit.is_defined()
|
80
|
-
|
81
|
-
def test_trajectory_orbit_sun_synchronous(self, earth):
|
82
|
-
epoch = Instant.date_time(DateTime(2018, 1, 1, 0, 0, 0), Scale.UTC)
|
83
|
-
altitude = Length.kilometers(500.0)
|
84
|
-
local_time_at_descending_node = Time.midnight()
|
85
|
-
|
86
|
-
orbit: Orbit = Orbit.sun_synchronous(
|
87
|
-
epoch, altitude, local_time_at_descending_node, earth
|
88
|
-
)
|
89
|
-
|
90
|
-
assert orbit is not None
|
91
|
-
assert isinstance(orbit, Orbit)
|
92
|
-
assert orbit.is_defined()
|
@@ -1,233 +0,0 @@
|
|
1
|
-
# Apache License 2.0
|
2
|
-
|
3
|
-
import pytest
|
4
|
-
|
5
|
-
import numpy as np
|
6
|
-
|
7
|
-
from ostk.mathematics.geometry.d3.objects import Cuboid
|
8
|
-
from ostk.mathematics.geometry.d3.objects import Composite
|
9
|
-
from ostk.mathematics.geometry.d3.objects import Point
|
10
|
-
|
11
|
-
from ostk.physics import Environment
|
12
|
-
from ostk.physics.units import Mass
|
13
|
-
from ostk.physics.time import Instant
|
14
|
-
from ostk.physics.time import DateTime
|
15
|
-
from ostk.physics.time import Scale
|
16
|
-
from ostk.physics.coordinate import Position
|
17
|
-
from ostk.physics.coordinate import Velocity
|
18
|
-
from ostk.physics.coordinate import Frame
|
19
|
-
from ostk.physics.environment.objects.celestial_bodies import Earth
|
20
|
-
|
21
|
-
from ostk.astrodynamics import NumericalSolver
|
22
|
-
from ostk.astrodynamics.flight.system import SatelliteSystem
|
23
|
-
from ostk.astrodynamics.flight.system import Dynamics
|
24
|
-
from ostk.astrodynamics.flight.system.dynamics import CentralBodyGravity
|
25
|
-
from ostk.astrodynamics.flight.system.dynamics import PositionDerivative
|
26
|
-
from ostk.astrodynamics.trajectory import State
|
27
|
-
from ostk.astrodynamics.trajectory import Propagator
|
28
|
-
from ostk.astrodynamics import EventCondition
|
29
|
-
|
30
|
-
|
31
|
-
@pytest.fixture
|
32
|
-
def satellite_system() -> SatelliteSystem:
|
33
|
-
mass = Mass(90.0, Mass.Unit.Kilogram)
|
34
|
-
satellite_geometry = Composite(
|
35
|
-
Cuboid(
|
36
|
-
Point(0.0, 0.0, 0.0),
|
37
|
-
[[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]],
|
38
|
-
[1.0, 0.0, 0.0],
|
39
|
-
)
|
40
|
-
)
|
41
|
-
inertia_tensor = np.identity(3)
|
42
|
-
surface_area = 0.8
|
43
|
-
drag_coefficient = 0.0
|
44
|
-
|
45
|
-
return SatelliteSystem(
|
46
|
-
mass, satellite_geometry, inertia_tensor, surface_area, drag_coefficient
|
47
|
-
)
|
48
|
-
|
49
|
-
|
50
|
-
@pytest.fixture
|
51
|
-
def environment() -> Environment:
|
52
|
-
return Environment.default()
|
53
|
-
|
54
|
-
|
55
|
-
@pytest.fixture
|
56
|
-
def state() -> State:
|
57
|
-
frame: Frame = Frame.GCRF()
|
58
|
-
position: Position = Position.meters([7500000.0, 0.0, 0.0], frame)
|
59
|
-
velocity: Velocity = Velocity.meters_per_second(
|
60
|
-
[0.0, 5335.865450622126, 5335.865450622126], frame
|
61
|
-
)
|
62
|
-
|
63
|
-
instant: Instant = Instant.date_time(DateTime(2018, 1, 1, 0, 0, 0), Scale.UTC)
|
64
|
-
return State(instant, position, velocity)
|
65
|
-
|
66
|
-
|
67
|
-
@pytest.fixture
|
68
|
-
def central_body_gravity() -> CentralBodyGravity:
|
69
|
-
return CentralBodyGravity(Earth.WGS84(20, 0))
|
70
|
-
|
71
|
-
|
72
|
-
@pytest.fixture
|
73
|
-
def position_derivative() -> PositionDerivative:
|
74
|
-
return PositionDerivative()
|
75
|
-
|
76
|
-
|
77
|
-
@pytest.fixture
|
78
|
-
def dynamics(
|
79
|
-
position_derivative: PositionDerivative, central_body_gravity: CentralBodyGravity
|
80
|
-
) -> list:
|
81
|
-
return [position_derivative, central_body_gravity]
|
82
|
-
|
83
|
-
|
84
|
-
@pytest.fixture
|
85
|
-
def numerical_solver() -> NumericalSolver:
|
86
|
-
return NumericalSolver(
|
87
|
-
NumericalSolver.LogType.NoLog,
|
88
|
-
NumericalSolver.StepperType.RungeKuttaFehlberg78,
|
89
|
-
5.0,
|
90
|
-
1.0e-15,
|
91
|
-
1.0e-15,
|
92
|
-
)
|
93
|
-
|
94
|
-
|
95
|
-
@pytest.fixture
|
96
|
-
def conditional_numerical_solver() -> NumericalSolver:
|
97
|
-
return NumericalSolver(
|
98
|
-
NumericalSolver.LogType.NoLog,
|
99
|
-
NumericalSolver.StepperType.RungeKuttaDopri5,
|
100
|
-
5.0,
|
101
|
-
1.0e-15,
|
102
|
-
1.0e-15,
|
103
|
-
)
|
104
|
-
|
105
|
-
|
106
|
-
@pytest.fixture
|
107
|
-
def event_condition() -> EventCondition:
|
108
|
-
class MyEventCondition(EventCondition):
|
109
|
-
def evaluate(self, state_vector, time):
|
110
|
-
return time - 42.0
|
111
|
-
|
112
|
-
return MyEventCondition("42 Seconds", EventCondition.Criteria.StrictlyPositive)
|
113
|
-
|
114
|
-
|
115
|
-
@pytest.fixture
|
116
|
-
def propagator(
|
117
|
-
numerical_solver: NumericalSolver, dynamics: list[Dynamics]
|
118
|
-
) -> Propagator:
|
119
|
-
return Propagator(numerical_solver, dynamics)
|
120
|
-
|
121
|
-
|
122
|
-
class TestPropagator:
|
123
|
-
def test_constructors(self, propagator: Propagator):
|
124
|
-
assert propagator is not None
|
125
|
-
assert isinstance(propagator, Propagator)
|
126
|
-
assert propagator.is_defined()
|
127
|
-
|
128
|
-
def test_get_dynamics(self, propagator: Propagator, dynamics: list):
|
129
|
-
assert propagator.get_dynamics() == dynamics
|
130
|
-
|
131
|
-
def test_set_dynamics(self, propagator: Propagator, dynamics: list):
|
132
|
-
assert len(propagator.get_dynamics()) == 2
|
133
|
-
|
134
|
-
propagator.set_dynamics(dynamics + dynamics)
|
135
|
-
|
136
|
-
assert len(propagator.get_dynamics()) == 4
|
137
|
-
|
138
|
-
def test_add_dynamics(
|
139
|
-
self, propagator: Propagator, central_body_gravity: CentralBodyGravity
|
140
|
-
):
|
141
|
-
assert len(propagator.get_dynamics()) == 2
|
142
|
-
|
143
|
-
propagator.add_dynamics(central_body_gravity)
|
144
|
-
propagator.add_dynamics(central_body_gravity)
|
145
|
-
|
146
|
-
assert len(propagator.get_dynamics()) == 4
|
147
|
-
|
148
|
-
def test_clear_dynamics(self, propagator: Propagator):
|
149
|
-
assert len(propagator.get_dynamics()) >= 1
|
150
|
-
|
151
|
-
propagator.clear_dynamics()
|
152
|
-
|
153
|
-
assert len(propagator.get_dynamics()) == 0
|
154
|
-
|
155
|
-
def test_calculate_state_at(self, propagator: Propagator, state: State):
|
156
|
-
instant: Instant = Instant.date_time(DateTime(2018, 1, 1, 0, 10, 0), Scale.UTC)
|
157
|
-
|
158
|
-
propagator_state = propagator.calculate_state_at(state, instant)
|
159
|
-
|
160
|
-
propagator_state_position_ref = np.array(
|
161
|
-
[6265892.25765909, 3024770.94961259, 3024359.72137468]
|
162
|
-
)
|
163
|
-
propagator_state_velocity_ref = np.array(
|
164
|
-
[-3974.49168221, 4468.16996776, 4466.19232746]
|
165
|
-
)
|
166
|
-
|
167
|
-
propagator_state_position = propagator_state.get_position().get_coordinates()
|
168
|
-
propagator_state_velocity = propagator_state.get_velocity().get_coordinates()
|
169
|
-
|
170
|
-
assert all(
|
171
|
-
[
|
172
|
-
round(propagator_state_position[i], 8)
|
173
|
-
== round(propagator_state_position_ref[i], 8)
|
174
|
-
for i in range(0, len(propagator_state_position_ref))
|
175
|
-
]
|
176
|
-
)
|
177
|
-
assert all(
|
178
|
-
[
|
179
|
-
round(propagator_state_velocity[i], 8)
|
180
|
-
== round(propagator_state_velocity_ref[i], 8)
|
181
|
-
for i in range(0, len(propagator_state_velocity_ref))
|
182
|
-
]
|
183
|
-
)
|
184
|
-
assert propagator_state.get_instant() == instant
|
185
|
-
|
186
|
-
def test_calculate_state_at(
|
187
|
-
self,
|
188
|
-
conditional_numerical_solver: NumericalSolver,
|
189
|
-
dynamics: list[Dynamics],
|
190
|
-
state: State,
|
191
|
-
event_condition: EventCondition,
|
192
|
-
):
|
193
|
-
propagator: Propagator = Propagator(conditional_numerical_solver, dynamics)
|
194
|
-
|
195
|
-
instant: Instant = Instant.date_time(DateTime(2018, 1, 1, 0, 10, 0), Scale.UTC)
|
196
|
-
|
197
|
-
propagator_state = propagator.calculate_state_at(
|
198
|
-
state, instant, event_condition
|
199
|
-
)
|
200
|
-
|
201
|
-
assert pytest.approx(42.0, abs=1e-3) == float(
|
202
|
-
(propagator_state.get_instant() - state.get_instant()).in_seconds()
|
203
|
-
)
|
204
|
-
|
205
|
-
def test_calculate_states_at(self, propagator: Propagator, state: State):
|
206
|
-
instant_array = [
|
207
|
-
Instant.date_time(DateTime(2018, 1, 1, 0, 10, 0), Scale.UTC),
|
208
|
-
Instant.date_time(DateTime(2018, 1, 1, 0, 20, 0), Scale.UTC),
|
209
|
-
]
|
210
|
-
|
211
|
-
_ = propagator.calculate_states_at(state, instant_array)
|
212
|
-
|
213
|
-
with pytest.raises(RuntimeError):
|
214
|
-
instant_array.reverse()
|
215
|
-
propagator.calculate_states_at(state, instant_array)
|
216
|
-
|
217
|
-
def test_from_environment(
|
218
|
-
self,
|
219
|
-
numerical_solver: NumericalSolver,
|
220
|
-
environment: Environment,
|
221
|
-
satellite_system: SatelliteSystem,
|
222
|
-
):
|
223
|
-
assert Propagator.from_environment(numerical_solver, environment) is not None
|
224
|
-
|
225
|
-
assert (
|
226
|
-
Propagator.from_environment(numerical_solver, environment, satellite_system)
|
227
|
-
is not None
|
228
|
-
)
|
229
|
-
|
230
|
-
def test_default(self, environment: Environment, satellite_system: SatelliteSystem):
|
231
|
-
assert Propagator.default()
|
232
|
-
assert Propagator.default(environment) is not None
|
233
|
-
assert Propagator.default(environment, satellite_system) is not None
|
@@ -1,70 +0,0 @@
|
|
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 Position
|
11
|
-
from ostk.physics.coordinate import Velocity
|
12
|
-
from ostk.physics.coordinate import Frame
|
13
|
-
|
14
|
-
from ostk.astrodynamics.trajectory import State
|
15
|
-
|
16
|
-
|
17
|
-
@pytest.fixture
|
18
|
-
def state_default_inputs() -> tuple[Instant, Position, Velocity, Frame]:
|
19
|
-
frame: Frame = Frame.GCRF()
|
20
|
-
position: Position = Position.meters([6371000.0, 0.0, 0.0], frame)
|
21
|
-
velocity: Velocity = Velocity.meters_per_second([7600.0, 0.0, 0.0], frame)
|
22
|
-
|
23
|
-
instant = Instant.date_time(DateTime(2018, 1, 1, 0, 0, 0), Scale.UTC)
|
24
|
-
|
25
|
-
return (instant, position, velocity, frame)
|
26
|
-
|
27
|
-
|
28
|
-
@pytest.fixture
|
29
|
-
def state(state_default_inputs) -> State:
|
30
|
-
return State(*state_default_inputs[0:-1])
|
31
|
-
|
32
|
-
|
33
|
-
class TestState:
|
34
|
-
def test_constructor(self, state: State):
|
35
|
-
assert state is not None
|
36
|
-
assert isinstance(state, State)
|
37
|
-
assert state.is_defined()
|
38
|
-
|
39
|
-
def test_comparators(self, state: State):
|
40
|
-
assert (state == state) is True
|
41
|
-
assert (state != state) is False
|
42
|
-
|
43
|
-
def test_operators(self, state: State):
|
44
|
-
assert isinstance(state + state, State)
|
45
|
-
assert isinstance(state - state, State)
|
46
|
-
|
47
|
-
def test_getters(
|
48
|
-
self,
|
49
|
-
state: State,
|
50
|
-
state_default_inputs: tuple[Instant, Position, Velocity, Frame],
|
51
|
-
):
|
52
|
-
(instant, position, velocity, _) = state_default_inputs
|
53
|
-
|
54
|
-
assert state.get_instant() == instant
|
55
|
-
assert state.get_position() == position
|
56
|
-
assert state.get_velocity() == velocity
|
57
|
-
assert (
|
58
|
-
state.get_coordinates()
|
59
|
-
== np.append(position.get_coordinates(), velocity.get_coordinates())
|
60
|
-
).all()
|
61
|
-
|
62
|
-
def test_in_frame(
|
63
|
-
self,
|
64
|
-
state: State,
|
65
|
-
state_default_inputs: tuple[Instant, Position, Velocity, Frame],
|
66
|
-
):
|
67
|
-
(_, _, _, frame) = state_default_inputs
|
68
|
-
|
69
|
-
assert state.in_frame(frame) == state
|
70
|
-
assert state.in_frame(Frame.ITRF()) != state
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|