keplemon 1.3.1__cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl → 1.5.0__cp310-cp310-manylinux_2_17_aarch64.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.

Potentially problematic release.


This version of keplemon might be problematic. Click here for more details.

keplemon/__init__.py CHANGED
@@ -4,6 +4,7 @@ from keplemon._keplemon import ( # type: ignore
4
4
  set_thread_count,
5
5
  set_license_file_path,
6
6
  get_license_file_path,
7
+ set_jpl_ephemeris_file_path,
7
8
  )
8
9
  from pathlib import Path
9
10
 
@@ -18,10 +19,15 @@ set_license_file_path(ASSETS_DIRECTORY.as_posix())
18
19
  TIME_CONSTANTS_PATH = ASSETS_DIRECTORY / "time_constants.dat"
19
20
  load_time_constants(TIME_CONSTANTS_PATH.as_posix())
20
21
 
22
+ # Load the JPL path
23
+ JPL_EPHEMERIS_PATH = ASSETS_DIRECTORY / "JPLcon_1950_2050.405"
24
+ set_jpl_ephemeris_file_path(JPL_EPHEMERIS_PATH.as_posix())
25
+
21
26
  __all__ = [
22
27
  "get_thread_count",
23
28
  "set_thread_count",
24
29
  "TIME_CONSTANTS_PATH",
30
+ "JPL_EPHEMERIS_PATH",
25
31
  "set_license_file_path",
26
32
  "PACKAGE_DIRECTORY",
27
33
  "ASSETS_DIRECTORY",
keplemon/bodies.pyi CHANGED
@@ -7,6 +7,8 @@ from keplemon.elements import (
7
7
  GeodeticPosition,
8
8
  OrbitPlotData,
9
9
  TopocentricElements,
10
+ RelativeState,
11
+ BoreToBodyAngles,
10
12
  )
11
13
  from keplemon.catalogs import TLECatalog
12
14
  from keplemon.time import Epoch, TimeSpan
@@ -80,6 +82,26 @@ class Satellite:
80
82
  """
81
83
  ...
82
84
 
85
+ def get_relative_state_at_epoch(self, other: Satellite, epoch: Epoch) -> RelativeState | None:
86
+ """
87
+ Calculate the relative state between this satellite and another satellite at a given epoch.
88
+
89
+ Args:
90
+ other: Secondary satellite to calculate the relative state against
91
+ epoch: UTC epoch at which the relative state will be calculated
92
+ """
93
+ ...
94
+
95
+ def get_body_angles_at_epoch(self, other: Satellite, epoch: Epoch) -> BoreToBodyAngles | None:
96
+ """
97
+ Calculate the bore-to-body angles between this satellite and another satellite at a given epoch.
98
+
99
+ Args:
100
+ other: Secondary satellite to calculate the bore-to-body angles against
101
+ epoch: UTC epoch at which the bore-to-body angles will be calculated
102
+ """
103
+ ...
104
+
83
105
  def get_plot_data(self, start: Epoch, end: Epoch, step: TimeSpan) -> OrbitPlotData | None: ...
84
106
  def get_observatory_access_report(
85
107
  self,
keplemon/elements.py CHANGED
@@ -12,6 +12,8 @@ from keplemon._keplemon.elements import ( # type: ignore
12
12
  GeodeticPosition,
13
13
  OrbitPlotData,
14
14
  OrbitPlotState,
15
+ RelativeState,
16
+ BoreToBodyAngles,
15
17
  )
16
18
 
17
19
  __all__ = [
@@ -28,4 +30,6 @@ __all__ = [
28
30
  "GeodeticPosition",
29
31
  "OrbitPlotData",
30
32
  "OrbitPlotState",
33
+ "RelativeState",
34
+ "BoreToBodyAngles",
31
35
  ]
keplemon/elements.pyi CHANGED
@@ -4,6 +4,18 @@ from keplemon.time import Epoch
4
4
  from keplemon.enums import Classification, KeplerianType, ReferenceFrame
5
5
  from keplemon.events import CloseApproach
6
6
 
7
+ class RelativeState:
8
+ epoch: Epoch
9
+ position: CartesianVector
10
+ velocity: CartesianVector
11
+ origin_satellite_id: str
12
+ secondary_satellite_id: str
13
+
14
+ class BoreToBodyAngles:
15
+ earth_angle: float
16
+ sun_angle: float
17
+ moon_angle: float
18
+
7
19
  class OrbitPlotData:
8
20
  satellite_id: str
9
21
  epochs: list[str]
@@ -3,6 +3,9 @@ from keplemon._keplemon.saal.astro_func_interface import ( # type: ignore
3
3
  ra_dec_to_az_el_time,
4
4
  ra_dec_to_az_el,
5
5
  mean_motion_to_sma,
6
+ sma_to_mean_motion,
7
+ kozai_to_brouwer,
8
+ brouwer_to_kozai,
6
9
  topo_date_to_equinox,
7
10
  topo_equinox_to_date,
8
11
  theta_teme_to_lla,
@@ -20,6 +23,7 @@ from keplemon._keplemon.saal.astro_func_interface import ( # type: ignore
20
23
  XA_TOPO_SIZE,
21
24
  YROFEQNX_2000,
22
25
  YROFEQNX_CURR,
26
+ get_jpl_sun_and_moon_position,
23
27
  )
24
28
 
25
29
  __all__ = [
@@ -44,4 +48,8 @@ __all__ = [
44
48
  "YROFEQNX_2000",
45
49
  "YROFEQNX_CURR",
46
50
  "topo_equinox_to_date",
51
+ "get_jpl_sun_and_moon_position",
52
+ "kozai_to_brouwer",
53
+ "brouwer_to_kozai",
54
+ "sma_to_mean_motion",
47
55
  ]
@@ -2,13 +2,41 @@
2
2
 
3
3
  def mean_motion_to_sma(mean_motion: float) -> float:
4
4
  """
5
- Convert mean motion to semi-major axis.
5
+ Convert mean motion to semi-major axis in kilometers.
6
6
 
7
7
  Args:
8
8
  mean_motion: Mean motion in revolutions/day.
9
+ """
10
+ ...
9
11
 
10
- Returns:
11
- Semi-major axis in kilometers.
12
+ def sma_to_mean_motion(sma: float) -> float:
13
+ """
14
+ Convert semi-major axis to mean motion in revolutions/day.
15
+
16
+ Args:
17
+ sma: Semi-major axis in kilometers.
18
+ """
19
+ ...
20
+
21
+ def kozai_to_brouwer(e_kozai: float, i_kozai: float, n_kozai: float) -> float:
22
+ """
23
+ Convert Kozai orbital elements to Brouwer orbital elements.
24
+
25
+ Args:
26
+ e_kozai: Eccentricity (unitless).
27
+ i_kozai: Inclination in degrees.
28
+ n_kozai: Mean motion in revolutions/day.
29
+ """
30
+ ...
31
+
32
+ def brouwer_to_kozai(e_brouwer: float, i_brouwer: float, n_brouwer: float) -> float:
33
+ """
34
+ Convert Brouwer orbital elements to Kozai orbital elements.
35
+
36
+ Args:
37
+ e_brouwer: Eccentricity (unitless).
38
+ i_brouwer: Inclination in degrees.
39
+ n_brouwer: Mean motion in revolutions/day.
12
40
  """
13
41
  ...
14
42
 
@@ -121,6 +149,20 @@ def theta_teme_to_lla(theta: float, lat: float, long: float, ra: float, dec: flo
121
149
  """
122
150
  ...
123
151
 
152
+ def get_jpl_sun_and_moon_position(ds50_utc: float) -> tuple[list[float], list[float]]:
153
+ """
154
+ Get the JPL ephemeris positions of the Sun and Moon in TEME coordinates.
155
+
156
+ Args:
157
+ ds50_utc: Epoch in DS50 UTC format.
158
+
159
+ Returns:
160
+ A tuple containing two lists:
161
+ - Sun position in TEME coordinates [x, y, z] in kilometers.
162
+ - Moon position in TEME coordinates [x, y, z] in kilometers.
163
+ """
164
+ ...
165
+
124
166
  def time_teme_to_lla(ds50_utc: float, lat: float, long: float, ra: float, dec: float) -> tuple[float, float]:
125
167
  """
126
168
  Convert TEME coordinates to latitude, longitude, and altitude.
@@ -0,0 +1,5 @@
1
+ from keplemon._keplemon.saal.sat_state_interface import ( # type: ignore
2
+ get_relative_state,
3
+ )
4
+
5
+ __all__ = ["get_relative_state"]
@@ -0,0 +1,9 @@
1
+ def get_relative_state(state_1: list[float], state_2: list[float], utc_ds50: float) -> list[float]:
2
+ """Calculate the relative state between two satellites
3
+
4
+ Args:
5
+ state_1: primary satellite TEME state vector [x, y, z, vx, vy, vz] in km and km/s
6
+ state_2: secondary satellite TEME state vector [x, y, z, vx, vy, vz] in km and km/s
7
+ utc_ds50: UTC time in days since 1950
8
+ """
9
+ ...
keplemon/time.py CHANGED
@@ -27,8 +27,14 @@ def _now() -> Epoch:
27
27
  return _from_datetime(datetime.now(timezone.utc))
28
28
 
29
29
 
30
+ def _to_datetime(epoch: Epoch) -> datetime:
31
+ iso_str = epoch.to_iso()
32
+ return datetime.fromisoformat(iso_str.replace("Z", "+00:00"))
33
+
34
+
30
35
  Epoch.now = staticmethod(_now)
31
36
  Epoch.from_datetime = staticmethod(_from_datetime)
37
+ Epoch.to_datetime = _to_datetime
32
38
 
33
39
 
34
40
  def request_time_constants_update(output_path: str) -> None:
keplemon/time.pyi CHANGED
@@ -146,6 +146,13 @@ class Epoch:
146
146
  day_of_year: float
147
147
  """Decimal day of the year (1-365.999...)"""
148
148
 
149
+ def to_datetime(self) -> datetime:
150
+ """
151
+ Returns:
152
+ Aware datetime object in UTC time system
153
+ """
154
+ ...
155
+
149
156
  @classmethod
150
157
  def from_datetime(cls, dt: datetime) -> Epoch:
151
158
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: keplemon
3
- Version: 1.3.1
3
+ Version: 1.5.0
4
4
  Requires-Dist: requests
5
5
  Requires-Dist: click
6
6
  Requires-Dist: maturin>=1.0,<2.0 ; extra == 'dev'
@@ -1,6 +1,6 @@
1
- keplemon-1.3.1.dist-info/METADATA,sha256=fl7n1Iefcs9qhxB00Y617U8cbU94YAwmuswu_482oJc,863
2
- keplemon-1.3.1.dist-info/WHEEL,sha256=zOcqs7SUV1kLYULE1MqkNF5fuwhGxyMJSg6hS7voZ84,131
3
- keplemon-1.3.1.dist-info/entry_points.txt,sha256=eYbCkvQvWfRDQ0LzaCELov1xeLAxQEHlfdgNq-LXyb0,49
1
+ keplemon-1.5.0.dist-info/METADATA,sha256=5zcpgXY79lEuvKCf89MaAfoXWmf0xeEsqGEu-zLVHzo,863
2
+ keplemon-1.5.0.dist-info/WHEEL,sha256=zOcqs7SUV1kLYULE1MqkNF5fuwhGxyMJSg6hS7voZ84,131
3
+ keplemon-1.5.0.dist-info/entry_points.txt,sha256=eYbCkvQvWfRDQ0LzaCELov1xeLAxQEHlfdgNq-LXyb0,49
4
4
  keplemon.libs/libastrofunc-d5d29f1a.so,sha256=e5roPhiI5MEQZvQ6o8SY2c2WhSThxXGHLE5HdJzP_1Y,468593
5
5
  keplemon.libs/libdllmain-83b073db.so,sha256=YD97bgzxLVt6Yip-fNxEKSOj3iYCtBmaip0d2RpBQgs,331977
6
6
  keplemon.libs/libelops-d6961cbd.so,sha256=4XTr3Ip2PWvjLVBAGe53r77_M6t5R9_L3go4KS-BKfI,331017
@@ -16,10 +16,10 @@ keplemon.libs/libspvec-b3cef8a2.so,sha256=h0BBTiOtTxF69NSdFuQ_iJ7MglrnvFCFfqbYu6
16
16
  keplemon.libs/libtimefunc-d4915652.so,sha256=qfvUsMrCuTPVyUVwPL08yWqgao35rfrRZxl8mDwaqis,332833
17
17
  keplemon.libs/libtle-72004375.so,sha256=-e1SAZMVti7WcFPk1ljqDLHGtDOR-uZOyq-Oo2-wRw4,398217
18
18
  keplemon.libs/libvcm-460d66c8.so,sha256=yDcaK-v2FOOiFf-doyTvPcGPvRK_vuNMMEomKNac59k,397865
19
- keplemon/__init__.py,sha256=M9q5lNYh_BE6l4xCGJ5IH5PQH9aNm4q_r67ljsNkKvM,832
19
+ keplemon/__init__.py,sha256=G4RZhxNf7pu0I_2qASrVAe4aZ6ezY9YvbmnwZP7KJx8,1034
20
20
  keplemon/__init__.pyi,sha256=uE60ln_KJgcfvKburVmbcKT0h_wLPgjBWuyNLgI8ETI,1295
21
21
  keplemon/__main__.py,sha256=-3GVkDOA0lV0MIqU9gPb4zbVimg2lA8HMkvdPDw1O28,669
22
- keplemon/_keplemon.cpython-310-aarch64-linux-gnu.so,sha256=10-BTLQ4k9M9CXhOI-Sg4BpiVsOx5VfoUbZZvnRzFE4,2560697
22
+ keplemon/_keplemon.cpython-310-aarch64-linux-gnu.so,sha256=1uPo5hrLkyi7MOmv_FujQrC0Epv1jOYh-bFZP2e66GE,2626281
23
23
  keplemon/assets/EGM-2008.GEO,sha256=K2nG8HGLATIHZYMfw3GSClYOTCuZ7rq4RdCeUNgCw5A,148770
24
24
  keplemon/assets/EGM-96.GEO,sha256=VBkILuvEMwAPuWmUHy2PeyEfULOwJ4PEJLNf5hr84mU,148770
25
25
  keplemon/assets/GEM_5-22.GEO,sha256=stemYLn1ChXa-VdLGHYfa15AXZa_xxGZQ65p4c3gffI,6852
@@ -32,11 +32,11 @@ keplemon/assets/SGP4_Open_License.txt,sha256=0WofOXQb5YJqnYhXWXnBdCajiTJQAT60UAk
32
32
  keplemon/assets/WGS84-70.GEO,sha256=ARjEC_5s2SVd0Kh9udbTy1ztBwTeuBYPOhUVJgIqit8,148510
33
33
  keplemon/assets/time_constants.dat,sha256=qDpJ2UrQvIDfxsBc4P2AdLS-b2lyR7RCzjqmeG4Ypl8,1226736
34
34
  keplemon/bodies.py,sha256=XnaY6XTuj8CHM3XOwOSY3E8nSo0RWwCcAY0FGxAVWa8,208
35
- keplemon/bodies.pyi,sha256=xpciSiscdGgXJ_RTLCd08U6vJIdNX0dYAnlBzPW8240,10091
35
+ keplemon/bodies.pyi,sha256=zLfQQPBP-6ormpm6dAObZaTgnUPJnoBW4wChgoJVm-w,10959
36
36
  keplemon/catalogs.py,sha256=lw71NiXlVtb-z3pQR03afxtkLca4HJcnpZ6kDCcR-Lk,102
37
37
  keplemon/catalogs.pyi,sha256=NU_6Mc_JY8xTYAKXOqubtPnt91YA9ZHd1hMqMFf6onc,589
38
- keplemon/elements.py,sha256=P4tlpQpCUG5jkgAT_yIeL2V14AhXtekMYxRBOsPlOgc,609
39
- keplemon/elements.pyi,sha256=L5s_2AJz6HYYIncKmpkbYcejMVht09WWVrXRqo-ZV-Y,10240
38
+ keplemon/elements.py,sha256=aVWooAU5RB2RTPirjOrhIyaEohfTc1hLa0Fgc83fYy8,695
39
+ keplemon/elements.pyi,sha256=pgFwj8AzKSWr0QI9WQLWjIAbTv5QtGA9tJ9EQCR-k5o,10491
40
40
  keplemon/enums.py,sha256=Jh0tFHg_rZXnOyLUXmHjSm3MSZFbvQKTBcP0BqHXeMY,308
41
41
  keplemon/enums.pyi,sha256=s9uqkm3Zrx6HLV4dQBScRiUy0CT4QoQwFjaCLOEMW1c,2330
42
42
  keplemon/estimation.py,sha256=2K87pFhOfaFohbAtBXv2SA6m_oIN-56toJOftu350fY,228
@@ -66,14 +66,16 @@ keplemon/propagation.pyi,sha256=qJOCbtgYma4MOg3-aw9_r1IvBDnknwsJlMwlgaJiEZk,688
66
66
  keplemon/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
67
67
  keplemon/saal/__init__.py,sha256=aoTB13q7IvXuQ80jgGCnwXA29yjpOqLiTdrtyjyRqLE,123
68
68
  keplemon/saal/__init__.pyi,sha256=GPB5f0dcK7srvSDq2i5wvHMyi-OYZakMvlrstKdDwkk,143
69
- keplemon/saal/astro_func_interface.py,sha256=Z3UEbviqkGCU4OcpvgShvMoT5_WeenYZkec6A5hyDgs,984
70
- keplemon/saal/astro_func_interface.pyi,sha256=it0olsVygZtIY4ekh_Hbu1_q_o87IvE7Ezslzr0_hZo,4782
69
+ keplemon/saal/astro_func_interface.py,sha256=zf56Sgw8WnRZFt-jQtiYUSxbzgPZlGPW6gA496bRSeM,1198
70
+ keplemon/saal/astro_func_interface.pyi,sha256=6nr0xlb5r3PL4GFzRHH_-lFEMHvJQzh5x5WY3R3-DdM,6006
71
71
  keplemon/saal/obs_interface.py,sha256=EtsaPKixjMWfCUpMd79SvhCs3f9sRcBaal6-ickj3Vs,248
72
72
  keplemon/saal/obs_interface.pyi,sha256=eIXbFnZSF3cX3MyXaCYLUAp0wUAbJiQ4rosqpXdf2I0,228
73
+ keplemon/saal/sat_state_interface.py,sha256=XSV6HEoVGytePa71MdlTbXuAUCgDFLDR04r92yO67So,134
74
+ keplemon/saal/sat_state_interface.pyi,sha256=UbZvnEt3sEc5Fydwm9QKvIKXnMzOZL6pQVYQEv2L5UY,414
73
75
  keplemon/saal/sgp4_prop_interface.py,sha256=BBKlIvXdUypcZspC8GJ2rPqfFoDKy0RM7w5qsqvobrE,127
74
76
  keplemon/saal/sgp4_prop_interface.pyi,sha256=Fv41UrqSPuITtYy_CcbyMxhysqtN3oeY38Ov4t81hvw,235
75
77
  keplemon/saal/time_func_interface.py,sha256=cshqJ15p_gcenMdmVuXTIoLeij1gsgVi0tujRQ4O6kA,421
76
78
  keplemon/saal/time_func_interface.pyi,sha256=GCj_EOmOceJorYQLGQQj1fE2cHxPvNrYml1DLvsaMy4,1508
77
- keplemon/time.py,sha256=OuJYhv9WFi0SF3P_6YKLSoLWDnbhQ-W8CDlNUvQJsxQ,3236
78
- keplemon/time.pyi,sha256=tFbv5qdVMGexvSHr_a6RxkXe0aDKcNWOxW3GmKf3eRc,6628
79
- keplemon-1.3.1.dist-info/RECORD,,
79
+ keplemon/time.py,sha256=1VTb9RbMvgEkJkRFeuPrFXnvO_ZA9HuSGbuYzh76d_4,3410
80
+ keplemon/time.pyi,sha256=r37R56aJCPQJONTYn1stT6_s_XBI_BAPjSb17l_Gox8,6774
81
+ keplemon-1.5.0.dist-info/RECORD,,