open-space-toolkit-astrodynamics 9.0.3__py39-none-manylinux2014_aarch64.whl → 13.0.2__py39-none-manylinux2014_aarch64.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 (31) hide show
  1. {open_space_toolkit_astrodynamics-9.0.3.dist-info → open_space_toolkit_astrodynamics-13.0.2.dist-info}/METADATA +5 -2
  2. {open_space_toolkit_astrodynamics-9.0.3.dist-info → open_space_toolkit_astrodynamics-13.0.2.dist-info}/RECORD +30 -28
  3. {open_space_toolkit_astrodynamics-9.0.3.dist-info → open_space_toolkit_astrodynamics-13.0.2.dist-info}/WHEEL +1 -1
  4. ostk/astrodynamics/OpenSpaceToolkitAstrodynamicsPy.cpython-39-aarch64-linux-gnu.so +0 -0
  5. ostk/astrodynamics/converters.py +36 -93
  6. ostk/astrodynamics/dataframe.py +479 -0
  7. ostk/astrodynamics/display.py +2 -0
  8. ostk/astrodynamics/libopen-space-toolkit-astrodynamics.so.13 +0 -0
  9. ostk/astrodynamics/pytrajectory/pystate.py +216 -1
  10. ostk/astrodynamics/test/conftest.py +2 -2
  11. ostk/astrodynamics/test/flight/test_maneuver.py +8 -12
  12. ostk/astrodynamics/test/flight/test_profile.py +155 -55
  13. ostk/astrodynamics/test/test_converters.py +43 -140
  14. ostk/astrodynamics/test/test_dataframe.py +875 -0
  15. ostk/astrodynamics/test/test_display.py +2 -3
  16. ostk/astrodynamics/test/test_event_condition.py +27 -7
  17. ostk/astrodynamics/test/test_trajectory.py +116 -38
  18. ostk/astrodynamics/test/test_utilities.py +31 -46
  19. ostk/astrodynamics/test/trajectory/orbit/models/kepler/test_coe.py +13 -0
  20. ostk/astrodynamics/test/trajectory/orbit/test_pass.py +9 -0
  21. ostk/astrodynamics/test/trajectory/state/test_coordinate_subset.py +3 -0
  22. ostk/astrodynamics/test/trajectory/state/test_numerical_solver.py +2 -2
  23. ostk/astrodynamics/test/trajectory/test_local_orbital_frame_factory.py +48 -4
  24. ostk/astrodynamics/test/trajectory/test_orbit.py +42 -2
  25. ostk/astrodynamics/test/trajectory/test_segment.py +99 -1
  26. ostk/astrodynamics/test/trajectory/test_sequence.py +53 -0
  27. ostk/astrodynamics/test/trajectory/test_state.py +306 -0
  28. ostk/astrodynamics/utilities.py +125 -36
  29. ostk/astrodynamics/libopen-space-toolkit-astrodynamics.so.9 +0 -0
  30. {open_space_toolkit_astrodynamics-9.0.3.dist-info → open_space_toolkit_astrodynamics-13.0.2.dist-info}/top_level.txt +0 -0
  31. {open_space_toolkit_astrodynamics-9.0.3.dist-info → open_space_toolkit_astrodynamics-13.0.2.dist-info}/zip-safe +0 -0
@@ -19,18 +19,17 @@ from ostk.astrodynamics import Trajectory
19
19
  from ostk.astrodynamics import display
20
20
  from ostk.astrodynamics.access import Generator as AccessGenerator
21
21
  from ostk.astrodynamics.trajectory import Orbit
22
- from ostk.astrodynamics.trajectory import State
23
22
  from ostk.astrodynamics.trajectory.orbit.model import SGP4
24
23
  from ostk.astrodynamics.trajectory.orbit.model.sgp4 import TLE
25
24
 
26
25
 
27
26
  class TestDisplay:
28
- def test_accesses_plot(self, state: State):
27
+ def test_accesses_plot(self):
29
28
  start_instant: Instant = Instant.date_time(
30
29
  DateTime(2023, 1, 3, 0, 0, 0),
31
30
  Scale.UTC,
32
31
  )
