keplemon 1.3.1__cp311-cp311-win_amd64.whl → 1.5.0__cp311-cp311-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.

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",
Binary file
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=bNaa2-XeaoMXnkzV391Sm2NgCjpJ3A2VmfN6ZUnNTZA,96
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=bNaa2-XeaoMXnkzV391Sm2NgCjpJ3A2VmfN6ZUnNTZA,96
3
+ keplemon-1.5.0.dist-info/entry_points.txt,sha256=eYbCkvQvWfRDQ0LzaCELov1xeLAxQEHlfdgNq-LXyb0,49
4
4
  keplemon/AstroFunc.dll,sha256=RwDLeYGuSd3MxQ3O_Ljb0maS5KoDL8HZLpAvcQhDmnQ,357376
5
5
  keplemon/AstroFunc.lib,sha256=q0Ob5NGUgbywJg6XqH48QLNmFv8T5p8NVLSx2kKkL4A,56480
6
6
  keplemon/DllMain.dll,sha256=vYgOfGAUHn2z1MrVu9wV-k_LRdtuF8RuWrbuu2xk7jk,121344
@@ -27,10 +27,10 @@ keplemon/Tle.dll,sha256=Yt6hY3-PoJFFgB2idJQFC_Ia49grYhpSe_gPAmVswMs,195584
27
27
  keplemon/Tle.lib,sha256=6NCJPR7JQ63mxCISyvYteq4-oHcqs3Ib8bwhTjJfk-I,23622
28
28
  keplemon/Vcm.dll,sha256=EWx2eZAdBa1F2yGSUYzgAItnP6-nJT35sfJsrBW1Vfs,274432
29
29
  keplemon/Vcm.lib,sha256=q2FPbH_DJXjIzNIzli2f1uV2faHHBjLbffZrL3Nagpw,19404
30
- keplemon/__init__.py,sha256=JymfGXbJ9UJDdwRW0CXS7j5j_LPk1_P_ViKbjoTdCFU,861
30
+ keplemon/__init__.py,sha256=2OlT1xsx5c_QHS1Mxg3wPmxMejkrx9d_gJ2NqPL6frk,1069
31
31
  keplemon/__init__.pyi,sha256=PgtL8CNupZCJibx07RLmFf56gMkCFx7voUIxBpeADO8,1349
32
32
  keplemon/__main__.py,sha256=Bbbzny3eE3NOikVCEVFAGJiSRGooAkLzPwoSz-rpaxc,689
33
- keplemon/_keplemon.cp311-win_amd64.pyd,sha256=NvqT2V5bWUbe8vdjr0-G1NHpnyHElXxeDk3gXFvZAq8,1672192
33
+ keplemon/_keplemon.cp311-win_amd64.pyd,sha256=FUhj7JC9eBeRz-9nZbcuY5Be8i_G6d_cuzAixxCZI24,1705472
34
34
  keplemon/assets/EGM-2008.GEO,sha256=K2nG8HGLATIHZYMfw3GSClYOTCuZ7rq4RdCeUNgCw5A,148770
35
35
  keplemon/assets/EGM-96.GEO,sha256=VBkILuvEMwAPuWmUHy2PeyEfULOwJ4PEJLNf5hr84mU,148770
36
36
  keplemon/assets/GEM_5-22.GEO,sha256=stemYLn1ChXa-VdLGHYfa15AXZa_xxGZQ65p4c3gffI,6852
@@ -43,11 +43,11 @@ keplemon/assets/SGP4_Open_License.txt,sha256=ThQ87DpbbXt-9K0-0U13tcZqsndte_UkaG3
43
43
  keplemon/assets/WGS84-70.GEO,sha256=ARjEC_5s2SVd0Kh9udbTy1ztBwTeuBYPOhUVJgIqit8,148510
44
44
  keplemon/assets/time_constants.dat,sha256=3nsYjFgq0QnTUHPxuQPdtMG-AqxShVbvmG2zPcZfdcA,1246208
45
45
  keplemon/bodies.py,sha256=MjdAGL25eF5pA3KHo5ipjz0DDql5EEEbBqR735M254g,217
46
- keplemon/bodies.pyi,sha256=wTgjk63L5_GNBIotvvZCCjrJ8ZIHHJG-6kOH5dEPjjk,10434
46
+ keplemon/bodies.pyi,sha256=WJnWEltpkYNfQXjlgZJYPUViiL4egcAnl54nvY3xCgI,11324
47
47
  keplemon/catalogs.py,sha256=AKONH7zWBOnUZI0ty0lYiYZtrdILfKivoUgk1nU3PZ8,107
48
48
  keplemon/catalogs.pyi,sha256=UxwRVMfuySXNYOQ7KuCXtwHcu3zL3Fgo1sBP77qUKaU,606
