satkit 0.2.4__tar.gz → 0.2.6__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 (119) hide show
  1. {satkit-0.2.4 → satkit-0.2.6}/Cargo.toml +1 -1
  2. {satkit-0.2.4/python/satkit.egg-info → satkit-0.2.6}/PKG-INFO +21 -4
  3. {satkit-0.2.4 → satkit-0.2.6}/README.md +20 -3
  4. {satkit-0.2.4 → satkit-0.2.6}/pyproject.toml +8 -8
  5. {satkit-0.2.4 → satkit-0.2.6}/python/satkit/__init__.pyi +77 -27
  6. {satkit-0.2.4 → satkit-0.2.6}/python/satkit/density/__init__.pyi +2 -2
  7. {satkit-0.2.4 → satkit-0.2.6}/python/satkit/frametransform/__init__.pyi +91 -46
  8. {satkit-0.2.4 → satkit-0.2.6}/python/satkit/jplephem/__init__.pyi +2 -2
  9. {satkit-0.2.4 → satkit-0.2.6}/python/satkit/satprop/__init__.pyi +2 -2
  10. {satkit-0.2.4 → satkit-0.2.6}/python/satkit/sun/__init__.pyi +1 -1
  11. {satkit-0.2.4 → satkit-0.2.6}/python/satkit/utils/__init__.pyi +1 -1
  12. {satkit-0.2.4 → satkit-0.2.6/python/satkit.egg-info}/PKG-INFO +21 -4
  13. {satkit-0.2.4 → satkit-0.2.6}/python/test/test.py +158 -2
  14. {satkit-0.2.4 → satkit-0.2.6}/src/astrotime.rs +10 -0
  15. {satkit-0.2.4 → satkit-0.2.6}/src/consts.rs +16 -16
  16. {satkit-0.2.4 → satkit-0.2.6}/src/duration.rs +3 -1
  17. {satkit-0.2.4 → satkit-0.2.6}/src/earth_orientation_params.rs +21 -2
  18. {satkit-0.2.4 → satkit-0.2.6}/src/earthgravity.rs +18 -2
  19. {satkit-0.2.4 → satkit-0.2.6}/src/frametransform/mod.rs +1 -0
  20. {satkit-0.2.4 → satkit-0.2.6}/src/itrfcoord.rs +44 -8
  21. {satkit-0.2.4 → satkit-0.2.6}/src/pybindings/mod_utils.rs +23 -4
  22. {satkit-0.2.4 → satkit-0.2.6}/src/pybindings/pyastrotime.rs +155 -20
  23. {satkit-0.2.4 → satkit-0.2.6}/src/pybindings/pyconsts.rs +1 -1
  24. satkit-0.2.6/src/pybindings/pyduration.rs +237 -0
  25. {satkit-0.2.4 → satkit-0.2.6}/src/pybindings/pyframetransform.rs +50 -18
  26. {satkit-0.2.4 → satkit-0.2.6}/src/pybindings/pyquaternion.rs +31 -2
  27. {satkit-0.2.4 → satkit-0.2.6}/src/pybindings/pyutils.rs +2 -0
  28. {satkit-0.2.4 → satkit-0.2.6}/src/sgp4/mod.rs +8 -0
  29. {satkit-0.2.4 → satkit-0.2.6}/src/utils/datadir.rs +2 -2
  30. {satkit-0.2.4 → satkit-0.2.6}/src/utils/mod.rs +7 -0
  31. satkit-0.2.4/src/pybindings/pyduration.rs +0 -97
  32. {satkit-0.2.4 → satkit-0.2.6}/LICENSE +0 -0
  33. {satkit-0.2.4 → satkit-0.2.6}/MANIFEST.in +0 -0
  34. {satkit-0.2.4 → satkit-0.2.6}/python/satkit/__init__.py +0 -0
  35. {satkit-0.2.4 → satkit-0.2.6}/python/satkit/astro-data/py.typed +0 -0
  36. {satkit-0.2.4 → satkit-0.2.6}/python/satkit/density/py.typed +0 -0
  37. {satkit-0.2.4 → satkit-0.2.6}/python/satkit/frametransform/py.typed +0 -0
  38. {satkit-0.2.4 → satkit-0.2.6}/python/satkit/jplephem/py.typed +0 -0
  39. {satkit-0.2.4 → satkit-0.2.6}/python/satkit/moon/__init__.py +0 -0
  40. {satkit-0.2.4 → satkit-0.2.6}/python/satkit/moon/py.typed +0 -0
  41. {satkit-0.2.4 → satkit-0.2.6}/python/satkit/py.typed +0 -0
  42. {satkit-0.2.4 → satkit-0.2.6}/python/satkit/satprop/py.typed +0 -0
  43. {satkit-0.2.4 → satkit-0.2.6}/python/satkit/sun/py.typed +0 -0
  44. {satkit-0.2.4 → satkit-0.2.6}/python/satkit/utils/py.typed +0 -0
  45. {satkit-0.2.4 → satkit-0.2.6}/python/satkit.egg-info/SOURCES.txt +0 -0
  46. {satkit-0.2.4 → satkit-0.2.6}/python/satkit.egg-info/dependency_links.txt +0 -0
  47. {satkit-0.2.4 → satkit-0.2.6}/python/satkit.egg-info/requires.txt +0 -0
  48. {satkit-0.2.4 → satkit-0.2.6}/python/satkit.egg-info/top_level.txt +0 -0
  49. {satkit-0.2.4 → satkit-0.2.6}/python/test/download_data.py +0 -0
  50. {satkit-0.2.4 → satkit-0.2.6}/python/test/download_from_json.py +0 -0
  51. {satkit-0.2.4 → satkit-0.2.6}/python/test/download_testvecs.py +0 -0
  52. {satkit-0.2.4 → satkit-0.2.6}/python/test/orbitprop_gps_fit.py +0 -0
  53. {satkit-0.2.4 → satkit-0.2.6}/python/test/sp3file.py +0 -0
  54. {satkit-0.2.4 → satkit-0.2.6}/setup.cfg +0 -0
  55. {satkit-0.2.4 → satkit-0.2.6}/src/frametransform/ierstable.rs +0 -0
  56. {satkit-0.2.4 → satkit-0.2.6}/src/frametransform/qcirs2gcrs.rs +0 -0
  57. {satkit-0.2.4 → satkit-0.2.6}/src/jplephem.rs +0 -0
  58. {satkit-0.2.4 → satkit-0.2.6}/src/lib.rs +0 -0
  59. {satkit-0.2.4 → satkit-0.2.6}/src/lpephem/mod.rs +0 -0
  60. {satkit-0.2.4 → satkit-0.2.6}/src/lpephem/moon.rs +0 -0
  61. {satkit-0.2.4 → satkit-0.2.6}/src/lpephem/sun.rs +0 -0
  62. {satkit-0.2.4 → satkit-0.2.6}/src/nrlmsise.rs +0 -0
  63. {satkit-0.2.4 → satkit-0.2.6}/src/ode/harmonic_oscillator.rs +0 -0
  64. {satkit-0.2.4 → satkit-0.2.6}/src/ode/mod.rs +0 -0
  65. {satkit-0.2.4 → satkit-0.2.6}/src/ode/nalgebra.rs +0 -0
  66. {satkit-0.2.4 → satkit-0.2.6}/src/ode/rk_adaptive.rs +0 -0
  67. {satkit-0.2.4 → satkit-0.2.6}/src/ode/rk_adaptive_settings.rs +0 -0
  68. {satkit-0.2.4 → satkit-0.2.6}/src/ode/rk_explicit.rs +0 -0
  69. {satkit-0.2.4 → satkit-0.2.6}/src/ode/rkf45.rs +0 -0
  70. {satkit-0.2.4 → satkit-0.2.6}/src/ode/rkts54.rs +0 -0
  71. {satkit-0.2.4 → satkit-0.2.6}/src/ode/rkv65.rs +0 -0
  72. {satkit-0.2.4 → satkit-0.2.6}/src/ode/rkv65_table.rs +0 -0
  73. {satkit-0.2.4 → satkit-0.2.6}/src/ode/rkv87.rs +0 -0
  74. {satkit-0.2.4 → satkit-0.2.6}/src/ode/rkv87_table.rs +0 -0
  75. {satkit-0.2.4 → satkit-0.2.6}/src/ode/rkv98.rs +0 -0
  76. {satkit-0.2.4 → satkit-0.2.6}/src/ode/rkv98_nointerp.rs +0 -0
  77. {satkit-0.2.4 → satkit-0.2.6}/src/ode/rkv98_nointerp_table.rs +0 -0
  78. {satkit-0.2.4 → satkit-0.2.6}/src/ode/rkv98_table.rs +0 -0
  79. {satkit-0.2.4 → satkit-0.2.6}/src/ode/types.rs +0 -0
  80. {satkit-0.2.4 → satkit-0.2.6}/src/orbitprop/drag.rs +0 -0
  81. {satkit-0.2.4 → satkit-0.2.6}/src/orbitprop/mod.rs +0 -0
  82. {satkit-0.2.4 → satkit-0.2.6}/src/orbitprop/point_gravity.rs +0 -0
  83. {satkit-0.2.4 → satkit-0.2.6}/src/orbitprop/propagator.rs +0 -0
  84. {satkit-0.2.4 → satkit-0.2.6}/src/orbitprop/satproperties.rs +0 -0
  85. {satkit-0.2.4 → satkit-0.2.6}/src/orbitprop/satstate.rs +0 -0
  86. {satkit-0.2.4 → satkit-0.2.6}/src/orbitprop/settings.rs +0 -0
  87. {satkit-0.2.4 → satkit-0.2.6}/src/pybindings/mod.rs +0 -0
  88. {satkit-0.2.4 → satkit-0.2.6}/src/pybindings/pydensity.rs +0 -0
  89. {satkit-0.2.4 → satkit-0.2.6}/src/pybindings/pygravity.rs +0 -0
  90. {satkit-0.2.4 → satkit-0.2.6}/src/pybindings/pyitrfcoord.rs +0 -0
  91. {satkit-0.2.4 → satkit-0.2.6}/src/pybindings/pyjplephem.rs +0 -0
  92. {satkit-0.2.4 → satkit-0.2.6}/src/pybindings/pylpephem_moon.rs +0 -0
  93. {satkit-0.2.4 → satkit-0.2.6}/src/pybindings/pylpephem_sun.rs +0 -0
  94. {satkit-0.2.4 → satkit-0.2.6}/src/pybindings/pynrlmsise.rs +0 -0
  95. {satkit-0.2.4 → satkit-0.2.6}/src/pybindings/pypropagate.rs +0 -0
  96. {satkit-0.2.4 → satkit-0.2.6}/src/pybindings/pypropsettings.rs +0 -0
  97. {satkit-0.2.4 → satkit-0.2.6}/src/pybindings/pysatproperties.rs +0 -0
  98. {satkit-0.2.4 → satkit-0.2.6}/src/pybindings/pysatstate.rs +0 -0
  99. {satkit-0.2.4 → satkit-0.2.6}/src/pybindings/pysgp4.rs +0 -0
  100. {satkit-0.2.4 → satkit-0.2.6}/src/pybindings/pysolarsystem.rs +0 -0
  101. {satkit-0.2.4 → satkit-0.2.6}/src/pybindings/pytle.rs +0 -0
  102. {satkit-0.2.4 → satkit-0.2.6}/src/sgp4/dpper.rs +0 -0
  103. {satkit-0.2.4 → satkit-0.2.6}/src/sgp4/dscom.rs +0 -0
  104. {satkit-0.2.4 → satkit-0.2.6}/src/sgp4/dsinit.rs +0 -0
  105. {satkit-0.2.4 → satkit-0.2.6}/src/sgp4/dspace.rs +0 -0
  106. {satkit-0.2.4 → satkit-0.2.6}/src/sgp4/getgravconst.rs +0 -0
  107. {satkit-0.2.4 → satkit-0.2.6}/src/sgp4/initl.rs +0 -0
  108. {satkit-0.2.4 → satkit-0.2.6}/src/sgp4/satrec.rs +0 -0
  109. {satkit-0.2.4 → satkit-0.2.6}/src/sgp4/sgp4.rs +0 -0
  110. {satkit-0.2.4 → satkit-0.2.6}/src/sgp4/sgp4_lowlevel.rs +0 -0
  111. {satkit-0.2.4 → satkit-0.2.6}/src/sgp4/sgp4init.rs +0 -0
  112. {satkit-0.2.4 → satkit-0.2.6}/src/solarsystem.rs +0 -0
  113. {satkit-0.2.4 → satkit-0.2.6}/src/spaceweather.rs +0 -0
  114. {satkit-0.2.4 → satkit-0.2.6}/src/tle.rs +0 -0
  115. {satkit-0.2.4 → satkit-0.2.6}/src/types.rs +0 -0
  116. {satkit-0.2.4 → satkit-0.2.6}/src/utils/download.rs +0 -0
  117. {satkit-0.2.4 → satkit-0.2.6}/src/utils/skerror.rs +0 -0
  118. {satkit-0.2.4 → satkit-0.2.6}/src/utils/test.rs +0 -0
  119. {satkit-0.2.4 → satkit-0.2.6}/src/utils/update_data.rs +0 -0
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "satkit"
3
- version = "0.2.4"
3
+ version = "0.2.6"
4
4
  edition = "2021"