33
- duration: Duration = Duration.days(7.0)
32
+ duration: Duration = Duration.hours(12.0)
34
33
  step: Duration = Duration.seconds(10.0)
35
34
  tolerance: Duration = Duration.seconds(1.0)
36
35
 
@@ -2,6 +2,10 @@
2
2
 
3
3
  import pytest
4
4
 
5
+ from ostk.physics.time import Instant
6
+ from ostk.physics.coordinate import Position, Velocity, Frame
7
+
8
+ from ostk.astrodynamics.trajectory import State
5
9
  from ostk.astrodynamics import EventCondition
6
10
 
7
11
 
@@ -12,7 +16,7 @@ def name() -> str:
12
16
 
13
17
  @pytest.fixture
14
18
  def evaluator() -> callable:
15
- return lambda state: 0.0
19
+ return lambda state: 5.0
16
20
 
17
21
 
18
22
  @pytest.fixture
@@ -22,7 +26,7 @@ def target_value() -> float:
22
26
 
23
27
  @pytest.fixture
24
28
  def target(target_value: float) -> EventCondition.Target:
25
- return EventCondition.Target(target_value, EventCondition.Target.Type.Absolute)
29
+ return EventCondition.Target(target_value, EventCondition.Target.Type.Relative)
26
30
 
27
31
 
28
32
  @pytest.fixture
@@ -32,12 +36,13 @@ def event_condition(
32
36
  class MyEventCondition(EventCondition):
33
37
  def is_satisfied(
34
38
  self,
35
- current_state_vector,
36
- current_time,
37
- previous_state_vector,
38
- previous_time,
39
+ current_state,
40
+ previous_state,
39
41
  ):
40
- return current_state_vector[0] > 0.0 and previous_state_vector[0] < 0.0
42
+ return (
43
+ current_state.get_position().get_coordinates()[2] > 0.0
44
+ and previous_state.get_position().get_coordinates()[2] < 0.0
45
+ )
41
46
 
42
47
  return MyEventCondition(name, evaluator, target)
43
48
 
@@ -56,3 +61,18 @@ class TestEventCondition:
56
61
  self, event_condition: EventCondition, target: EventCondition.Target
57
62
  ):
58
63
  assert event_condition.get_target() == target
64
+
65
+ def test_update_target(
66
+ self,
67
+ event_condition: EventCondition,
68
+ ):
69
+ current_target_value_offset: float = event_condition.get_target().value_offset
70
+ event_condition.update_target(
71
+ State(
72
+ Instant.J2000(),
73
+ Position.meters([0.0, 0.0, 0.0], Frame.GCRF()),
74
+ Velocity.meters_per_second([0.0, 0.0, 0.0], Frame.GCRF()),
75
+ )
76
+ )
77
+
78
+ assert event_condition.get_target().value_offset != current_target_value_offset
@@ -1,40 +1,118 @@
1
1
  # Apache License 2.0
2
2
 
