open-space-toolkit-astrodynamics 6.1.0__py311-none-any.whl → 7.0.0__py311-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.
Files changed (71) hide show
  1. {open_space_toolkit_astrodynamics-6.1.0.dist-info → open_space_toolkit_astrodynamics-7.0.0.dist-info}/METADATA +2 -2
  2. open_space_toolkit_astrodynamics-7.0.0.dist-info/RECORD +97 -0
  3. ostk/astrodynamics/OpenSpaceToolkitAstrodynamicsPy.cpython-311-x86_64-linux-gnu.so +0 -0
  4. ostk/astrodynamics/display.py +3 -3
  5. ostk/astrodynamics/{libopen-space-toolkit-astrodynamics.so.6 → libopen-space-toolkit-astrodynamics.so.7} +0 -0
  6. ostk/astrodynamics/pytrajectory/pystate.py +4 -4
  7. ostk/astrodynamics/test/access/test_generator.py +6 -6
  8. ostk/astrodynamics/test/conftest.py +2 -2
  9. ostk/astrodynamics/test/conjunction/{messages → message}/ccsds/test_cdm.py +4 -4
  10. ostk/astrodynamics/test/dynamics/test_atmospheric_drag.py +18 -18
  11. ostk/astrodynamics/test/dynamics/test_central_body_gravity.py +1 -1
  12. ostk/astrodynamics/test/dynamics/test_dynamics.py +3 -3
  13. ostk/astrodynamics/test/dynamics/test_position_derivative.py +1 -1
  14. ostk/astrodynamics/test/dynamics/test_tabulated.py +5 -5
  15. ostk/astrodynamics/test/dynamics/test_third_body_gravity.py +1 -1
  16. ostk/astrodynamics/test/dynamics/test_thruster.py +17 -17
  17. ostk/astrodynamics/test/event_condition/test_angular_condition.py +1 -1
  18. ostk/astrodynamics/test/event_condition/test_coe_condition.py +1 -1
  19. ostk/astrodynamics/test/flight/system/test_propulsion_system.py +1 -1
  20. ostk/astrodynamics/test/flight/system/test_satellite_system.py +4 -4
  21. ostk/astrodynamics/test/flight/system/test_satellite_system_builder.py +4 -4
  22. ostk/astrodynamics/test/flight/test_profile.py +7 -7
  23. ostk/astrodynamics/test/flight/test_system.py +4 -4
  24. ostk/astrodynamics/test/guidance_law/test_qlaw.py +5 -5
  25. ostk/astrodynamics/test/solvers/test_finite_difference_solver.py +5 -5
  26. ostk/astrodynamics/test/solvers/test_temporal_condition_solver.py +4 -4
  27. ostk/astrodynamics/test/test_access.py +9 -9
  28. ostk/astrodynamics/test/test_display.py +6 -6
  29. ostk/astrodynamics/test/test_import.py +5 -5
  30. ostk/astrodynamics/test/test_trajectory.py +9 -9
  31. ostk/astrodynamics/test/test_utilities.py +7 -7
  32. ostk/astrodynamics/test/test_viewer.py +4 -3
  33. ostk/astrodynamics/test/trajectory/orbit/{messages → message}/spacex/test_opm.py +4 -4
  34. ostk/astrodynamics/test/trajectory/orbit/models/kepler/test_brouwer_lyddane_mean.py +3 -3
  35. ostk/astrodynamics/test/trajectory/orbit/models/kepler/test_brouwer_lyddane_mean_long.py +4 -4
  36. ostk/astrodynamics/test/trajectory/orbit/models/kepler/test_brouwer_lyddane_mean_short.py +4 -4
  37. ostk/astrodynamics/test/trajectory/orbit/models/kepler/test_coe.py +3 -3
  38. ostk/astrodynamics/test/trajectory/orbit/models/sgp4/test_tle.py +4 -4
  39. ostk/astrodynamics/test/trajectory/orbit/models/test_kepler.py +6 -6
  40. ostk/astrodynamics/test/trajectory/orbit/models/test_propagated.py +2 -2
  41. ostk/astrodynamics/test/trajectory/orbit/models/test_tabulated.py +1 -1
  42. ostk/astrodynamics/test/trajectory/state/{coordinates_subset → coordinate_subset}/test_angular_velocity.py +1 -1
  43. ostk/astrodynamics/test/trajectory/state/{coordinates_subset → coordinate_subset}/test_attitude_quaternion.py +1 -1
  44. ostk/astrodynamics/test/trajectory/state/{coordinates_subset → coordinate_subset}/test_cartesian_position.py +14 -14
  45. ostk/astrodynamics/test/trajectory/state/{coordinates_subset → coordinate_subset}/test_cartesian_velocity.py +14 -14
  46. ostk/astrodynamics/test/trajectory/state/test_coordinate_broker.py +84 -0
  47. ostk/astrodynamics/test/trajectory/state/test_coordinate_subset.py +43 -0
  48. ostk/astrodynamics/test/trajectory/state/test_numerical_solver.py +10 -10
  49. ostk/astrodynamics/test/trajectory/test_orbit.py +4 -4
  50. ostk/astrodynamics/test/trajectory/test_propagator.py +23 -23
  51. ostk/astrodynamics/test/trajectory/test_segment.py +8 -8
  52. ostk/astrodynamics/test/trajectory/test_sequence.py +18 -18
  53. ostk/astrodynamics/test/trajectory/test_state.py +34 -20
  54. ostk/astrodynamics/test/trajectory/test_state_builder.py +22 -22
  55. ostk/astrodynamics/utilities.py +1 -1
  56. ostk/astrodynamics/viewer.py +33 -3
  57. open_space_toolkit_astrodynamics-6.1.0.dist-info/RECORD +0 -99
  58. ostk/astrodynamics/test/flight/profile/test_state.py +0 -144
  59. ostk/astrodynamics/test/trajectory/orbit/messages/spacex/__init__.py +0 -1
  60. ostk/astrodynamics/test/trajectory/state/test_coordinates_broker.py +0 -84
  61. ostk/astrodynamics/test/trajectory/state/test_coordinates_subset.py +0 -43
  62. {open_space_toolkit_astrodynamics-6.1.0.dist-info → open_space_toolkit_astrodynamics-7.0.0.dist-info}/WHEEL +0 -0
  63. {open_space_toolkit_astrodynamics-6.1.0.dist-info → open_space_toolkit_astrodynamics-7.0.0.dist-info}/top_level.txt +0 -0
  64. {open_space_toolkit_astrodynamics-6.1.0.dist-info → open_space_toolkit_astrodynamics-7.0.0.dist-info}/zip-safe +0 -0
  65. /ostk/astrodynamics/test/conjunction/{messages → message}/ccsds/__init__.py +0 -0
  66. /ostk/astrodynamics/test/conjunction/{messages → message}/ccsds/conftest.py +0 -0
  67. /ostk/astrodynamics/test/conjunction/{messages → message}/ccsds/data/cdm.json +0 -0
  68. /ostk/astrodynamics/test/{flight/profile → trajectory/orbit/message}/__init__.py +0 -0
  69. /ostk/astrodynamics/test/trajectory/orbit/{messages → message/spacex}/__init__.py +0 -0
  70. /ostk/astrodynamics/test/trajectory/orbit/{messages → message}/spacex/conftest.py +0 -0
  71. /ostk/astrodynamics/test/trajectory/orbit/{messages → message}/spacex/data/opm_1.yaml +0 -0