5
5
  description = "Satellite Toolkit"
6
6
  readme = "README.md"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: satkit
3
- Version: 0.2.4
3
+ Version: 0.2.6
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>
@@ -19,16 +19,33 @@ Requires-Dist: numpy>=1.20.0
19
19
 
20
20
  # Satellite Toolkit with Rust
21
21
 
22
+ An accurate, high-performance satellite orbital kinematics toolkit, written in Rust with a sensible interface.
23
+ <br/>
24
+
25
+ ### Github
26
+
22
27
  ![Build Passing?](https://github.com/ssmichael1/satkit/actions/workflows/build.yml/badge.svg)
23
28
  ![Wheel Passing?](https://github.com/ssmichael1/satkit/actions/workflows/wheels.yml/badge.svg)
24
29
  ![GitHub License](https://img.shields.io/github/license/ssmichael1/satkit)
25
- <br/>
26
- An accurate, high-performance satellite orbital kinematics toolkit, written in Rust with a sensible interface.
30
+
31
+ ### Crates.io
32
+
33
+ ![Crates.io Version](https://img.shields.io/crates/v/satkit)
34
+ ![Crates.io Downloads (recent)](https://img.shields.io/crates/dr/satkit)
35
+
36
+ ### PyPi
37
+
38
+ ![PyPI - Version](https://img.shields.io/pypi/v/satkit)
39
+ ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/satkit)
40
+ ![PyPI - Implementation](https://img.shields.io/pypi/implementation/satkit)
41
+ ![PyPI - Status](https://img.shields.io/pypi/status/satkit)
27
42
 
28
43
  ## Language Bindings
29
44
 
30
45
  - **Native Rust** bindings
31
- - **Python bindings** for compiled rust code ... speed of Rust with convenience of Python
46
+ - **Python bindings** for compiled rust code ... speed of Rust with convenience of Python<br/>
47
+ Install with `pip install satkit`<br/>
48
+ PyPi includes binaries for windows, macos (Intel & arm), and linux
32
49
 
33
50
  ## Features
34
51
 
@@ -1,15 +1,32 @@
1
1
  # Satellite Toolkit with Rust
2
2
 
3
+ An accurate, high-performance satellite orbital kinematics toolkit, written in Rust with a sensible interface.
4
+ <br/>
5
+
6
+ ### Github
7
+
3
8
  ![Build Passing?](https://github.com/ssmichael1/satkit/actions/workflows/build.yml/badge.svg)
4
9
  ![Wheel Passing?](https://github.com/ssmichael1/satkit/actions/workflows/wheels.yml/badge.svg)
5
10
  ![GitHub License](https://img.shields.io/github/license/ssmichael1/satkit)
6
- <br/>
7
- An accurate, high-performance satellite orbital kinematics toolkit, written in Rust with a sensible interface.
11
+
12
+ ### Crates.io
13
+
14
+ ![Crates.io Version](https://img.shields.io/crates/v/satkit)
15
+ ![Crates.io Downloads (recent)](https://img.shields.io/crates/dr/satkit)
16
+
17
+ ### PyPi
18
+
19
+ ![PyPI - Version](https://img.shields.io/pypi/v/satkit)
20
+ ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/satkit)
21
+ ![PyPI - Implementation](https://img.shields.io/pypi/implementation/satkit)
22
+ ![PyPI - Status](https://img.shields.io/pypi/status/satkit)
8
23
 
9
24
  ## Language Bindings
10
25
 
11
26
  - **Native Rust** bindings
12
- - **Python bindings** for compiled rust code ... speed of Rust with convenience of Python
27
+ - **Python bindings** for compiled rust code ... speed of Rust with convenience of Python<br/>
28
+ Install with `pip install satkit`<br/>
29
+ PyPi includes binaries for windows, macos (Intel & arm), and linux
13
30
 
14
31
  ## Features
15
32
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "satkit"
7
- version = "0.2.4"
7
+ version = "0.2.6"
8
8
  dependencies = ["numpy>=1.20.0"]
9
9
  requires-python = ">= 3.8"
10
10
  authors = [{ name = "Steven Michael", email = "ssmichael@gmail.com" }]
@@ -43,6 +43,9 @@ find = { where = ["python"] }
43
43
 
44
44
  [tool.cibuildwheel]
45
45
  build = ["cp312-*", "cp311-* cp310-* cp39-* cp38-*"]
46
+ test-skip = "*-macosx_arm64 *-macosx_universal2:arm64"
47
+ skip = ["pp*", "*_i686", "*_s390x", "*_aarch64", "*_ppc64le", "*-musllinux*"]
48
+
46
49
 
47
50
  [tool.cibuildwheel.macos]
48
51
  archs = ["x86_64", "arm64"]
@@ -54,17 +57,15 @@ before-build = [
54
57
  ]
55
58
  environment = { PATH = "$PATH:$HOME/.cargo/bin" }
56
59
  # Skip trying to test arm64 builds on Intel Macs
57
- test-skip = "*-macosx_arm64 *-macosx_universal2:arm64"
58
60
  test-requires = "pytest"
59
61
  test-command = [
60
- "ASTRO_DATA={package}/astro-data SATKIT_TESTVEC_ROOT={package}/satkit-testvecs pytest {project}/python/test/test.py",
62
+ "SATKIT_DATA={package}/astro-data SATKIT_TESTVEC_ROOT={package}/satkit-testvecs pytest {project}/python/test/test.py",
61
63
  ]
62
64
 
63
65
 
64
66
  [tool.cibuildwheel.linux]
65
67
  environment = { PATH = "$PATH:$HOME/.cargo/bin" }
66
68
  archs = ["x86_64"]
67
- skip = ["pp*", "*_i686", "*_s390x", "*_aarch64", "*_ppc64le", "*-musllinux*"]
68
69
  before-build = [
69
70
  "pip install -U setuptools-rust",
70
71
  "curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=stable --profile=minimal -y",
@@ -72,7 +73,7 @@ before-build = [
72
73
  ]
73
74
  test-requires = "pytest"
74
75
  test-command = [
75
- "ASTRO_DATA={package}/astro-data SATKIT_TESTVEC_ROOT={package}/satkit-testvecs pytest {project}/python/test/test.py",
76
+ "SATKIT_DATA={package}/astro-data SATKIT_TESTVEC_ROOT={package}/satkit-testvecs pytest {project}/python/test/test.py",
76
77
  ]
77
78
 
78
79
  [tool.cibuildwheel.windows]
@@ -85,14 +86,13 @@ before-build = [
85
86
  "rustup show",
86
87
  ]
87
88
  archs = ["AMD64"]
88
- skip = ["pp*"]
89
89
  test-requires = "pytest"
90
90
  before-test = [
91
- "set ASTRO_DATA={package}\\astro-data",
91
+ "set SATKIT_DATA={package}\\astro-data",
92
92
  "set SATKIT_TESTVEC_ROOT={package}\\satkit-testvecs",
93
93
  ]
94
94
  test-command = [
95
- "set ASTRO_DATA={package}\\astro-data&&set SATKIT_TESTVEC_ROOT={package}\\satkit-testvecs&&pytest {project}\\python\\test\\test.py",
95
+ "set SATKIT_DATA={package}\\astro-data&&set SATKIT_TESTVEC_ROOT={package}\\satkit-testvecs&&pytest {project}\\python\\test\\test.py",
96
96
  ]
97
97
 
98
98
 
@@ -176,7 +176,7 @@ def sgp4(
176
176
  tle: satkit.TLE | list[satkit.tle],
177
177
  tm: satkit.time | list[satkit.time] | npt.ArrayLike[satkit.time],
178
178
  **kwargs,
179
- ) -> (npt.ArrayLike[np.float64], npt.ArrayLike[np.float64]):
179
+ ) -> tuple[npt.ArrayLike[np.float64], npt.ArrayLike[np.float64]]:
180
180
  """
181
181
  Run Simplified General Perturbations (SGP)-4 propagator on
182
182
  Two-Line Element Set to
@@ -369,7 +369,7 @@ def gravity(
369
369
 
370
370
  def gravity_and_partials(
371
371
  pos: satkit.itrfcoord | npt.ArrayLike[np.float], **kwargs
372
- ) -> (npt.ArrayLike[np.float], np.arrayLike[np.float]):
372
+ ) -> typing.Tuple[npt.ArrayLike[np.float], np.arrayLike[np.float]]:
373
373
  """
374
374
  gravity_and_partials(pos)
375
375
  --
@@ -537,8 +537,18 @@ class timescale:
537
537
  are needed to compute precise rotations between various inertial and
538
538
  Earth-fixed coordinate frames
539
539
 
540
- For details, see:
541
- https://stjarnhimlen.se/comp/time.html
540
+ For an excellent overview, see:
541
+ https://spsweb.fltops.jpl.nasa.gov/portaldataops/mpg/MPG_Docs/MPG%20Book/Release/Chapter2-TimeScales.pdf
542
+
543
+ # Options:
544
+
545
+ * Invalid: Invalid time scale
546
+ * UTC: Universal Time Coordinate
547
+ * TT: Terrestrial Time
548
+ * UT1: UT1
549
+ * TAI: International Atomic Time
550
+ * GPS: Global Positioning System (GPS) time
551
+ * TDB: Barycentric Dynamical Time
542
552
  """
543
553
 
544
554
  @property
@@ -587,6 +597,31 @@ class time:
587
597
  the ability to convert to an from the "datetime" object. However, a separate
588
598
  time representation is needed as the "datetime" object does not allow for
589
599
  conversion between various time epochs (GPS, TAI, UTC, UT1, etc...)
600
+
601
+ Initialization arguments:
602
+
603
+ If no arguments are passed in, the created object represents
604
+ the current time, i.e. the time at which the function was called
605
+
606
+
607
+ If 3 integers are passed in, they represent a UTC date specified
608
+ by the standard Gregorian year, month (1-based), and day of month
609
+ (1-based)
610
+
611
+ if 5 integers and a float are passed in, they represent a UTC
612
+ date and time. The 1st 3 numbers represent the standard
613
+ Gregorian year, month, and day as above. The last 3 represent the
614
+ hour of the day [0,23], the minute of the hour [0,59], and the
615
+ second (including fractional component) of the minute
616
+
617
+ Example 1:
618
+ print(satkit.time(2023, 3, 5, 11, 3,45.453))
619
+ 2023-03-05 11:03:45.453Z
620
+
621
+ Example 2:
622
+ print(satkit.time(2023, 3, 5))
623
+ 2023-03-05 00:00:00.000Z
624
+
590
625
  """
591
626
 
592
627
  def __init__(self, *args):
@@ -645,7 +680,7 @@ class time:
645
680
  Return a time object representing input modified Julian date and time scale
646
681
  """
647
682
 
648
- def to_date(self) -> (int, int, int):
683
+ def to_date(self) -> typing.Tuple[int, int, int]:
649
684
  """
650
685
  Return tuple representing as UTC Gegorian date of the
651
686
  time object. Tuple has 6 elements:
@@ -687,7 +722,7 @@ class time:
687
722
 
688
723
  def to_gregorian(
689
724
  self, scale=satkit.timescale.UTC
690
- ) -> (int, int, int, int, int, float):
725
+ ) -> typing.Tuple[int, int, int, int, int, float]:
691
726
  """
692
727
  Return tuple representing as UTC Gegorian date and time of the
693
728
  time object. Tuple has 6 elements:
@@ -730,16 +765,20 @@ class time:
730
765
  2023-06-03 02:19:34
731
766
  """
732
767
 
733
- def to_mjd(self, scale: satkit.timescale) -> float:
768
+ def to_mjd(self, scale: satkit.timescale = satkit.timescale.UTC) -> float:
734
769
  """
735
770
  Represent time instance as a Modified Julian Date
736
771
  with the provided time scale
772
+
773
+ If no time scale is provided, default is satkit.timescale.UTC
737
774
  """
738
775
 
739
- def to_jd(self, scale: satkit.timescale) -> float:
776
+ def to_jd(self, scale: satkit.timescale = satkit.timescale.UTC) -> float:
740
777
  """
741
778
  Represent time instance as Julian Date with
742
779
  the provided time scale
780
+
781
+ If no time scale is provided, default is satkit.timescale.UTC
743
782
  """
744
783
 
745
784
  def to_unixtime(self) -> float:
@@ -765,15 +804,15 @@ class time:
765
804
  Return an satkit.time object or nunpy array of satkit.time objects
766
805
  representing the input "added to" the current object
767
806
 
768
- Possible inputs and corresponding outputs:
807
+ # Possible inputs and corresponding outputs:
769
808
 
770
- 1. float: return satkit.time object incremented by input number of days
771
- 2. satkit.duration: return satkit.time object incremented by duration
772
- 3. list[float]: return numpy array of satkit.time objects, representing
809
+ * `float` - return satkit.time object incremented by input number of days
810
+ * `satkit.duration` - return satkit.time object incremented by duration
811
+ * `list[float]` - return numpy array of satkit.time objects, representing
773
812
  an element-wise addition of days to the "self"
774
- 4. list[duration]: reuturn numpy array of satkit.time objects, with each
813
+ * `list[duration]` - reuturn numpy array of satkit.time objects, with each
775
814
  object representing an element-wise addition of "duration" to the "self"
776
- 5. numpy.array(float): return numpy array of satkit.time objects, with each
815
+ * `numpy.array(float)` - return numpy array of satkit.time objects, with each
777
816
  object representing an element-wise addition of days to the "self"
778
817
  """
779
818
 
@@ -791,17 +830,17 @@ class time:
791
830
  Return an satkit.time object or numpy array of satkit.time objects
792
831
  representing the input "subtracted from" the current object
793
832
 
794
- Possible inputs and corresponding outputs:
833
+ # Possible inputs and corresponding outputs:
795
834
 
796
- 1. satkit.time: output is duration representing the difference
835
+ * `satkit.time` - output is duration representing the difference
797
836
  between the "other" time and "self"
798
- 2. satkit.duration: output is satkit.time object representing time minus
837
+ * `satkit.duration` - output is satkit.time object representing time minus
799
838
  the input duration
800
- 3. list[float]: return numpy array of satkit.time objects, representing
839
+ * `list[float]` - return numpy array of satkit.time objects, representing
801
840
  an element-wise subtraction of days to the "self"
802
- 4. list[duration]: return numpy array of satkit.time objects, representing
841
+ * `list[duration]` - return numpy array of satkit.time objects, representing
803
842
  an element-wise subtraction of "duration" from the "self"
804
- 5. numpy.array(float): return numpy array of satkit.time objects, with
843
+ * `numpy.array(float)` - return numpy array of satkit.time objects, with
805
844
  each object representing an element-wise subtraction of days from
806
845
  the "self".
807
846
 
@@ -847,11 +886,13 @@ class duration:
847
886
  if "other" is a time, output is a time representing the input
848
887
  time plus the duration
849
888
 
850
- Example 1:
889
+ # Example 1:
890
+
851
891
  print(duration.from_hours(1) + duration.from_minutes(1))
852
892
  Duration: 1 hours, 1 minutes, 0.000 seconds
853
893
 
854
- Example 2:
894
+ # Example 2:
895
+
855
896
  print(duration.from_hours(1) + satkit.time(2023, 6, 4, 11,30,0))
856
897
  2023-06-04 13:30:00.000Z
857
898
 
@@ -936,6 +977,15 @@ class quaternion:
936
977
  have to be normalized.
937
978
  """
938
979
 
980
+ @staticmethod
981
+ def from_rotation_matrix(
982
+ mat: npt.ArrayLike[np.float64],
983
+ ) -> satkit.quaternion:
984
+ """
985
+ Return quaternion representing right-handed rotation
986
+ represented by input 3x3 rotation matrix
987
+ """
988
+
939
989
  @staticmethod
940
990
  def rotx(theta) -> satkit.quaternion:
941
991
  """
@@ -994,7 +1044,7 @@ class quaternion:
994
1044
  Return 3x3 rotation matrix representing equivalent rotation
995
1045
  """
996
1046
 
997
- def to_euler(self) -> (float, float, float):
1047
+ def to_euler(self) -> typing.Tuple[float, float, float]:
998
1048
  """
999
1049
  Return equivalent rotation angle represented as rotation angles:
1000
1050
  ("roll", "pitch", "yaw") in radians:
@@ -1009,7 +1059,7 @@ class quaternion:
1009
1059
  Return the angle in radians of the rotation
1010
1060
  """
1011
1061
 
1012
- def axis(self) -> npt.ArrayLike(np.float64):
1062
+ def axis(self) -> npt.ArrayLike[np.float64]:
1013
1063
  """
1014
1064
  Return the axis of rotation as a unit vector
1015
1065
  """
@@ -1196,13 +1246,13 @@ class itrfcoord:
1196
1246
  """
1197
1247
 
1198
1248
  @property
1199
- def geodetic_rad(self) -> (float, float, float):
1249
+ def geodetic_rad(self) -> typing.Tuple[float, float, float]:
1200
1250
  """
1201
1251
  Tuple with: (latitude_rad, longitude_rad, altitude)
1202
1252
  """
1203
1253
 
1204
1254
  @property
1205
- def geodetic_deg(self) -> (float, float, float):
1255
+ def geodetic_deg(self) -> typing.Tuple[float, float, float]:
1206
1256
  """
1207
1257
  Tuple with (latitude_deg, longitude_deg, altitude)
1208
1258
  """
@@ -1227,7 +1277,7 @@ class itrfcoord:
1227
1277
  to ITRF at this location
1228
1278
  """
1229
1279
 
1230
- def geodesic_distance(self, other: itrfcoord) -> (float, float, float):
1280
+ def geodesic_distance(self, other: itrfcoord) -> typing.Tuple[float, float, float]:
1231
1281
  """
1232
1282
  Use Vincenty formula to compute geodesic distance:
1233
1283
  https://en.wikipedia.org/wiki/Vincenty%27s_formulae
@@ -13,7 +13,7 @@ import satkit
13
13
 
14
14
 
15
15
  @typing.overload
16
- def nrlmsise(itrf: satkit.itrfcoord, time: satkit.time | None) -> (float, float):
16
+ def nrlmsise(itrf: satkit.itrfcoord, time: satkit.time | None) -> typing.Tuple[float, float]:
17
17
  """
18
18
  NRL MSISE-00 Atmosphere Density Model
19
19
 
@@ -44,7 +44,7 @@ def nrlmsise(itrf: satkit.itrfcoord, time: satkit.time | None) -> (float, float)
44
44
  def nrlmsise(altitude_meters: float,
45
45
  latitude_rad: float,
46
46
  longitude_rad: float,
47
- time: satkit.time | None) -> (float, float):
47
+ time: satkit.time | None) -> typing.Tuple[float, float]:
48
48
  """
49
49
  NRL MSISE-00 Atmosphere Density Model
50
50
 
@@ -19,80 +19,125 @@ import satkit
19
19
  import datetime
20
20
 
21
21
  def gmst(
22
- tm: satkit.time | npt.ArrayLike[satkit.time],
22
+ tm: satkit.time | npt.ArrayLike[satkit.time] | datetime.datetime | npt.ArrayLike[datetime.datetime],
23
23
  ) -> float | npt.ArrayLike[np.float]:
24
24
  """
25
25
  Greenwich Mean Sidereal Time
26
-
26
+
27
27
  Vallado algorithm 15:
28
-
29
- GMST = 67310.5481 + (876600h + 8640184.812866) * tᵤₜ₁ * (0.983104 + tᵤₜ₁ * -6.2e-6)
30
-
31
- Input is satkit.time object or list or numpy array of satkit.time objects.
32
-
33
- Output is float or numpy array of floats with GMST in radians matched element-wise
34
- to the input times.
28
+
29
+ GMST = 67310.5481 + (876600h + 8640184.812866) * tᵤₜ₁ * (0.983104 + tᵤₜ₁ * −6.2e−6)
30
+
31
+
32
+ # Arguments
33
+
34
+ * `tm`: scalar, list, or numpy array of astro.time or datetime.datetime
35
+ representing time at which to calculate output
36
+
37
+ # Returns
38
+
39
+ * Greenwich Mean Sideral Time, radians, at intput time(s)
40
+
35
41
  """
36
42
 
37
43
  def gast(
38
- tm: satkit.time | npt.ArrayLike[satkit.time],
44
+ tm: satkit.time | npt.ArrayLike[satkit.time] | datetime.datetime | npt.ArrayLike[datetime.datetime],
39
45
  ) -> float | npt.ArrayLike[np.float]:
40
46
  """
41
- Greenwich Apparent Sidereal Time
42
-
43
- Input is satkit.time object or list or numpy array of satkit.time objects.
44
-
45
- Output is float or numpy array of floats with GAST in radians matched element-wise
46
- to the input times.
47
+ Greenwich apparant sidereal time, radians
48
+
49
+ # Arguments:
50
+
51
+ * `tm`: scalar, list, or numpy array of astro.time or datetime.datetime
52
+ representing time at which to calculate output
53
+
54
+ # Returns:
55
+
56
+ * Greenwich apparant sidereal time, radians, at input time(s)
57
+
47
58
  """
48
59
 
49
60
  def earth_rotation_angle(
50
- tm: satkit.time | npt.ArrayLike[satkit.time],
61
+ tm: satkit.time | npt.ArrayLike[satkit.time] | datetime.datetime | npt.ArrayLike[datetime.datetime],
51
62
  ) -> float | npt.ArrayLike[np.float]:
52
63
  """
53
- Earth rotation angle
54
-
55
- See:
56
- https://www.iers.org/SharedDocs/Publikationen/EN/IERS/Publications/tn/TechnNote36/tn36_043.pdf?__blob=publicationFile&v=1
57
-
64
+ Earth Rotation Angle
65
+
66
+ See
67
+ [IERS Technical Note 36, Chapter 5](https://www.iers.org/SharedDocs/Publikationen/EN/IERS/Publications/tn/TechnNote36/tn36_043.pdf?__blob=publicationFile&v=1)
58
68
  Equation 5.15
59
-
60
- Input is satkit.time object or list or numpy array of satkit.time objects.
61
-
62
- Output is float or numpy array of floats with Earth Rotation Angle in radians
63
- matched element-wise to the input times.
69
+
70
+ # Arguments:
71
+
72
+ * `tm`: scalar, list, or numpy array of astro.time or datetime.datetime
73
+ representing time at which to calculate output
74
+
75
+ # Returns:
76
+
77
+ * Earth rotation angle, in radians, at input time(s)
78
+
79
+ # Calculation Details
80
+
81
+ * Let t be UT1 Julian date
82
+ * let f be fractional component of t (fraction of day)
83
+ * ERA = 2𝜋 ((0.7790572732640 + f + 0.00273781191135448 * (t − 2451545.0))
84
+
64
85
  """
65
86
 
66
87
  def qitrf2tirs(
67
- tm: satkit.time | npt.ArrayLike[satkit.time],
88
+ tm: satkit.time | npt.ArrayLike[satkit.time] | datetime.datetime | npt.ArrayLike[datetime.datetime],
68
89
  ) -> satkit.quaternion | npt.ArrayLike[satkit.quaternion]:
69
90
  """
70
- Rotation from International Terrestrial Reference Frame
71
- (ITRF) to the Terrestrial Intermediate Reference System (TIRS)
72
- represented as satkit.quaterinion object
73
-
74
- Input is satkit.time object or list or numpy array of satkit.time objects.
75
-
76
- Output is satkit.quaternion or numpy array of satkit.quaternion representiong
77
- rotations from itrf to tirs matched element-wise to the input times
91
+ Rotation from Terrestrial Intermediate Reference System to
92
+ Celestial Intermediate Reference Systems
93
+
94
+ # Arguments:
95
+
96
+ * `tm`: scalar, list, or numpy array of astro.time or datetime.datetime
97
+ representing time at which to calculate output
98
+
99
+ # Returns:
100
+
101
+ * Quaternion representing rotation from TIRS to CIRS at input time(s)
102
+
78
103
  """
79
104
 
80
105
  @typing.overload
81
- def qcirs2gcrf(tm: satkit.time) -> satkit.quaternion:
82
- """
83
- Rotate from Celestial Intermediate Reference System
106
+ def qcirs2gcrf(tm: satkit.time | datetime.datetime) -> satkit.quaternion:
107
+ """
108
+ Rotation from Celestial Intermediate Reference System
84
109
  to Geocentric Celestial Reference Frame
110
+
111
+ # Arguments:
112
+
113
+ * `tm`: scalar, list, or numpy array of astro.time or datetime.datetime
114
+ representing time at which to calculate output
115
+
116
+ # Returns:
117
+
118
+ * Quaternion representing rotation from CIRS to GCRF at input time(s)
119
+
85
120
  """
86
121
 
87
122
  @typing.overload
88
- def qcirs2gcrf(tm: npt.ArrayLike[satkit.time]) -> npt.ArrayLike[satkit.quaternion]:
123
+ def qcirs2gcrf(tm: npt.ArrayLike[satkit.time] | npt.ArrayLike[datetime.datetime]) -> npt.ArrayLike[satkit.quaternion]:
89
124
  """
90
- Rotate from Celestial Intermediate Reference System
125
+ Rotation from Celestial Intermediate Reference System
91
126
  to Geocentric Celestial Reference Frame
127
+
128
+ # Arguments:
129
+
130
+ * `tm`: scalar, list, or numpy array of astro.time or datetime.datetime
131
+ representing time at which to calculate output
132
+
133
+ # Returns:
134
+
135
+ * Quaternion representing rotation from CIRS to GCRF at input time(s)
136
+
92
137
  """
93
138
 
94
139
  def qtirs2cirs(
95
- tm: satkit.time | npt.ArrayLike[satkit.time],
140
+ tm: satkit.time | npt.ArrayLike[satkit.time] | datetime.datetime | npt.ArrayLike[datetime.datetime],
96
141
  ) -> satkit.quaternion | npt.ArrayLike[satkit.quaternion]:
97
142
  """
98
143
  Rotation from Terrestrial Intermediate Reference System (TIRS)
@@ -106,7 +151,7 @@ def qtirs2cirs(
106
151
  """
107
152
 
108
153
  def qgcrf2itrf_approx(
109
- tm: satkit.time | npt.ArrayLike[satkit.time],
154
+ tm: satkit.time | npt.ArrayLike[satkit.time] | datetime.datetime | npt.ArrayLike[datetime.datetime],
110
155
  ) -> satkit.quaternion | npt.ArrayLike[satkit.quaternion]:
111
156
  """
112
157
  Quaternion representing approximate rotation from the
@@ -128,7 +173,7 @@ def qgcrf2itrf_approx(
128
173
  """
129
174
 
130
175
  def qitrf2gcrf_approx(
131
- tm: satkit.time | npt.ArrayLike[satkit.time],
176
+ tm: satkit.time | npt.ArrayLike[satkit.time] | datetime.datetime | npt.ArrayLike[datetime.datetime],
132
177
  ) -> satkit.quaternion | npt.ArrayLike[satkit.quaternion]:
133
178
  """
134
179
  Quaternion representing approximate rotation from the
@@ -175,7 +220,7 @@ def qgcrf2itrf(
175
220
  """
176
221
 
177
222
  def qitrf2gcrf(
178
- tm: satkit.time | npt.ArrayLike[satkit.time],
223
+ tm: satkit.time | npt.ArrayLike[satkit.time] | datetime.datetime | npt.ArrayLike[datetime.datetime],
179
224
  ) -> satkit.quaternion | npt.ArrayLike[satkit.quaternion]:
180
225
  """
181
226
  Quaternion representing rotation from the
@@ -200,7 +245,7 @@ def qitrf2gcrf(
200
245
  """
201
246
 
202
247
  def qteme2itrf(
203
- tm: satkit.time | npt.ArrayLike[satkit.time],
248
+ tm: satkit.time | npt.ArrayLike[satkit.time] | datetime.datetime | npt.ArrayLike[datetime.datetime],
204
249
  ) -> satkit.quaternion | npt.ArrayLike[satkit.quaternion]:
205
250
  """
206
251
  Quaternion representing rotation from the
@@ -60,7 +60,7 @@ def barycentric_pos(body: satkit.solarsystem, tm: satkit.time|list[satkit.time]|
60
60
  """
61
61
 
62
62
  def geocentric_state(body: satkit.solarsystem,
63
- tm: satkit.time|list[satkit.time]|npt.ArrayLike[satkit.time]) -> (npt.ArrayLike[np.float64], npt.ArrayLike[np.float64]):
63
+ tm: satkit.time|list[satkit.time]|npt.ArrayLike[satkit.time]) -> typing.Tuple[npt.ArrayLike[np.float64], npt.ArrayLike[np.float64]]:
64
64
  """
65
65
  Return geocentric (Earth-centered) state (position and velocity) for a given solar-system body
66
66
  at the given time or times in the GCRF frame
@@ -88,7 +88,7 @@ def geocentric_state(body: satkit.solarsystem,
88
88
  """
89
89
 
90
90
  def barycentric_state(body: satkit.solarsystem,
91
- tm: satkit.time|list[satkit.time]|npt.ArrayLike[satkit.time]) -> (npt.ArrayLike[np.float64], npt.ArrayLike[np.float64]):
91
+ tm: satkit.time|list[satkit.time]|npt.ArrayLike[satkit.time]) -> typing.Tuple[npt.ArrayLike[np.float64], npt.ArrayLike[np.float64]]:
92
92
  """
93
93
  Return barycentric position and velocity for a given solar-system body
94
94
  at the given time or times. The barycentric coordinate system origin
@@ -234,8 +234,8 @@ class propsettings:
234
234
  """
235
235
 
236
236
  def propagate(
237
- pos: npt.ArrayLike(np.float64),
238
- vel: npt.ArrayLike(np.float64),
237
+ pos: npt.ArrayLike[float],
238
+ vel: npt.ArrayLike[float],
239
239
  start: satkit.time,
240
240
  **kwargs,
241
241
  ) -> PropResult:
@@ -125,7 +125,7 @@ def pos_mod(
125
125
  def rise_set(time: satkit.time,
126
126
  coord: satkit.itrfcoord,
127
127
  sigma: float = 90.0 + 50.0/60.0
128
- ) -> (satkit.time, satkit.time):
128
+ ) -> typing.Tuple[satkit.time, satkit.time]:
129
129
  """
130
130
  Sunrise and sunset times on the day given by input time
131
131
  and at the given location.
@@ -52,7 +52,7 @@ def datadir() -> str:
52
52
 
53
53
  MacOS:
54
54
 
55
- 1. Directory pointed to by "ASTRO_DATA" environment variable
55
+ 1. Directory pointed to by "SATKIT_DATA" environment variable
56
56
  2. $HOME/LIBRARY/Application\ Support/astro-data
57
57
  3. $HOME/.astro-data
58
58
  4. $HOME