3
- import ostk.mathematics as mathematics
4
-
5
- import ostk.physics as physics
6
-
7
- import ostk.astrodynamics as astrodynamics
8
-
9
- RealInterval = mathematics.object.RealInterval
10
- Quaternion = mathematics.geometry.d3.transformation.rotation.Quaternion
11
- Length = physics.unit.Length
12
- Angle = physics.unit.Angle
13
- DateTime = physics.time.DateTime
14
- Scale = physics.time.Scale
15
- Duration = physics.time.Duration
16
- Instant = physics.time.Instant
17
- Transform = physics.coordinate.Transform
18
- Frame = physics.coordinate.Frame
19
- Axes = physics.coordinate.Axes
20
- DynamicProvider = physics.coordinate.frame.provider.Dynamic
21
- Environment = physics.Environment
22
- Earth = physics.environment.object.celestial.Earth
23
- Trajectory = astrodynamics.Trajectory
24
- Profile = astrodynamics.flight.Profile
25
- SatelliteSystem = astrodynamics.flight.system.SatelliteSystem
26
- Orbit = astrodynamics.trajectory.Orbit
27
- State = astrodynamics.trajectory.State
28
- Pass = astrodynamics.trajectory.orbit.Pass
29
- Kepler = astrodynamics.trajectory.orbit.model.Kepler
30
- COE = astrodynamics.trajectory.orbit.model.kepler.COE
31
- SGP4 = astrodynamics.trajectory.orbit.model.sgp4
32
- Access = astrodynamics.Access
33
-
34
-
35
- def test_trajectory_undefined():
36
- trajectory: Trajectory = Trajectory.undefined()
37
-
38
- assert trajectory is not None
39
- assert isinstance(trajectory, Trajectory)
40
- assert trajectory.is_defined() is False
3
+ import pytest
4
+
5
+ from ostk.physics.environment.object.celestial import Earth
6
+ from ostk.physics.coordinate.spherical import LLA
7
+ from ostk.physics.coordinate import Position
8
+ from ostk.physics.coordinate import Frame
9
+ from ostk.physics.time import Instant
10
+ from ostk.physics.time import Duration
11
+ from ostk.physics.unit import Derived
12
+
13
+ from ostk.astrodynamics import Trajectory
14
+ from ostk.astrodynamics.trajectory import State
15
+
16
+
17
+ @pytest.fixture
18
+ def start_lla() -> LLA:
19
+ return LLA.vector([0.0, 0.0, 0.0])
20
+
21
+
22
+ @pytest.fixture
23
+ def end_lla() -> LLA:
24
+ return LLA.vector([1.0, 0.0, 0.0])
25
+
26
+
27
+ @pytest.fixture
28
+ def start_instant() -> Instant:
29
+ return Instant.J2000()
30
+
31
+
32
+ @pytest.fixture
33
+ def ground_speed() -> Derived:
34
+ return Derived(7000.0, Derived.Unit.meter_per_second())
35
+
36
+
37
+ @pytest.fixture
38
+ def earth() -> Earth:
39
+ return Earth.WGS84()
40
+
41
+
42
+ @pytest.fixture
43
+ def instants() -> list[Instant]:
44
+ return [Instant.J2000(), Instant.J2000() + Duration.seconds(10.0)]
45
+
46
+
47
+ @pytest.fixture
48
+ def position() -> Position:
49
+ return Position.meters([0.0, 0.0, 0.0], Frame.ITRF())
50
+
51
+
52
+ @pytest.fixture
53
+ def trajectory(position: Position) -> Trajectory:
54
+ return Trajectory.position(position)
55
+
56
+
57
+ @pytest.fixture
58
+ def states(trajectory: Trajectory) -> list[State]:
59
+ return trajectory.get_states_at(
60
+ [Instant.J2000(), Instant.J2000() + Duration.seconds(10.0)]
61
+ )
62
+
63
+
64
+ class TestTrajectory:
65
+ def test_trajectory(self, states: list[State]):
66
+ assert Trajectory(states) is not None
67
+
68
+ def test_is_defined(self, trajectory: Trajectory):
69
+ assert trajectory.is_defined()
70
+
71
+ def test_access_model(self, trajectory: Trajectory):
72
+ assert trajectory.access_model() is not None
73
+
74
+ def test_get_state_at(self, trajectory: Trajectory):
75
+ assert trajectory.get_state_at(Instant.J2000()) is not None
76
+
77
+ def test_get_states_at(self, trajectory: Trajectory):
78
+ assert (
79
+ trajectory.get_states_at(
80
+ [Instant.J2000(), Instant.J2000() + Duration.seconds(10.0)]
81
+ )
82
+ is not None
83
+ )
84
+
85
+ def test_trajectory_undefined(self):
86
+ trajectory: Trajectory = Trajectory.undefined()
87
+
88
+ assert trajectory is not None
89
+ assert isinstance(trajectory, Trajectory)
90
+ assert trajectory.is_defined() is False
91
+
92
+ def test_trajectory_position(self, position: Position):
93
+ trajectory: Trajectory = Trajectory.position(position)
94
+
95
+ assert trajectory is not None
96
+
97
+ def test_ground_strip(
98
+ self,
99
+ start_lla: LLA,
100
+ end_lla: LLA,
101
+ ground_speed: Derived,
102
+ start_instant: Instant,
103
+ earth: Earth,
104
+ instants: list[Instant],
105
+ ):
106
+ assert (
107
+ Trajectory.ground_strip(
108
+ start_lla, end_lla, ground_speed, start_instant, earth
109
+ )
110
+ is not None
111
+ )
112
+ assert (
113
+ Trajectory.ground_strip(start_lla, end_lla, ground_speed, start_instant)
114
+ is not None
115
+ )
116
+
117
+ assert Trajectory.ground_strip(start_lla, end_lla, instants, earth) is not None
118
+ assert Trajectory.ground_strip(start_lla, end_lla, instants) is not None
@@ -1,25 +1,15 @@
1
1
  # Apache License 2.0