@@ -0,0 +1,84 @@
1
+ # Apache License 2.0
2
+
3
+ import pytest
4
+
5
+ from ostk.astrodynamics.trajectory.state import CoordinateBroker, CoordinateSubset
6
+
7
+
8
+ @pytest.fixture
9
+ def coordinate_subsets() -> list:
10
+ return [CoordinateSubset("Subset1", 2), CoordinateSubset("Subset2", 3)]
11
+
12
+
13
+ @pytest.fixture
14
+ def coordinate_broker(coordinate_subsets) -> CoordinateBroker:
15
+ return CoordinateBroker(coordinate_subsets)
16
+
17
+
18
+ @pytest.fixture
19
+ def coordinates() -> list[float]:
20
+ return [1.0, 2.0, 3.0, 4.0, 5.0]
21
+
22
+
23
+ class TestCoordinateBroker:
24
+ def test_constructor(self, coordinate_broker: CoordinateBroker):
25
+ assert coordinate_broker is not None
26
+
27
+ def test_eq(self, coordinate_broker: CoordinateBroker):
28
+ assert coordinate_broker == coordinate_broker
29
+
30
+ def test_ne(self, coordinate_broker: CoordinateBroker):
31
+ assert (coordinate_broker != coordinate_broker) == False
32
+
33
+ def test_access_subsets(
34
+ self, coordinate_broker: CoordinateBroker, coordinate_subsets: list
35
+ ):
36
+ assert coordinate_broker.access_subsets() == coordinate_subsets
37
+
38
+ def test_get_number_of_coordinates(self, coordinate_broker: CoordinateBroker):
39
+ assert coordinate_broker.get_number_of_coordinates() == 5
40
+
41
+ def test_get_number_of_subsets(self, coordinate_broker: CoordinateBroker):
42
+ assert coordinate_broker.get_number_of_subsets() == 2
43
+
44
+ def test_get_subsets(
45
+ self, coordinate_broker: CoordinateBroker, coordinate_subsets: list
46
+ ):
47
+ assert coordinate_broker.get_subsets() == coordinate_subsets
48
+
49
+ def test_add_subset(self, coordinate_broker: CoordinateBroker):
50
+ new_subset = CoordinateSubset("NewSubset", 4)
51
+ number_of_coordinates = coordinate_broker.get_number_of_coordinates()
52
+ assert coordinate_broker.add_subset(new_subset) == number_of_coordinates
53
+ assert coordinate_broker.has_subset(new_subset)
54
+
55
+ def test_has_subset(
56
+ self, coordinate_broker: CoordinateBroker, coordinate_subsets: list
57
+ ):
58
+ assert coordinate_broker.has_subset(coordinate_subsets[0])
59
+
60
+ def test_extract_coordinate(
61
+ self,
62
+ coordinate_broker: CoordinateBroker,
63
+ coordinates: list[float],
64
+ coordinate_subsets: list[CoordinateSubset],
65
+ ):
66
+ assert (
67
+ coordinate_broker.extract_coordinate(coordinates, coordinate_subsets[0])
68
+ == [1.0, 2.0]
69
+ ).all()
70
+ assert (
71
+ coordinate_broker.extract_coordinate(coordinates, coordinate_subsets[1])
72
+ == [3.0, 4.0, 5.0]
73
+ ).all()
74
+
75
+ def test_extract_coordinates(
76
+ self,
77
+ coordinate_broker: CoordinateBroker,
78
+ coordinates: list[float],
79
+ coordinate_subsets: list[CoordinateSubset],
80
+ ):
81
+ assert (
82
+ coordinate_broker.extract_coordinates(coordinates, coordinate_subsets)
83
+ == [1.0, 2.0, 3.0, 4.0, 5.0]
84
+ ).all()
@@ -0,0 +1,43 @@
1
+ # Apache License 2.0
2
+
3
+ import pytest
4
+
5
+ from ostk.astrodynamics.trajectory.state import CoordinateSubset
6
+
7
+
8
+ @pytest.fixture
9
+ def name() -> str:
10
+ return "MySubset"
11
+
12
+
13
+ @pytest.fixture
14
+ def size() -> int:
15
+ return 3
16
+
17
+
18
+ @pytest.fixture
19
+ def coordinate_subset(name: str, size: int) -> CoordinateSubset:
20
+ return CoordinateSubset(name, size)
21
+
22
+
23
+ class TestCoordinateSubset:
24
+ def test_constructor(self, coordinate_subset: CoordinateSubset):
25
+ assert coordinate_subset is not None
26
+
27
+ def test_eq(self, coordinate_subset: CoordinateSubset):
28
+ assert coordinate_subset == coordinate_subset
29
+
30
+ def test_ne(self, coordinate_subset: CoordinateSubset):
31
+ assert (coordinate_subset != coordinate_subset) == False
32
+
33
+ def test_get_id(self, coordinate_subset: CoordinateSubset):
34
+ assert coordinate_subset.get_id() is not None
35
+
36
+ def test_get_name(self, coordinate_subset: CoordinateSubset, name: str):
37
+ assert coordinate_subset.get_name() == name
38
+
39
+ def test_get_size(self, coordinate_subset: CoordinateSubset, size: int):
40
+ assert coordinate_subset.get_size() == size
41
+
42
+ def test_mass(self):
43
+ assert CoordinateSubset.mass() is not None
@@ -11,8 +11,8 @@ from ostk.physics.coordinate import Frame
11
11
  from ostk.astrodynamics.trajectory import State
