satkit 0.24.0__cp315-cp315-win_amd64.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.
- satkit/__init__.py +9 -0
- satkit/__init__.pyi +59 -0
- satkit/_types.py +72 -0
- satkit/density.pyi +96 -0
- satkit/frametransform.pyi +1107 -0
- satkit/jplephem.pyi +143 -0
- satkit/moon.pyi +248 -0
- satkit/planets.pyi +52 -0
- satkit/py.typed +0 -0
- satkit/satkit.cp315-win_amd64.pyd +0 -0
- satkit/satkit.pyi +4889 -0
- satkit/spaceweather.pyi +134 -0
- satkit/sun.pyi +188 -0
- satkit/utils.pyi +226 -0
- satkit-0.24.0.dist-info/METADATA +238 -0
- satkit-0.24.0.dist-info/RECORD +21 -0
- satkit-0.24.0.dist-info/WHEEL +5 -0
- satkit-0.24.0.dist-info/licenses/LICENSE-APACHE +201 -0
- satkit-0.24.0.dist-info/licenses/LICENSE-MIT +21 -0
- satkit-0.24.0.dist-info/licenses/THIRDPARTY-DATA.md +55 -0
- satkit-0.24.0.dist-info/top_level.txt +1 -0
satkit/__init__.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
from .satkit import * # type: ignore
|
|
2
|
+
from ._types import OMMDict
|
|
3
|
+
from .satkit import __version__
|
|
4
|
+
|
|
5
|
+
# The core data (IERS nutation tables, public-domain gravity models to degree 70) is
|
|
6
|
+
# compiled into the extension, so satkit works with no data directory at all.
|
|
7
|
+
# The JPL ephemeris is downloaded (SHA-256 verified) on first use into
|
|
8
|
+
# `satkit.utils.datadir()`, and the Earth-orientation / space-weather files
|
|
9
|
+
# are refreshed by `satkit.utils.update_datafiles()`.
|
satkit/__init__.pyi
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
from .satkit import *
|
|
2
|
+
from ._types import OMMDict
|
|
3
|
+
|
|
4
|
+
from . import jplephem
|
|
5
|
+
from . import frametransform
|
|
6
|
+
from . import moon
|
|
7
|
+
from . import sun
|
|
8
|
+
from . import density
|
|
9
|
+
from . import utils
|
|
10
|
+
from . import planets
|
|
11
|
+
from . import spaceweather
|
|
12
|
+
|
|
13
|
+
__version__: str
|
|
14
|
+
|
|
15
|
+
__all__ = [
|
|
16
|
+
"time",
|
|
17
|
+
"duration",
|
|
18
|
+
"timescale",
|
|
19
|
+
"weekday",
|
|
20
|
+
"quaternion",
|
|
21
|
+
"frame",
|
|
22
|
+
"sgp4",
|
|
23
|
+
"sgp4_error",
|
|
24
|
+
"sgp4_gravconst",
|
|
25
|
+
"sgp4_opsmode",
|
|
26
|
+
"gravmodel",
|
|
27
|
+
"gravity",
|
|
28
|
+
"gravity_and_partials",
|
|
29
|
+
"nrlmsise00",
|
|
30
|
+
"density",
|
|
31
|
+
"solarsystem",
|
|
32
|
+
"TLE",
|
|
33
|
+
"itrfcoord",
|
|
34
|
+
"geodetic",
|
|
35
|
+
"kepler",
|
|
36
|
+
"consts",
|
|
37
|
+
"frametransform",
|
|
38
|
+
"jplephem",
|
|
39
|
+
"utils",
|
|
40
|
+
"moon",
|
|
41
|
+
"sun",
|
|
42
|
+
"planets",
|
|
43
|
+
"spaceweather",
|
|
44
|
+
"satstate",
|
|
45
|
+
"propagate",
|
|
46
|
+
"lambert",
|
|
47
|
+
"propsettings",
|
|
48
|
+
"integrator",
|
|
49
|
+
"satproperties",
|
|
50
|
+
"thrust",
|
|
51
|
+
"propresult",
|
|
52
|
+
"propstats",
|
|
53
|
+
"omm_from_url",
|
|
54
|
+
"omm_from_file",
|
|
55
|
+
"omm_from_text",
|
|
56
|
+
"OMMDict",
|
|
57
|
+
"tlefitstatus",
|
|
58
|
+
"__version__",
|
|
59
|
+
]
|
satkit/_types.py
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"""Pure-Python types shared by the stubs and the runtime package."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import datetime
|
|
6
|
+
from typing import TYPE_CHECKING, TypedDict
|
|
7
|
+
|
|
8
|
+
if TYPE_CHECKING:
|
|
9
|
+
from .satkit import time
|
|
10
|
+
|
|
11
|
+
__all__ = ["OMMDict"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class OMMDict(TypedDict, total=False):
|
|
15
|
+
"""An Orbital Mean-Element Message (OMM) as a plain dictionary
|
|
16
|
+
|
|
17
|
+
This is the shape returned by :func:`omm_from_url`, :func:`omm_from_file`,
|
|
18
|
+
:func:`omm_from_text` and :meth:`TLE.to_omm`, and accepted by :func:`sgp4`
|
|
19
|
+
and :meth:`TLE.from_omm`. It is an ordinary ``dict`` (this class exists for
|
|
20
|
+
type checking only): the keys are the CCSDS 502.0-B-3 field names, so
|
|
21
|
+
``json.load`` on a Space-Track or CelesTrak JSON response produces one
|
|
22
|
+
directly. Every key is optional in the type; :func:`sgp4` needs ``EPOCH``
|
|
23
|
+
and the six mean elements.
|
|
24
|
+
|
|
25
|
+
Units follow the TLE convention: angles in degrees, ``MEAN_MOTION`` in
|
|
26
|
+
revolutions per day, ``MEAN_MOTION_DOT`` in rev/day² and
|
|
27
|
+
``MEAN_MOTION_DDOT`` in rev/day³ (the TLE fields, i.e. ṅ/2 and n̈/6),
|
|
28
|
+
``BSTAR`` in inverse Earth radii, ``GM`` in km³/s², ``MASS`` in kg, areas in
|
|
29
|
+
m², ``BTERM`` and ``AGOM`` in m²/kg.
|
|
30
|
+
|
|
31
|
+
The loaders return numbers as ``float`` / ``int`` (Space-Track quotes them
|
|
32
|
+
as strings in its JSON; :func:`sgp4` accepts either), ``EPOCH`` as an
|
|
33
|
+
RFC 3339 string, absent optional fields omitted, and every key that is not
|
|
34
|
+
a CCSDS field (Space-Track's ``OBJECT_TYPE``, ``RCS_SIZE``, ``LAUNCH_DATE``,
|
|
35
|
+
``TLE_LINE1``, ...; XML ``USER_DEFINED`` parameters) kept verbatim.
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
CCSDS_OMM_VERS: str
|
|
39
|
+
COMMENT: str
|
|
40
|
+
ORIGINATOR: str
|
|
41
|
+
CLASSIFICATION: str
|
|
42
|
+
MESSAGE_ID: str
|
|
43
|
+
OBJECT_NAME: str
|
|
44
|
+
OBJECT_ID: str
|
|
45
|
+
CENTER_NAME: str
|
|
46
|
+
REF_FRAME: str
|
|
47
|
+
REF_FRAME_EPOCH: str
|
|
48
|
+
TIME_SYSTEM: str
|
|
49
|
+
MEAN_ELEMENT_THEORY: str
|
|
50
|
+
EPOCH: str | time | datetime.datetime
|
|
51
|
+
MEAN_MOTION: float | str
|
|
52
|
+
ECCENTRICITY: float | str
|
|
53
|
+
INCLINATION: float | str
|
|
54
|
+
RA_OF_ASC_NODE: float | str
|
|
55
|
+
ARG_OF_PERICENTER: float | str
|
|
56
|
+
MEAN_ANOMALY: float | str
|
|
57
|
+
GM: float | str | None
|
|
58
|
+
MASS: float | str | None
|
|
59
|
+
SOLAR_RAD_AREA: float | str | None
|
|
60
|
+
DRAG_AREA: float | str | None
|
|
61
|
+
SOLAR_RAD_COEFF: float | str | None
|
|
62
|
+
DRAG_COEFF: float | str | None
|
|
63
|
+
EPHEMERIS_TYPE: int | str | None
|
|
64
|
+
CLASSIFICATION_TYPE: str
|
|
65
|
+
NORAD_CAT_ID: int | str | None
|
|
66
|
+
ELEMENT_SET_NO: int | str | None
|
|
67
|
+
REV_AT_EPOCH: int | str | None
|
|
68
|
+
BSTAR: float | str | None
|
|
69
|
+
BTERM: float | str | None
|
|
70
|
+
MEAN_MOTION_DOT: float | str | None
|
|
71
|
+
MEAN_MOTION_DDOT: float | str | None
|
|
72
|
+
AGOM: float | str | None
|
satkit/density.pyi
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Air density models
|
|
3
|
+
|
|
4
|
+
Currently only contains NRL MSISE-00 air density model
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
import typing
|
|
9
|
+
|
|
10
|
+
import satkit
|
|
11
|
+
from .satkit import TimeScalar
|
|
12
|
+
|
|
13
|
+
@typing.overload
|
|
14
|
+
def nrlmsise(
|
|
15
|
+
itrf: satkit.itrfcoord, time: TimeScalar | None = None, /
|
|
16
|
+
) -> tuple[float, float]:
|
|
17
|
+
"""
|
|
18
|
+
NRL MSISE-00 Atmosphere Density Model
|
|
19
|
+
|
|
20
|
+
<https://en.wikipedia.org/wiki/NRLMSISE-00>
|
|
21
|
+
|
|
22
|
+
or for more detail:
|
|
23
|
+
<https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2002JA009430>
|
|
24
|
+
|
|
25
|
+
Args:
|
|
26
|
+
|
|
27
|
+
itrf (satkit.itrfcoord): position at which to compute density & temperature
|
|
28
|
+
time (satkit.time|datetime.datetime, optional): Instant at which to compute
|
|
29
|
+
density & temperature. "Space weather" data at this time will be
|
|
30
|
+
used in model computation. Note: at satellite altitudes, density can
|
|
31
|
+
change by > 10 X depending on solar cycle. Without a time the model
|
|
32
|
+
runs on its default indices (F10.7 = F10.7A = 150, Ap = 4).
|
|
33
|
+
|
|
34
|
+
Returns:
|
|
35
|
+
tuple: (rho, T) where rho is mass density in kg/m^3 and T is temperature in Kelvin
|
|
36
|
+
|
|
37
|
+
Raises:
|
|
38
|
+
TypeError: If ``time`` is not a ``satkit.time``, ``datetime.datetime``,
|
|
39
|
+
``numpy.datetime64`` or ``None``
|
|
40
|
+
|
|
41
|
+
Example:
|
|
42
|
+
```python
|
|
43
|
+
t = satkit.time(2024, 1, 1)
|
|
44
|
+
coord = satkit.itrfcoord(latitude_deg=0, longitude_deg=0, altitude=400e3)
|
|
45
|
+
rho, temp = satkit.density.nrlmsise(coord, t)
|
|
46
|
+
print(f"Density: {rho:.2e} kg/m^3")
|
|
47
|
+
print(f"Temperature: {temp:.1f} K")
|
|
48
|
+
```
|
|
49
|
+
"""
|
|
50
|
+
...
|
|
51
|
+
|
|
52
|
+
@typing.overload
|
|
53
|
+
def nrlmsise(
|
|
54
|
+
altitude_meters: float,
|
|
55
|
+
latitude_rad: float = 0.0,
|
|
56
|
+
longitude_rad: float = 0.0,
|
|
57
|
+
time: TimeScalar | None = None,
|
|
58
|
+
/,
|
|
59
|
+
) -> tuple[float, float]:
|
|
60
|
+
"""
|
|
61
|
+
NRL MSISE-00 Atmosphere Density Model
|
|
62
|
+
|
|
63
|
+
<https://en.wikipedia.org/wiki/NRLMSISE-00>
|
|
64
|
+
|
|
65
|
+
or for more detail:
|
|
66
|
+
<https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2002JA009430>
|
|
67
|
+
|
|
68
|
+
Args:
|
|
69
|
+
altitude_meters (float): Altitude in meters
|
|
70
|
+
latitude_rad (float, optional): Latitude in radians. Default is 0.
|
|
71
|
+
longitude_rad (float, optional): Longitude in radians. Default is 0.
|
|
72
|
+
time (satkit.time|datetime.datetime, optional): Instant at which to compute
|
|
73
|
+
density & temperature. "Space weather" data at this time will be
|
|
74
|
+
used in model computation. Note: at satellite altitudes, density can
|
|
75
|
+
change by > 10 X depending on solar cycle. Without a time the model
|
|
76
|
+
runs on its default indices (F10.7 = F10.7A = 150, Ap = 4). The time
|
|
77
|
+
may also directly follow the altitude or the latitude.
|
|
78
|
+
|
|
79
|
+
Returns:
|
|
80
|
+
tuple: (rho, T) where rho is mass density in kg/m^3 and T is temperature in Kelvin
|
|
81
|
+
|
|
82
|
+
Raises:
|
|
83
|
+
TypeError: If an angle is not a real number, or ``time`` is not a
|
|
84
|
+
``satkit.time``, ``datetime.datetime``, ``numpy.datetime64`` or ``None``
|
|
85
|
+
"""
|
|
86
|
+
...
|
|
87
|
+
|
|
88
|
+
@typing.overload
|
|
89
|
+
def nrlmsise(
|
|
90
|
+
altitude_meters: float, time: TimeScalar | None, /
|
|
91
|
+
) -> tuple[float, float]: ...
|
|
92
|
+
|
|
93
|
+
@typing.overload
|
|
94
|
+
def nrlmsise(
|
|
95
|
+
altitude_meters: float, latitude_rad: float, time: TimeScalar | None, /
|
|
96
|
+
) -> tuple[float, float]: ...
|