2
2
 
3
- import pytest
3
+ from datetime import datetime
4
4
 
5
- import ostk.physics as physics
6
- import ostk.astrodynamics as astrodynamics
7
- from ostk.astrodynamics import utilities
5
+ from ostk.physics import Environment
6
+ from ostk.physics.time import Instant, Interval
7
+ from ostk.physics.coordinate import Position
8
+ from ostk.physics.coordinate.spherical import LLA, AER
8
9
 
9
- Length = physics.unit.Length
10
- Angle = physics.unit.Angle
11
- DateTime = physics.time.DateTime
12
- Scale = physics.time.Scale
13
- Instant = physics.time.Instant
14
- Interval = physics.time.Interval
15
- Position = physics.coordinate.Position
16
- Velocity = physics.coordinate.Velocity
17
- Frame = physics.coordinate.Frame
18
- LLA = physics.coordinate.spherical.LLA
19
- AER = physics.coordinate.spherical.AER
20
- Environment = physics.Environment
21
- Trajectory = astrodynamics.Trajectory
22
- State = astrodynamics.trajectory.State
10
+ from ostk.astrodynamics import utilities
11
+ from ostk.astrodynamics import Trajectory
12
+ from ostk.astrodynamics.trajectory import State
23
13
 
24
14
 
25
15
  class TestUtility:
@@ -27,22 +17,16 @@ class TestUtility:
27
17
  self,
28
18
  state: State,
29
19
  ):
30
- lla: tuple[float, float, float] = utilities.lla_from_state(state)
20
+ lla: LLA = utilities.lla_from_state(state)
31
21
 
32
22
  assert lla is not None
33
- assert len(lla) == 3
34
- assert isinstance(lla, tuple)
35
- assert isinstance(lla[0], float)
36
- assert lla[0] >= -90.0 and lla[0] <= 90.0
37
- assert isinstance(lla[1], float)
38
- assert lla[0] >= -180.0 and lla[0] <= 180.0
39
- assert isinstance(lla[2], float)
23
+ assert isinstance(lla, LLA)
24
+ assert lla.is_defined()
40
25
 
41
26
  def test_lla_from_position(
42
27
  self,
43
28
  instant: Instant,
44
29
  position: Position,
45
- state: State,
46
30
  ):
47
31
  lla: LLA = utilities.lla_from_position(position, instant)
48
32
 
@@ -50,12 +34,6 @@ class TestUtility:
50
34
  assert isinstance(lla, LLA)
51
35
  assert lla.is_defined()
52
36
 
53
- lla_from_state: tuple[float, float, float] = utilities.lla_from_state(state)
54
-
55
- assert lla.get_latitude().in_degrees() == lla_from_state[0]
56
- assert lla.get_longitude().in_degrees() == lla_from_state[1]
57
- assert lla.get_altitude().in_meters() == lla_from_state[2]
58
-
59
37
  def test_position_from_lla(
60
38
  self,
61
39
  lla: LLA,
@@ -72,28 +50,24 @@ class TestUtility:
72
50
  position: Position,
73
51
  environment: Environment,
74
52
  ):
