keplemon 1.1.3__cp313-cp313-macosx_11_0_arm64.whl → 1.3.0__cp313-cp313-macosx_11_0_arm64.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.

Binary file
keplemon/bodies.pyi CHANGED
@@ -12,6 +12,7 @@ from keplemon.catalogs import TLECatalog
12
12
  from keplemon.time import Epoch, TimeSpan
13
13
  from keplemon.events import CloseApproach, CloseApproachReport, HorizonAccessReport, FieldOfViewReport
14
14
  from keplemon.propagation import ForceProperties
15
+ from keplemon.enums import ReferenceFrame
15
16
 
16
17
  class Earth:
17
18
  @staticmethod
@@ -226,7 +227,9 @@ class Sensor:
226
227
  angular_noise: Angular noise in **_degrees_**
227
228
  """
228
229
 
229
- name: str
230
+ id: str
231
+ """Unique identifier for the sensor."""
232
+ name: str | None
230
233
  angular_noise: float
231
234
  range_noise: float | None
232
235
  """Range noise in **_kilometers_**"""
@@ -236,7 +239,7 @@ class Sensor:
236
239
 
237
240
  angular_rate_noise: float | None
238
241
  """Angular rate noise in **_degrees per second_**"""
239
- def __init__(self, name: str, angular_noise: float) -> None: ...
242
+ def __init__(self, angular_noise: float) -> None: ...
240
243
 
241
244
  class Observatory:
242
245
  """
@@ -310,16 +313,31 @@ class Observatory:
310
313
  sensor_direction: TopocentricElements,
311
314
  angular_threshold: float,
312
315
  sats: Constellation,
316
+ reference_frame: ReferenceFrame,
313
317
  ) -> FieldOfViewReport:
314
318
  """
315
- Calculate field of view report for a sensor at the observatory.
319
+ Calculate satellites in the field of view from a given time and direction.
316
320
 
317
321
  Args:
318
322
  epoch: UTC epoch of the report
319
323
  sensor_direction: Topocentric direction the sensor is pointing
320
324
  angular_threshold: Angular threshold in **_degrees_**
321
325
  sats: Constellation of satellites to check for being in the field of view
322
- Returns:
323
- Field of view report for the sensor at the observatory containing satellites within the field of view
326
+ reference_frame: Reference frame of the output direction elements
327
+ """
328
+ ...
329
+
330
+ def get_topocentric_to_satellite(
331
+ self,
332
+ epoch: Epoch,
333
+ sat: Satellite,
334
+ reference_frame: ReferenceFrame,
335
+ ) -> TopocentricElements:
336
+ """
337
+ Get the topocentric elements of a satellite as seen from the observatory.
338
+ Args:
339
+ epoch: UTC epoch of the observation
340
+ sat: Satellite to observe
341
+ reference_frame: Reference frame of the output direction elements
324
342
  """
325
343
  ...
keplemon/estimation.pyi CHANGED
@@ -17,6 +17,9 @@ class Observation:
17
17
  observer_teme_pos: Position of the observer in TEME coordinates
18
18
  """
19
19
 
20
+ id: str
21
+ """Unique identifier for the observation"""
22
+
20
23
  sensor: Sensor
21
24
  """Sensor which produced the observation"""
22
25
 
keplemon/events.pyi CHANGED
@@ -1,6 +1,7 @@
1
1
  # flake8: noqa
2
2
  from keplemon.time import Epoch, TimeSpan
3
3
  from keplemon.elements import HorizonState, CartesianVector, TopocentricElements
4
+ from keplemon.enums import ReferenceFrame
4
5
 
5
6
  class FieldOfViewCandidate:
6
7
  satellite_id: str
@@ -25,6 +26,9 @@ class FieldOfViewReport:
25
26
  candidates: list[FieldOfViewCandidate]
26
27
  """List of candidate satellites within the field of view"""
27
28
 
29
+ reference_frame: ReferenceFrame
30
+ """Reference frame of the output direction elements"""
31
+
28
32
  class CloseApproach:
29
33
  epoch: Epoch
30
34
  """UTC epoch of the close approach"""
keplemon/time.py CHANGED
@@ -4,7 +4,7 @@ from keplemon._keplemon.time import ( # type: ignore
4
4
  Epoch,
5
5
  )
6
6
  import requests # type: ignore
7
- from datetime import datetime
7
+ from datetime import datetime, timezone
8
8
  from keplemon._keplemon.enums import TimeSystem # type: ignore
9
9
 
10
10
  __all__ = [
@@ -15,6 +15,22 @@ __all__ = [
15
15
  ]
16
16
 
17
17
 
18
+ def _from_datetime(dt: datetime) -> Epoch:
19
+ if dt.tzinfo is None:
20
+ dt = dt.replace(tzinfo=timezone.utc)
21
+ elif dt.tzinfo != timezone.utc:
22
+ dt = dt.astimezone(timezone.utc)
23
+ return Epoch.from_iso(dt.strftime("%Y-%m-%dT%H:%M:%S.%fZ"), TimeSystem.UTC)
24
+
25
+
26
+ def _now() -> Epoch:
27
+ return _from_datetime(datetime.now(timezone.utc))
28
+
29
+
30
+ Epoch.now = staticmethod(_now)
31
+ Epoch.from_datetime = staticmethod(_from_datetime)
32
+
33
+
18
34
  def request_time_constants_update(output_path: str) -> None:
19
35
  finals = requests.get("https://maia.usno.navy.mil/ser7/finals.all").text.splitlines()
20
36
 
keplemon/time.pyi CHANGED
@@ -3,6 +3,7 @@ from __future__ import annotations
3
3
  from pathlib import Path
4
4
  from keplemon.enums import TimeSystem
5
5
  from typing import overload, Any
6
+ from datetime import datetime
6
7
 
7
8
  def request_time_constants_update(output_path: str | Path) -> None:
8
9
  """
