keplemon 1.2.0__cp39-cp39-macosx_10_12_x86_64.whl → 1.3.1__cp39-cp39-macosx_10_12_x86_64.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
@@ -227,7 +227,9 @@ class Sensor:
227
227
  angular_noise: Angular noise in **_degrees_**
228
228
  """
229
229
 
230
- name: str
230
+ id: str
231
+ """Unique identifier for the sensor."""
232
+ name: str | None
231
233
  angular_noise: float
232
234
  range_noise: float | None
233
235
  """Range noise in **_kilometers_**"""
@@ -237,7 +239,7 @@ class Sensor:
237
239
 
238
240
  angular_rate_noise: float | None
239
241
  """Angular rate noise in **_degrees per second_**"""
240
- def __init__(self, name: str, angular_noise: float) -> None: ...
242
+ def __init__(self, angular_noise: float) -> None: ...
241
243
 
242
244
  class Observatory:
243
245
  """
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/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.2.0
3
+ Version: 1.3.1
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.2.0.dist-info/METADATA,sha256=U0X9nUGwhoMBoT7kXFTgQ0dlhEvBysgJyZOCUwcE2b8,863
2
- keplemon-1.2.0.dist-info/WHEEL,sha256=LPXtrqUAzbjssUPtGGeYLdx2VrlK-hwkpt4GIVftvF4,104
3
- keplemon-1.2.0.dist-info/entry_points.txt,sha256=eYbCkvQvWfRDQ0LzaCELov1xeLAxQEHlfdgNq-LXyb0,49
1
+ keplemon-1.3.1.dist-info/METADATA,sha256=fl7n1Iefcs9qhxB00Y617U8cbU94YAwmuswu_482oJc,863
2
+ keplemon-1.3.1.dist-info/WHEEL,sha256=LPXtrqUAzbjssUPtGGeYLdx2VrlK-hwkpt4GIVftvF4,104
3
+ keplemon-1.3.1.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-39-darwin.so,sha256=LAcfTJ-vToyDdnrJtlArGt5DLjum4W0Pp_0XQPkb3TA,2235180
7
+ keplemon/_keplemon.cpython-39-darwin.so,sha256=RbkGSlMzj1qxg0CL4IXnanrRuGsFMQYWcSHs2SEII7U,2241764
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=kr0tR6fei2Uq4aGBX30L_bXVS3uogB0ijnG0asAxwW0,10039
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,7 +25,7 @@ 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
30
  keplemon/events.pyi,sha256=4wKWpQIVkCrE0jbRUk6KpmtXtzkksnEKJUAYY8Duw58,3043
31
31
  keplemon/exceptions.py,sha256=gTKSkN4yJ2VwR3_anpWqnIO9kQcJCO41_818NjgItiM,102
@@ -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.2.0.dist-info/RECORD,,
62
+ keplemon/time.py,sha256=OuJYhv9WFi0SF3P_6YKLSoLWDnbhQ-W8CDlNUvQJsxQ,3236
63
+ keplemon/time.pyi,sha256=tFbv5qdVMGexvSHr_a6RxkXe0aDKcNWOxW3GmKf3eRc,6628
64
+ keplemon-1.3.1.dist-info/RECORD,,