satkit 0.2.8__tar.gz → 0.3.0__tar.gz

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 (125) hide show
  1. {satkit-0.2.8 → satkit-0.3.0}/Cargo.toml +6 -6
  2. {satkit-0.2.8/python/satkit.egg-info → satkit-0.3.0}/PKG-INFO +1 -1
  3. {satkit-0.2.8 → satkit-0.3.0}/pyproject.toml +1 -1
  4. {satkit-0.2.8 → satkit-0.3.0}/python/docs/source/conf.py +4 -4
  5. {satkit-0.2.8 → satkit-0.3.0}/python/satkit/__init__.pyi +4 -1
  6. {satkit-0.2.8 → satkit-0.3.0}/python/satkit/density.pyi +15 -28
  7. {satkit-0.2.8 → satkit-0.3.0}/python/satkit/jplephem.pyi +1 -1
  8. satkit-0.3.0/python/satkit/planets.pyi +28 -0
  9. {satkit-0.2.8 → satkit-0.3.0}/python/satkit/satkit.pyi +156 -15
  10. {satkit-0.2.8 → satkit-0.3.0}/python/satkit/satprop.pyi +43 -117
  11. {satkit-0.2.8 → satkit-0.3.0/python/satkit.egg-info}/PKG-INFO +1 -1
  12. {satkit-0.2.8 → satkit-0.3.0}/python/satkit.egg-info/SOURCES.txt +5 -0
  13. {satkit-0.2.8 → satkit-0.3.0}/python/test/test.py +7 -5
  14. {satkit-0.2.8 → satkit-0.3.0}/src/astrotime.rs +2 -2
  15. {satkit-0.2.8 → satkit-0.3.0}/src/duration.rs +2 -1
  16. {satkit-0.2.8 → satkit-0.3.0}/src/earthgravity.rs +7 -8
  17. satkit-0.3.0/src/frames.rs +52 -0
  18. satkit-0.3.0/src/kepler.rs +312 -0
  19. {satkit-0.2.8 → satkit-0.3.0}/src/lib.rs +7 -2
  20. {satkit-0.2.8 → satkit-0.3.0}/src/lpephem/mod.rs +2 -2
  21. {satkit-0.2.8 → satkit-0.3.0}/src/lpephem/planets.rs +63 -114
  22. {satkit-0.2.8 → satkit-0.3.0}/src/ode/mod.rs +4 -0
  23. {satkit-0.2.8 → satkit-0.3.0}/src/ode/nalgebra.rs +0 -5
  24. {satkit-0.2.8 → satkit-0.3.0}/src/ode/rk_adaptive.rs +38 -97
  25. {satkit-0.2.8 → satkit-0.3.0}/src/ode/rk_explicit.rs +1 -0
  26. {satkit-0.2.8 → satkit-0.3.0}/src/ode/rkts54.rs +29 -18
  27. {satkit-0.2.8 → satkit-0.3.0}/src/ode/rkv65.rs +27 -18
  28. {satkit-0.2.8 → satkit-0.3.0}/src/ode/rkv87.rs +28 -18
  29. {satkit-0.2.8 → satkit-0.3.0}/src/ode/rkv98.rs +13 -26
  30. {satkit-0.2.8 → satkit-0.3.0}/src/ode/rkv98_nointerp.rs +2 -11
  31. {satkit-0.2.8 → satkit-0.3.0}/src/ode/types.rs +1 -13
  32. {satkit-0.2.8 → satkit-0.3.0}/src/orbitprop/propagator.rs +101 -46
  33. {satkit-0.2.8 → satkit-0.3.0}/src/orbitprop/satstate.rs +17 -17
  34. {satkit-0.2.8 → satkit-0.3.0}/src/pybindings/mod.rs +17 -2
  35. {satkit-0.2.8 → satkit-0.3.0}/src/pybindings/pyastrotime.rs +121 -70
  36. {satkit-0.2.8 → satkit-0.3.0}/src/pybindings/pyduration.rs +21 -1
  37. satkit-0.3.0/src/pybindings/pyframes.rs +53 -0
  38. {satkit-0.2.8 → satkit-0.3.0}/src/pybindings/pyitrfcoord.rs +60 -28
  39. satkit-0.3.0/src/pybindings/pykepler.rs +231 -0
  40. satkit-0.3.0/src/pybindings/pylpephem_planets.rs +21 -0
  41. satkit-0.3.0/src/pybindings/pypropagate.rs +181 -0
  42. satkit-0.3.0/src/pybindings/pypropresult.rs +217 -0
  43. {satkit-0.2.8 → satkit-0.3.0}/src/pybindings/pyquaternion.rs +30 -2
  44. {satkit-0.2.8 → satkit-0.3.0}/src/pybindings/pysatproperties.rs +27 -1
  45. {satkit-0.2.8 → satkit-0.3.0}/src/pybindings/pysatstate.rs +124 -21
  46. satkit-0.3.0/src/pybindings/pytle.rs +242 -0
  47. {satkit-0.2.8 → satkit-0.3.0}/src/pybindings/pyutils.rs +35 -4
  48. {satkit-0.2.8 → satkit-0.3.0}/src/sgp4/sgp4.rs +7 -7
  49. {satkit-0.2.8 → satkit-0.3.0}/src/solarsystem.rs +19 -0
  50. satkit-0.3.0/src/types.rs +9 -0
  51. satkit-0.2.8/src/kepler.rs +0 -159
  52. satkit-0.2.8/src/pybindings/pykepler.rs +0 -98
  53. satkit-0.2.8/src/pybindings/pypropagate.rs +0 -298
  54. satkit-0.2.8/src/pybindings/pytle.rs +0 -150
  55. satkit-0.2.8/src/types.rs +0 -2
  56. {satkit-0.2.8 → satkit-0.3.0}/LICENSE +0 -0
  57. {satkit-0.2.8 → satkit-0.3.0}/MANIFEST.in +0 -0
  58. {satkit-0.2.8 → satkit-0.3.0}/README.md +0 -0
  59. {satkit-0.2.8 → satkit-0.3.0}/python/satkit/__init__.py +0 -0
  60. {satkit-0.2.8 → satkit-0.3.0}/python/satkit/frametransform.pyi +0 -0
  61. {satkit-0.2.8 → satkit-0.3.0}/python/satkit/moon.pyi +0 -0
  62. {satkit-0.2.8 → satkit-0.3.0}/python/satkit/py.typed +0 -0
  63. {satkit-0.2.8 → satkit-0.3.0}/python/satkit/sun.pyi +0 -0
  64. {satkit-0.2.8 → satkit-0.3.0}/python/satkit/utils.pyi +0 -0
  65. {satkit-0.2.8 → satkit-0.3.0}/python/satkit.egg-info/dependency_links.txt +0 -0
  66. {satkit-0.2.8 → satkit-0.3.0}/python/satkit.egg-info/requires.txt +0 -0
  67. {satkit-0.2.8 → satkit-0.3.0}/python/satkit.egg-info/top_level.txt +0 -0
  68. {satkit-0.2.8 → satkit-0.3.0}/python/test/download_data.py +0 -0
  69. {satkit-0.2.8 → satkit-0.3.0}/python/test/download_from_json.py +0 -0
  70. {satkit-0.2.8 → satkit-0.3.0}/python/test/download_testvecs.py +0 -0
  71. {satkit-0.2.8 → satkit-0.3.0}/python/test/orbitprop_gps_fit.py +0 -0
  72. {satkit-0.2.8 → satkit-0.3.0}/python/test/sp3file.py +0 -0
  73. {satkit-0.2.8 → satkit-0.3.0}/setup.cfg +0 -0
  74. {satkit-0.2.8 → satkit-0.3.0}/src/consts.rs +0 -0
  75. {satkit-0.2.8 → satkit-0.3.0}/src/earth_orientation_params.rs +0 -0
  76. {satkit-0.2.8 → satkit-0.3.0}/src/frametransform/ierstable.rs +0 -0
  77. {satkit-0.2.8 → satkit-0.3.0}/src/frametransform/mod.rs +0 -0
  78. {satkit-0.2.8 → satkit-0.3.0}/src/frametransform/qcirs2gcrs.rs +0 -0
  79. {satkit-0.2.8 → satkit-0.3.0}/src/itrfcoord.rs +0 -0
  80. {satkit-0.2.8 → satkit-0.3.0}/src/jplephem.rs +0 -0
  81. {satkit-0.2.8 → satkit-0.3.0}/src/lpephem/moon.rs +0 -0
  82. {satkit-0.2.8 → satkit-0.3.0}/src/lpephem/sun.rs +0 -0
  83. {satkit-0.2.8 → satkit-0.3.0}/src/nrlmsise.rs +0 -0
  84. {satkit-0.2.8 → satkit-0.3.0}/src/ode/harmonic_oscillator.rs +0 -0
  85. {satkit-0.2.8 → satkit-0.3.0}/src/ode/rk_adaptive_settings.rs +0 -0
  86. {satkit-0.2.8 → satkit-0.3.0}/src/ode/rkf45.rs +0 -0
  87. {satkit-0.2.8 → satkit-0.3.0}/src/ode/rkv65_table.rs +0 -0
  88. {satkit-0.2.8 → satkit-0.3.0}/src/ode/rkv87_table.rs +0 -0
  89. {satkit-0.2.8 → satkit-0.3.0}/src/ode/rkv98_nointerp_table.rs +0 -0
  90. {satkit-0.2.8 → satkit-0.3.0}/src/ode/rkv98_table.rs +0 -0
  91. {satkit-0.2.8 → satkit-0.3.0}/src/orbitprop/drag.rs +0 -0
  92. {satkit-0.2.8 → satkit-0.3.0}/src/orbitprop/mod.rs +0 -0
  93. {satkit-0.2.8 → satkit-0.3.0}/src/orbitprop/point_gravity.rs +0 -0
  94. {satkit-0.2.8 → satkit-0.3.0}/src/orbitprop/satproperties.rs +0 -0
  95. {satkit-0.2.8 → satkit-0.3.0}/src/orbitprop/settings.rs +0 -0
  96. {satkit-0.2.8 → satkit-0.3.0}/src/pybindings/mod_utils.rs +0 -0
  97. {satkit-0.2.8 → satkit-0.3.0}/src/pybindings/pyconsts.rs +0 -0
  98. {satkit-0.2.8 → satkit-0.3.0}/src/pybindings/pydensity.rs +0 -0
  99. {satkit-0.2.8 → satkit-0.3.0}/src/pybindings/pyframetransform.rs +0 -0
  100. {satkit-0.2.8 → satkit-0.3.0}/src/pybindings/pygravity.rs +0 -0
  101. {satkit-0.2.8 → satkit-0.3.0}/src/pybindings/pyjplephem.rs +0 -0
  102. {satkit-0.2.8 → satkit-0.3.0}/src/pybindings/pylpephem_moon.rs +0 -0
  103. {satkit-0.2.8 → satkit-0.3.0}/src/pybindings/pylpephem_sun.rs +0 -0
  104. {satkit-0.2.8 → satkit-0.3.0}/src/pybindings/pynrlmsise.rs +0 -0
  105. {satkit-0.2.8 → satkit-0.3.0}/src/pybindings/pypropsettings.rs +0 -0
  106. {satkit-0.2.8 → satkit-0.3.0}/src/pybindings/pysgp4.rs +0 -0
  107. {satkit-0.2.8 → satkit-0.3.0}/src/pybindings/pysolarsystem.rs +0 -0
  108. {satkit-0.2.8 → satkit-0.3.0}/src/sgp4/dpper.rs +0 -0
  109. {satkit-0.2.8 → satkit-0.3.0}/src/sgp4/dscom.rs +0 -0
  110. {satkit-0.2.8 → satkit-0.3.0}/src/sgp4/dsinit.rs +0 -0
  111. {satkit-0.2.8 → satkit-0.3.0}/src/sgp4/dspace.rs +0 -0
  112. {satkit-0.2.8 → satkit-0.3.0}/src/sgp4/getgravconst.rs +0 -0
  113. {satkit-0.2.8 → satkit-0.3.0}/src/sgp4/initl.rs +0 -0
  114. {satkit-0.2.8 → satkit-0.3.0}/src/sgp4/mod.rs +0 -0
  115. {satkit-0.2.8 → satkit-0.3.0}/src/sgp4/satrec.rs +0 -0
  116. {satkit-0.2.8 → satkit-0.3.0}/src/sgp4/sgp4_lowlevel.rs +0 -0
  117. {satkit-0.2.8 → satkit-0.3.0}/src/sgp4/sgp4init.rs +0 -0
  118. {satkit-0.2.8 → satkit-0.3.0}/src/spaceweather.rs +0 -0
  119. {satkit-0.2.8 → satkit-0.3.0}/src/tle.rs +0 -0
  120. {satkit-0.2.8 → satkit-0.3.0}/src/utils/datadir.rs +0 -0
  121. {satkit-0.2.8 → satkit-0.3.0}/src/utils/download.rs +0 -0
  122. {satkit-0.2.8 → satkit-0.3.0}/src/utils/mod.rs +0 -0
  123. {satkit-0.2.8 → satkit-0.3.0}/src/utils/skerror.rs +0 -0
  124. {satkit-0.2.8 → satkit-0.3.0}/src/utils/test.rs +0 -0
  125. {satkit-0.2.8 → satkit-0.3.0}/src/utils/update_data.rs +0 -0
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "satkit"
3
- version = "0.2.8"
3
+ version = "0.3.0"
4
4
  edition = "2021"