75
- aer: tuple[float, float, float] = utilities.compute_aer(
76
- instant, position, position, environment
77
- )
53
+ aer: AER = utilities.compute_aer(instant, position, position, environment)
78
54
 
79
55
  assert aer is not None
80
- assert len(aer) == 3
81
- assert aer[2] == 0.0
56
+ assert isinstance(aer, AER)
82
57
 
83
- def test_compute_time_lla_aer_state(
58
+ def test_compute_time_lla_aer_coordinates(
84
59
  self,
85
60
  state: State,
86
61
  position: Position,
87
62
  environment: Environment,
88
63
  ):
89
- time_lla_aer: float[Instant, float, float, float, float, float, float] = (
90
- utilities.compute_time_lla_aer_state(state, position, environment)
64
+ time_lla_aer: float[datetime, float, float, float, float, float, float] = (
65
+ utilities.compute_time_lla_aer_coordinates(state, position, environment)
91
66
  )
92
67
 
93
68
  assert time_lla_aer is not None
94
69
  assert len(time_lla_aer) == 7
95
- assert isinstance(time_lla_aer[0], Instant)
96
- assert time_lla_aer[0] == state.get_instant()
70
+ assert isinstance(time_lla_aer[0], datetime)
97
71
  for i in range(1, 7):
98
72
  assert isinstance(time_lla_aer[i], float)
99
73
 
@@ -102,12 +76,23 @@ class TestUtility:
102
76
  interval: Interval,
103
77
  trajectory: Trajectory,
104
78
  ):
105
- output: list[tuple[float, float, float]] = utilities.compute_trajectory_geometry(
106
- trajectory, interval
107
- )
79
+ output: list[LLA] = utilities.compute_trajectory_geometry(trajectory, interval)
80
+
81
+ assert output is not None
82
+ assert len(output) == 2
83
+ assert isinstance(output[0], LLA)
84
+
85
+ def test_compute_ground_track(
86
+ self,
87
+ interval: Interval,
88
+ trajectory: Trajectory,
89
+ ):
90
+ output: list[LLA] = utilities.compute_ground_track(trajectory, interval)
108
91
 
109
92
  assert output is not None
110
93
  assert len(output) == 2
94
+ assert isinstance(output[0], LLA)
95
+ assert output[0].get_altitude().in_meters() <= 15.0
111
96
 
112
97
  def test_convert_state(self, state: State):
113
98
  output: tuple[
@@ -4,7 +4,9 @@ import pytest
4
4
 
5
5
  from ostk.physics.unit import Length
6
6
  from ostk.physics.unit import Angle
7
+ from ostk.physics.time import Instant
7
8
  from ostk.physics.environment.gravitational import Earth
9
+ from ostk.physics.environment.object.celestial import Sun
8
10
 
9
11
  from ostk.astrodynamics.trajectory.orbit.model.kepler import COE
10
12
 
@@ -140,6 +142,17 @@ class TestCOE:
140
142
  )
141
143
  assert COE.compute_radial_distance(7000.0e3, 0.0, 0.0) is not None
142
144
 
145
+ assert COE.compute_ltan(Angle.degrees(270.0), Instant.J2000()) is not None
146
+ assert (
147
+ COE.compute_ltan(Angle.degrees(270.0), Instant.J2000(), Sun.default())
148
+ is not None
149
+ )
150
+ assert COE.compute_mean_ltan(Angle.degrees(270.0), Instant.J2000()) is not None
151
+ assert (
152
+ COE.compute_mean_ltan(Angle.degrees(270.0), Instant.J2000(), Sun.default())
153
+ is not None
154
+ )
155
+
143
156
  def test_from_SI_vector(
144
157
  self,
145
158
  coe: COE,
@@ -41,6 +41,15 @@ class TestPass:
41
41
  def test_get_duration(self, pass_: Pass):
42
42
  assert pass_.get_duration() is not None
43
43
 
44
+ def test_get_start_instant(self, pass_: Pass):
45
+ assert pass_.get_start_instant() is not None
46
+
47
+ def test_get_end_instant(self, pass_: Pass):
48
+ assert pass_.get_end_instant() is not None
49
+
50
+ def test_get_interval(self, pass_: Pass):
51
+ assert pass_.get_interval() is not None
52
+
44
53
  def test_get_instant_at_ascending_node(self, pass_: Pass):
45
54
  assert pass_.get_instant_at_ascending_node() is not None
46
55
 
@@ -30,6 +30,9 @@ class TestCoordinateSubset:
30
30
  def test_ne(self, coordinate_subset: CoordinateSubset):
31
31
  assert (coordinate_subset != coordinate_subset) == False
32
32
 
33
+ def test_hash(self, coordinate_subset: CoordinateSubset):
34
+ assert hash(coordinate_subset) is not None
35
+
33
36
  def test_get_id(self, coordinate_subset: CoordinateSubset):
34
37
  assert coordinate_subset.get_id() is not None
35
38
 
@@ -191,7 +191,7 @@ class TestNumericalSolver:
191
191
  initial_state: State,
192
192
  numerical_solver: NumericalSolver,
193
193
  ):
194
- duration_seconds: float = 100.0
194
+ duration_seconds: float = 10.0
195
195
  end_instant: Instant = initial_state.get_instant() + Duration.seconds(
196
196
  duration_seconds
197
197
  )
@@ -205,7 +205,7 @@ class TestNumericalSolver:
205
205
 
206
206
  end_instants: list[Instant] = [
207
207
  initial_state.get_instant() + Duration.seconds(duration)
208
- for duration in np.arange(600.0, 1000.0, 50.0)
208
+ for duration in np.arange(60.0, 100.0, 20.0)
209
209
  ]
210
210
  states: list[State] = numerical_solver.integrate_time(
211
211
  initial_state, end_instants, oscillator
@@ -5,16 +5,31 @@ import pytest
5
5
  from ostk.physics.time import Instant
6
6
  from ostk.physics.time import DateTime
7
7
  from ostk.physics.time import Scale
8
- from ostk.physics.coordinate import Position
9
- from ostk.physics.coordinate import Velocity
10
8
  from ostk.physics.coordinate import Frame
9
+ from ostk.physics.coordinate import Transform
11
10
 
12
11
  from ostk.astrodynamics.trajectory import LocalOrbitalFrameFactory
12
+ from ostk.astrodynamics.trajectory import LocalOrbitalFrameTransformProvider
13
13
 
14
14
 
15
15
  @pytest.fixture
16
- def local_orbital_frame_factory() -> LocalOrbitalFrameFactory:
17
- return LocalOrbitalFrameFactory.VNC(Frame.GCRF())
16
+ def parent_frame() -> Frame:
17
+ return Frame.GCRF()
18
+
19
+
20
+ @pytest.fixture
21
+ def local_orbital_transform_provider_type() -> LocalOrbitalFrameTransformProvider.Type:
22
+ return LocalOrbitalFrameTransformProvider.Type.VNC
23
+
24
+
25
+ @pytest.fixture
26
+ def transform_generator() -> callable:
27
+ return lambda instant, position, velocity: Transform.identity(Transform.Type.passive)
28
+
29
+
30
+ @pytest.fixture
31
+ def local_orbital_frame_factory(parent_frame: Frame) -> LocalOrbitalFrameFactory:
32
+ return LocalOrbitalFrameFactory.VNC(parent_frame)
18
33
 
19
34
 
20
35
  @pytest.fixture
@@ -41,6 +56,13 @@ class TestLocalOrbitalFrameFactory:
41
56
  assert LocalOrbitalFrameFactory.TNW(Frame.GCRF()) is not None
42
57
  assert LocalOrbitalFrameFactory.VVLH(Frame.GCRF()) is not None
43
58
 
59
+ def test_accessors(
60
+ self,
61
+ parent_frame: Frame,
62
+ local_orbital_frame_factory: LocalOrbitalFrameFactory,
63
+ ):
64
+ assert parent_frame == local_orbital_frame_factory.access_parent_frame()
65
+
44
66
  def test_generate_frame(
45
67
  self,
46
68
  local_orbital_frame_factory: LocalOrbitalFrameFactory,
@@ -62,3 +84,25 @@ class TestLocalOrbitalFrameFactory:
62
84
  local_orbital_frame_factory: LocalOrbitalFrameFactory,
63
85
  ):
64
86
  assert local_orbital_frame_factory.is_defined()
87
+
88
+ def test_constructor(
89
+ self,
90
+ local_orbital_transform_provider_type: LocalOrbitalFrameTransformProvider.Type,
91
+ parent_frame: Frame,
92
+ ):
93
+ assert (
94
+ LocalOrbitalFrameFactory.construct(
95
+ local_orbital_transform_provider_type, parent_frame
96
+ )
97
+ is not None
98
+ )
99
+
100
+ def test_custom_constructor(
101
+ self,
102
+ transform_generator: callable,
103
+ parent_frame: Frame,
104
+ ):
105
+ assert (
106
+ LocalOrbitalFrameFactory.construct(transform_generator, parent_frame)
107
+ is not None
108
+ )
@@ -58,6 +58,22 @@ class TestOrbit:
58
58
  assert state is not None
59
59
  assert isinstance(state, State)
60
60
 
61
+ @pytest.mark.parametrize(
62
+ "frame_type",
63
+ [
64
+ (Orbit.FrameType.NED),
65
+ (Orbit.FrameType.LVLH),
66
+ (Orbit.FrameType.VVLH),
67
+ (Orbit.FrameType.LVLHGD),
68
+ (Orbit.FrameType.LVLHGDGT),
69
+ (Orbit.FrameType.QSW),
70
+ (Orbit.FrameType.TNW),
71
+ (Orbit.FrameType.VNC),
72
+ ],
73
+ )
74
+ def test_get_orbital_frame(self, orbit: Orbit, frame_type: Orbit.FrameType):
75
+ assert orbit.get_orbital_frame(frame_type) is not None
76
+
61
77
  def test_get_revolution_number_at(self, orbit: Orbit):
62
78
  assert (
63
79
  orbit.get_revolution_number_at(
@@ -82,6 +98,20 @@ class TestOrbit:
82
98
  assert isinstance(pass_, Pass)
83
99
  assert pass_.is_defined()
84
100
 
101
+ assert (
102
+ orbit.get_pass_with_revolution_number(2, Duration.minutes(10.0)) is not None
103
+ )
104
+
105
+ def test_get_passes_within_interval(self, orbit: Orbit):
106
+ passes: list[Pass] = orbit.get_passes_within_interval(
107
+ Interval.closed(
108
+ Instant.date_time(DateTime(2018, 1, 1, 0, 0, 0), Scale.UTC),
109
+ Instant.date_time(DateTime(2018, 1, 1, 0, 10, 0), Scale.UTC),
110
+ )
111
+ )
112
+
113
+ assert len(passes) > 0
114
+
85
115
  def test_undefined(self):
86
116
  assert Orbit.undefined().is_defined() is False
87
117
 
@@ -151,6 +181,16 @@ class TestOrbit:
151
181
  argument_of_latitude=Angle.degrees(50.0),
152
182
  ).is_defined()
153
183
 
154
- def test_compute_passes(self, orbit: Orbit, states: list[State]):
155
- passes: list[tuple[int, Pass]] = orbit.compute_passes(states, 1)
184
+ def test_compute_passes(self, states: list[State]):
185
+ passes: list[tuple[int, Pass]] = Orbit.compute_passes(states, 1)
156
186
  assert passes is not None
187
+
188
+ def test_compute_passes_with_model(self, orbit: Orbit):
189
+ passes: list[tuple[int, Pass]] = Orbit.compute_passes_with_model(
190
+ model=orbit.access_kepler_model(),
191
+ start_instant=Instant.date_time(DateTime(2018, 1, 1, 0, 0, 0), Scale.UTC),
192
+ end_instant=Instant.date_time(DateTime(2018, 1, 1, 0, 10, 0), Scale.UTC),
193
+ initial_revolution_number=1,
194
+ )
195
+
196
+ assert len(passes) > 0