49
- keplemon/elements.py,sha256=Z0zzwjbOnqi4lXO4Iw5Nio2eZcdrlObzAJ2oLRDzyJY,640
50
- keplemon/elements.pyi,sha256=EQEqEduwsMqhKjLPbbVS3eyGxNRQitLfzM8KhuxPDLs,10647
49
+ keplemon/elements.py,sha256=-xnzE4wM6VESsenEdzJrVLmxwG68nWwfqOpfXY1F0xI,730
50
+ keplemon/elements.pyi,sha256=VzuP2qT8miPWohOHXGGzPcp-kWaUh48Far6G7qtxls0,10910
51
51
  keplemon/enums.py,sha256=5MejXeSwXPtfpIYeNuFQH3LSIRf4aTFZTK2Q1AYyaEg,325
52
52
  keplemon/enums.pyi,sha256=OSS71WesYTgzWGUSjpxaYtzj6XmoyLBXq_Zd13IBwyQ,2418
53
53
  keplemon/estimation.py,sha256=Of0rHiapW4s1wRipBCZrp4oOiIzs794w1nhqM7AVrGs,236
@@ -63,14 +63,16 @@ keplemon/propagation.pyi,sha256=BjBIlp_8fdEb5gii5OsvLtXfIzV_Mo2pLlX75bZ1SDo,715
63
63
  keplemon/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
64
64
  keplemon/saal/__init__.py,sha256=JS-tjVFqN1B3ZjIG2g7v1GrmUPi9eIv0_Le1reYuQ2o,126
65
65
  keplemon/saal/__init__.pyi,sha256=7wosTC1KhEJis-zp2LlZmW7hlr8BzFO4gx0TJ9c3J80,148
66
- keplemon/saal/astro_func_interface.py,sha256=i0b1a7y2Y1IJWcBbm6WdFhGUBMrSxwvWpgra-QepXF0,1031
67
- keplemon/saal/astro_func_interface.pyi,sha256=soshmSZ7k1v_1WgVfE93pM-h7RNF17e5-xmdBPGu7vo,4955
66
+ keplemon/saal/astro_func_interface.py,sha256=GlS_JBSU12yjw4jbiHLQtL9QMM_VI91sm1VYhTDChVw,1253
67
+ keplemon/saal/astro_func_interface.pyi,sha256=eY-Z86rquRMHhSP_q7pAGAwGQSi67JONBY_x0zmd_Cw,6221
68
68
  keplemon/saal/obs_interface.py,sha256=ax8T4Y61pWh3VnQ4K2bCDNdrK-H6WKWr14pEDAY8WxE,257
69
69
  keplemon/saal/obs_interface.pyi,sha256=Y9PE1t2Kdz1Sne1t_M-ctOp9G4hWGKgMMkuES6v1U6Q,235
70
+ keplemon/saal/sat_state_interface.py,sha256=iiL_qIAaqXWlBu5FIdxhPWK4K9E7OmMzYIxkZPsShSo,139
71
+ keplemon/saal/sat_state_interface.pyi,sha256=w3KGIYiRuhpY1bx7Hp8F9gKbfDhi0ofBRSYcMw1glR0,423
70
72
  keplemon/saal/sgp4_prop_interface.py,sha256=biuhXWIsauR4BO8chsWILfb8-E8OdRNWT5cSL3OYsVQ,134
71
73
  keplemon/saal/sgp4_prop_interface.pyi,sha256=9NpOUhf03VQYVEyq1Kutqp6J6bZ3x0NCFSBlVY-Nb9s,244
72
74
  keplemon/saal/time_func_interface.py,sha256=C18Q_PIMUFBcB0pHN6wlVj35Vrt83VQNKOEmHDHvZSA,438
73
75
  keplemon/saal/time_func_interface.pyi,sha256=3QKtsuxMoTgG--bDvbVNcJyD8vfcAUlw2n69g1m0kNM,1578
74
- keplemon/time.py,sha256=21gJUjG6ijI34j6Q5NwDisFZN3jXLcBIxoXeQ48D9Ak,3348
75
- keplemon/time.pyi,sha256=TD60TgcCnAbgo0hnQlD5iMhOmQR57kKs05fGv32oVNY,6914
76
- keplemon-1.3.1.dist-info/RECORD,,
76
+ keplemon/time.py,sha256=rjS9bRLlfdcELE25e72sjqTw5I2Igb50rNqeStpFC-k,3528
77
+ keplemon/time.pyi,sha256=IDSNfQa0zy4YspWSjdUAMzrGUrHzZUDWLBKz9WZ4ZA0,7067
78
+ keplemon-1.5.0.dist-info/RECORD,,