kiam-astro 2.0.4__tar.gz → 3.0.0__tar.gz

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.
Files changed (49) hide show
  1. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/PKG-INFO +1 -1
  2. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/README.md +2 -2
  3. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/html/Trajectory.html +22 -4
  4. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/html/kiam.html +184 -7
  5. kiam_astro-3.0.0/kiam_astro/FKIAMToolbox.cp39-win_amd64.pyd +0 -0
  6. kiam_astro-3.0.0/kiam_astro/FKIAMToolbox.cpython-39-darwin.so +0 -0
  7. kiam_astro-3.0.0/kiam_astro/FKIAMToolbox.cpython-39-x86_64-linux-gnu.so +0 -0
  8. kiam_astro-3.0.0/kiam_astro/__pycache__/engine.cpython-39.pyc +0 -0
  9. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/kiam_astro/__pycache__/kiam.cpython-39.pyc +0 -0
  10. kiam_astro-3.0.0/kiam_astro/__pycache__/trajectory.cpython-39.pyc +0 -0
  11. kiam_astro-3.0.0/kiam_astro/engine.py +296 -0
  12. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/kiam_astro/kiam.py +360 -16
  13. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/kiam_astro/trajectory.py +596 -252
  14. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/kiam_astro.egg-info/PKG-INFO +1 -1
  15. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/kiam_astro.egg-info/SOURCES.txt +2 -0
  16. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/setup.py +1 -1
  17. kiam_astro-2.0.4/kiam_astro/FKIAMToolbox.cp39-win_amd64.pyd +0 -0
  18. kiam_astro-2.0.4/kiam_astro/FKIAMToolbox.cpython-39-darwin.so +0 -0
  19. kiam_astro-2.0.4/kiam_astro/FKIAMToolbox.cpython-39-x86_64-linux-gnu.so +0 -0
  20. kiam_astro-2.0.4/kiam_astro/__pycache__/trajectory.cpython-39.pyc +0 -0
  21. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/.github/workflows/static.yml +0 -0
  22. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/.idea/.gitignore +0 -0
  23. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/.idea/.name +0 -0
  24. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/.idea/KIAMToolbox.iml +0 -0
  25. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/.idea/encodings.xml +0 -0
  26. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/.idea/inspectionProfiles/Project_Default.xml +0 -0
  27. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/.idea/inspectionProfiles/profiles_settings.xml +0 -0
  28. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/.idea/misc.xml +0 -0
  29. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/.idea/modules.xml +0 -0
  30. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/.idea/vcs.xml +0 -0
  31. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/LICENSE +0 -0
  32. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/MANIFEST.in +0 -0
  33. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/index.html +0 -0
  34. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/kiam_astro/JPLEPH +0 -0
  35. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/kiam_astro/__init__.py +0 -0
  36. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/kiam_astro/__pycache__/__init__.cpython-39.pyc +0 -0
  37. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/kiam_astro/images/Earth.jpg +0 -0
  38. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/kiam_astro/images/Earth2.jpg +0 -0
  39. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/kiam_astro/images/Moon - Plate Caree Projection.jpg +0 -0
  40. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/kiam_astro/images/Moon1.jpg +0 -0
  41. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/kiam_astro/images/Moon2.jpg +0 -0
  42. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/kiam_astro/libifcoremd.dll +0 -0
  43. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/kiam_astro/libmmd.dll +0 -0
  44. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/kiam_astro/svml_dispmd.dll +0 -0
  45. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/kiam_astro.egg-info/dependency_links.txt +0 -0
  46. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/kiam_astro.egg-info/requires.txt +0 -0
  47. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/kiam_astro.egg-info/top_level.txt +0 -0
  48. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/requirements.txt +0 -0
  49. {kiam_astro-2.0.4 → kiam_astro-3.0.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kiam_astro
3
- Version: 2.0.4
3
+ Version: 3.0.0
4
4
  Summary: KIAM Astrodynamics Toolbox
5
5
  Home-page: https://github.com/shmaxg/KIAMToolbox
6
6
  Author: Maksim Shirobokov
@@ -12,9 +12,9 @@ One can also download the toolbox using the Releases section on the right.
12
12
 
13
13
  ## Versions
14
14
 
15
- Current version: 1.5.
15
+ Current version: 2.0
16
16
 
17
- The next version 2.0 will be released on Feb 27, 2023.
17
+ The next version 3.0 will be released on Mar 20, 2023.
18
18
 
19
19
  ## The toolbox files
20
20
 
@@ -155,7 +155,11 @@ their characteristics.</p>
155
155
  <p><code>model</code> : dict</p>
156
156
  <p>The model used for trajectory propagation.</p>
157
157
  <p><code>parts</code> : list[int]</p>
158
- <p>The numbers of nodes between which the trajectory was sequentially propagated.</p>
158
+ <p>The nodes between which the trajectory was sequentially propagated:</p>
159
+ <p><code>tr.states[:, tr.parts[0]:tr.parts[1]+1]</code> &ndash; first part</p>
160
+ <p><code>tr.states[:, tr.parts[1]:tr.parts[2]+1]</code> &ndash; second part</p>
161
+ <p><code>tr.states[:, tr.parts[2]:tr.parts[3]+1]</code> &ndash; third part</p>
162
+ <p>etc.</p>
159
163
  <p><code>states</code> : numpy.array, shape(m,n)</p>
160
164
  <p>Phase vectors along the trajectory.</p>
161
165
  <p><code>system</code> : str</p>
@@ -190,6 +194,13 @@ their characteristics.</p>
190
194
  <p>'scrs', 'mer', 'sors', 'ssrm_em' (the Moon-centered systems)</p>
191
195
  <p>'gcrs', 'itrs', 'gsrf_em', 'gsrf_se' (the Earth-centered systems)</p>
192
196
  <p>'hcrs', 'hsrf_se' (the Sun-centered systems)</p>
197
+ <p>'mercrs', 'mersrf_smer' (the Mercury-centered systems)</p>
198
+ <p>'vcrs', 'vsrf_sv' (the Venus-centered systems)</p>
199
+ <p>'mcrs', 'msrf_sm' (the Mars-centered systems)</p>
200
+ <p>'jcrs', 'jsrf_sj' (the Jupiter-centered systems)</p>
201
+ <p>'satcrs', 'satsrf_ssat' (the Saturn-centered systems)</p>
202
+ <p>'ucrs', 'usrf_su' (the Uranus-centered systems)</p>
203
+ <p>'ncrs', 'nsrf_sn' (the Neptune-centered systems)</p>
193
204
  <p>'ine_fb' (non-rotating frame in CR3BP, BR4BP at first primary)</p>
194
205
  <p>'ine_cm' (non-rotating frame in CR3BP, BR4BP at barycenter)</p>
195
206
  <p>'ine_sb' (non-rotating frame in CR3BP, BR4BP, Hill at secondary primary)</p>
@@ -256,10 +267,16 @@ the specified variables.</p></div>
256
267
  <div class="desc"><p>Clears states, times, julian dates, parts, and resets the final date.</p></div>
257
268
  </dd>
258
269
  <dt id="trajectory.Trajectory.copy"><code class="name flex">
259
- <span>def <span class="ident">copy</span></span>(<span>self)</span>
270
+ <span>def <span class="ident">copy</span></span>(<span>self, forced: bool = False)</span>
260
271
  </code></dt>
261
272
  <dd>
262
- <div class="desc"><p>Returns independent copy of the trajectory object.</p></div>
273
+ <div class="desc"><p>Returns independent copy of the trajectory object.</p>
274
+ <h2 id="parameters">Parameters:</h2>
275
+ <p>forced : bool</p>
276
+ <p>If False (default), raise exception if model['control'] is not None. Do not make copy.</p>
277
+ <p>If True (default), erase funtion handle in model['control'] and make copy.</p>
278
+ <h2 id="returns">Returns:</h2>
279
+ <p>If successfull, the deep copy of the Trajectory object is returned.</p></div>
263
280
  </dd>
264
281
  <dt id="trajectory.Trajectory.propagate"><code class="name flex">
265
282
  <span>def <span class="ident">propagate</span></span>(<span>self, tof: float, npoints: int = 2) ‑> None</span>
@@ -372,9 +389,10 @@ It also initializes tr.model['data'] property.</p>
372
389
  <p>Options:</p>
373
390
  <ol>
374
391
  <li>
375
- <p>'xy', '3d' if self.vars in ['rv', 'rvm', 'rv_stm']</p>
392
+ <p>'xy', '3d', 'r' if self.vars in ['rv', 'rvm', 'rv_stm']</p>
376
393
  <p>'xy' plots the trajectory in x-y axes.</p>
377
394
  <p>'3d' plots the trajectory in 3d.</p>
395
+ <p>'r' plots the distance to the origin of the coordinate system.</p>
378
396
  </li>
379
397
  <li>
380
398
  <p>'a', 'e', 'inc', 'Om', 'w', 'th' if self.vars in ['oe', 'oem', 'oe_stm']</p>
@@ -87,6 +87,51 @@ planet['Earth']['GM'] # Gravitational parameter of the Earth
87
87
  planet['Mars']['SemimajorAxis'] # Semi-major axis of the Mars's orbit.
88
88
  </code></pre></div>
89
89
  </dd>
90
+ <dt id="kiam.b1crs2b2crs"><code class="name flex">
91
+ <span>def <span class="ident">b1crs2b2crs</span></span>(<span>body1: str, body2: str, xb1crs: numpy.ndarray, jd: Union[float, numpy.ndarray], dist_unit: float, vel_unit: float) ‑> numpy.ndarray</span>
92
+ </code></dt>
93
+ <dd>
94
+ <div class="desc"><p>Translate phase vectors from one CRS c/s to other CRS c/s.</p>
95
+ <h2 id="parameters">Parameters:</h2>
96
+ <p><code>body1</code> : str</p>
97
+ <p>The name of the first body.</p>
98
+ <p><code>body2</code> : str</p>
99
+ <p>The name of the second (target) body.</p>
100
+ <p><code>xb1crs</code> : numpy.ndarray, shape (6,), (6,n)</p>
101
+ <p>6D vector or array of 6D column phase vectors in the CRS coordinate system of body1.</p>
102
+ <p>Vector structure: [x, y, z, vx, vy, vz]</p>
103
+ <p><code>jd</code> : float, numpy.ndarray, shape (n,)</p>
104
+ <p>Julian dates corresponding to columns in xb1crs</p>
105
+ <p><code>dist_unit</code> : float</p>
106
+ <p>The unit of distance in km</p>
107
+ <p><code>vel_unit</code> : float</p>
108
+ <p>The unit of velocity in km/s</p>
109
+ <h2 id="returns">Returns:</h2>
110
+ <p><code>xb2crs</code> : numpy.ndarray, shape (6,), (6,n)</p>
111
+ <p>6D vector or array of 6D column phase vectors in the CRS coordinate system of body2.</p>
112
+ <p>Vector structure: [x, y, z, vx, vy, vz].</p>
113
+ <h2 id="examples">Examples:</h2>
114
+ <pre><code>Example 1 (6D -&gt; 6D):
115
+
116
+ ku = kiam.units('sun', 'mars')
117
+
118
+ xb1crs = numpy.array([1, 0, 0, 0, 1, 0]) # wrt the Sun
119
+
120
+ jd = kiam.juliandate(2022, 12, 6, 0, 0, 0)
121
+
122
+ xb2crs = kiam.b1crs2b2crs('sun', 'mars', xb1crs, jd, ku['DistUnit'], ku['VelUnit']) # wrt Mars
123
+
124
+ Example 2 (6x1 -&gt; 6x1)
125
+
126
+ ku = kiam.units('sun', 'mars')
127
+
128
+ xb1crs = numpy.array([[1, 0, 0, 0, 1, 0]]).T # wrt the Sun
129
+
130
+ jd = kiam.juliandate(2022, 12, 6, 0, 0, 0)
131
+
132
+ xb2crs = kiam.b1crs2b2crs('sun', 'mars', xb1crs, jd, ku['DistUnit'], ku['VelUnit']) # wrt Mars
133
+ </code></pre></div>
134
+ </dd>
90
135
  <dt id="kiam.body_surface"><code class="name flex">
91
136
  <span>def <span class="ident">body_surface</span></span>(<span>body: str, radius: float = 1.0, quality: str = 'medium')</span>
92
137
  </code></dt>
@@ -1372,6 +1417,114 @@ dsdt = kiam.nbp_ee_moon(t, s, stm_req, sources, data, units_data)
1372
1417
  [0. 0. 0. 0. 0. 1.]
1373
1418
  </code></pre></div>
1374
1419
  </dd>
1420
+ <dt id="kiam.nbp_rv_body"><code class="name flex">
1421
+ <span>def <span class="ident">nbp_rv_body</span></span>(<span>body: str, t: float, s: numpy.ndarray, stm_req: bool, sources: dict, data: dict, units_data: dict) ‑> numpy.ndarray</span>
1422
+ </code></dt>
1423
+ <dd>
1424
+ <div class="desc"><p>Right-hand side of the n-body problem equations of motion wrt the specified body (except Earth and Moon) in terms of
1425
+ the position and velocity variables.</p>
1426
+ <h2 id="parameters">Parameters:</h2>
1427
+ <p><code>body</code> : str</p>
1428
+ <p>The body wrt that the right-hand side of the equations of motion is calculated.</p>
1429
+ <p>Options: <code>Sun</code>, <code>Mercury</code>, <code>Venus</code>, <code>Mars</code>, <code>Jupiter</code>, <code>Saturn</code>, <code>Uranus</code>, <code>Neptune</code></p>
1430
+ <p><code>t</code> : float</p>
1431
+ <p>Time</p>
1432
+ <p><code>s</code> : numpy.ndarray, shape (6,), (42,)</p>
1433
+ <p>Phase state vector containing position and velocity and (if stm_req = True)
1434
+ vectorized state-transition matrix.</p>
1435
+ <p>Vector structure:</p>
1436
+ <p>[x, y, z, vx, vy, vz] if stm_req = False</p>
1437
+ <p>[x, y, z, vx, vy, vz, m11, m21, m31, &hellip;] if stm_req = True</p>
1438
+ <p><code>stm_req</code> : bool</p>
1439
+ <p>Flag to calculate the derivative of the state-transition matrix</p>
1440
+ <p><code>sources</code> : dict</p>
1441
+ <p>Dictionary that contains the perturbations that should be accounted.</p>
1442
+ <p>The dictionary keys:</p>
1443
+ <p>'srp'
1444
+ (Solar radiation pressure)</p>
1445
+ <p>'sun'
1446
+ (Gravitational acceleration of the Sun)</p>
1447
+ <p>'mercury'
1448
+ (Gravitational acceleration of Mercury)</p>
1449
+ <p>'venus'
1450
+ (Gravitational acceleration of Venus)</p>
1451
+ <p>'earth'
1452
+ (Gravitational acceleration of the Earth)</p>
1453
+ <p>'mars'
1454
+ (Gravitational acceleration of Mars)</p>
1455
+ <p>'jupiter'
1456
+ (Gravitational acceleration of Jupiter)</p>
1457
+ <p>'saturn'
1458
+ (Gravitational acceleration of Saturn)</p>
1459
+ <p>'uranus'
1460
+ (Gravitational acceleration of Uranus)</p>
1461
+ <p>'neptune'
1462
+ (Gravitational acceleration of Neptune)</p>
1463
+ <p>If sources[key] = True, the corresponding perturbation will be accounted.</p>
1464
+ <p>If sources[key] = False, the corresponding perturbation will not be accounted.</p>
1465
+ <p>The sources dictionary with all False values can be created by
1466
+ the kiam.prepare_sources_dict() function.</p>
1467
+ <p><code>data</code> : dict</p>
1468
+ <p>A dictionary that contains auxilary data.</p>
1469
+ <p>The dictionary keys:</p>
1470
+ <p>'jd_zero' (Julian date that corresponds to t = 0)</p>
1471
+ <p>'order'
1472
+ (Order of the lunar complex gravitational field)</p>
1473
+ <p>'area'
1474
+ (Area of the spacecraft to account in atmospheric drag and SRP, m^2)</p>
1475
+ <p>'mass'
1476
+ (Mass of the spacecraft to account in atmospheric drag and SRP, kg)</p>
1477
+ <p>The data should be submitted even if the corresponding perturbations
1478
+ are not accounted.</p>
1479
+ <p><code>units_data</code> : dict</p>
1480
+ <p>A dictionary that contains the units.</p>
1481
+ <p>The dictionary keys:</p>
1482
+ <p>'DistUnit' (The unit of distance in km)</p>
1483
+ <p>'VelUnit'
1484
+ (The unit of velocity in km/s)</p>
1485
+ <p>'TimeUnit' (The unit of time in days)</p>
1486
+ <p>'AccUnit'
1487
+ (The unit of acceleration in m/s^2)</p>
1488
+ <p>'RSun'
1489
+ (The radius of the Sun in the units of distance)</p>
1490
+ <p>'REarth'
1491
+ (The radius of the Earth in the units of distance)</p>
1492
+ <p>'RMoon'
1493
+ (The radius of the Moon in the units of distance)</p>
1494
+ <p>The units dictionary can be created by the kiam.prepare_units_dict() function.</p>
1495
+ <p>The gravitational parameter in the specified units should be 1.0.</p>
1496
+ <h2 id="returns">Returns:</h2>
1497
+ <p><code>f</code> : numpy.ndarray, shape (6,), (42,)</p>
1498
+ <p>Gravitational acceleration according to the specified n-body problem equations
1499
+ of motion extended (if stm_req = True) by the derivative of the
1500
+ state-transition matrix.</p>
1501
+ <p>Vector structure:</p>
1502
+ <p>[fx, fy, fz, fvx, fvy, fvz] if stm_req = False</p>
1503
+ <p>[fx, fy, fz, fvx, fvy, fvz, fm11, fm21, fm31, &hellip; ] if stm_req = True</p>
1504
+ <h2 id="examples">Examples:</h2>
1505
+ <pre><code>t = 0.0
1506
+
1507
+ s = numpy.array([1, 0, 0, 0, 1, 0])
1508
+
1509
+ stm_req = False
1510
+
1511
+ sources = kiam.prepare_sources_dict()
1512
+
1513
+ data = kiam.prepare_data_dict()
1514
+
1515
+ data['jd_zero'] = kiam.juliandate(2022, 11, 1, 0, 0, 0)
1516
+
1517
+ data['area'] = 1.0
1518
+
1519
+ data['mass'] = 100.0
1520
+
1521
+ units_data = kiam.prepare_units_dict('moon')
1522
+
1523
+ dsdt = kiam.nbp_rv_moon(t, s, stm_req, sources, data, units_data)
1524
+
1525
+ [ 0. 1. 0. -1. -0. -0.]
1526
+ </code></pre></div>
1527
+ </dd>
1375
1528
  <dt id="kiam.nbp_rv_earth"><code class="name flex">
1376
1529
  <span>def <span class="ident">nbp_rv_earth</span></span>(<span>t: float, s: numpy.ndarray, stm_req: bool, sources: dict, data: dict, units_data: dict) ‑> numpy.ndarray</span>
1377
1530
  </code></dt>
@@ -2022,7 +2175,7 @@ t, y = kiam.propagate_hill(tspan, x0)
2022
2175
  </code></pre></div>
2023
2176
  </dd>
2024
2177
  <dt id="kiam.propagate_nbp"><code class="name flex">
2025
- <span>def <span class="ident">propagate_nbp</span></span>(<span>central_body: str, tspan: numpy.ndarray, x0: numpy.ndarray, sources_dict: dict, dat_dict: dict, stm: bool, variables: str) ‑> tuple</span>
2178
+ <span>def <span class="ident">propagate_nbp</span></span>(<span>central_body: str, tspan: numpy.ndarray, x0: numpy.ndarray, sources_dict: dict, dat_dict: dict, units_dict: dict, stm: bool, variables: str, control_function: Callable = None) ‑> tuple</span>
2026
2179
  </code></dt>
2027
2180
  <dd>
2028
2181
  <div class="desc"><p>Propagate trajectory in the n-body model of motion.</p>
@@ -2089,7 +2242,7 @@ t, y = kiam.propagate_hill(tspan, x0)
2089
2242
  <p>If sources[key] = False, the corresponding perturbation will not be accounted.</p>
2090
2243
  <p>The sources dictionary with all False values can be created by
2091
2244
  the kiam.prepare_sources_dict() function.</p>
2092
- <p><code>dat_dict</code>: dict</p>
2245
+ <p><code>dat_dict</code> : dict</p>
2093
2246
  <p>A dictionary that contains auxilary data.</p>
2094
2247
  <p>The dictionary keys:</p>
2095
2248
  <p>'jd_zero' (Julian date that corresponds to t = 0)</p>
@@ -2101,12 +2254,20 @@ the kiam.prepare_sources_dict() function.</p>
2101
2254
  (Mass of the spacecraft to account in atmospheric drag and SRP, kg)</p>
2102
2255
  <p>The data should be submitted even if the corresponding perturbations
2103
2256
  are not accounted.</p>
2257
+ <p>'units_dict' : dict</p>
2258
+ <p>A dictionary that contains the units of distance, velocity, time, acceleration, and the gravitational parameters of the bodies.</p>
2259
+ <p>This variable can be generated by kiam.prepare_units_dict function.</p>
2104
2260
  <p><code>stm</code>: bool</p>
2105
2261
  <p>Flag to calculate the derivative of the state-transition matrix</p>
2106
2262
  <p><code>variables</code>: str</p>
2107
2263
  <p>Type of variables used to propagate the trajectory.</p>
2108
2264
  <p>If stm = False, then variables should be 'rv' or 'ee'.</p>
2109
2265
  <p>If stm = True, then variables should be 'rv_stm' or 'ee_stm'.</p>
2266
+ <p><code>control_function</code> : Callable</p>
2267
+ <p>The control function that returns force vector, specific impulse and (if stm is True) force vector time derivative,</p>
2268
+ <p>force vector state derivative, specific impulce time derivative, specific impulse state derivative. The control function</p>
2269
+ <p>should take two arguments: the time and the phase state that corresponds to <code>variables</code>.</p>
2270
+ <p>None by default.</p>
2110
2271
  <h2 id="returns">Returns:</h2>
2111
2272
  <p><code>t</code> : numpy.ndarray, shape(n,)</p>
2112
2273
  <p>Times (nodes) in tspan at which the solution is obtained</p>
@@ -2142,11 +2303,13 @@ sources_dict = kiam.prepare_sources_dict()
2142
2303
 
2143
2304
  dat_dict = kiam.prepare_data_dict()
2144
2305
 
2306
+ units_dict = kiam.prepare_units_dict('earth')
2307
+
2145
2308
  stm = False
2146
2309
 
2147
2310
  variables = 'rv'
2148
2311
 
2149
- t, y = kiam.propagate_nbp(central_body, tspan, x0, sources_dict, dat_dict, stm, variables)
2312
+ t, y = kiam.propagate_nbp(central_body, tspan, x0, sources_dict, dat_dict, units_dict, stm, variables)
2150
2313
  </code></pre></div>
2151
2314
  </dd>
2152
2315
  <dt id="kiam.propagate_r2bp"><code class="name flex">
@@ -2827,7 +2990,7 @@ z = r*sin(theta)
2827
2990
  <span>def <span class="ident">units</span></span>(<span>*args: str) ‑> dict</span>
2828
2991
  </code></dt>
2829
2992
  <dd>
2830
- <div class="desc"><p>Get units of distance, velocity, and time.</p>
2993
+ <div class="desc"><p>Get units of distance, velocity, time, and gravitational parameters.</p>
2831
2994
  <h2 id="parameters">Parameters:</h2>
2832
2995
  <p><code>*args</code></p>
2833
2996
  <p>Name or a pair of names of a celestial bodies</p>
@@ -2837,9 +3000,21 @@ z = r*sin(theta)
2837
3000
  <h2 id="returns">Returns:</h2>
2838
3001
  <p><code>units_dict</code> : dict</p>
2839
3002
  <p>A dictionary containing the units of distance, velocity, and time.</p>
2840
- <p>DistUnit &ndash; the unit of distance, km</p>
2841
- <p>VelUnit &ndash; the unit of velocity, km/s</p>
2842
- <p>TimeUnit &ndash; the unit of time, days</p>
3003
+ <p><code>'DistUnit'</code> &ndash; the unit of distance, km</p>
3004
+ <p><code>'VelUnit'</code> &ndash; the unit of velocity, km/s</p>
3005
+ <p><code>'TimeUnit'</code> &ndash; the unit of time, days</p>
3006
+ <p><code>'AccUnit'</code> &ndash; the unit of acceleration, m/s^2</p>
3007
+ <p><code>'SunGM'</code> &ndash; the nondimensional gravitational parameter of the Sun</p>
3008
+ <p><code>'MercuryGM'</code> &ndash; the nondimensional gravitational parameter of Mercury</p>
3009
+ <p><code>'VenusGM'</code> &ndash; the nondimensional gravitational parameter of Venus</p>
3010
+ <p><code>'EarthGM'</code> &ndash; the nondimensional gravitational parameter of the Earth</p>
3011
+ <p><code>'MoonGM'</code> &ndash; the nondimensional gravitational parameter of the Moon</p>
3012
+ <p><code>'EarthMoonGM'</code> &ndash; the nondimensional gravitational parameter of the Earth+Moon system</p>
3013
+ <p><code>'MarsGM'</code> &ndash; the nondimensional gravitational parameter of Mars</p>
3014
+ <p><code>'JupiterGM'</code> &ndash; the nondimensional gravitational parameter of Jupiter</p>
3015
+ <p><code>'SaturnGM'</code> &ndash; the nondimensional gravitational parameter of Saturn</p>
3016
+ <p><code>'UranusGM'</code> &ndash; the nondimensional gravitational parameter of Uranus</p>
3017
+ <p><code>'NeptuneGM'</code> &ndash; the nondimensional gravitational parameter of Neptune</p>
2843
3018
  <h2 id="examples">Examples:</h2>
2844
3019
  <pre><code>un = kiam.units('earth')
2845
3020
 
@@ -2886,6 +3061,7 @@ VU = un['VelUnit'] # Unit of velocity for the Earth-Moon system of units
2886
3061
  <li><h3><a href="#header-functions">Functions</a></h3>
2887
3062
  <ul class="">
2888
3063
  <li><code><a title="kiam.astro_const" href="#kiam.astro_const">astro_const</a></code></li>
3064
+ <li><code><a title="kiam.b1crs2b2crs" href="#kiam.b1crs2b2crs">b1crs2b2crs</a></code></li>
2889
3065
  <li><code><a title="kiam.body_surface" href="#kiam.body_surface">body_surface</a></code></li>
2890
3066
  <li><code><a title="kiam.box_plot" href="#kiam.box_plot">box_plot</a></code></li>
2891
3067
  <li><code><a title="kiam.cart2latlon" href="#kiam.cart2latlon">cart2latlon</a></code></li>
@@ -2927,6 +3103,7 @@ VU = un['VelUnit'] # Unit of velocity for the Earth-Moon system of units
2927
3103
  <li><code><a title="kiam.mer2scrs" href="#kiam.mer2scrs">mer2scrs</a></code></li>
2928
3104
  <li><code><a title="kiam.nbp_ee_earth" href="#kiam.nbp_ee_earth">nbp_ee_earth</a></code></li>
2929
3105
  <li><code><a title="kiam.nbp_ee_moon" href="#kiam.nbp_ee_moon">nbp_ee_moon</a></code></li>
3106
+ <li><code><a title="kiam.nbp_rv_body" href="#kiam.nbp_rv_body">nbp_rv_body</a></code></li>
2930
3107
  <li><code><a title="kiam.nbp_rv_earth" href="#kiam.nbp_rv_earth">nbp_rv_earth</a></code></li>
2931
3108
  <li><code><a title="kiam.nbp_rv_moon" href="#kiam.nbp_rv_moon">nbp_rv_moon</a></code></li>
2932
3109
  <li><code><a title="kiam.oe2rv" href="#kiam.oe2rv">oe2rv</a></code></li>
@@ -0,0 +1,296 @@
1
+ """
2
+
3
+ Sources: https://fakel-russia.com/en/productions
4
+ """
5
+
6
+ class Engine:
7
+
8
+ def __init__(self):
9
+
10
+ self.name = None
11
+ self.engine_class = None # 'attitude', 'orbital'
12
+ self.engine_type = None # 'chemical', 'electric'
13
+
14
+ self.force = None
15
+ self.specific_impulse = None
16
+ self.input_power = None
17
+ self.efficiency = None
18
+
19
+ def get_force_dependence(self):
20
+ return self.force
21
+
22
+ def get_specific_impulse_dependence(self):
23
+ return self.specific_impulse
24
+
25
+ def get_input_power_dependence(self):
26
+ return self.input_power
27
+
28
+ def get_efficiency_dependence(self):
29
+ return self.efficiency
30
+
31
+ class SPT50(Engine):
32
+
33
+ def __init__(self):
34
+ super(SPT50, self).__init__()
35
+
36
+ self.name = 'spt50'
37
+ self.engine_class = 'orbital'
38
+ self.engine_type = 'electric'
39
+
40
+ self.propellant = 'Xe'
41
+ self.discharge_voltage = 180 # V
42
+ self.discharge_current = 1.25 # A
43
+ self.discharge_power = 225 # W
44
+
45
+ self.force = 14.0e-03 # N
46
+ self.specific_impulse = 860 # s
47
+ self.power_to_thrust_ratio = 16.1e+03 # W/N
48
+ self.min_lifetime_h = 1217/24 # days
49
+ self.min_lifetime_cycles = 3011 # cycles
50
+ self.mass = 1.23 # kg
51
+ self.dimensions = '160 x 120 x 91' # mm
52
+
53
+ class SPT50M(Engine):
54
+
55
+ def __init__(self, option=None):
56
+ super(SPT50M, self).__init__()
57
+
58
+ self.name = 'spt50m'
59
+ self.engine_class = 'orbital'
60
+ self.engine_type = 'electric'
61
+
62
+ if option == 'Xe_low':
63
+
64
+ self.propellant = 'Xe'
65
+
66
+ self.discharge_voltage = 180 # V
67
+ self.discharge_current = 1.25 # A
68
+ self.discharge_power = 225 # W
69
+
70
+ self.force = 14.8e-03 # N
71
+ self.specific_impulse = 930 # s
72
+ self.power_to_thrust_ratio = 15.2e+03 # W/N
73
+ self.min_lifetime_h = 5000/24 # days
74
+ self.min_lifetime_cycles = 11000 # cycles
75
+ self.mass = 1.32 # kg
76
+ self.dimensions = '169 x 120 x 88' # mm
77
+
78
+ elif option == 'Xe_high':
79
+
80
+ self.propellant = 'Xe'
81
+
82
+ self.discharge_voltage = 300 # V
83
+ self.discharge_current = 1.0 # A
84
+ self.discharge_power = 300 # W
85
+
86
+ self.force = 18.0e-03 # N
87
+ self.specific_impulse = 1250 # s
88
+ self.power_to_thrust_ratio = 16.7e+03 # W/N
89
+ self.min_lifetime_h = 5000 / 24 # days
90
+ self.min_lifetime_cycles = 11000 # cycles
91
+ self.mass = 1.32 # kg
92
+ self.dimensions = '169 x 120 x 88' # mm
93
+
94
+ class SPT70(Engine):
95
+
96
+ def __init__(self):
97
+ super(SPT70, self).__init__()
98
+
99
+ self.name = 'spt70'
100
+ self.engine_class = 'orbital'
101
+ self.engine_type = 'electric'
102
+
103
+ self.propellant = 'Xe'
104
+
105
+ self.discharge_voltage = 300 # V
106
+ self.discharge_current = 2.23 # A
107
+ self.discharge_power = 670 # W
108
+
109
+ self.force = 39.0e-03 # N
110
+ self.specific_impulse = 1470 # s
111
+ self.power_to_thrust_ratio = 16.1e+03 # W/N
112
+ self.min_lifetime_h = 3100 / 24 # days
113
+ self.min_lifetime_cycles = 3000 # cycles
114
+ self.mass = 1.5 # kg
115
+ self.dimensions = '198 x 146 x 98' # mm
116
+
117
+ class SPT70M(Engine):
118
+
119
+ def __init__(self, option=None):
120
+ super(SPT70M, self).__init__()
121
+
122
+ self.name = 'spt70m'
123
+ self.engine_class = 'orbital'
124
+ self.engine_type = 'electric'
125
+
126
+ if option == 'Xe_low':
127
+
128
+ self.propellant = 'Xe'
129
+
130
+ self.discharge_voltage = 300 # V
131
+ self.discharge_current = 2.00 # A
132
+ self.discharge_power = 600 # W
133
+
134
+ self.force = 36.0e-03 # N
135
+ self.specific_impulse = 1430 # s
136
+ self.power_to_thrust_ratio = 15.2e+03 # W/N
137
+ self.min_lifetime_h = 7000 / 24 # days
138
+ self.min_lifetime_cycles = 11000 # cycles
139
+ self.mass = 2.6 # kg
140
+ self.dimensions = '200 x 128 x 94' # mm
141
+
142
+ elif option == 'Xe_med':
143
+
144
+ self.propellant = 'Xe'
145
+
146
+ self.discharge_voltage = 300 # V
147
+ self.discharge_current = 2.67 # A
148
+ self.discharge_power = 800 # W
149
+
150
+ self.force = 48.0e-03 # N
151
+ self.specific_impulse = 1530 # s
152
+ self.power_to_thrust_ratio = 16.7e+03 # W/N
153
+ self.min_lifetime_h = 7000 / 24 # days
154
+ self.min_lifetime_cycles = 11000 # cycles
155
+ self.mass = 2.6 # kg
156
+ self.dimensions = '200 x 128 x 94' # mm
157
+
158
+ elif option == 'Xe_high':
159
+
160
+ self.propellant = 'Xe'
161
+
162
+ self.discharge_voltage = 300 # V
163
+ self.discharge_current = 3.33 # A
164
+ self.discharge_power = 1000 # W
165
+
166
+ self.force = 59.0e-03 # N
167
+ self.specific_impulse = 1600 # s
168
+ self.power_to_thrust_ratio = 16.9e+03 # W/N
169
+ self.min_lifetime_h = 7000 / 24 # days
170
+ self.min_lifetime_cycles = 11000 # cycles
171
+ self.mass = 2.6 # kg
172
+ self.dimensions = '200 x 128 x 94' # mm
173
+
174
+ elif option == 'Kr_low':
175
+
176
+ self.propellant = 'Kr'
177
+
178
+ self.discharge_voltage = 300 # V
179
+ self.discharge_current = 2.00 # A
180
+ self.discharge_power = 600 # W
181
+
182
+ self.force = 28.0e-03 # N
183
+ self.specific_impulse = 1380 # s
184
+ self.power_to_thrust_ratio = 21.4e+03 # W/N
185
+ self.min_lifetime_h = 7000 / 24 # days
186
+ self.min_lifetime_cycles = 11000 # cycles
187
+ self.mass = 2.6 # kg
188
+ self.dimensions = '200 x 128 x 94' # mm
189
+
190
+ elif option == 'Kr_med':
191
+
192
+ self.propellant = 'Kr'
193
+
194
+ self.discharge_voltage = 300 # V
195
+ self.discharge_current = 2.67 # A
196
+ self.discharge_power = 800 # W
197
+
198
+ self.force = 37.0e-03 # N
199
+ self.specific_impulse = 1490 # s
200
+ self.power_to_thrust_ratio = 21.6e+03 # W/N
201
+ self.min_lifetime_h = 7000 / 24 # days
202
+ self.min_lifetime_cycles = 11000 # cycles
203
+ self.mass = 2.6 # kg
204
+ self.dimensions = '200 x 128 x 94' # mm
205
+
206
+ elif option == 'Kr_high':
207
+
208
+ self.propellant = 'Kr'
209
+
210
+ self.discharge_voltage = 300 # V
211
+ self.discharge_current = 3.33 # A
212
+ self.discharge_power = 1000 # W
213
+
214
+ self.force = 47.0e-03 # N
215
+ self.specific_impulse = 1560 # s
216
+ self.power_to_thrust_ratio = 21.3e+03 # W/N
217
+ self.min_lifetime_h = 7000 / 24 # days
218
+ self.min_lifetime_cycles = 11000 # cycles
219
+ self.mass = 2.6 # kg
220
+ self.dimensions = '200 x 128 x 94' # mm
221
+
222
+ else:
223
+
224
+ raise Exception('Unknown option.')
225
+
226
+ class SPT100B(Engine):
227
+
228
+ def __init__(self):
229
+ super(SPT100B, self).__init__()
230
+
231
+ self.name = 'spt100B'
232
+ self.engine_class = 'orbital'
233
+ self.engine_type = 'electric'
234
+
235
+ self.propellant = 'Xe'
236
+
237
+ self.discharge_voltage = 300 # V
238
+ self.discharge_current = 4.5 # A
239
+ self.discharge_power = 1350 # W
240
+
241
+ self.force = 83.0e-03 # N
242
+ self.specific_impulse = 1540 # s
243
+ self.efficiency = 0.45
244
+ self.power_to_thrust_ratio = 16.3e+03 # W/N
245
+ self.min_lifetime_h = 9000 / 24 # days
246
+ self.min_lifetime_cycles = 8800 # cycles
247
+ self.mass = 3.5 # kg
248
+ self.dimensions = '225 x 150 x 125' # mm
249
+
250
+ class SPT100BM(Engine):
251
+
252
+ def __init__(self):
253
+ super(SPT100BM, self).__init__()
254
+
255
+ self.name = 'spt100BM'
256
+ self.engine_class = 'orbital'
257
+ self.engine_type = 'electric'
258
+
259
+ self.propellant = 'Xe'
260
+
261
+ self.discharge_voltage = 300 # V
262
+ self.discharge_current = 4.5 # A
263
+ self.discharge_power = 1350 # W
264
+
265
+ self.force = 90.0e-03 # N
266
+ self.specific_impulse = 1600 # s
267
+ self.efficiency = 0.52
268
+ self.power_to_thrust_ratio = 15.0e+03 # W/N
269
+ self.min_lifetime_h = 9000 / 24 # days
270
+ self.min_lifetime_cycles = 9000 # cycles
271
+ self.mass = 4.2 # kg
272
+ self.dimensions = '200 x 142 x 110' # mm
273
+
274
+ class SPT140D(Engine):
275
+
276
+ def __init__(self):
277
+ super(SPT140D, self).__init__()
278
+
279
+ self.name = 'spt140D'
280
+ self.engine_class = 'orbital'
281
+ self.engine_type = 'electric'
282
+
283
+ self.propellant = 'Xe'
284
+
285
+ self.discharge_voltage = 300 # V
286
+ self.discharge_current = 15 # A
287
+ self.discharge_power = 4500 # W
288
+
289
+ self.force = 290.0e-03 # N
290
+ self.specific_impulse = 1750 # s
291
+ self.efficiency = 0.53
292
+ self.power_to_thrust_ratio = 15.5e+03 # W/N
293
+ self.min_lifetime_h = 15000 / 24 # days
294
+ self.min_lifetime_cycles = 7000 # cycles
295
+ self.mass = 8.5 # kg
296
+ self.dimensions = '305 x 249 x 109' # mm