12
12
  from ostk.astrodynamics.trajectory.state import (
13
13
  NumericalSolver,
14
- CoordinatesBroker,
15
- CoordinatesSubset,
14
+ CoordinateBroker,
15
+ CoordinateSubset,
16
16
  )
17
17
  from ostk.astrodynamics.event_condition import RealCondition
18
18
 
@@ -28,15 +28,15 @@ def get_state_vec(time: float) -> np.ndarray:
28
28
 
29
29
 
30
30
  @pytest.fixture
31
- def coordinates_subsets() -> list[CoordinatesSubset]:
32
- return [CoordinatesSubset("Subset", 2)]
31
+ def coordinate_subsets() -> list[CoordinateSubset]:
32
+ return [CoordinateSubset("Subset", 2)]
33
33
 
34
34
 
35
35
  @pytest.fixture
36
- def coordinates_broker(
37
- coordinates_subsets: list[CoordinatesSubset],
38
- ) -> CoordinatesBroker:
39
- return CoordinatesBroker(coordinates_subsets)
36
+ def coordinate_broker(
37
+ coordinate_subsets: list[CoordinateSubset],
38
+ ) -> CoordinateBroker:
39
+ return CoordinateBroker(coordinate_subsets)
40
40
 
41
41
 
42
42
  @pytest.fixture
@@ -53,9 +53,9 @@ def frame() -> Frame:
53
53
  def initial_state(
54
54
  start_instant: Instant,
55
55
  frame: Frame,
56
- coordinates_broker: CoordinatesBroker,
56
+ coordinate_broker: CoordinateBroker,
57
57
  ) -> State:
58
- return State(start_instant, get_state_vec(0.0), frame, coordinates_broker)
58
+ return State(start_instant, get_state_vec(0.0), frame, coordinate_broker)
59
59
 
60
60
 
61
61
  @pytest.fixture
@@ -2,15 +2,15 @@
2
2
 
3
3
  import pytest
4
4
 
5
- from ostk.physics.environment.objects.celestial_bodies import Earth
6
- from ostk.physics.units import Length, Angle
5
+ from ostk.physics.environment.object.celestial import Earth
6
+ from ostk.physics.unit import Length, Angle
7
7
  from ostk.physics.time import Scale, Instant, DateTime, Time, Duration, Interval
8
8
 
9
9
  from ostk.astrodynamics.trajectory import Orbit, State
10
10
  from ostk.astrodynamics.trajectory.orbit import Pass
11
11
  from ostk.astrodynamics.trajectory.orbit import Pass
12
- from ostk.astrodynamics.trajectory.orbit.models import SGP4
13
- from ostk.astrodynamics.trajectory.orbit.models.sgp4 import TLE
12
+ from ostk.astrodynamics.trajectory.orbit.model import SGP4
13
+ from ostk.astrodynamics.trajectory.orbit.model.sgp4 import TLE
14
14
 
15
15
 
16
16
  @pytest.fixture
@@ -4,12 +4,12 @@ import pytest
4
4
 
5
5
  import numpy as np
6
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
7
+ from ostk.mathematics.geometry.d3.object import Cuboid
8
+ from ostk.mathematics.geometry.d3.object import Composite
9
+ from ostk.mathematics.geometry.d3.object import Point
10
10
 
11
11
  from ostk.physics import Environment
12
- from ostk.physics.units import Mass
12
+ from ostk.physics.unit import Mass
13
13
  from ostk.physics.time import Instant
14
14
  from ostk.physics.time import DateTime
15
15
  from ostk.physics.time import Scale
@@ -17,7 +17,7 @@ from ostk.physics.time import Duration
17
17
  from ostk.physics.coordinate import Position
18
18
  from ostk.physics.coordinate import Velocity
19
19
  from ostk.physics.coordinate import Frame
20
- from ostk.physics.environment.objects.celestial_bodies import Earth, Sun
20
+ from ostk.physics.environment.object.celestial import Earth, Sun
21
21
  from ostk.physics.environment.gravitational import Earth as EarthGravitationalModel
22
22
  from ostk.physics.environment.magnetic import Earth as EarthMagneticModel
23
23
  from ostk.physics.environment.atmospheric import Earth as EarthAtmosphericModel
@@ -25,10 +25,10 @@ from ostk.physics.environment.atmospheric import Earth as EarthAtmosphericModel
25
25
  from ostk.astrodynamics.trajectory import LocalOrbitalFrameFactory
26
26
  from ostk.astrodynamics.trajectory import LocalOrbitalFrameDirection
27
27
 
28
- from ostk.astrodynamics.trajectory.state import CoordinatesSubset
29
- from ostk.astrodynamics.trajectory.state.coordinates_subset import CartesianPosition
30
- from ostk.astrodynamics.trajectory.state.coordinates_subset import CartesianVelocity
31
- from ostk.astrodynamics.trajectory.state import CoordinatesBroker
28
+ from ostk.astrodynamics.trajectory.state import CoordinateSubset
29
+ from ostk.astrodynamics.trajectory.state.coordinate_subset import CartesianPosition
30
+ from ostk.astrodynamics.trajectory.state.coordinate_subset import CartesianVelocity
31
+ from ostk.astrodynamics.trajectory.state import CoordinateBroker
32
32
  from ostk.astrodynamics.trajectory.state import NumericalSolver
33
33
 
34
34
  from ostk.astrodynamics.flight.system import PropulsionSystem
@@ -40,8 +40,8 @@ from ostk.astrodynamics.dynamics import PositionDerivative
40
40
  from ostk.astrodynamics.dynamics import AtmosphericDrag
41
41
  from ostk.astrodynamics.guidance_law import ConstantThrust
42
42
  from ostk.astrodynamics.trajectory import State