@@ -145,6 +146,22 @@ class Epoch:
145
146
  day_of_year: float
146
147
  """Decimal day of the year (1-365.999...)"""
147
148
 
149
+ @classmethod
150
+ def from_datetime(cls, dt: datetime) -> Epoch:
151
+ """
152
+ Args:
153
+ dt: Aware or naive datetime object (assumed to be UTC if naive)
154
+ """
155
+ ...
156
+
157
+ @classmethod
158
+ def now(cls) -> Epoch:
159
+ """
160
+ Returns:
161
+ Current epoch in UTC time system
162
+ """
163
+ ...
164
+
148
165
  @classmethod
149
166
  def from_days_since_1950(cls, days: float, time_system: TimeSystem) -> Epoch:
150
167
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: keplemon
3
- Version: 1.1.3
3
+ Version: 1.3.0
4
4
  Requires-Dist: requests
5
5
  Requires-Dist: click
6
6
  Requires-Dist: maturin>=1.0,<2.0 ; extra == 'dev'
@@ -1,10 +1,10 @@
1
- keplemon-1.1.3.dist-info/METADATA,sha256=nIV1B6nVcgMIMYk8CBPRexx82ZXOJ1IK9DkT9fsoo4Q,863
2
- keplemon-1.1.3.dist-info/WHEEL,sha256=7EyPuU1vQDftlqyV8jHPuI-hSsV6D32-W3PQHFWI9CA,104
3
- keplemon-1.1.3.dist-info/entry_points.txt,sha256=eYbCkvQvWfRDQ0LzaCELov1xeLAxQEHlfdgNq-LXyb0,49
1
+ keplemon-1.3.0.dist-info/METADATA,sha256=3sQ1D7MO2aczJbdHH_zcbQTqM7AgkqE_Tsw28zQPcO8,863
2
+ keplemon-1.3.0.dist-info/WHEEL,sha256=7EyPuU1vQDftlqyV8jHPuI-hSsV6D32-W3PQHFWI9CA,104
3
+ keplemon-1.3.0.dist-info/entry_points.txt,sha256=eYbCkvQvWfRDQ0LzaCELov1xeLAxQEHlfdgNq-LXyb0,49
4
4
  keplemon/__init__.py,sha256=M9q5lNYh_BE6l4xCGJ5IH5PQH9aNm4q_r67ljsNkKvM,832
5
5
  keplemon/__init__.pyi,sha256=uE60ln_KJgcfvKburVmbcKT0h_wLPgjBWuyNLgI8ETI,1295
6
6
  keplemon/__main__.py,sha256=-3GVkDOA0lV0MIqU9gPb4zbVimg2lA8HMkvdPDw1O28,669
7
- keplemon/_keplemon.cpython-313-darwin.so,sha256=BZocYFcRoUBIBuu6TCno1OQQ8MMBrsIADh1vsxhaHig,2041536
7
+ keplemon/_keplemon.cpython-313-darwin.so,sha256=ylJ1R39Kvi8_beIgInpp06iy111ybpUMfztwyRfoLiE,2040144
8
8
  keplemon/assets/EGM-2008.GEO,sha256=K2nG8HGLATIHZYMfw3GSClYOTCuZ7rq4RdCeUNgCw5A,148770
9
9
  keplemon/assets/EGM-96.GEO,sha256=VBkILuvEMwAPuWmUHy2PeyEfULOwJ4PEJLNf5hr84mU,148770
10
10
  keplemon/assets/GEM_5-22.GEO,sha256=stemYLn1ChXa-VdLGHYfa15AXZa_xxGZQ65p4c3gffI,6852
@@ -17,7 +17,7 @@ keplemon/assets/SGP4_Open_License.txt,sha256=0WofOXQb5YJqnYhXWXnBdCajiTJQAT60UAk
17
17
  keplemon/assets/WGS84-70.GEO,sha256=ARjEC_5s2SVd0Kh9udbTy1ztBwTeuBYPOhUVJgIqit8,148510
