open-space-toolkit-astrodynamics 9.1.6__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 (30) hide show
  1. {open_space_toolkit_astrodynamics-9.1.6.dist-info → open_space_toolkit_astrodynamics-13.0.2.dist-info}/METADATA +5 -5
  2. {open_space_toolkit_astrodynamics-9.1.6.dist-info → open_space_toolkit_astrodynamics-13.0.2.dist-info}/RECORD +29 -27
  3. {open_space_toolkit_astrodynamics-9.1.6.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 +35 -90
  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_profile.py +155 -55
  12. ostk/astrodynamics/test/test_converters.py +43 -140
  13. ostk/astrodynamics/test/test_dataframe.py +875 -0
  14. ostk/astrodynamics/test/test_display.py +2 -3
  15. ostk/astrodynamics/test/test_event_condition.py +27 -7
  16. ostk/astrodynamics/test/test_trajectory.py +116 -38
  17. ostk/astrodynamics/test/test_utilities.py +31 -46
  18. ostk/astrodynamics/test/trajectory/orbit/models/kepler/test_coe.py +13 -0
  19. ostk/astrodynamics/test/trajectory/orbit/test_pass.py +9 -0
  20. ostk/astrodynamics/test/trajectory/state/test_coordinate_subset.py +3 -0
  21. ostk/astrodynamics/test/trajectory/state/test_numerical_solver.py +2 -2
  22. ostk/astrodynamics/test/trajectory/test_local_orbital_frame_factory.py +34 -2
  23. ostk/astrodynamics/test/trajectory/test_orbit.py +26 -2
  24. ostk/astrodynamics/test/trajectory/test_segment.py +99 -1
  25. ostk/astrodynamics/test/trajectory/test_sequence.py +53 -0
  26. ostk/astrodynamics/test/trajectory/test_state.py +306 -0
  27. ostk/astrodynamics/utilities.py +125 -36
  28. ostk/astrodynamics/libopen-space-toolkit-astrodynamics.so.9 +0 -0
  29. {open_space_toolkit_astrodynamics-9.1.6.dist-info → open_space_toolkit_astrodynamics-13.0.2.dist-info}/top_level.txt +0 -0
  30. {open_space_toolkit_astrodynamics-9.1.6.dist-info → open_space_toolkit_astrodynamics-13.0.2.dist-info}/zip-safe +0 -0
@@ -4,27 +4,15 @@ import pytest
4
4
 
5
5
  from datetime import datetime, timedelta, timezone
6
6
 
7
- import numpy as np
8
-
9
- from ostk.mathematics.geometry.d3.transformation.rotation import Quaternion
10
-
11
7
  from ostk.physics.time import Instant
12
8
  from ostk.physics.time import Interval
13
- from ostk.physics.time import Duration
14
9
  from ostk.physics.time import DateTime
15
10
  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
11
 
20
12
  from ostk.astrodynamics.converters import coerce_to_datetime
21
13
  from ostk.astrodynamics.converters import coerce_to_instant
22
14
  from ostk.astrodynamics.converters import coerce_to_iso
23
15
  from ostk.astrodynamics.converters import coerce_to_interval
24
- from ostk.astrodynamics.converters import coerce_to_duration
25
- from ostk.astrodynamics.converters import coerce_to_position
26
- from ostk.astrodynamics.converters import coerce_to_velocity
27
- from ostk.astrodynamics.converters import coerce_to_quaternion
28
16
 
29
17
 
30
18
  def test_coerce_to_datetime_success_instant():
@@ -253,135 +241,50 @@ def test_coerce_to_iso_failure():
253
241
  coerce_to_iso("some_ill_formed_iso")
254
242
 
255
243
 
256
- def test_coerce_to_interval_success_interval():
257
- value = Interval.closed(
258
- Instant.date_time(DateTime(2020, 1, 1), Scale.UTC),
259
- Instant.date_time(DateTime(2020, 1, 2), Scale.UTC),
260
- )
261
- assert coerce_to_interval(value) == value
262
-
263
-
264
- def test_coerce_to_interval_success_tuple_instant():
265
- value = (
266
- Instant.date_time(DateTime(2020, 1, 1), Scale.UTC),
267
- Instant.date_time(DateTime(2020, 1, 2), Scale.UTC),
268
- )
269
- assert coerce_to_interval(value) == Interval.closed(
270
- Instant.date_time(DateTime(2020, 1, 1), Scale.UTC),
271
- Instant.date_time(DateTime(2020, 1, 2), Scale.UTC),
272
- )
273
-
274
-
275
- def test_coerce_to_interval_success_list_instant():
276
- value = [
277
- Instant.date_time(DateTime(2020, 1, 1), Scale.UTC),
278
- Instant.date_time(DateTime(2020, 1, 2), Scale.UTC),
279
- ]
280
- assert coerce_to_interval(value) == Interval.closed(
281
- Instant.date_time(DateTime(2020, 1, 1), Scale.UTC),
282
- Instant.date_time(DateTime(2020, 1, 2), Scale.UTC),
283
- )
284
-
285
-
286
- def test_coerce_to_interval_success_tuple_datetime():
287
- value = (
288
- datetime(2020, 1, 1, tzinfo=timezone.utc),
289
- datetime(2020, 1, 2, tzinfo=timezone.utc),
290
- )
291
- assert coerce_to_interval(value) == Interval.closed(
292
- Instant.date_time(DateTime(2020, 1, 1), Scale.UTC),
293
- Instant.date_time(DateTime(2020, 1, 2), Scale.UTC),
294
- )
295
-
296
-
297
- def test_coerce_to_interval_success_list_datetime():
298
- value = [
299
- datetime(2020, 1, 1, tzinfo=timezone.utc),
300
- datetime(2020, 1, 2, tzinfo=timezone.utc),
301
- ]
244
+ @pytest.mark.parametrize(
245
+ "value",
246
+ [
247
+ (
248
+ Interval.closed(
249
+ Instant.date_time(DateTime(2020, 1, 1), Scale.UTC),
250
+ Instant.date_time(DateTime(2020, 1, 2), Scale.UTC),
251
+ )
252
+ ),
253
+ (
254
+ (
255
+ Instant.date_time(DateTime(2020, 1, 1), Scale.UTC),
256
+ Instant.date_time(DateTime(2020, 1, 2), Scale.UTC),
257
+ )
258
+ ),
259
+ (
260
+ [
261
+ Instant.date_time(DateTime(2020, 1, 1), Scale.UTC),
262
+ Instant.date_time(DateTime(2020, 1, 2), Scale.UTC),
263
+ ]
264
+ ),
265
+ (
266
+ (
267
+ datetime(2020, 1, 1, tzinfo=timezone.utc),
268
+ datetime(2020, 1, 2, tzinfo=timezone.utc),
269
+ )
270
+ ),
271
+ (
272
+ [
273
+ datetime(2020, 1, 1, tzinfo=timezone.utc),
274
+ datetime(2020, 1, 2, tzinfo=timezone.utc),
275
+ ]
276
+ ),
277
+ (
278
+ [
279
+ "2020-01-01T00:00:00Z",
280
+ "2020-01-02T00:00:00Z",
281
+ ]
282
+ ),
283
+ ("[2020-01-01T00:00:00Z - 2020-01-02T00:00:00Z] [UTC]"),
284
+ ],
285
+ )
286
+ def test_coerce_to_interval(value):
302
287
  assert coerce_to_interval(value) == Interval.closed(
303
288
  Instant.date_time(DateTime(2020, 1, 1), Scale.UTC),
304
289
  Instant.date_time(DateTime(2020, 1, 2), Scale.UTC),
305
290
  )
306
-
307
-
308
- def test_coerce_to_duration_success_duration():
309
- value = Duration.seconds(1.0)
310
- assert coerce_to_duration(value) == value
311
-
312
-
313
- def test_coerce_to_duration_success_timedelta():
314
- value = timedelta(seconds=1.0)
315
- assert coerce_to_duration(value) == Duration.seconds(1.0)
316
-
317
-
318
- def test_coerce_to_position_success_position():
319
- value = Position.meters((1.0, 2.0, 3.0), Frame.GCRF())
320
- assert coerce_to_position(value, Frame.GCRF()) == value
321
-
322
-
323
- def test_coerce_to_position_success_tuple_float():
324
- value = (1.0, 2.0, 3.0)
325
- assert coerce_to_position(value, Frame.GCRF()) == Position.meters(
326
- (1.0, 2.0, 3.0), Frame.GCRF()
327
- )
328
-
329
-
330
- def test_coerce_to_position_success_list_float():
331
- value = [1.0, 2.0, 3.0]
332
- assert coerce_to_position(value, Frame.GCRF()) == Position.meters(
333
- (1.0, 2.0, 3.0), Frame.GCRF()
334
- )
335
-
336
-
337
- def test_coerce_to_position_success_np_array():
338
- value = np.array((1.0, 2.0, 3.0))
339
- assert coerce_to_position(value, Frame.GCRF()) == Position.meters(
340
- (1.0, 2.0, 3.0), Frame.GCRF()
341
- )
342
-
343
-
344
- def test_coerce_to_velocity_success_velocity():
345
- value = Velocity.meters_per_second((1.0, 2.0, 3.0), Frame.GCRF())
346
- assert coerce_to_velocity(value, Frame.GCRF()) == value
347
-
348
-
349
- def test_coerce_to_velocity_success_tuple_float():
350
- value = (1.0, 2.0, 3.0)
351
- assert coerce_to_velocity(value, Frame.GCRF()) == Velocity.meters_per_second(
352
- (1.0, 2.0, 3.0), Frame.GCRF()
353
- )
354
-
355
-
356
- def test_coerce_to_velocity_success_list_float():
357
- value = [1.0, 2.0, 3.0]
358
- assert coerce_to_velocity(value, Frame.GCRF()) == Velocity.meters_per_second(
359
- (1.0, 2.0, 3.0), Frame.GCRF()
360
- )
361
-
362
-
363
- def test_coerce_to_velocity_success_np_array():
364
- value = np.array((1.0, 2.0, 3.0))
365
- assert coerce_to_velocity(value, Frame.GCRF()) == Velocity.meters_per_second(
366
- (1.0, 2.0, 3.0), Frame.GCRF()
367
- )
368
-
369
-
370
- def test_coerce_to_quaternion_success_quaternion():
371
- value = Quaternion.xyzs(1.0, 2.0, 3.0, 4.0)
372
- assert coerce_to_quaternion(value) == value
373
-
374
-
375
- def test_coerce_to_quaternion_success_list_float():
376
- value = [1.0, 2.0, 3.0, 4.0]
377
- assert coerce_to_quaternion(value) == Quaternion.xyzs(1.0, 2.0, 3.0, 4.0)
378
-
379
-
380
- def test_coerce_to_quaternion_success_np_array():
381
- value = np.array((1.0, 2.0, 3.0, 4.0))
382
- assert coerce_to_quaternion(value) == Quaternion.xyzs(1.0, 2.0, 3.0, 4.0)
383
-
384
-
385
- def test_coerce_to_quaternion_success_tuple_float():
386
- value = (1.0, 2.0, 3.0, 4.0)
387
- assert coerce_to_quaternion(value) == Quaternion.xyzs(1.0, 2.0, 3.0, 4.0)