43
- from ostk.astrodynamics.trajectory.state import CoordinatesSubset, CoordinatesBroker
44
- from ostk.astrodynamics.trajectory.state.coordinates_subset import (
43
+ from ostk.astrodynamics.trajectory.state import CoordinateSubset, CoordinateBroker
44
+ from ostk.astrodynamics.trajectory.state.coordinate_subset import (
45
45
  CartesianPosition,
46
46
  CartesianVelocity,
47
47
  )
@@ -99,32 +99,32 @@ def environment(earth) -> Environment:
99
99
 
100
100
 
101
101
  @pytest.fixture
102
- def coordinates_broker_7d():
103
- return CoordinatesBroker(
102
+ def coordinate_broker_7d():
103
+ return CoordinateBroker(
104
104
  [
105
105
  CartesianPosition.default(),
106
106
  CartesianVelocity.default(),
107
- CoordinatesSubset.mass(),
107
+ CoordinateSubset.mass(),
108
108
  ]
109
109
  )
110
110
 
111
111
 
112
112
  @pytest.fixture
113
- def coordinates_broker_9d():
114
- return CoordinatesBroker(
113
+ def coordinate_broker_9d():
114
+ return CoordinateBroker(
115
115
  [
116
116
  CartesianPosition.default(),
117
117
  CartesianVelocity.default(),
118
- CoordinatesSubset.mass(),
119
- CoordinatesSubset.surface_area(),
120
- CoordinatesSubset.drag_coefficient(),
118
+ CoordinateSubset.mass(),
119
+ CoordinateSubset.surface_area(),
120
+ CoordinateSubset.drag_coefficient(),
121
121
  ]
122
122
  )
123
123
 
124
124
 
125
125
  @pytest.fixture
126
126
  def state(
127
- satellite_system: SatelliteSystem, coordinates_broker_7d: CoordinatesBroker
127
+ satellite_system: SatelliteSystem, coordinate_broker_7d: CoordinateBroker
128
128
  ) -> State:
129
129
  instant: Instant = Instant.date_time(DateTime(2018, 1, 1, 0, 0, 0), Scale.UTC)
130
130
 
@@ -140,12 +140,12 @@ def state(
140
140
  satellite_system.get_mass().in_kilograms() + propellant_mass,
141
141
  ]
142
142
 
143
- return State(instant, coordinates, Frame.GCRF(), coordinates_broker_7d)
143
+ return State(instant, coordinates, Frame.GCRF(), coordinate_broker_7d)
144
144
 
145
145
 
146
146
  @pytest.fixture
147
147
  def state_low_altitude(
148
- satellite_system: SatelliteSystem, coordinates_broker_9d: CoordinatesBroker
148
+ satellite_system: SatelliteSystem, coordinate_broker_9d: CoordinateBroker
149
149
  ) -> State:
150
150
  instant: Instant = Instant.date_time(DateTime(2018, 1, 1, 0, 0, 0), Scale.UTC)
151
151
 
@@ -165,7 +165,7 @@ def state_low_altitude(
165
165
  cd,
166
166
  ]
167
167
 
168
- return State(instant, coordinates, Frame.GCRF(), coordinates_broker_9d)
168
+ return State(instant, coordinates, Frame.GCRF(), coordinate_broker_9d)
169
169
 
170
170
 
171
171
  @pytest.fixture
@@ -9,7 +9,7 @@ from ostk.physics.time import DateTime
9
9
  from ostk.physics.time import Scale
10
10
  from ostk.physics.time import Duration
11
11
  from ostk.physics.coordinate import Frame
12
- from ostk.physics.environment.objects.celestial_bodies import Earth
12
+ from ostk.physics.environment.object.celestial import Earth
13
13
 
14
14
  from ostk.astrodynamics.trajectory.state import NumericalSolver
15
15
  from ostk.astrodynamics.flight.system import SatelliteSystem
@@ -20,10 +20,10 @@ from ostk.astrodynamics.guidance_law import ConstantThrust
20
20
  from ostk.astrodynamics.trajectory import State
21
21
  from ostk.astrodynamics.trajectory import Segment
22
22
  from ostk.astrodynamics.event_condition import InstantCondition
23
- from ostk.astrodynamics.trajectory.state import CoordinatesSubset
24
- from ostk.astrodynamics.trajectory.state import CoordinatesBroker
25
- from ostk.astrodynamics.trajectory.state.coordinates_subset import CartesianPosition
26
- from ostk.astrodynamics.trajectory.state.coordinates_subset import CartesianVelocity
23
+ from ostk.astrodynamics.trajectory.state import CoordinateSubset
24
+ from ostk.astrodynamics.trajectory.state import CoordinateBroker
25
+ from ostk.astrodynamics.trajectory.state.coordinate_subset import CartesianPosition
26
+ from ostk.astrodynamics.trajectory.state.coordinate_subset import CartesianVelocity
27
27
 
28
28
 
29
29
  @pytest.fixture
@@ -44,14 +44,14 @@ def state() -> State:
44
44
  300.0,
45
45
  ]
46
46
  frame: Frame = Frame.GCRF()
47
- coordinates_broker: CoordinatesBroker = CoordinatesBroker(
47
+ coordinate_broker: CoordinateBroker = CoordinateBroker(
48
48
  [
49
49
  CartesianPosition.default(),
50
50
  CartesianVelocity.default(),
51
- CoordinatesSubset.mass(),
51
+ CoordinateSubset.mass(),
52
52
  ]
53
53
  )
54
- return State(instant, coordinates, frame, coordinates_broker)
54
+ return State(instant, coordinates, frame, coordinate_broker)
55
55
 
56
56
 
57
57
  @pytest.fixture
@@ -4,23 +4,23 @@ import pytest
4
4
 
5
5
  import numpy as np
6
6
 
7
- from ostk.mathematics.geometry.d3.objects import Composite
8
- from ostk.mathematics.geometry.d3.objects import Cuboid
9
- from ostk.mathematics.geometry.d3.objects import Point
7
+ from ostk.mathematics.geometry.d3.object import Composite
8
+ from ostk.mathematics.geometry.d3.object import Cuboid
9
+ from ostk.mathematics.geometry.d3.object import Point
10
10
 
11
11
  from ostk.physics import Environment
12
12
  from ostk.physics.coordinate import Frame
13
13
  from ostk.physics.environment.atmospheric import Earth as EarthAtmosphericModel
14
14
  from ostk.physics.environment.gravitational import Earth as EarthGravitationalModel
15
15
  from ostk.physics.environment.magnetic import Earth as EarthMagneticModel
16
- from ostk.physics.environment.objects.celestial_bodies import Earth
16
+ from ostk.physics.environment.object.celestial import Earth
17
17
  from ostk.physics.time import DateTime
18
18
  from ostk.physics.time import Duration
19
19
  from ostk.physics.time import Instant
20
20
  from ostk.physics.time import Scale
21
- from ostk.physics.units import Derived
22
- from ostk.physics.units import Length
23
- from ostk.physics.units import Mass
21
+ from ostk.physics.unit import Derived
22
+ from ostk.physics.unit import Length
23
+ from ostk.physics.unit import Mass
24
24
 
25
25
  from ostk.astrodynamics.event_condition import COECondition
26
26
  from ostk.astrodynamics.event_condition import InstantCondition
@@ -36,11 +36,11 @@ from ostk.astrodynamics.trajectory import LocalOrbitalFrameFactory
36
36
  from ostk.astrodynamics.trajectory import Segment
37
37
  from ostk.astrodynamics.trajectory import Sequence
38
38
  from ostk.astrodynamics.trajectory import State
39
- from ostk.astrodynamics.trajectory.state import CoordinatesBroker
40
- from ostk.astrodynamics.trajectory.state import CoordinatesSubset
39
+ from ostk.astrodynamics.trajectory.state import CoordinateBroker
40
+ from ostk.astrodynamics.trajectory.state import CoordinateSubset
41
41
  from ostk.astrodynamics.trajectory.state import NumericalSolver
42
- from ostk.astrodynamics.trajectory.state.coordinates_subset import CartesianPosition
43
- from ostk.astrodynamics.trajectory.state.coordinates_subset import CartesianVelocity
42
+ from ostk.astrodynamics.trajectory.state.coordinate_subset import CartesianPosition
43
+ from ostk.astrodynamics.trajectory.state.coordinate_subset import CartesianVelocity
44
44
 
45
45
 
46
46
  @pytest.fixture
@@ -112,14 +112,14 @@ def environment() -> Environment:
112
112
 
113
113
 
114
114
  @pytest.fixture
115
- def coordinates_broker() -> CoordinatesBroker:
116
- return CoordinatesBroker(
115
+ def coordinate_broker() -> CoordinateBroker:
116
+ return CoordinateBroker(
117
117
  [
118
118
  CartesianPosition.default(),
119
119
  CartesianVelocity.default(),
120
- CoordinatesSubset.mass(),
121
- CoordinatesSubset.surface_area(),
122
- CoordinatesSubset.drag_coefficient(),
120
+ CoordinateSubset.mass(),
121
+ CoordinateSubset.surface_area(),
122
+ CoordinateSubset.drag_coefficient(),
123
123
  ]
124
124
  )
125
125
 
@@ -143,7 +143,7 @@ def state(
143
143
  wet_mass: Mass,
144
144
  cross_sectional_surface_area: float,
145
145
  drag_coefficient: float,
146
- coordinates_broker: CoordinatesBroker,
146
+ coordinate_broker: CoordinateBroker,
147
147
  ) -> State:
148
148
  frame: Frame = Frame.GCRF()
149
149
  instant: Instant = Instant.date_time(DateTime(2018, 1, 1, 0, 0, 0), Scale.UTC)
@@ -168,7 +168,7 @@ def state(
168
168
  drag_coefficient,
169
169
  ],
170
170
  frame,
171
- coordinates_broker,
171
+ coordinate_broker,
172
172
  )
173
173
 
174
174
 
@@ -14,8 +14,8 @@ from ostk.physics.coordinate import Velocity
14
14
  from ostk.physics.coordinate import Frame
15
15
 
16
16
  from ostk.astrodynamics.trajectory import State
17
- from ostk.astrodynamics.trajectory.state import CoordinatesBroker
18
- from ostk.astrodynamics.trajectory.state.coordinates_subset import (
17
+ from ostk.astrodynamics.trajectory.state import CoordinateBroker
18
+ from ostk.astrodynamics.trajectory.state.coordinate_subset import (
19
19
  CartesianPosition,
20
20
  CartesianVelocity,
21
21
  )
@@ -53,14 +53,28 @@ def angular_velocity() -> np.ndarray:
53
53
 
54
54
  @pytest.fixture
55
55
  def state(
56
- instant: Instant, position: Position, velocity: Velocity, frame: Frame
56
+ instant: Instant,
57
+ position: Position,
58
+ velocity: Velocity,
57
59
  ) -> State:
58
60
  return State(instant, position, velocity)
59
61
 
60
62
 
61
63
  @pytest.fixture
62
- def coordinates_broker() -> CoordinatesBroker:
63
- return CoordinatesBroker([CartesianPosition.default(), CartesianVelocity.default()])
64
+ def profile_state(
65
+ instant: Instant,
66
+ position: Position,
67
+ velocity: Velocity,
68
+ attitude: Quaternion,
69
+ angular_velocity: np.ndarray,
70
+ frame: Frame,
71
+ ) -> State:
72
+ return State(instant, position, velocity, attitude, angular_velocity, frame)
73
+
74
+
75
+ @pytest.fixture
76
+ def coordinate_broker() -> CoordinateBroker:
77
+ return CoordinateBroker([CartesianPosition.default(), CartesianVelocity.default()])
64
78
 
65
79
 
66
80
  class TestState:
@@ -95,7 +109,7 @@ class TestState:
95
109
  position: Position,
96
110
  velocity: Velocity,
97
111
  frame: Frame,
98
- coordinates_broker: CoordinatesBroker,
112
+ coordinate_broker: CoordinateBroker,
99
113
  ):
100
114
  state = State(instant, position, velocity)
101
115
  assert state is not None
@@ -106,7 +120,7 @@ class TestState:
106
120
  instant,
107
121
  np.append(position.get_coordinates(), velocity.get_coordinates()),
108
122
  frame,
109
- coordinates_broker,
123
+ coordinate_broker,
110
124
  )
111
125
 
112
126
  assert state is not None
@@ -173,24 +187,24 @@ class TestState:
173
187
 
174
188
  def test_getters(
175
189
  self,
176
- state: State,
190
+ profile_state: State,
177
191
  instant: Instant,
178
192
  position: Position,
179
193
  velocity: Velocity,
194
+ attitude: Quaternion,
195
+ angular_velocity: np.ndarray,
180
196
  frame: Frame,
181
- coordinates_broker: CoordinatesBroker,
182
197
  ):
183
- assert state.get_instant() == instant
184
- assert state.get_position() == position
185
- assert state.get_velocity() == velocity
186
- assert state.has_subset(CartesianPosition.default())
187
- assert state.has_subset(CartesianVelocity.default())
188
- assert state.get_frame() == frame
189
- assert (
190
- state.get_coordinates()
191
- == np.append(position.get_coordinates(), velocity.get_coordinates())
192
- ).all()
193
- assert state.get_coordinates_subsets() == coordinates_broker.get_subsets()
198
+ assert profile_state.get_instant() == instant
199
+ assert profile_state.get_position() == position
200
+ assert profile_state.get_velocity() == velocity
201
+ assert profile_state.get_attitude() == attitude
202
+ assert np.all(profile_state.get_angular_velocity() == angular_velocity)
203
+ assert profile_state.has_subset(CartesianPosition.default())
204
+ assert profile_state.has_subset(CartesianVelocity.default())
205
+ assert profile_state.get_frame() == frame
206
+ assert profile_state.get_coordinates() is not None
207
+ assert profile_state.get_coordinate_subsets() is not None
194
208
 
195
209
  def test_in_frame(
196
210
  self,
@@ -14,10 +14,10 @@ from ostk.astrodynamics.trajectory import (
14
14
  StateBuilder,
15
15
  )
16
16
  from ostk.astrodynamics.trajectory.state import (
17
- CoordinatesBroker,
18
- CoordinatesSubset,
17
+ CoordinateBroker,
18
+ CoordinateSubset,
19
19
  )
20
- from ostk.astrodynamics.trajectory.state.coordinates_subset import (
20
+ from ostk.astrodynamics.trajectory.state.coordinate_subset import (
21
21
  CartesianPosition,
22
22
  CartesianVelocity,
23
23
  )
@@ -34,7 +34,7 @@ def frame() -> Frame:
34
34
 
35
35
 
36
36
  @pytest.fixture
37
- def coordinates_subsets() -> list[CoordinatesSubset]:
37
+ def coordinate_subsets() -> list[CoordinateSubset]:
38
38
  return [CartesianPosition.default(), CartesianVelocity.default()]
39
39
 
40
40
 
@@ -44,10 +44,10 @@ def coordinates() -> list[float]:
44
44
 
45
45
 
46
46
  @pytest.fixture
47
- def coordinates_broker(
48
- coordinates_subsets: list[CoordinatesSubset],
49
- ) -> CoordinatesBroker:
50
- return CoordinatesBroker(coordinates_subsets)
47
+ def coordinate_broker(
48
+ coordinate_subsets: list[CoordinateSubset],
49
+ ) -> CoordinateBroker:
50
+ return CoordinateBroker(coordinate_subsets)
51
51
 
52
52
 
53
53
  @pytest.fixture
@@ -55,23 +55,23 @@ def state(
55
55
  instant: Instant,
56
56
  coordinates: list[float],
57
57
  frame: Frame,
58
- coordinates_broker: CoordinatesBroker,
58
+ coordinate_broker: CoordinateBroker,
59
59
  ) -> State:
60
- return State(instant, coordinates, frame, coordinates_broker)
60
+ return State(instant, coordinates, frame, coordinate_broker)
61
61
 
62
62
 
63
63
  @pytest.fixture
64
- def state_builder(frame: Frame, coordinates_broker: CoordinatesBroker) -> State:
65
- return StateBuilder(frame, coordinates_broker)
64
+ def state_builder(frame: Frame, coordinate_broker: CoordinateBroker) -> State:
65
+ return StateBuilder(frame, coordinate_broker)
66
66
 
67
67
 
68
68
  class TestStateBuilder:
69
69
  def test_broker_constructor(
70
70
  self,
71
71
  frame: Frame,
72
- coordinates_broker: CoordinatesBroker,
72
+ coordinate_broker: CoordinateBroker,
73
73
  ):
74
- builder = StateBuilder(frame, coordinates_broker)
74
+ builder = StateBuilder(frame, coordinate_broker)
75
75
  assert builder is not None
76
76
  assert isinstance(builder, StateBuilder)
77
77
  assert builder.is_defined()
@@ -79,9 +79,9 @@ class TestStateBuilder:
79
79
  def test_subsets_constructor(
80
80
  self,
81
81
  frame: Frame,
82
- coordinates_subsets: list[CoordinatesSubset],
82
+ coordinate_subsets: list[CoordinateSubset],
83
83
  ):
84
- builder = StateBuilder(frame, coordinates_subsets)
84
+ builder = StateBuilder(frame, coordinate_subsets)
85
85
  assert builder is not None
86
86
  assert isinstance(builder, StateBuilder)
87
87
  assert builder.is_defined()
@@ -103,7 +103,7 @@ class TestStateBuilder:
103
103
  self,
104
104
  state_builder: StateBuilder,
105
105
  ):
106
- added_builder: StateBuilder = state_builder + CoordinatesSubset.mass()
106
+ added_builder: StateBuilder = state_builder + CoordinateSubset.mass()
107
107
  assert isinstance(added_builder, StateBuilder)
108
108
  assert state_builder != added_builder
109
109
 
@@ -125,7 +125,7 @@ class TestStateBuilder:
125
125
  assert state.get_instant() == instant
126
126
  assert (state.get_coordinates() == coordinates).all()
127
127
  assert state.get_frame() == state_builder.get_frame()
128
- assert state.get_coordinates_subsets() == state_builder.get_coordinates_subsets()
128
+ assert state.get_coordinate_subsets() == state_builder.get_coordinate_subsets()
129
129
 
130
130
  def test_reduce(
131
131
  self,
@@ -146,14 +146,14 @@ class TestStateBuilder:
146
146
  [
147
147
  CartesianPosition.default(),
148
148
  CartesianVelocity.default(),
149
- CoordinatesSubset.mass(),
149
+ CoordinateSubset.mass(),
150
150
  ],
151
151
  )
152
152
  default_state: State = State(
153
153
  state.get_instant(),
154
154
  [100],
155
155
  state.get_frame(),
156
- CoordinatesBroker([CoordinatesSubset.mass()]),
156
+ CoordinateBroker([CoordinateSubset.mass()]),
157
157
  )
158
158
  expanded_state: State = builder.expand(state, default_state)
159
159
 
@@ -165,7 +165,7 @@ class TestStateBuilder:
165
165
  self,
166
166
  state_builder: StateBuilder,
167
167
  frame: Frame,
168
- coordinates_broker: CoordinatesBroker,
168
+ coordinate_broker: CoordinateBroker,
169
169
  ):
170
170
  assert state_builder.get_frame() == frame
171
- assert state_builder.get_coordinates_subsets() == coordinates_broker.get_subsets()
171
+ assert state_builder.get_coordinate_subsets() == coordinate_broker.get_subsets()
@@ -11,7 +11,7 @@ from ostk.physics.coordinate.spherical import LLA
11
11
  from ostk.physics.coordinate.spherical import AER
12
12
  from ostk.physics.coordinate import Position
13
13
  from ostk.physics.coordinate import Frame
14
- from ostk.physics.environment.objects.celestial_bodies import Earth
14
+ from ostk.physics.environment.object.celestial import Earth
15
15
  from ostk.physics.environment.gravitational import Earth as EarthGravitationalModel
16
16
 
17
17