18
18
  keplemon/assets/time_constants.dat,sha256=qDpJ2UrQvIDfxsBc4P2AdLS-b2lyR7RCzjqmeG4Ypl8,1226736
19
19
  keplemon/bodies.py,sha256=XnaY6XTuj8CHM3XOwOSY3E8nSo0RWwCcAY0FGxAVWa8,208
20
- keplemon/bodies.pyi,sha256=AU8veUqXkgA3CnYO3XycMUlOwnep-YoUvJZA2cXieYs,9532
20
+ keplemon/bodies.pyi,sha256=xpciSiscdGgXJ_RTLCd08U6vJIdNX0dYAnlBzPW8240,10091
21
21
  keplemon/catalogs.py,sha256=lw71NiXlVtb-z3pQR03afxtkLca4HJcnpZ6kDCcR-Lk,102
22
22
  keplemon/catalogs.pyi,sha256=NU_6Mc_JY8xTYAKXOqubtPnt91YA9ZHd1hMqMFf6onc,589
23
23
  keplemon/elements.py,sha256=P4tlpQpCUG5jkgAT_yIeL2V14AhXtekMYxRBOsPlOgc,609
@@ -25,9 +25,9 @@ keplemon/elements.pyi,sha256=L5s_2AJz6HYYIncKmpkbYcejMVht09WWVrXRqo-ZV-Y,10240
25
25
  keplemon/enums.py,sha256=Jh0tFHg_rZXnOyLUXmHjSm3MSZFbvQKTBcP0BqHXeMY,308
26
26
  keplemon/enums.pyi,sha256=s9uqkm3Zrx6HLV4dQBScRiUy0CT4QoQwFjaCLOEMW1c,2330
27
27
  keplemon/estimation.py,sha256=2K87pFhOfaFohbAtBXv2SA6m_oIN-56toJOftu350fY,228
28
- keplemon/estimation.pyi,sha256=zb_llx8pCx9Iv95mXXpGnXPZeJsg9Oh5GRWDLyXrMFI,5521
28
+ keplemon/estimation.pyi,sha256=3TtNCCwuwIX6J4UKyEL4Mwzmz_x9Sgj2TxSsSaOBz3U,5582
29
29
  keplemon/events.py,sha256=PGp-xE-eyjYSMWpugplA7bPlrYjkR1NKSHRurFMnBcE,359
30
- keplemon/events.pyi,sha256=8ydd7aWJ6upPRs6oHQL1-Mpp8iv_dOHxRnNyto1FbwA,2905
30
+ keplemon/events.pyi,sha256=4wKWpQIVkCrE0jbRUk6KpmtXtzkksnEKJUAYY8Duw58,3043
31
31
  keplemon/exceptions.py,sha256=gTKSkN4yJ2VwR3_anpWqnIO9kQcJCO41_818NjgItiM,102
32
32
  keplemon/libastrofunc.dylib,sha256=guF0v4MRjoz8Ine-1nLxXYTktvlwHfQHUSa-GKjJZw0,241840
33
33
  keplemon/libdllmain.dylib,sha256=eyJQawgeOfDj4lAf2-YSJcvbdJ6abehX5nTChIOOLbs,112144
@@ -59,6 +59,6 @@ keplemon/saal/sgp4_prop_interface.py,sha256=BBKlIvXdUypcZspC8GJ2rPqfFoDKy0RM7w5q
59
59
  keplemon/saal/sgp4_prop_interface.pyi,sha256=Fv41UrqSPuITtYy_CcbyMxhysqtN3oeY38Ov4t81hvw,235
60
60
  keplemon/saal/time_func_interface.py,sha256=cshqJ15p_gcenMdmVuXTIoLeij1gsgVi0tujRQ4O6kA,421
61
61
  keplemon/saal/time_func_interface.pyi,sha256=GCj_EOmOceJorYQLGQQj1fE2cHxPvNrYml1DLvsaMy4,1508
62
- keplemon/time.py,sha256=vvHcwWQ1JXPaQSvdBfXYZrk2_-ukDw0RnXDeN5wy3nU,2792
63
- keplemon/time.pyi,sha256=S2Ul8fpuWnor9wKNFBxLwAiwrGrVN_LJH_xy6WSocv4,6260
64
- keplemon-1.1.3.dist-info/RECORD,,
62
+ keplemon/time.py,sha256=OuJYhv9WFi0SF3P_6YKLSoLWDnbhQ-W8CDlNUvQJsxQ,3236
63
+ keplemon/time.pyi,sha256=tFbv5qdVMGexvSHr_a6RxkXe0aDKcNWOxW3GmKf3eRc,6628
64
+ keplemon-1.3.0.dist-info/RECORD,,