5
5
  description = "Satellite Toolkit"
6
6
  readme = "README.md"
@@ -20,25 +20,25 @@ name = "satkit"
20
20
 
21
21
 
22
22
  [dependencies]
23
- nalgebra = "0.32.3"
23
+ nalgebra = "0.33.0"
24
24
  ndarray = "0.15.6"
25
25
  libc = "0.2"
26
26
  chrono = "0.4.19"
27
27
  cty = "0.2.2"
28
28
  num-traits = "0.2"
29
29
  thiserror = "1.0"
30
- simba = "0.8"
30
+ simba = "0.9"
31
31
  once_cell = "1.6.0"
32
32
  numpy = { version = "0.21.0", optional = true }
33
- pyo3 = { version = "0.21.0", features = ["extension-module"], optional = true }
33
+ pyo3 = { version = "0.21", features = ["extension-module"], optional = true }
34
34
  ureq = "2.9.1"
35
35
  json = "0.12.4"
36
36
  process_path = "0.1.4"
37
37
 
38
38
  [build-dependencies]
39
39
  cc = { version = "1.0.74", features = ["parallel"] }
40
- chrono = "0.4.19"
41
- pyo3-build-config = { version = "0.21.0", optional = true }
40
+ chrono = "0.4.38"
41
+ pyo3-build-config = { version = "0.21", optional = true }
42
42
 
43
43
  [dev-dependencies]
44
44
  rand = "0.8.5"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: satkit
3
- Version: 0.2.8
3
+ Version: 0.3.0
4
4
  Summary: Satellite Orbital Dynamics Toolkit
5
5
  Author-email: Steven Michael <ssmichael@gmail.com>
6
6
  Maintainer-email: Steven Michael <ssmichael@gmail.com>
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "satkit"
7
- version = "0.2.8"
7
+ version = "0.3.0"
8
8
  dependencies = ["numpy>=1.20.0"]
9
9
  requires-python = ">= 3.8"
10
10
  authors = [{ name = "Steven Michael", email = "ssmichael@gmail.com" }]
@@ -77,8 +77,8 @@ github_project_url = "https://github.com/ssmichael1/satkit"
77
77
  ##version = "%i.%i" % version_ns["version_info"][:2]
78
78
  # The full version, including alpha/beta/rc tags.
79
79
  ##release = version_ns["__version__"]
80
- version = "0.2.7"
81
- release = "0.2.7"
80
+ version = "0.2.9"
81
+ release = "0.2.9"
82
82
 
83
83
  # The language for content autogenerated by Sphinx. Refer to documentation
84
84
  # for a list of supported languages.
@@ -162,7 +162,7 @@ html_theme = "sphinx_rtd_theme"
162
162
  # NOTE: Sphinx's 'make html' builder will throw a warning about an unfound
163
163
  # _static directory. Do not remove or comment out html_static_path
164
164
  # since it is needed to properly generate _static in the build directory
165
- html_static_path = ["source/_static"]
165
+ html_static_path = ["_static"]
166
166
 
167
167
  # Add any extra paths that contain custom files (such as robots.txt or
168
168
  # .htaccess) here, relative to this directory. These files are copied
@@ -324,5 +324,5 @@ intersphinx_mapping = {
324
324
  spelling_lang = "en_US"
325
325
  spelling_word_list_filename = "spelling_wordlist.txt"
326
326
 
327
- primary_domain = "python"
327
+ # primary_domain = "python"
328
328
  highlight_language = "python"
@@ -8,6 +8,7 @@ from . import sun
8
8
  from . import satprop
9
9
  from . import density
10
10
  from . import utils
11
+ from . import planets
11
12
 
12
13
  __all__ = [
13
14
  "time",
@@ -28,7 +29,9 @@ __all__ = [
28
29
  "utils",
29
30
  "moon",
30
31
  "sun",
32
+ "planets",
31
33
  "satprop",
34
+ "satstate",
32
35
  "density",
33
- "utils"
36
+ "utils",
34
37
  ]
@@ -22,22 +22,16 @@ def nrlmsise(itrf: satkit.itrfcoord, time: satkit.time | None) -> typing.Tuple[f
22
22
  or for more detail:
23
23
  https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2002JA009430
24
24
 
25
- Inputs:
25
+ Args:
26
26
 
27
- itrf: satkit.itrfcoord representing position at which to
28
- compute density & temperature
29
-
30
- time: Optional instant at which to compute density & temperature.
27
+ itrf (satkit.itrfcoord): position at which to compute density & temperature
28
+ time (satkit.time|numpy.ndarray|list): Optional instant(s) at which to compute density & temperature.
31
29
  "Space weather" data at this time will be used in model
32
30
  computation. Note: at satellite altitudes, density can
33
31
  change by > 10 X depending on solar cycle
34
32
 
35
- Outputs:
36
-
37
- rho: Atmosphere mass density in kg / m^3
38
-
39
- T: Atmosphere temperature in Kelvin
40
-
33
+ Returns:
34
+ tuple: (rho, T) where rho is mass density in kg/m^3 and T is temperature in Kelvin
41
35
  """
42
36
 
43
37
  @typing.overload
@@ -53,22 +47,15 @@ def nrlmsise(altitude_meters: float,
53
47
  or for more detail:
54
48
  https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2002JA009430
55
49
 
56
- Inputs:
57
-
58
- altitude_meters: Altitude in meters
59
-
60
- latitude_rad: Latitude in radians
61
-
62
- longitude_rad: Longitude in radians
50
+ Args:
51
+ altitude_meters (float): Altitude in meters
52
+ latitude_rad (float, optional): Latitude in radians. Default is 0.
53
+ longitude_rad (float, optional): Longitude in radians. Default is 0.
54
+ time (satkit.time|numpy.ndarray|list, optional): Optional instant(s) at which to compute density & temperature.
55
+ "Space weather" data at this time will be used in model
56
+ computation. Note: at satellite altitudes, density can
57
+ change by > 10 X depending on solar cycle
63
58
 
64
- time: Optional instant at which to compute density & temperature.
65
- "Space weather" data at this time will be used in model
66
- computation. Note: at satellite altitudes, density can
67
- change by > 10 X depending on solar cycle
68
- Outputs:
69
-
70
- rho: Atmosphere mass density in kg / m^3
71
-
72
- T: Atmosphere temperature in Kelvin
73
-
59
+ Returns:
60
+ tuple: (rho, T) where rho is mass density in kg/m^3 and T is temperature in Kelvin
74
61
  """
@@ -1,7 +1,7 @@
1
1
  """
2
2
  High-precision JPL ephemerides for solar-system bodies
3
3
 
4
- For details, see:
4
+ For details, see: https://ssd.jpl.nasa.gov/
5
5
  """
6
6
 
7
7
  from __future__ import annotations
@@ -0,0 +1,28 @@
1
+ """
2
+ Low-precision planetary ephemerides from https://ssd.jpl.nasa.gov/?planet_pos
3
+ """
4
+
5
+ from __future__ import annotations
6
+ import typing
7
+ import numpy.typing as npt
8
+ import numpy as np
9
+
10
+ import satkit
11
+
12
+ def heliocentric_pos(body: satkit.solarsystem, tm: satkit.time|list[satkit.time]|npt.ArrayLike[satkit.time]) -> npt.ArrayLike[np.float64]:
13
+ """Return the position of the given body in the Heliocentric coordinate system (origin is the Sun)
14
+
15
+ Note: This function is only valid for the Sun and the 8 planets
16
+
17
+ Note: This is less accurate than using the jpl ephemeris, but involves fewer calculations
18
+
19
+ Note: See https://ssd.jpl.nasa.gov/?planet_pos for more information and accuracy details
20
+
21
+ Args:
22
+ body (satkit.solarsystem): Solar system body for which to return position
23
+ tm (satkit.time|numpy.ndarray|list): Time[s] at which to return position
24
+
25
+ Returns:
26
+ numpy.ndarray: 3-vector of Cartesian position in meters, with the origin at the Sun.
27
+ If input is list or numpy array of N times, then r will be Nx3 array
28
+ """
@@ -454,15 +454,17 @@ class time:
454
454
 
455
455
  Notes:
456
456
  * If no arguments are passed in, the created object represents the current time
457
-
457
+ * If year is passed in, month and day must also be passed in
458
+ * If hour is passed in, minute and second must also be passed in
459
+
458
460
  Args:
459
- year (int): Gregorian year (e.g., 2024) (optional)
460
- month (int): Gregorian month (1 = January, 2 = February, ...) (optional)
461
- day (int): Day of month, beginning with 1 (optional)
462
- hour (int): Hour of day, in range [0,23] (optional), default is 0
463
- min (int): Minute of hour, in range [0,59] (optional), default is 0
464
- sec (float): floating point second of minute, in range [0,60) (optional), defialt is 0
465
- scale (satkit.timescale): Time scale (optional), default is satkit.timescale.UTC
461
+ year (int, optional): Gregorian year (e.g., 2024)
462
+ month (int, optional): Gregorian month (1 = January, 2 = February, ...)
463
+ day (int, optional): Day of month, beginning with 1
464
+ hour (int, optional): Hour of day, in range [0,23] (optional), default is 0
465
+ min (int, optional): Minute of hour, in range [0,59], default is 0
466
+ sec (float, optional): floating point second of minute, in range [0,60), default is 0
467
+ scale (satkit.timescale, optional): Time scale , default is satkit.timescale.UTC
466
468
 
467
469
  Returns:
468
470
  satkit.time: Time object representing input date and time, or if no arguments, the current date and time
@@ -488,13 +490,13 @@ class time:
488
490
  * If no arguments are passed in, the created object represents the current time
489
491
 
490
492
  Args:
491
- year (int): Gregorian year (e.g., 2024) (optional)
492
- month (int): Gregorian month (1 = January, 2 = February, ...) (optional)
493
- day (int): Day of month, beginning with 1 (optional)
494
- hour (int): Hour of day, in range [0,23] (optional), default is 0
495
- min (int): Minute of hour, in range [0,59] (optional), default is 0
496
- sec (float): floating point second of minute, in range [0,60) (optional), defialt is 0
497
- scale (satkit.timescale): Time scale (optional), default is satkit.timescale.UTC
493
+ year (int, optional): Gregorian year (e.g., 2024)
494
+ month (int, optional): Gregorian month (1 = January, 2 = February, ...)
495
+ day (int, optional): Day of month, beginning with 1
496
+ hour (int, optional): Hour of day, in range [0,23] (optional), default is 0
497
+ min (int, optional): Minute of hour, in range [0,59], default is 0
498
+ sec (float, optional): floating point second of minute, in range [0,60), default is 0
499
+ scale (satkit.timescale, optional): Time scale , default is satkit.timescale.UTC
498
500
 
499
501
  Returns:
500
502
  satkit.time: Time object representing input date and time, or if no arguments, the current date and time
@@ -541,6 +543,17 @@ class time:
541
543
  satkit.time: Time object representing input Julian date and time scale
542
544
  """
543
545
 
546
+ @staticmethod
547
+ def from_unixtime(ut: float) -> time:
548
+ """Return a time object representing input unixtime
549
+
550
+ Args:
551
+ ut (float): unixtime, UTC seconds since Jan 1, 1970 00:00:00
552
+
553
+ Returns:
554
+ satkit.time: Time object representing input unixtime
555
+ """
556
+
544
557
  @staticmethod
545
558
  def from_mjd(mjd: float, scale: timescale = timescale.UTC) -> time:
546
559
  """Return a time object representing input modified Julian date and time scale
@@ -1073,6 +1086,16 @@ class kepler:
1073
1086
  argp (float) : Argument of perigee, radians
1074
1087
  nu (float) : True anomaly, radians
1075
1088
 
1089
+ # Keyword Args:
1090
+ true_anomaly (float) : True anomaly, radians
1091
+ mean_anomaly (float) : Mean anomaly, radians
1092
+ eccentric_anomaly (float) : Eccentric anomaly, radians
1093
+
1094
+ # Notes:
1095
+ * If "nu" is provided (6th argument), it will be used as the true anomaly
1096
+ * Anomaly may also be set via keyword arguments; if so, the there should only be
1097
+ 5 input arguments
1098
+
1076
1099
  # Returns:
1077
1100
  satkit.kepler: Keplerian element set object
1078
1101
  """
@@ -1084,6 +1107,42 @@ class kepler:
1084
1107
  tuple[npt.ArrayLike[np.float64], npt.ArrayLike[np.float64]]: Tuple with two elements representing the position and velocity vectors
1085
1108
  """
1086
1109
 
1110
+ def propagate(self, dt: duration|float) -> kepler:
1111
+ """Propagate Keplerian element set by input duration
1112
+
1113
+ Args:
1114
+ dt (duration | float): Duration by which to propagate the Keplerian element set
1115
+ If float, value is seconds
1116
+
1117
+ Returns:
1118
+ satkit.kepler: Keplerian element set object after propagation
1119
+ """
1120
+
1121
+ @property
1122
+ def mean_motion(self) -> float:
1123
+ """Mean motion, radians / second
1124
+ """
1125
+
1126
+ @property
1127
+ def true_anomaly(self) -> float:
1128
+ """True anomaly, radians
1129
+ """
1130
+
1131
+ @property
1132
+ def eccentric_anomaly(self) -> float:
1133
+ """Eccentric anomaly, radians
1134
+ """
1135
+
1136
+ @property
1137
+ def mean_anomaly(self) -> float:
1138
+ """Mean anomaly, radians
1139
+ """
1140
+
1141
+ @property
1142
+ def period(self) -> float:
1143
+ """Orbital period, seconds
1144
+ """
1145
+
1087
1146
  def from_pv(
1088
1147
  pos: npt.ArrayLike[np.float64], vel: npt.ArrayLike[np.float64]
1089
1148
  ) -> kepler:
@@ -1355,3 +1414,85 @@ class consts:
1355
1414
  def jgm3_j2() -> float:
1356
1415
  """ "J2" gravity due oblateness of Earth from JGM3 gravity model, unitless
1357
1416
  """
1417
+ class satstate:
1418
+ """
1419
+ A convenience class representing a satellite position and velocity, and
1420
+ optionally 6x6 position/velocity covariance at a particular instant in time
1421
+
1422
+ This class can be used to propagate the position, velocity, and optional
1423
+ covariance to different points in time.
1424
+ """
1425
+
1426
+ def __init__(
1427
+ self,
1428
+ time: time,
1429
+ pos: npt.ArrayLike[np.float64],
1430
+ vel: npt.ArrayLike[np.float64],
1431
+ cov: npt.ArrayLike[np.float64] | None = None,
1432
+ ):
1433
+ """Create a new satellite state
1434
+
1435
+ Args:
1436
+ time (satkit.time): Time instant of this state
1437
+ pos (npt.ArrayLike[np.float64]): Position in meters in GCRF frame
1438
+ vel (npt.ArrayLike[np.float64]): Velocity in meters / second in GCRF frame
1439
+ cov (npt.ArrayLike[np.float64]|None, optional): Covariance in GCRF frame. Defaults to None. If input, should be a 6x6 numpy array
1440
+
1441
+ Returns:
1442
+ satstate: New satellite state object
1443
+ """
1444
+
1445
+ @property
1446
+ def pos_gcrf(self) -> npt.ArrayLike[np.float64]:
1447
+ """state position in meters in GCRF frame
1448
+
1449
+ Returns:
1450
+ npt.ArrayLike[np.float64]: 3-element numpy array representing position in meters in GCRF frame
1451
+ """
1452
+
1453
+ @property
1454
+ def vel_gcrf(self) -> npt.ArrayLike[np.float64]:
1455
+ """Return this state velocity in meters / second in GCRF
1456
+
1457
+ Returns:
1458
+ npt.ArrayLike[np.float64]: 3-element numpy array representing velocity in meters / second in GCRF frame
1459
+ """
1460
+
1461
+ @property
1462
+ def qgcrf2lvlh(self) -> quaternion:
1463
+ """ Quaternion that rotates from the GCRF to the LVLH frame for the current state
1464
+
1465
+ Returns:
1466
+ satkit.quaternion: Quaternion that rotates from the GCRF to the LVLH frame for the current state
1467
+ """
1468
+
1469
+
1470
+ @property
1471
+ def cov(self) -> npt.ArrayLike[np.float64] | None:
1472
+ """6x6 state covariance matrix in GCRF frame
1473
+
1474
+ Returns:
1475
+ npt.ArrayLike[np.float64] | None: 6x6 numpy array representing state covariance in GCRF frame or None if not set
1476
+ """
1477
+
1478
+
1479
+ @property
1480
+ def time(self) -> time:
1481
+ """Return time of this satellite state
1482
+
1483
+ Returns:
1484
+ satkit.time: Time instant of this state
1485
+ """
1486
+
1487
+ def propagate(self, time: time | duration, propsettings=None) -> satstate:
1488
+ """Propagate this state to a new time, specified by the "time" input, updating the position, the velocity, and the covariance if set
1489
+
1490
+ Args:
1491
+ time (satkit.time|satkit.duration): Time or duration from current time to which to propagate the state
1492
+
1493
+ Keyword Arguments:
1494
+ propsettings: satkit.satprop.propsettings object describing settings to use in the propagation. If omitted, default is used
1495
+
1496
+ Returns:
1497
+ satstate: New satellite state object representing the state at the new time
1498
+ """
@@ -38,131 +38,65 @@ import numpy as np
38
38
  import satkit
39
39
  import datetime
40
40
 
41
- class PropStats(typing.TypedDict):
42
- """PropStats is a dictionary containing statistics for the propagation.
43
- """
44
-
45
- num_eval: int
46
- """int: Number of function evaluations of the force model computed during propagation function call
47
- """
41
+ class propstats:
42
+ @property
43
+ def num_eval() -> int:
44
+ """Number of function evaluations"""
48
45
 
49
- accepted_steps: int
50
- """int: Accepted steps in the adaptive Runga-Kutta solver
51
- """
52
-
53
- rejected_steps: int
54
- """int: Rejected steps in the adaptive Runga-Kutta solver
55
- """
46
+ @property
47
+ def num_accept() -> int:
48
+ """Number of accepted steps in adaptive RK integrator"""
56
49
 
57
- class PropResult(typing.TypedDict):
58
- """
59
- PropResult is a dictionary containing the results of a high-precision orbit propagation that is returned by the "propagate" function
60
- """
50
+ @property
51
+ def num_reject() -> int:
52
+ """Number of rejected steps in adaptive RK integrator"""
61
53
 
62
- time: npt.ArrayLike[satkit.time]
63
- """npt.ArrayLike[satkit.time]: List of satkit.time objects at which time is computed
64
- """
54
+ class propresult:
55
+ """Results of a satellite propagation
65
56
 
66
- pos: npt.ArrayLike[np.float64]
67
- """npt.ArrayLike[float]: GCRF position in meters at output times. Output is Nx3 numpy matrix, where N is the number of times
57
+ This class lets the user access results of the satellite propagation
68
58
  """
69
59
 
70
- vel: npt.ArrayLike[np.float64]
71
- """npt.ArrayLike[float]: GCRF velocity in meters per second at output times. Output is Nx3 numpy matrix, where N is the number of times
72
- """
73
-
74
- Phi: typing.NotRequired[npt.ArrayLike[np.float64]]
75
- """6x6 State transition matrix corresponding to each time. Output is Nx6x6 numpy matrix, where N is the lenght of the output "time" list. Not included if output_phi kwarg is set to false (the default)
76
- """
77
-
78
- stats: PropStats
79
- """
80
- (PropStats): Python dictionary with statistics for the propagation. This includes:
81
-
82
- * num_eval: Number of function evaluations of the force model required to get solution with desired accuracy
83
- * accepted_steps: Accepted steps in the adpative Runga-Kutta solver
84
- * rejected_steps: Rejected steps in the adaptive Runga-Kutta solver
85
- """
86
-
87
- class satstate:
88
- """
89
- A convenience class representing a satellite position and velocity, and
90
- optionally 6x6 position/velocity covariance at a particular instant in time
91
-
92
- This class can be used to propagate the position, velocity, and optional
93
- covariance to different points in time.
94
- """
95
-
96
- def __init__(
97
- self,
98
- time: satkit.time,
99
- pos: npt.ArrayLike[np.float64],
100
- vel: npt.ArrayLike[np.float64],
101
- cov: npt.ArrayLike[np.float64] | None = None,
102
- ):
103
- """Create a new satellite state
104
-
105
- Args:
106
- time (satkit.time): Time instant of this state
107
- pos (npt.ArrayLike[np.float64]): Position in meters in GCRF frame
108
- vel (npt.ArrayLike[np.float64]): Velocity in meters / second in GCRF frame
109
- cov (npt.ArrayLike[np.float64]|None, optional): Covariance in GCRF frame. Defaults to None. If input, should be a 6x6 numpy array
110
-
111
- Returns:
112
- satstate: New satellite state object
113
- """
114
-
115
60
  @property
116
- def pos(self) -> npt.ArrayLike[np.float64]:
117
- """state position in meters in GCRF frame
118
-
119
- Returns:
120
- npt.ArrayLike[np.float64]: 3-element numpy array representing position in meters in GCRF frame
121
- """
61
+ def pos() -> npt.ArrayLike[float]:
62
+ """GCRF position of satellite, meters"""
122
63
 
123
64
  @property
124
- def vel(self) -> npt.ArrayLike[np.float64]:
125
- """Return this state velocity in meters / second in GCRF
126
-
127
- Returns:
128
- npt.ArrayLike[np.float64]: 3-element numpy array representing velocity in meters / second in GCRF frame
129
- """
65
+ def vel() -> npt.ArrayLike[float]:
66
+ """GCRF velocity of satellite, meters/second"""
130
67
 
131
68
  @property
132
- def qgcrf2lvlh(self) -> satkit.quaternion:
133
- """ Quaternion that rotates from the GCRF to the LVLH frame for the current state
134
-
135
- Returns:
136
- satkit.quaternion: Quaternion that rotates from the GCRF to the LVLH frame for the current state
137
- """
138
-
69
+ def state() -> npt.ArrayLike[float]:
70
+ """6-element state (pos + vel) of satellite in meters & meters/second"""
139
71
 
140
72
  @property
141
- def cov(self) -> npt.ArrayLike[np.float64] | None:
142
- """6x6 state covariance matrix in GCRF frame
143
-
144
- Returns:
145
- npt.ArrayLike[np.float64] | None: 6x6 numpy array representing state covariance in GCRF frame or None if not set
146
- """
73
+ def time() -> satkit.time:
74
+ """Time at which state is valid"""
147
75
 
76
+ @property
77
+ def stats() -> propstats:
78
+ """Statistics of propagation"""
148
79
 
149
80
  @property
150
- def time(self) -> satkit.time:
151
- """Return time of this satellite state
152
-
153
- Returns:
154
- satkit.time: Time instant of this state
155
- """
81
+ def phi() -> npt.ArrayLike[np.float64]|None:
82
+ """6x6 State transition matrix
83
+ or None if not computed
84
+ """
156
85
 
157
- def propagate(self, time: satkit.time, propsettings=None) -> satstate:
158
- """Propagate this state to a new time, specified by the "time" input, updating the position, the velocity, and the covariance if set
86
+ def interp(time: satkit.time, output_phi: bool=False) -> npt.ArrayLike[np.float64]|typing.Tuple[npt.ArrayLike[np.float64], npt.ArrayLike[np.float64]]:
87
+ """Interpolate state at given time
88
+
89
+ Args:
90
+ time (satkit.time): Time at which to interpolate state
159
91
 
160
92
  Keyword Arguments:
161
- propsettings: satkit.satprop.propsettings object describing settings to use in the propagation. If omitted, default is used
93
+ output_phi (bool): Output 6x6 state transition matrix at the interpolated time
162
94
 
163
95
  Returns:
164
- satstate: New satellite state object representing the state at the new time
96
+ 6-element vector representing state at given time
97
+ if output_phi, also output 6x6 state transition matrix at given time
165
98
  """
99
+
166
100
 
167
101
  class satproperties_static:
168
102
  """Satellite properties relevant for drag and radiation pressure
@@ -271,7 +205,7 @@ def propagate(
271
205
  vel: npt.ArrayLike[float],
272
206
  start: satkit.time,
273
207
  **kwargs,
274
- ) -> PropResult:
208
+ ) -> propresult:
275
209
  """High-precision orbit propagator
276
210
 
277
211
  Notes:
@@ -299,21 +233,13 @@ def propagate(
299
233
  duration_secs (float): duration in seconds from "tm" for at which new position and velocity will be computed.
300
234
  duration_days (float): duration in days from "tm" at which new position and velocity will be computed.
301
235
  duration (satkit.duration): duration from "tm" at which new position & velocity will be computed.
302
- dt_secs (float): Interval in seconds between "starttime" and "stoptime" at which solution will also be computed
303
- dt_days (float): Interval in days between "starttime" and "stoptime" at which solution will also be computed
304
- dt (satkit.duration): Interval over which new position & velocity will be computed
305
236
  output_phi (bool): Output 6x6 state transition matrix between "starttime" and "stoptime" (and at intervals, if specified)
306
237
  propsettings (propsettings): "propsettings" object with input settings for the propagation. if left out, default will be used.
307
- satproperties (satproperties_static): "SatPropertiesStatic" object with drag and radiation pressure succeptibility of satellite. If left out, drag and radiation pressure are neglected
238
+ satproperties (satproperties_static): "SatPropertiesStatic" object with drag and radiation pressure succeptibility of satellite.
239
+ If left out, drag and radiation pressure are neglected
240
+ output_dense: boolean indicting whether or not dense output should be recorded. Default is false. If true, this will allow for calling the "interp" function
241
+ to query states at arbitrary times between the start time and the stop time
308
242
 
309
243
  Returns:
310
- (PropResult): Python dictionary with the following elements:
311
- * "time": list of satkit.time objects at which solution is computed
312
- * "pos": GCRF position in meters at "time". Output is a Nx3 numpy matrix, where N is the length of the output "time" list
313
- * "vel": GCRF velocity in meters / second at "time". Output is a Nx3 numpy matrix, where N is the length of the output "time" list
314
- * "Phi": 6x6 State transition matrix corresponding to each time. Output is Nx6x6 numpy matrix, where N is the lenght of the output "time" list. Not included if output_phi kwarg is set to false (the default)
315
- * "stats": Python dictionary with statistics for the propagation. This includes:
316
- * "num_eval": Number of function evaluations of the force model required to get solution with desired accuracy
317
- * "accepted_steps": Accepted steps in the adpative Runga-Kutta solver
318
- * "rejected_steps": Rejected steps in the adaptive Runga-Kutta solver
244
+ (propresult): Propagation result object holding state outputs, statistics, and dense output if requested
319
245
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: satkit
3
- Version: 0.2.8
3
+ Version: 0.3.0
4
4
  Summary: Satellite Orbital Dynamics Toolkit
5
5
  Author-email: Steven Michael <ssmichael@gmail.com>
6
6
  Maintainer-email: Steven Michael <ssmichael@gmail.com>
@@ -10,6 +10,7 @@ python/satkit/density.pyi
10
10
  python/satkit/frametransform.pyi
11
11
  python/satkit/jplephem.pyi
12
12
  python/satkit/moon.pyi
13
+ python/satkit/planets.pyi
13
14
  python/satkit/py.typed
14
15
  python/satkit/satkit.pyi
15
16
  python/satkit/satprop.pyi
@@ -31,6 +32,7 @@ src/consts.rs
31
32
  src/duration.rs
32
33
  src/earth_orientation_params.rs
33
34
  src/earthgravity.rs
35
+ src/frames.rs
34
36
  src/itrfcoord.rs
35
37
  src/jplephem.rs
36
38
  src/kepler.rs
@@ -77,15 +79,18 @@ src/pybindings/pyastrotime.rs
77
79
  src/pybindings/pyconsts.rs
78
80
  src/pybindings/pydensity.rs
79
81
  src/pybindings/pyduration.rs
82
+ src/pybindings/pyframes.rs
80
83
  src/pybindings/pyframetransform.rs
81
84
  src/pybindings/pygravity.rs
82
85
  src/pybindings/pyitrfcoord.rs
83
86
  src/pybindings/pyjplephem.rs
84
87
  src/pybindings/pykepler.rs
85
88
  src/pybindings/pylpephem_moon.rs
89
+ src/pybindings/pylpephem_planets.rs
86
90
  src/pybindings/pylpephem_sun.rs
87
91
  src/pybindings/pynrlmsise.rs
88
92
  src/pybindings/pypropagate.rs
93
+ src/pybindings/pypropresult.rs
89
94
  src/pybindings/pypropsettings.rs
90
95
  src/pybindings/pyquaternion.rs
91
96
  src/pybindings/pysatproperties.rs