@interstellar-tools/equations 0.60.2 → 0.61.1

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 (53) hide show
  1. package/LICENSE +21 -0
  2. package/dist/categories/angle/compute-angle.d.ts +31 -42
  3. package/dist/categories/angle/compute-angle.d.ts.map +1 -1
  4. package/dist/categories/angle/compute-angle.js +34 -45
  5. package/dist/categories/angle/compute-angle.js.map +1 -1
  6. package/dist/categories/anomalies/advance-mean-anomaly.d.ts +50 -0
  7. package/dist/categories/anomalies/advance-mean-anomaly.d.ts.map +1 -0
  8. package/dist/categories/anomalies/{mean-to-eccentric-anomaly.js → advance-mean-anomaly.js} +22 -18
  9. package/dist/categories/anomalies/advance-mean-anomaly.js.map +1 -0
  10. package/dist/categories/kepler/solve-kepler.d.ts +3 -0
  11. package/dist/categories/kepler/solve-kepler.d.ts.map +1 -1
  12. package/dist/categories/kepler/solve-kepler.js +3 -0
  13. package/dist/categories/kepler/solve-kepler.js.map +1 -1
  14. package/dist/categories/orbits/circular-speed.d.ts +14 -0
  15. package/dist/categories/orbits/circular-speed.d.ts.map +1 -1
  16. package/dist/categories/orbits/circular-speed.js +14 -0
  17. package/dist/categories/orbits/circular-speed.js.map +1 -1
  18. package/dist/categories/orbits/escape-speed.d.ts +16 -0
  19. package/dist/categories/orbits/escape-speed.d.ts.map +1 -1
  20. package/dist/categories/orbits/escape-speed.js +16 -0
  21. package/dist/categories/orbits/escape-speed.js.map +1 -1
  22. package/dist/categories/orbits/kepler-period.d.ts +15 -0
  23. package/dist/categories/orbits/kepler-period.d.ts.map +1 -1
  24. package/dist/categories/orbits/kepler-period.js +15 -0
  25. package/dist/categories/orbits/kepler-period.js.map +1 -1
  26. package/dist/categories/orbits/mean-motion.d.ts +15 -0
  27. package/dist/categories/orbits/mean-motion.d.ts.map +1 -1
  28. package/dist/categories/orbits/mean-motion.js +15 -0
  29. package/dist/categories/orbits/mean-motion.js.map +1 -1
  30. package/dist/categories/orbits/peri-apoapsis-radii.d.ts +17 -0
  31. package/dist/categories/orbits/peri-apoapsis-radii.d.ts.map +1 -1
  32. package/dist/categories/orbits/peri-apoapsis-radii.js +17 -0
  33. package/dist/categories/orbits/peri-apoapsis-radii.js.map +1 -1
  34. package/dist/categories/orbits/specific-mechanical-energy.d.ts +20 -0
  35. package/dist/categories/orbits/specific-mechanical-energy.d.ts.map +1 -1
  36. package/dist/categories/orbits/specific-mechanical-energy.js +20 -0
  37. package/dist/categories/orbits/specific-mechanical-energy.js.map +1 -1
  38. package/dist/categories/orbits/sphere-of-influence-radius.d.ts +17 -0
  39. package/dist/categories/orbits/sphere-of-influence-radius.d.ts.map +1 -1
  40. package/dist/categories/orbits/sphere-of-influence-radius.js +17 -0
  41. package/dist/categories/orbits/sphere-of-influence-radius.js.map +1 -1
  42. package/dist/categories/orbits/vis-viva-speed.d.ts +19 -0
  43. package/dist/categories/orbits/vis-viva-speed.d.ts.map +1 -1
  44. package/dist/categories/orbits/vis-viva-speed.js +19 -0
  45. package/dist/categories/orbits/vis-viva-speed.js.map +1 -1
  46. package/dist/index.d.ts +1 -1
  47. package/dist/index.d.ts.map +1 -1
  48. package/dist/index.js +1 -1
  49. package/dist/index.js.map +1 -1
  50. package/package.json +4 -3
  51. package/dist/categories/anomalies/mean-to-eccentric-anomaly.d.ts +0 -47
  52. package/dist/categories/anomalies/mean-to-eccentric-anomaly.d.ts.map +0 -1
  53. package/dist/categories/anomalies/mean-to-eccentric-anomaly.js.map +0 -1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Alexander Vassbotn Røyne-Helgesen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,62 +1,51 @@
1
- import type { CelestialBodyType, Radians, TimeStepInterface } from '@interstellar-tools/types';
1
+ import type { OrbitInterface, Radians, TimeStepInterface } from '@interstellar-tools/types';
2
2
  /**
3
- * Computes the orbital angle (true anomaly, $ν$) of a celestial body for a given date and time step.
3
+ * Advances a body along its orbit by one time step and returns its new
4
+ * **true anomaly** ($\nu$).
4
5
  *
5
- * **Mathematical Explanation:**
6
+ * The orbit's `angle` is the starting true anomaly. There is no date input:
7
+ * call this once per frame or step, and feed the result back in as the next
8
+ * `angle` to move the body over time.
6
9
  *
7
- * This function determines the **true anomaly** ($ν$) based on the time elapsed since the
8
- * **J2000 epoch** (January 1, 2000) and the provided time step. The calculation follows these steps:
10
+ * **Step 1: Mean anomaly after the time step ($M$)**
9
11
  *
10
- * **Step 1: Compute Time Elapsed Since J2000**
11
- *
12
- * The number of days since **J2000** is computed as:
13
- * $$ \Delta T = \frac{t - t_{J2000}}{\text{MILLISECONDS\_PER\_DAY}} $$
12
+ * Done by {@link advanceMeanAnomaly}:
13
+ * $$ M = M_0 + n \cdot \Delta t, \qquad n = \frac{2\pi}{|P|} $$
14
14
  * where:
15
- * - $t$ is the current date in milliseconds.
16
- * - $t_{J2000}$ is **J2000** (2000-01-01T00:00:00Z).
17
- * - **MILLISECONDS_PER_DAY** is the number of milliseconds in one day.
18
- *
19
- * **Step 2: Compute the Mean Anomaly ($M$)**
15
+ * - $M_0$ is the mean anomaly at the start, converted from the true anomaly
16
+ * `angle` (equal to it when $e = 0$).
17
+ * - $n$ is the mean motion, from the period $P$ converted to days. The sign of
18
+ * $P$ is ignored, so the angle always increases.
19
+ * - $\Delta t$ is `timeStep.value` in days, clamped to at least $10^{-5}$ days
20
+ * and at most $10\,|P|$ ($|P|$ when $e \geq 0.9$).
20
21
  *
21
- * The **mean anomaly** is calculated as:
22
- * $$ M = M_0 + n \cdot (\Delta T + \text{timeStep}) $$
23
- * where:
24
- * - $M_0$ is the initial mean anomaly at **J2000**.
25
- * - $n$ is the mean motion (orbital angular velocity).
26
- * - $\text{timeStep}$ is the time step in days.
22
+ * The result is wrapped to $[0, 2\pi)$.
27
23
  *
28
- * **Step 3: Solve Kepler’s Equation for Eccentric Anomaly ($E$)**
24
+ * **Step 2: Solve Kepler's equation for the eccentric anomaly ($E$)**
29
25
  *
30
- * Kepler’s equation:
31
26
  * $$ M = E - e \sin(E) $$
32
- * is solved numerically to obtain the **eccentric anomaly** ($E$).
33
- *
34
- * **Step 4: Convert Eccentric Anomaly ($E$) to True Anomaly ($ν$)**
27
+ * is solved numerically by {@link solveKepler}.
35
28
  *
36
- * Using the relation:
37
- * $$ ν = 2 \tan^{-1} \left( \sqrt{\frac{1+e}{1-e}} \tan\left(\frac{E}{2}\right) \right) $$
29
+ * **Step 3: Convert the eccentric anomaly to the true anomaly ($\nu$)**
38
30
  *
39
- * **Step 5: Adjust the True Anomaly for Certain Bodies**
40
- * - For **comets**, the final **true anomaly** is adjusted by subtracting the **eccentricity** ($e$).
41
- * - For **stars and other celestial objects**, the computed **true anomaly** is used directly.
31
+ * Done by {@link eccentricToTrueAnomaly}:
32
+ * $$ \nu = 2 \tan^{-1} \left( \sqrt{\frac{1+e}{1-e}} \tan\left(\frac{E}{2}\right) \right) $$
42
33
  *
43
- * @param {CelestialBodyType} body - The celestial body for which to compute the true anomaly.
44
- * @param {TimeStepInterface} timeStep - The time step in days since the last frame.
45
- * @returns {Radians} The computed true anomaly in radians.
34
+ * @param {Pick<OrbitInterface, 'e' | 'angle' | 'period'>} orbit - The body's orbit, for example `body.orbit` from a dataset.
35
+ * @param {TimeStepInterface} timeStep - How far to advance, in days.
36
+ * @returns {Radians} The true anomaly after the time step, in radians.
37
+ * @throws {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError | RangeError} If the orbit's eccentricity is outside $0 \leq e < 1$.
46
38
  *
47
39
  * @example
48
40
  * ```ts
41
+ * import { PLANETS } from '@interstellar-tools/constants';
49
42
  * import { computeAngle } from '@interstellar-tools/equations';
50
43
  *
51
- * const earth: CelestialBodyType = {
52
- * name: 'Earth',
53
- * e: 0.0167, // Orbital eccentricity
54
- * angle: 0, // Initial angle
55
- * };
44
+ * const earth = PLANETS.find((planet) => planet.id === 'earth')!;
45
+ * const timeStep: TimeStepInterface = { value: 1, unit: 'd' };
56
46
  *
57
- * const timeStep: TimeStepInterface = { days: 1 }; // Time step of 1 day
58
- * const angle: Radians = computeAngle(earth, timeStep);
59
- * console.log(angle); // Output: Computed true anomaly in radians
47
+ * // Earth's true anomaly one day after its dataset position
48
+ * const angle: Radians = computeAngle(earth.orbit!, timeStep);
60
49
  * ```
61
50
  *
62
51
  * @see [Kepler's Equation (Wikipedia)](https://en.wikipedia.org/wiki/Kepler%27s_equation)
@@ -65,5 +54,5 @@ import type { CelestialBodyType, Radians, TimeStepInterface } from '@interstella
65
54
  * @see [Orbital Mechanics (NASA)](https://solarsystem.nasa.gov/basics/chapter2-2/)
66
55
  * @group Angles
67
56
  */
68
- export declare const computeAngle: (body: CelestialBodyType, timeStep: TimeStepInterface) => Radians;
57
+ export declare const computeAngle: (orbit: Pick<OrbitInterface, "e" | "angle" | "period">, timeStep: TimeStepInterface) => Radians;
69
58
  //# sourceMappingURL=compute-angle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"compute-angle.d.ts","sourceRoot":"","sources":["../../../src/categories/angle/compute-angle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,OAAO,EACP,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AAMnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AACH,eAAO,MAAM,YAAY,GACvB,MAAM,iBAAiB,EACvB,UAAU,iBAAiB,KAC1B,OASF,CAAC"}
1
+ {"version":3,"file":"compute-angle.d.ts","sourceRoot":"","sources":["../../../src/categories/angle/compute-angle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,OAAO,EACP,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AAMnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,eAAO,MAAM,YAAY,GACvB,OAAO,IAAI,CAAC,cAAc,EAAE,GAAG,GAAG,OAAO,GAAG,QAAQ,CAAC,EACrD,UAAU,iBAAiB,KAC1B,OASF,CAAC"}
@@ -1,64 +1,53 @@
1
+ import { advanceMeanAnomaly } from '../anomalies/advance-mean-anomaly.js';
1
2
  import { eccentricToTrueAnomaly } from '../anomalies/eccentric-to-true-anomaly.js';
2
- import { meanToEccentricAnomaly } from '../anomalies/mean-to-eccentric-anomaly.js';
3
3
  import { solveKepler } from '../kepler/solve-kepler.js';
4
4
  /**
5
- * Computes the orbital angle (true anomaly, $ν$) of a celestial body for a given date and time step.
5
+ * Advances a body along its orbit by one time step and returns its new
6
+ * **true anomaly** ($\nu$).
6
7
  *
7
- * **Mathematical Explanation:**
8
+ * The orbit's `angle` is the starting true anomaly. There is no date input:
9
+ * call this once per frame or step, and feed the result back in as the next
10
+ * `angle` to move the body over time.
8
11
  *
9
- * This function determines the **true anomaly** ($ν$) based on the time elapsed since the
10
- * **J2000 epoch** (January 1, 2000) and the provided time step. The calculation follows these steps:
12
+ * **Step 1: Mean anomaly after the time step ($M$)**
11
13
  *
12
- * **Step 1: Compute Time Elapsed Since J2000**
13
- *
14
- * The number of days since **J2000** is computed as:
15
- * $$ \Delta T = \frac{t - t_{J2000}}{\text{MILLISECONDS\_PER\_DAY}} $$
14
+ * Done by {@link advanceMeanAnomaly}:
15
+ * $$ M = M_0 + n \cdot \Delta t, \qquad n = \frac{2\pi}{|P|} $$
16
16
  * where:
17
- * - $t$ is the current date in milliseconds.
18
- * - $t_{J2000}$ is **J2000** (2000-01-01T00:00:00Z).
19
- * - **MILLISECONDS_PER_DAY** is the number of milliseconds in one day.
20
- *
21
- * **Step 2: Compute the Mean Anomaly ($M$)**
17
+ * - $M_0$ is the mean anomaly at the start, converted from the true anomaly
18
+ * `angle` (equal to it when $e = 0$).
19
+ * - $n$ is the mean motion, from the period $P$ converted to days. The sign of
20
+ * $P$ is ignored, so the angle always increases.
21
+ * - $\Delta t$ is `timeStep.value` in days, clamped to at least $10^{-5}$ days
22
+ * and at most $10\,|P|$ ($|P|$ when $e \geq 0.9$).
22
23
  *
23
- * The **mean anomaly** is calculated as:
24
- * $$ M = M_0 + n \cdot (\Delta T + \text{timeStep}) $$
25
- * where:
26
- * - $M_0$ is the initial mean anomaly at **J2000**.
27
- * - $n$ is the mean motion (orbital angular velocity).
28
- * - $\text{timeStep}$ is the time step in days.
24
+ * The result is wrapped to $[0, 2\pi)$.
29
25
  *
30
- * **Step 3: Solve Kepler’s Equation for Eccentric Anomaly ($E$)**
26
+ * **Step 2: Solve Kepler's equation for the eccentric anomaly ($E$)**
31
27
  *
32
- * Kepler’s equation:
33
28
  * $$ M = E - e \sin(E) $$
34
- * is solved numerically to obtain the **eccentric anomaly** ($E$).
35
- *
36
- * **Step 4: Convert Eccentric Anomaly ($E$) to True Anomaly ($ν$)**
29
+ * is solved numerically by {@link solveKepler}.
37
30
  *
38
- * Using the relation:
39
- * $$ ν = 2 \tan^{-1} \left( \sqrt{\frac{1+e}{1-e}} \tan\left(\frac{E}{2}\right) \right) $$
31
+ * **Step 3: Convert the eccentric anomaly to the true anomaly ($\nu$)**
40
32
  *
41
- * **Step 5: Adjust the True Anomaly for Certain Bodies**
42
- * - For **comets**, the final **true anomaly** is adjusted by subtracting the **eccentricity** ($e$).
43
- * - For **stars and other celestial objects**, the computed **true anomaly** is used directly.
33
+ * Done by {@link eccentricToTrueAnomaly}:
34
+ * $$ \nu = 2 \tan^{-1} \left( \sqrt{\frac{1+e}{1-e}} \tan\left(\frac{E}{2}\right) \right) $$
44
35
  *
45
- * @param {CelestialBodyType} body - The celestial body for which to compute the true anomaly.
46
- * @param {TimeStepInterface} timeStep - The time step in days since the last frame.
47
- * @returns {Radians} The computed true anomaly in radians.
36
+ * @param {Pick<OrbitInterface, 'e' | 'angle' | 'period'>} orbit - The body's orbit, for example `body.orbit` from a dataset.
37
+ * @param {TimeStepInterface} timeStep - How far to advance, in days.
38
+ * @returns {Radians} The true anomaly after the time step, in radians.
39
+ * @throws {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError | RangeError} If the orbit's eccentricity is outside $0 \leq e < 1$.
48
40
  *
49
41
  * @example
50
42
  * ```ts
43
+ * import { PLANETS } from '@interstellar-tools/constants';
51
44
  * import { computeAngle } from '@interstellar-tools/equations';
52
45
  *
53
- * const earth: CelestialBodyType = {
54
- * name: 'Earth',
55
- * e: 0.0167, // Orbital eccentricity
56
- * angle: 0, // Initial angle
57
- * };
46
+ * const earth = PLANETS.find((planet) => planet.id === 'earth')!;
47
+ * const timeStep: TimeStepInterface = { value: 1, unit: 'd' };
58
48
  *
59
- * const timeStep: TimeStepInterface = { days: 1 }; // Time step of 1 day
60
- * const angle: Radians = computeAngle(earth, timeStep);
61
- * console.log(angle); // Output: Computed true anomaly in radians
49
+ * // Earth's true anomaly one day after its dataset position
50
+ * const angle: Radians = computeAngle(earth.orbit!, timeStep);
62
51
  * ```
63
52
  *
64
53
  * @see [Kepler's Equation (Wikipedia)](https://en.wikipedia.org/wiki/Kepler%27s_equation)
@@ -67,13 +56,13 @@ import { solveKepler } from '../kepler/solve-kepler.js';
67
56
  * @see [Orbital Mechanics (NASA)](https://solarsystem.nasa.gov/basics/chapter2-2/)
68
57
  * @group Angles
69
58
  */
70
- export const computeAngle = (body, timeStep) => {
59
+ export const computeAngle = (orbit, timeStep) => {
71
60
  // Compute mean anomaly (M) with time step
72
- const M = meanToEccentricAnomaly(body, timeStep);
61
+ const M = advanceMeanAnomaly(orbit, timeStep);
73
62
  // Solve Kepler's equation for eccentric anomaly (E)
74
- const E = solveKepler(M, body.e);
63
+ const E = solveKepler(M, orbit.e);
75
64
  // Convert eccentric anomaly (E) to true anomaly (ν)
76
- const V = eccentricToTrueAnomaly(E, body.e);
65
+ const V = eccentricToTrueAnomaly(E, orbit.e);
77
66
  return V;
78
67
  };
79
68
  //# sourceMappingURL=compute-angle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"compute-angle.js","sourceRoot":"","sources":["../../../src/categories/angle/compute-angle.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACnF,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,IAAuB,EACvB,QAA2B,EAClB,EAAE;IACX,0CAA0C;IAC1C,MAAM,CAAC,GAAY,sBAAsB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC1D,oDAAoD;IACpD,MAAM,CAAC,GAAY,WAAW,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IAC1C,oDAAoD;IACpD,MAAM,CAAC,GAAY,sBAAsB,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IAErD,OAAO,CAAC,CAAC;AACX,CAAC,CAAC"}
1
+ {"version":3,"file":"compute-angle.js","sourceRoot":"","sources":["../../../src/categories/angle/compute-angle.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,KAAqD,EACrD,QAA2B,EAClB,EAAE;IACX,0CAA0C;IAC1C,MAAM,CAAC,GAAY,kBAAkB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IACvD,oDAAoD;IACpD,MAAM,CAAC,GAAY,WAAW,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAC3C,oDAAoD;IACpD,MAAM,CAAC,GAAY,sBAAsB,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAEtD,OAAO,CAAC,CAAC;AACX,CAAC,CAAC"}
@@ -0,0 +1,50 @@
1
+ import type { OrbitInterface, Radians, TemporalInterface } from '@interstellar-tools/types';
2
+ /**
3
+ * Advances an orbit by a time step and returns its new **mean anomaly** ($M$).
4
+ *
5
+ * The orbit's `angle` (true anomaly) is the starting point. To get the eccentric
6
+ * anomaly from the result, pass it to {@link solveKepler}.
7
+ *
8
+ * **Mathematical Explanation:**
9
+ *
10
+ * The **mean anomaly** is a measure of the position of an orbiting body as if it moved
11
+ * with uniform angular motion along a circular orbit with the same period as the actual
12
+ * elliptical orbit. It is computed as:
13
+ *
14
+ * $$ M = M_0 + n \cdot \Delta T $$
15
+ *
16
+ * where:
17
+ * - $M_0$ is the **initial mean anomaly** (converted from true anomaly if necessary).
18
+ * - $n$ is the **mean motion**, given by:
19
+ * $$ n = \frac{2\pi}{P} $$
20
+ * where $P$ is the orbital period in days.
21
+ * - $\Delta T$ is the time step, converted to days from its unit.
22
+ *
23
+ * @param {Pick<OrbitInterface, 'e' | 'angle' | 'period'>} orbit - The body's orbit, for example `body.orbit` from a dataset.
24
+ * @param {TemporalInterface} timeStep - The time step over which to compute the change, in any temporal unit.
25
+ * @returns {Radians} The computed mean anomaly in radians.
26
+ *
27
+ * @throws {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError | RangeError} If the orbit's eccentricity is outside the range $0 \leq e < 1$.
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * import { advanceMeanAnomaly } from '@interstellar-tools/equations';
32
+ *
33
+ * const marsOrbit = {
34
+ * e: 0.0934, // Eccentricity of Mars' orbit
35
+ * angle: 1.047 as Radians, // Initial true anomaly (in radians)
36
+ * period: { value: 687, unit: 'd' } // Orbital period in days
37
+ * };
38
+ *
39
+ * const timeStep: TemporalInterface = { value: 1, unit: 'd' }; // 1-day step
40
+ * const meanAnomaly = advanceMeanAnomaly(marsOrbit, timeStep);
41
+ * console.log(meanAnomaly); // Output: Computed mean anomaly in radians
42
+ * ```
43
+ *
44
+ * @see {@link solveKepler} to convert the mean anomaly to the eccentric anomaly.
45
+ * @see [Mean Anomaly (Wikipedia)](https://en.wikipedia.org/wiki/Mean_anomaly)
46
+ * @see [Orbital Mechanics (NASA)](https://solarsystem.nasa.gov/basics/chapter2-2/)
47
+ * @group Anomalies
48
+ */
49
+ export declare const advanceMeanAnomaly: (orbit: Pick<OrbitInterface, "e" | "angle" | "period">, timeStep: TemporalInterface) => Radians;
50
+ //# sourceMappingURL=advance-mean-anomaly.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"advance-mean-anomaly.d.ts","sourceRoot":"","sources":["../../../src/categories/anomalies/advance-mean-anomaly.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,cAAc,EACd,OAAO,EACP,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AAQnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,eAAO,MAAM,kBAAkB,GAC7B,OAAO,IAAI,CAAC,cAAc,EAAE,GAAG,GAAG,OAAO,GAAG,QAAQ,CAAC,EACrD,UAAU,iBAAiB,KAC1B,OAqCF,CAAC"}
@@ -5,7 +5,10 @@ import { trueToMeanAnomaly } from './true-to-mean-anomaly.js';
5
5
  import { areEqual } from './utils/are-equal.js';
6
6
  /* node:coverage disable */
7
7
  /**
8
- * Computes the **mean anomaly** ($M$) of a celestial body for a given time step.
8
+ * Advances an orbit by a time step and returns its new **mean anomaly** ($M$).
9
+ *
10
+ * The orbit's `angle` (true anomaly) is the starting point. To get the eccentric
11
+ * anomaly from the result, pass it to {@link solveKepler}.
9
12
  *
10
13
  * **Mathematical Explanation:**
11
14
  *
@@ -20,52 +23,53 @@ import { areEqual } from './utils/are-equal.js';
20
23
  * - $n$ is the **mean motion**, given by:
21
24
  * $$ n = \frac{2\pi}{P} $$
22
25
  * where $P$ is the orbital period in days.
23
- * - $\Delta T$ is the time step.
26
+ * - $\Delta T$ is the time step, converted to days from its unit.
24
27
  *
25
- * @param {CelestialBodyType} body - The celestial body for which to compute the mean anomaly.
26
- * @param {TemporalInterface} timeStep - The time step over which to compute the change.
28
+ * @param {Pick<OrbitInterface, 'e' | 'angle' | 'period'>} orbit - The body's orbit, for example `body.orbit` from a dataset.
29
+ * @param {TemporalInterface} timeStep - The time step over which to compute the change, in any temporal unit.
27
30
  * @returns {Radians} The computed mean anomaly in radians.
28
31
  *
29
- * @throws {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError | RangeError} If the body's eccentricity is outside the range $0 \leq e < 1$.
32
+ * @throws {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError | RangeError} If the orbit's eccentricity is outside the range $0 \leq e < 1$.
30
33
  *
31
34
  * @example
32
35
  * ```ts
33
- * import { meanToEccentricAnomaly } from '@interstellar-tools/equations';
36
+ * import { advanceMeanAnomaly } from '@interstellar-tools/equations';
34
37
  *
35
- * const mars: CelestialBodyType = {
36
- * name: 'Mars',
38
+ * const marsOrbit = {
37
39
  * e: 0.0934, // Eccentricity of Mars' orbit
38
- * angle: 1.047, // Initial true anomaly (in radians)
39
- * period: { value: 687, unit: 'day' }, // Orbital period in days
40
+ * angle: 1.047 as Radians, // Initial true anomaly (in radians)
41
+ * period: { value: 687, unit: 'd' } // Orbital period in days
40
42
  * };
41
43
  *
42
- * const timeStep: TemporalInterface = { value: 1, unit: 'day' }; // 1-day step
43
- * const meanAnomaly = meanToEccentricAnomaly(mars, timeStep);
44
+ * const timeStep: TemporalInterface = { value: 1, unit: 'd' }; // 1-day step
45
+ * const meanAnomaly = advanceMeanAnomaly(marsOrbit, timeStep);
44
46
  * console.log(meanAnomaly); // Output: Computed mean anomaly in radians
45
47
  * ```
46
48
  *
49
+ * @see {@link solveKepler} to convert the mean anomaly to the eccentric anomaly.
47
50
  * @see [Mean Anomaly (Wikipedia)](https://en.wikipedia.org/wiki/Mean_anomaly)
48
51
  * @see [Orbital Mechanics (NASA)](https://solarsystem.nasa.gov/basics/chapter2-2/)
49
52
  * @group Anomalies
50
53
  */
51
54
  /* node:coverage enable */
52
- export const meanToEccentricAnomaly = (body, timeStep) => {
53
- const { e, angle, period } = body;
55
+ export const advanceMeanAnomaly = (orbit, timeStep) => {
56
+ const { e, angle, period } = orbit;
54
57
  if (e < 0 || e >= 1) {
55
58
  throw new RangeError(`Invalid eccentricity: ${e}. Eccentricity must be in the range [0, 1].`);
56
59
  }
57
- // Convert period to days and compute mean motion
60
+ // Convert period and time step to days and compute mean motion
58
61
  const periodInDays = convertTemporalUnit(period, 'd').value;
62
+ const timeStepInDays = convertTemporalUnit(timeStep, 'd').value;
59
63
  const meanMotion = TWO_PI / Math.abs(periodInDays);
60
64
  // Convert true anomaly (V) to mean anomaly (M0) if necessary
61
65
  const M0 = e === 0 ? angle : trueToMeanAnomaly(angle, e);
62
- if (timeStep.value === 0) {
66
+ if (timeStepInDays === 0) {
63
67
  return M0;
64
68
  }
65
69
  // Clamping small time steps to prevent unnecessary updates
66
70
  const minTimeStep = 1e-5; // Minimum allowed time step
67
71
  const maxTimeStepFactor = e >= 0.9 ? 1 : 10; // Stricter limit for highly eccentric orbits
68
- const clampedDeltaT = Math.max(minTimeStep, Math.min(timeStep.value, maxTimeStepFactor * Math.abs(periodInDays)));
72
+ const clampedDeltaT = Math.max(minTimeStep, Math.min(timeStepInDays, maxTimeStepFactor * Math.abs(periodInDays)));
69
73
  // Compute new mean anomaly with hysteresis filter and sign preservation
70
74
  const prevM = M0;
71
75
  let newM = wrapAngle(M0 + meanMotion * clampedDeltaT);
@@ -74,4 +78,4 @@ export const meanToEccentricAnomaly = (body, timeStep) => {
74
78
  }
75
79
  return newM;
76
80
  };
77
- //# sourceMappingURL=mean-to-eccentric-anomaly.js.map
81
+ //# sourceMappingURL=advance-mean-anomaly.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"advance-mean-anomaly.js","sourceRoot":"","sources":["../../../src/categories/anomalies/advance-mean-anomaly.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAOnE,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,2BAA2B;AAC3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,0BAA0B;AAC1B,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,KAAqD,EACrD,QAA2B,E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AE,CAAC;QAC1B,IAAI,GAAG,KAAK,CAAC;IACf,CAAC;IAED,OAAO,IAAe,CAAC;AACzB,CAAC,CAAC"}
@@ -6,6 +6,9 @@ import type { Radians } from '@interstellar-tools/types';
6
6
  * - **High-eccentricity solver** for extreme orbits ($e > 0.9$).
7
7
  * - **Bisection fallback** if the selected solver doesn't return a root.
8
8
  *
9
+ * This is the conversion from **mean anomaly** to **eccentric anomaly**. Use
10
+ * {@link eccentricToTrueAnomaly} on the result to get the true anomaly.
11
+ *
9
12
  * ---
10
13
  *
11
14
  * **Mathematical Explanation:**
@@ -1 +1 @@
1
- {"version":3,"file":"solve-kepler.d.ts","sourceRoot":"","sources":["../../../src/categories/kepler/solve-kepler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAQzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoFG;AACH,eAAO,MAAM,WAAW,GACtB,GAAG,OAAO,EACV,GAAG,MAAM,EACT,gBAAY,EACZ,kBAAgB,KACf,OAuBF,CAAC"}
1
+ {"version":3,"file":"solve-kepler.d.ts","sourceRoot":"","sources":["../../../src/categories/kepler/solve-kepler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAQzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuFG;AACH,eAAO,MAAM,WAAW,GACtB,GAAG,OAAO,EACV,GAAG,MAAM,EACT,gBAAY,EACZ,kBAAgB,KACf,OAuBF,CAAC"}
@@ -10,6 +10,9 @@ import { solveKeplerNewtonRaphson } from './solve-kepler-newton-raphson.js';
10
10
  * - **High-eccentricity solver** for extreme orbits ($e > 0.9$).
11
11
  * - **Bisection fallback** if the selected solver doesn't return a root.
12
12
  *
13
+ * This is the conversion from **mean anomaly** to **eccentric anomaly**. Use
14
+ * {@link eccentricToTrueAnomaly} on the result to get the true anomaly.
15
+ *
13
16
  * ---
14
17
  *
15
18
  * **Mathematical Explanation:**
@@ -1 +1 @@
1
- {"version":3,"file":"solve-kepler.js","sourceRoot":"","sources":["../../../src/categories/kepler/solve-kepler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAGvD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AAClF,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAE5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoFG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,CAAU,EACV,CAAS,EACT,OAAO,GAAG,EAAE,EACZ,SAAS,GAAG,IAAI,EACP,EAAE;IACX,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACpB,MAAM,IAAI,UAAU,CAAC,yBAAyB,CAAC,2BAA2B,CAAC,CAAC;IAC9E,CAAC;IAED,8DAA8D;IAC9D,MAAM,EAAE,GAAG,OAAO,CAAC,CAAC,CAAY,CAAC;IAEjC,wDAAwD;IACxD,IAAI,CAAC,GACH,CAAC,GAAG,GAAG;QACL,CAAC,CAAC,2BAA2B,CAAC,EAAE,EAAE,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC;QACxD,CAAC,CAAC,wBAAwB,CAAC,EAAE,EAAE,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;IAE1D,6EAA6E;IAC7E,sEAAsE;IACtE,MAAM,QAAQ,G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L,CAAC,CAAC,2BAA2B,CAAC,EAAE,EAAE,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC;QACxD,CAAC,CAAC,wBAAwB,CAAC,EAAE,EAAE,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;IAE1D,6EAA6E;IAC7E,sEAAsE;IACtE,MAAM,QAAQ,GAAG,OAAO,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IAEnD,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAAC,IAAI,SAAS,CAAC,EAAE,CAAC;QAC1D,CAAC,GAAG,oBAAoB,CAAC,EAAE,EAAE,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;IACtD,CAAC;IAED,OAAO,OAAO,CAAC,CAAC,CAAY,CAAC;AAC/B,CAAC,CAAC"}
@@ -21,6 +21,20 @@
21
21
  *
22
22
  * :::
23
23
  *
24
+ * ::: practice The International Space Station
25
+ *
26
+ * **7.66 km/s**
27
+ *
28
+ * _Circular speed at 420 km altitude_
29
+ *
30
+ * That's about 27 600 km/h, fast enough to circle Earth every 93 minutes.
31
+ *
32
+ * ```ts
33
+ * circularSpeed(6.371e6 + 420e3, 3.986004418e14); // ≈ 7661 m/s
34
+ * ```
35
+ *
36
+ * :::
37
+ *
24
38
  * @param {number} r Orbital radius ($ r $) (m), must be finite and **> 0**.
25
39
  * @param {number} mu Gravitational parameter ($ \mu $) (m³/s²), must be finite and **≥ 0**.
26
40
  * @returns {number} Circular speed ($ v_c $) (m/s).
@@ -1 +1 @@
1
- {"version":3,"file":"circular-speed.d.ts","sourceRoot":"","sources":["../../../src/categories/orbits/circular-speed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,eAAO,MAAM,aAAa,GAAI,GAAG,MAAM,EAAE,IAAI,MAAM,KAAG,MAUrD,CAAC"}
1
+ {"version":3,"file":"circular-speed.d.ts","sourceRoot":"","sources":["../../../src/categories/orbits/circular-speed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,eAAO,MAAM,aAAa,GAAI,GAAG,MAAM,EAAE,IAAI,MAAM,KAAG,MAUrD,CAAC"}
@@ -21,6 +21,20 @@
21
21
  *
22
22
  * :::
23
23
  *
24
+ * ::: practice The International Space Station
25
+ *
26
+ * **7.66 km/s**
27
+ *
28
+ * _Circular speed at 420 km altitude_
29
+ *
30
+ * That's about 27 600 km/h, fast enough to circle Earth every 93 minutes.
31
+ *
32
+ * ```ts
33
+ * circularSpeed(6.371e6 + 420e3, 3.986004418e14); // ≈ 7661 m/s
34
+ * ```
35
+ *
36
+ * :::
37
+ *
24
38
  * @param {number} r Orbital radius ($ r $) (m), must be finite and **> 0**.
25
39
  * @param {number} mu Gravitational parameter ($ \mu $) (m³/s²), must be finite and **≥ 0**.
26
40
  * @returns {number} Circular speed ($ v_c $) (m/s).
@@ -1 +1 @@
1
- {"version":3,"file":"circular-speed.js","sourceRoot":"","sources":["../../../src/categories/orbits/circular-speed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAS,EAAE,EAAU,EAAU,EAAE;IAC7D,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;IAC9D,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC;QACnC,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACvE,CAAC;IAED,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;AAC3B,CAAC,CAAC"}
1
+ {"version":3,"file":"circular-speed.js","sourceRoot":"","sources":["../../../src/categories/orbits/circular-speed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAS,EAAE,EAAU,EAAU,EAAE;IAC7D,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;IAC9D,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC;QACnC,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACvE,CAAC;IAED,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;AAC3B,CAAC,CAAC"}
@@ -22,6 +22,22 @@
22
22
  *
23
23
  * :::
24
24
  *
25
+ * ::: practice Leaving Earth
26
+ *
27
+ * **11.19 km/s**
28
+ *
29
+ * _Escape speed at Earth's surface_
30
+ *
31
+ * That's √2 times the 7.91 km/s it takes to orbit just above the surface, which
32
+ * is why a rocket for the Moon or Mars is so much bigger than one for low Earth
33
+ * orbit.
34
+ *
35
+ * ```ts
36
+ * escapeSpeed(6.371e6, 3.986004418e14); // ≈ 11 186 m/s
37
+ * ```
38
+ *
39
+ * :::
40
+ *
25
41
  * @param {number} r Radius ($ r $) (m), distance from the central body’s center (must be finite and **> 0**).
26
42
  * @param {number} mu Gravitational parameter ($ \mu $) (m³/s²), must be finite and **≥ 0**.
27
43
  * @returns {number} Escape speed ($ v_{\text{esc}} $) (m/s).
@@ -1 +1 @@
1
- {"version":3,"file":"escape-speed.d.ts","sourceRoot":"","sources":["../../../src/categories/orbits/escape-speed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,eAAO,MAAM,WAAW,GAAI,GAAG,MAAM,EAAE,IAAI,MAAM,KAAG,MAUnD,CAAC"}
1
+ {"version":3,"file":"escape-speed.d.ts","sourceRoot":"","sources":["../../../src/categories/orbits/escape-speed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACH,eAAO,MAAM,WAAW,GAAI,GAAG,MAAM,EAAE,IAAI,MAAM,KAAG,MAUnD,CAAC"}
@@ -22,6 +22,22 @@
22
22
  *
23
23
  * :::
24
24
  *
25
+ * ::: practice Leaving Earth
26
+ *
27
+ * **11.19 km/s**
28
+ *
29
+ * _Escape speed at Earth's surface_
30
+ *
31
+ * That's √2 times the 7.91 km/s it takes to orbit just above the surface, which
32
+ * is why a rocket for the Moon or Mars is so much bigger than one for low Earth
33
+ * orbit.
34
+ *
35
+ * ```ts
36
+ * escapeSpeed(6.371e6, 3.986004418e14); // ≈ 11 186 m/s
37
+ * ```
38
+ *
39
+ * :::
40
+ *
25
41
  * @param {number} r Radius ($ r $) (m), distance from the central body’s center (must be finite and **> 0**).
26
42
  * @param {number} mu Gravitational parameter ($ \mu $) (m³/s²), must be finite and **≥ 0**.
27
43
  * @returns {number} Escape speed ($ v_{\text{esc}} $) (m/s).
@@ -1 +1 @@
1
- {"version":3,"file":"escape-speed.js","sourceRoot":"","sources":["../../../src/categories/orbits/escape-speed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAS,EAAE,EAAU,EAAU,EAAE;IAC3D,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;IAC9D,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC;QACnC,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACvE,CAAC;IAED,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;AACjC,CAAC,CAAC"}
1
+ {"version":3,"file":"escape-speed.js","sourceRoot":"","sources":["../../../src/categories/orbits/escape-speed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAS,EAAE,EAAU,EAAU,EAAE;IAC3D,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;IAC9D,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC;QACnC,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACvE,CAAC;IAED,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;AACjC,CAAC,CAAC"}
@@ -18,6 +18,21 @@
18
18
  *
19
19
  * :::
20
20
  *
21
+ * ::: practice Geostationary orbit
22
+ *
23
+ * **23.93 h**
24
+ *
25
+ * _Orbital period 42 164 km from Earth's centre_
26
+ *
27
+ * That's one sidereal day, the time Earth takes to turn once relative to the
28
+ * stars, so a satellite there stays over the same spot on the equator.
29
+ *
30
+ * ```ts
31
+ * keplerPeriod(42164e3, 3.986004418e14); // ≈ 86 164 s
32
+ * ```
33
+ *
34
+ * :::
35
+ *
21
36
  * @param {number} a Semi-major axis (m), must be finite and **> 0**.
22
37
  * @param {number} mu Gravitational parameter (m³/s²), must be finite and **> 0**.
23
38
  * @returns {number} Orbital period ($ T $) (s).
@@ -1 +1 @@
1
- {"version":3,"file":"kepler-period.d.ts","sourceRoot":"","sources":["../../../src/categories/orbits/kepler-period.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,eAAO,MAAM,YAAY,GAAI,GAAG,MAAM,EAAE,IAAI,MAAM,KAAG,MAYpD,CAAC"}
1
+ {"version":3,"file":"kepler-period.d.ts","sourceRoot":"","sources":["../../../src/categories/orbits/kepler-period.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,eAAO,MAAM,YAAY,GAAI,GAAG,MAAM,EAAE,IAAI,MAAM,KAAG,MAYpD,CAAC"}
@@ -18,6 +18,21 @@
18
18
  *
19
19
  * :::
20
20
  *
21
+ * ::: practice Geostationary orbit
22
+ *
23
+ * **23.93 h**
24
+ *
25
+ * _Orbital period 42 164 km from Earth's centre_
26
+ *
27
+ * That's one sidereal day, the time Earth takes to turn once relative to the
28
+ * stars, so a satellite there stays over the same spot on the equator.
29
+ *
30
+ * ```ts
31
+ * keplerPeriod(42164e3, 3.986004418e14); // ≈ 86 164 s
32
+ * ```
33
+ *
34
+ * :::
35
+ *
21
36
  * @param {number} a Semi-major axis (m), must be finite and **> 0**.
22
37
  * @param {number} mu Gravitational parameter (m³/s²), must be finite and **> 0**.
23
38
  * @returns {number} Orbital period ($ T $) (s).
@@ -1 +1 @@
1
- {"version":3,"file":"kepler-period.js","sourceRoot":"","sources":["../../../src/categories/orbits/kepler-period.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAS,EAAE,EAAU,EAAU,EAAE;IAC5D,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;IACnE,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC;QACpC,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;IACnE,CAAC;IAED,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM;IAE5B,OAAO,CAAC,GAAG,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;AAC1C,CAAC,CAAC"}
1
+ {"version":3,"file":"kepler-period.js","sourceRoot":"","sources":["../../../src/categories/orbits/kepler-period.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAS,EAAE,EAAU,EAAU,EAAE;IAC5D,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;IACnE,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC;QACpC,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;IACnE,CAAC;IAED,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM;IAE5B,OAAO,CAAC,GAAG,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;AAC1C,CAAC,CAAC"}
@@ -18,6 +18,21 @@
18
18
  * Common usage: reference rate for relative motion models (e.g., Clohessy–Wiltshire / Hill),
19
19
  * orbital period estimates, and circular-orbit dynamics.
20
20
  *
21
+ * ::: practice The ISS, orbit by orbit
22
+ *
23
+ * **15.51 orbits/day**
24
+ *
25
+ * _Mean motion at 420 km altitude_
26
+ *
27
+ * The function returns 0.001128 rad/s. Multiply by 86 400 s and divide by 2π for
28
+ * orbits per day, the unit used in a satellite's two-line elements (TLEs).
29
+ *
30
+ * ```ts
31
+ * meanMotion(3.986004418e14, 6.371e6 + 420e3); // ≈ 0.001128 rad/s
32
+ * ```
33
+ *
34
+ * :::
35
+ *
21
36
  * @param mu - Standard gravitational parameter $ \mu $ (finite, > 0).
22
37
  * @param a - Semi-major axis $ a $ (finite, > 0).
23
38
  * @returns Mean motion $ n $ in **rad/s**.
@@ -1 +1 @@
1
- {"version":3,"file":"mean-motion.d.ts","sourceRoot":"","sources":["../../../src/categories/orbits/mean-motion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,eAAO,MAAM,UAAU,GAAI,IAAI,MAAM,EAAE,GAAG,MAAM,KAAG,MAYlD,CAAC"}
1
+ {"version":3,"file":"mean-motion.d.ts","sourceRoot":"","sources":["../../../src/categories/orbits/mean-motion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,eAAO,MAAM,UAAU,GAAI,IAAI,MAAM,EAAE,GAAG,MAAM,KAAG,MAYlD,CAAC"}
@@ -18,6 +18,21 @@
18
18
  * Common usage: reference rate for relative motion models (e.g., Clohessy–Wiltshire / Hill),
19
19
  * orbital period estimates, and circular-orbit dynamics.
20
20
  *
21
+ * ::: practice The ISS, orbit by orbit
22
+ *
23
+ * **15.51 orbits/day**
24
+ *
25
+ * _Mean motion at 420 km altitude_
26
+ *
27
+ * The function returns 0.001128 rad/s. Multiply by 86 400 s and divide by 2π for
28
+ * orbits per day, the unit used in a satellite's two-line elements (TLEs).
29
+ *
30
+ * ```ts
31
+ * meanMotion(3.986004418e14, 6.371e6 + 420e3); // ≈ 0.001128 rad/s
32
+ * ```
33
+ *
34
+ * :::
35
+ *
21
36
  * @param mu - Standard gravitational parameter $ \mu $ (finite, > 0).
22
37
  * @param a - Semi-major axis $ a $ (finite, > 0).
23
38
  * @returns Mean motion $ n $ in **rad/s**.
@@ -1 +1 @@
1
- {"version":3,"file":"mean-motion.js","sourceRoot":"","sources":["../../../src/categories/orbits/mean-motion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EAAU,EAAE,CAAS,EAAU,EAAE;IAC1D,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;QACtB,MAAM,IAAI,SAAS,CAAC,gCAAgC,EAAE,EAAE,CAAC,CAAC;IAE5D,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;QACrB,MAAM,IAAI,SAAS,CAAC,+BAA+B,CAAC,EAAE,CAAC,CAAC;IAE1D,IAAI,EAAE,IAAI,CAAC;QAAE,MAAM,IAAI,UAAU,CAAC,6BAA6B,EAAE,EAAE,CAAC,CAAC;IAErE,IAAI,CAAC,IAAI,CAAC;QAAE,MAAM,IAAI,UAAU,CAAC,4BAA4B,CAAC,EAAE,CAAC,CAAC;IAElE,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACrC,CAAC,CAAC"}
1
+ {"version":3,"file":"mean-motion.js","sourceRoot":"","sources":["../../../src/categories/orbits/mean-motion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EAAU,EAAE,CAAS,EAAU,EAAE;IAC1D,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;QACtB,MAAM,IAAI,SAAS,CAAC,gCAAgC,EAAE,EAAE,CAAC,CAAC;IAE5D,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;QACrB,MAAM,IAAI,SAAS,CAAC,+BAA+B,CAAC,EAAE,CAAC,CAAC;IAE1D,IAAI,EAAE,IAAI,CAAC;QAAE,MAAM,IAAI,UAAU,CAAC,6BAA6B,EAAE,EAAE,CAAC,CAAC;IAErE,IAAI,CAAC,IAAI,CAAC;QAAE,MAAM,IAAI,UAAU,CAAC,4BAA4B,CAAC,EAAE,CAAC,CAAC;IAElE,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACrC,CAAC,CAAC"}
@@ -17,6 +17,23 @@ import { PeriApoRadiiType } from '@interstellar-tools/types';
17
17
  * - Inputs: ($ a $) in **meters (m)**, ($ e $) dimensionless.
18
18
  * - Output: ($ r_p, r_a $) in **meters (m)**.
19
19
  *
20
+ * ::: practice Molniya orbit
21
+ *
22
+ * **545 km / 39 913 km**
23
+ *
24
+ * _Altitude at perigee and apogee_
25
+ *
26
+ * With e = 0.74, a Molniya satellite races through perigee and spends most of its
27
+ * 12 hour orbit slowly crossing apogee, high above the northern latitudes it
28
+ * serves.
29
+ *
30
+ * ```ts
31
+ * periApoapsisRadii(26600e3, 0.74);
32
+ * // rp = 6 916 km, ra = 46 284 km from Earth's centre
33
+ * ```
34
+ *
35
+ * :::
36
+ *
20
37
  * @param {number} a Semi-major axis ($ a $) (m). Must be finite and **≠ 0**.
21
38
  * @param {number} e Eccentricity ($ e $) (dimensionless). Must be finite and **≥ 0**.
22
39
  * @returns {{ rp: number; ra: number | null }} Object with periapsis `rp` and apoapsis `ra` (or `null` if undefined for hyperbolic).
@@ -1 +1 @@
1
- {"version":3,"file":"peri-apoapsis-radii.d.ts","sourceRoot":"","sources":["../../../src/categories/orbits/peri-apoapsis-radii.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAG7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,eAAO,MAAM,iBAAiB,GAAI,GAAG,MAAM,EAAE,GAAG,MAAM,KAAG,gBAsDxD,CAAC"}
1
+ {"version":3,"file":"peri-apoapsis-radii.d.ts","sourceRoot":"","sources":["../../../src/categories/orbits/peri-apoapsis-radii.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAG7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AAEH,eAAO,MAAM,iBAAiB,GAAI,GAAG,MAAM,EAAE,GAAG,MAAM,KAAG,gBAsDxD,CAAC"}
@@ -17,6 +17,23 @@
17
17
  * - Inputs: ($ a $) in **meters (m)**, ($ e $) dimensionless.
18
18
  * - Output: ($ r_p, r_a $) in **meters (m)**.
19
19
  *
20
+ * ::: practice Molniya orbit
21
+ *
22
+ * **545 km / 39 913 km**
23
+ *
24
+ * _Altitude at perigee and apogee_
25
+ *
26
+ * With e = 0.74, a Molniya satellite races through perigee and spends most of its
27
+ * 12 hour orbit slowly crossing apogee, high above the northern latitudes it
28
+ * serves.
29
+ *
30
+ * ```ts
31
+ * periApoapsisRadii(26600e3, 0.74);
32
+ * // rp = 6 916 km, ra = 46 284 km from Earth's centre
33
+ * ```
34
+ *
35
+ * :::
36
+ *
20
37
  * @param {number} a Semi-major axis ($ a $) (m). Must be finite and **≠ 0**.
21
38
  * @param {number} e Eccentricity ($ e $) (dimensionless). Must be finite and **≥ 0**.
22
39
  * @returns {{ rp: number; ra: number | null }} Object with periapsis `rp` and apoapsis `ra` (or `null` if undefined for hyperbolic).
@@ -1 +1 @@
1
- {"version":3,"file":"peri-apoapsis-radii.js","sourceRoot":"","sources":["../../../src/categories/orbits/peri-apoapsis-radii.ts"],"names":[],"mappings":"AAEA,2BAA2B;AAC3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,0BAA0B;AAC1B,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAS,EAAE,CAAS,EAAoB,EAAE;IAC1E,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACnC,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;IAC7D,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QACjC,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;IAC/C,CAAC;IAED,sBAAsB;IACtB,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QACV,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACX,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;gBACZ,MAAM,IAAI,KAAK,CACb,0GAA0G,CAC3G,CAAC;YACJ,CAAC;YAED,MAAM,IAAI,KAAK,CACb,mEAAmE,CACpE,CAAC;QACJ,CAAC;QAED,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACvB,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QAEvB,4CAA4C;QAC5C,IAAI,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,EAAE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,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC;YACd,OAAO,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;QAC7B,CAAC;QAED,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;IACtE,CAAC;IAED,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;AAC1B,CAAC,CAAC"}
@@ -25,6 +25,26 @@
25
25
  *
26
26
  * :::
27
27
  *
28
+ * ::: practice Energy of the ISS orbit
29
+ *
30
+ * **-29.35 MJ/kg**
31
+ *
32
+ * _Specific orbital energy at 420 km altitude_
33
+ *
34
+ * Negative means the orbit is bound. Escaping Earth from there takes 29.35 MJ
35
+ * more for every kilogram, which brings the energy up to zero.
36
+ *
37
+ * ```ts
38
+ * const mu = 3.986004418e14;
39
+ * const r = 6.371e6 + 420e3;
40
+ *
41
+ * const v = circularSpeed(r, mu);
42
+ *
43
+ * specificMechanicalEnergy(v, r, mu); // ≈ -2.935e7 J/kg
44
+ * ```
45
+ *
46
+ * :::
47
+ *
28
48
  * @param {number} v Speed magnitude ($ v $) (m/s).
29
49
  * @param {number} r Radius ($ r=\|\mathbf r\| $) from the central body (m).
30
50
  * @param {number} mu Gravitational parameter ($ \mu $) (m³/s²).
@@ -1 +1 @@
1
- {"version":3,"file":"specific-mechanical-energy.d.ts","sourceRoot":"","sources":["../../../src/categories/orbits/specific-mechanical-energy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,eAAO,MAAM,wBAAwB,GACnC,GAAG,MAAM,EACT,GAAG,MAAM,EACT,IAAI,MAAM,KACT,MAWF,CAAC"}
1
+ {"version":3,"file":"specific-mechanical-energy.d.ts","sourceRoot":"","sources":["../../../src/categories/orbits/specific-mechanical-energy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AACH,eAAO,MAAM,wBAAwB,GACnC,GAAG,MAAM,EACT,GAAG,MAAM,EACT,IAAI,MAAM,KACT,MAWF,CAAC"}
@@ -25,6 +25,26 @@
25
25
  *
26
26
  * :::
27
27
  *
28
+ * ::: practice Energy of the ISS orbit
29
+ *
30
+ * **-29.35 MJ/kg**
31
+ *
32
+ * _Specific orbital energy at 420 km altitude_
33
+ *
34
+ * Negative means the orbit is bound. Escaping Earth from there takes 29.35 MJ
35
+ * more for every kilogram, which brings the energy up to zero.
36
+ *
37
+ * ```ts
38
+ * const mu = 3.986004418e14;
39
+ * const r = 6.371e6 + 420e3;
40
+ *
41
+ * const v = circularSpeed(r, mu);
42
+ *
43
+ * specificMechanicalEnergy(v, r, mu); // ≈ -2.935e7 J/kg
44
+ * ```
45
+ *
46
+ * :::
47
+ *
28
48
  * @param {number} v Speed magnitude ($ v $) (m/s).
29
49
  * @param {number} r Radius ($ r=\|\mathbf r\| $) from the central body (m).
30
50
  * @param {number} mu Gravitational parameter ($ \mu $) (m³/s²).
@@ -1 +1 @@
1
- {"version":3,"file":"specific-mechanical-energy.js","sourceRoot":"","sources":["../../../src/categories/orbits/specific-mechanical-energy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACtC,CAAS,EACT,CAAS,EACT,EAAU,EACF,EAAE;IACV,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;IAEpE,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;IAE9D,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IAEvE,OAAO,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAC9B,CAAC,CAAC"}
1
+ {"version":3,"file":"specific-mechanical-energy.js","sourceRoot":"","sources":["../../../src/categories/orbits/specific-mechanical-energy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACtC,CAAS,EACT,CAAS,EACT,EAAU,EACF,EAAE;IACV,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;IAEpE,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;IAE9D,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IAEvE,OAAO,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAC9B,CAAC,CAAC"}
@@ -14,6 +14,23 @@
14
14
  * Units:
15
15
  * - Output `rSOI` has the same distance unit as `a` (since the mass ratio is dimensionless).
16
16
  *
17
+ * ::: practice Earth's sphere of influence
18
+ *
19
+ * **925 000 km**
20
+ *
21
+ * _Where Earth's gravity outweighs the Sun's_
22
+ *
23
+ * The Moon, at 384 400 km, is well inside it. Beyond this distance, a
24
+ * spacecraft's path is best described as an orbit around the Sun.
25
+ *
26
+ * ```ts
27
+ * const au = 1.495978707e11; // m
28
+ *
29
+ * sphereOfInfluenceRadius(au, 5.972e24, 1.989e30); // ≈ 9.245e8 m
30
+ * ```
31
+ *
32
+ * :::
33
+ *
17
34
  * @param {number} a Semi-major axis `a` of the secondary around the primary (finite, > 0).
18
35
  * @param {number} m Mass of the secondary body `m` (finite, > 0).
19
36
  * @param {number} M Mass of the primary body `M` (finite, > 0).
@@ -1 +1 @@
1
- {"version":3,"file":"sphere-of-influence-radius.d.ts","sourceRoot":"","sources":["../../../src/categories/orbits/sphere-of-influence-radius.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,uBAAuB,GAClC,GAAG,MAAM,EACT,GAAG,MAAM,EACT,GAAG,MAAM,KACR,MA0BF,CAAC"}
1
+ {"version":3,"file":"sphere-of-influence-radius.d.ts","sourceRoot":"","sources":["../../../src/categories/orbits/sphere-of-influence-radius.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,eAAO,MAAM,uBAAuB,GAClC,GAAG,MAAM,EACT,GAAG,MAAM,EACT,GAAG,MAAM,KACR,MA0BF,CAAC"}
@@ -14,6 +14,23 @@
14
14
  * Units:
15
15
  * - Output `rSOI` has the same distance unit as `a` (since the mass ratio is dimensionless).
16
16
  *
17
+ * ::: practice Earth's sphere of influence
18
+ *
19
+ * **925 000 km**
20
+ *
21
+ * _Where Earth's gravity outweighs the Sun's_
22
+ *
23
+ * The Moon, at 384 400 km, is well inside it. Beyond this distance, a
24
+ * spacecraft's path is best described as an orbit around the Sun.
25
+ *
26
+ * ```ts
27
+ * const au = 1.495978707e11; // m
28
+ *
29
+ * sphereOfInfluenceRadius(au, 5.972e24, 1.989e30); // ≈ 9.245e8 m
30
+ * ```
31
+ *
32
+ * :::
33
+ *
17
34
  * @param {number} a Semi-major axis `a` of the secondary around the primary (finite, > 0).
18
35
  * @param {number} m Mass of the secondary body `m` (finite, > 0).
19
36
  * @param {number} M Mass of the primary body `M` (finite, > 0).
@@ -1 +1 @@
1
- {"version":3,"file":"sphere-of-influence-radius.js","sourceRoot":"","sources":["../../../src/categories/orbits/sphere-of-influence-radius.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACrC,CAAS,EACT,CAAS,EACT,CAAS,EACD,EAAE;IACV,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;QACxB,MAAM,IAAI,SAAS,CAAC,wCAAwC,CAAC,EAAE,CAAC,CAAC;IACnE,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;QACxB,MAAM,IAAI,SAAS,CAAC,wCAAwC,CAAC,EAAE,CAAC,CAAC;IACnE,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;QACxB,MAAM,IAAI,SAAS,CAAC,wCAAwC,CAAC,EAAE,CAAC,CAAC;IACnE,CAAC;IAED,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACX,MAAM,IAAI,UAAU,CAAC,4BAA4B,CAAC,EAAE,CAAC,CAAC;IACxD,CAAC;IAED,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACX,MAAM,IAAI,UAAU,CAAC,4BAA4B,CAAC,EAAE,CAAC,CAAC;IACxD,CAAC;IAED,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACX,MAAM,IAAI,UAAU,CAAC,4BAA4B,CAAC,EAAE,CAAC,CAAC;IACxD,CAAC;IAED,OAAO,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;AACpC,CAAC,CAAC"}
1
+ {"version":3,"file":"sphere-of-influence-radius.js","sourceRoot":"","sources":["../../../src/categories/orbits/sphere-of-influence-radius.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACrC,CAAS,EACT,CAAS,EACT,CAAS,EACD,EAAE;IACV,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;QACxB,MAAM,IAAI,SAAS,CAAC,wCAAwC,CAAC,EAAE,CAAC,CAAC;IACnE,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;QACxB,MAAM,IAAI,SAAS,CAAC,wCAAwC,CAAC,EAAE,CAAC,CAAC;IACnE,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;QACxB,MAAM,IAAI,SAAS,CAAC,wCAAwC,CAAC,EAAE,CAAC,CAAC;IACnE,CAAC;IAED,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACX,MAAM,IAAI,UAAU,CAAC,4BAA4B,CAAC,EAAE,CAAC,CAAC;IACxD,CAAC;IAED,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACX,MAAM,IAAI,UAAU,CAAC,4BAA4B,CAAC,EAAE,CAAC,CAAC;IACxD,CAAC;IAED,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACX,MAAM,IAAI,UAAU,CAAC,4BAA4B,CAAC,EAAE,CAAC,CAAC;IACxD,CAAC;IAED,OAAO,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;AACpC,CAAC,CAAC"}
@@ -22,6 +22,25 @@
22
22
  *
23
23
  * :::
24
24
  *
25
+ * ::: practice Departing for Mars
26
+ *
27
+ * **32.73 km/s**
28
+ *
29
+ * _Speed at the start of a Hohmann transfer to Mars_
30
+ *
31
+ * Earth moves around the Sun at 29.78 km/s, so a spacecraft leaving on the
32
+ * transfer orbit needs 2.95 km/s on top of Earth's own speed.
33
+ *
34
+ * ```ts
35
+ * const au = 1.495978707e11; // m
36
+ * const muSun = 1.32712440018e20; // m³/s²
37
+ * const a = ((1 + 1.524) / 2) * au; // transfer orbit
38
+ *
39
+ * visVivaSpeed(au, a, muSun); // ≈ 32 731 m/s
40
+ * ```
41
+ *
42
+ * :::
43
+ *
25
44
  * @param {number} r Radius ($ r $) (m), distance to the attracting body.
26
45
  * @param {number} a Semi-major axis ($ a $) (m). Use `Infinity` for parabolic, negative for hyperbolic.
27
46
  * @param {number} mu Gravitational parameter ($ \mu $) (m³/s²).
@@ -1 +1 @@
1
- {"version":3,"file":"vis-viva-speed.d.ts","sourceRoot":"","sources":["../../../src/categories/orbits/vis-viva-speed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,eAAO,MAAM,YAAY,GAAI,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,IAAI,MAAM,KAAG,MAsC/D,CAAC"}
1
+ {"version":3,"file":"vis-viva-speed.d.ts","sourceRoot":"","sources":["../../../src/categories/orbits/vis-viva-speed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,eAAO,MAAM,YAAY,GAAI,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,IAAI,MAAM,KAAG,MAsC/D,CAAC"}
@@ -22,6 +22,25 @@
22
22
  *
23
23
  * :::
24
24
  *
25
+ * ::: practice Departing for Mars
26
+ *
27
+ * **32.73 km/s**
28
+ *
29
+ * _Speed at the start of a Hohmann transfer to Mars_
30
+ *
31
+ * Earth moves around the Sun at 29.78 km/s, so a spacecraft leaving on the
32
+ * transfer orbit needs 2.95 km/s on top of Earth's own speed.
33
+ *
34
+ * ```ts
35
+ * const au = 1.495978707e11; // m
36
+ * const muSun = 1.32712440018e20; // m³/s²
37
+ * const a = ((1 + 1.524) / 2) * au; // transfer orbit
38
+ *
39
+ * visVivaSpeed(au, a, muSun); // ≈ 32 731 m/s
40
+ * ```
41
+ *
42
+ * :::
43
+ *
25
44
  * @param {number} r Radius ($ r $) (m), distance to the attracting body.
26
45
  * @param {number} a Semi-major axis ($ a $) (m). Use `Infinity` for parabolic, negative for hyperbolic.
27
46
  * @param {number} mu Gravitational parameter ($ \mu $) (m³/s²).
@@ -1 +1 @@
1
- {"version":3,"file":"vis-viva-speed.js","sourceRoot":"","sources":["../../../src/categories/orbits/vis-viva-speed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAS,EAAE,CAAS,EAAE,EAAU,EAAU,EAAE;IACvE,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;IAC9D,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC;QACnC,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACvE,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;QACxB,iEAAiE;QACjE,IAAI,CAAC,KAAK,QAAQ,EAAE,CAAC;YACnB,kBAAkB;YAClB,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QACjC,CAAC;QAED,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;IAC9E,CAAC;IAED,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACZ,M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AE,CAAC;QACxB,iEAAiE;QACjE,IAAI,CAAC,KAAK,QAAQ,EAAE,CAAC;YACnB,kBAAkB;YAClB,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QACjC,CAAC;QAED,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;IAC9E,CAAC;IAED,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;IACpE,CAAC;IAED,MAAM,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,gDAAgD;IACpE,MAAM,QAAQ,GAAG,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;IAErC,oEAAoE;IACpE,IAAI,QAAQ,GAAG,CAAC,EAAE,CAAC;QACjB,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAEvC,IAAI,QAAQ,GAAG,CAAC,GAAG;YAAE,OAAO,CAAC,CAAC,CAAC,yBAAyB;QAExD,MAAM,IAAI,KAAK,CACb,uCAAuC,EAAE,OAAO,CAAC,OAAO,CAAC,IAAI,CAC9D,CAAC;IACJ,CAAC;IAED,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAC7B,CAAC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -19,8 +19,8 @@ export * from './categories/helpers/radians.js';
19
19
  export * from './categories/helpers/rot-1.js';
20
20
  export * from './categories/helpers/rot-3.js';
21
21
  export * from './categories/helpers/transpose-3.js';
22
+ export * from './categories/anomalies/advance-mean-anomaly.js';
22
23
  export * from './categories/anomalies/eccentric-to-true-anomaly.js';
23
- export * from './categories/anomalies/mean-to-eccentric-anomaly.js';
24
24
  export * from './categories/anomalies/true-to-mean-anomaly.js';
25
25
  export * from './categories/kepler/solve-kepler-bisection.js';
26
26
  export * from './categories/kepler/solve-kepler-high-eccentricity.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,cAAc,qCAAqC,CAAC;AAEpD,cAAc,kCAAkC,CAAC;AAIjD,cAAc,8DAA8D,CAAC;AAE7E,cAAc,kEAAkE,CAAC;AAEjF,cAAc,wDAAwD,CAAC;AAEvE,cAAc,8DAA8D,CAAC;AAE7E,cAAc,qDAAqD,CAAC;AAEpE,cAAc,4DAA4D,CAAC;AAI3E,cAAc,wCAAwC,CAAC;AAEvD,cAAc,+BAA+B,CAAC;AAE9C,cAAc,kCAAkC,CAAC;AAEjD,cAAc,8BAA8B,CAAC;AAE7C,cAAc,iCAAiC,CAAC;AAEhD,cAAc,+BAA+B,CAAC;AAE9C,cAAc,+BAA+B,CAAC;AAE9C,cAAc,qCAAqC,CAAC;AAIpD,cAAc,qDAAqD,CAAC;AAEpE,cAAc,qDAAqD,CAAC;AAEpE,cAAc,gDAAgD,CAAC;AAI/D,cAAc,+CAA+C,CAAC;AAE9D,cAAc,uDAAuD,CAAC;AAEtE,cAAc,oDAAoD,CAAC;AAEnE,cAAc,qCAAqC,CAAC;AAIpD,cAAc,8CAA8C,CAAC;AAE7D,cAAc,uCAAuC,CAAC;AAEtD,cAAc,6CAA6C,CAAC;AAE5D,cAAc,iDAAiD,CAAC;AAIhE,cAAc,sDAAsD,CAAC;AAErE,cAAc,iDAAiD,CAAC;AAEhE,cAAc,uCAAuC,CAAC;AAEtD,cAAc,4CAA4C,CAAC;AAE3D,cAAc,qCAAqC,CAAC;AAEpD,cAAc,4DAA4D,CAAC;AAE3E,cAAc,mDAAmD,CAAC;AAElE,cAAc,oDAAoD,CAAC;AAEnE,cAAc,iDAAiD,CAAC;AAEhE,cAAc,sCAAsC,CAAC;AAErD,cAAc,oCAAoC,CAAC;AAEnD,cAAc,4CAA4C,CAAC;AAE3D,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AEtD,cAAc,4CAA4C,CAAC;AAE3D,cAAc,qCAAqC,CAAC;AAEpD,cAAc,4DAA4D,CAAC;AAE3E,cAAc,mDAAmD,CAAC;AAElE,cAAc,oDAAoD,CAAC;AAEnE,cAAc,iDAAiD,CAAC;AAEhE,cAAc,sCAAsC,CAAC;AAErD,cAAc,oCAAoC,CAAC;AAEnD,cAAc,4CAA4C,CAAC;AAE3D,cAAc,gEAAgE,CAAC;AAE/E,cAAc,kDAAkD,CAAC;AAEjE,cAAc,mDAAmD,CAAC;AAElE,cAAc,mDAAmD,CAAC;AAElE,cAAc,uCAAuC,CAAC;AAItD,cAAc,kDAAkD,CAAC;AAEjE,cAAc,yDAAyD,CAAC;AAExE,cAAc,6CAA6C,CAAC;AAE5D,cAAc,+CAA+C,CAAC;AAE9D,cAAc,iDAAiD,CAAC;AAEhE,cAAc,oDAAoD,CAAC;AAEnE,cAAc,mDAAmD,CAAC"}
package/dist/index.js CHANGED
@@ -23,8 +23,8 @@ export * from './categories/helpers/rot-1.js';
23
23
  export * from './categories/helpers/rot-3.js';
24
24
  export * from './categories/helpers/transpose-3.js';
25
25
  // categories/anomalies
26
+ export * from './categories/anomalies/advance-mean-anomaly.js';
26
27
  export * from './categories/anomalies/eccentric-to-true-anomaly.js';
27
- export * from './categories/anomalies/mean-to-eccentric-anomaly.js';
28
28
  export * from './categories/anomalies/true-to-mean-anomaly.js';
29
29
  // categories/kepler (solvers)
30
30
  export * from './categories/kepler/solve-kepler-bisection.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,mBAAmB;AACnB,cAAc,qCAAqC,CAAC;AAEpD,cAAc,kCAAkC,CAAC;AAEjD,yBAAyB;AAEzB,cAAc,8DAA8D,CAAC;AAE7E,cAAc,kEAAkE,CAAC;AAEjF,cAAc,wDAAwD,CAAC;AAEvE,cAAc,8DAA8D,CAAC;AAE7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oD,CAAC;AAEnE,cAAc,iDAAiD,CAAC;AAEhE,cAAc,sCAAsC,CAAC;AAErD,cAAc,oCAAoC,CAAC;AAEnD,cAAc,4CAA4C,CAAC;AAE3D,cAAc,gEAAgE,CAAC;AAE/E,cAAc,kDAAkD,CAAC;AAEjE,cAAc,mDAAmD,CAAC;AAElE,cAAc,mDAAmD,CAAC;AAElE,cAAc,uCAAuC,CAAC;AAEtD,wBAAwB;AAExB,cAAc,kDAAkD,CAAC;AAEjE,cAAc,yDAAyD,CAAC;AAExE,cAAc,6CAA6C,CAAC;AAE5D,cAAc,+CAA+C,CAAC;AAE9D,cAAc,iDAAiD,CAAC;AAEhE,cAAc,oDAAoD,CAAC;AAEnE,cAAc,mDAAmD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@interstellar-tools/equations",
3
- "version": "0.60.2",
3
+ "version": "0.61.1",
4
4
  "description": "Curated, well-tested orbital mechanics and dynamics formulas (e.g., Newtonian gravity, vis-viva, Kepler's 3rd law, escape/circular speeds, specific energy, specific angular momentum, peri/apoapsis radii).",
5
5
  "keywords": [
6
6
  "interstellar",
@@ -110,12 +110,13 @@
110
110
  "test:ci": "glob-bin -c \"node --import tsx --test --no-warnings --experimental-test-coverage --test-coverage-exclude='**/__tests__/helpers/**' --test-reporter=cobertura --test-reporter-destination=coverage/cobertura-coverage.xml --test-reporter=spec --test-reporter-destination=stdout\" \"**/__tests__/**/*.spec.ts\""
111
111
  },
112
112
  "dependencies": {
113
- "@interstellar-tools/constants": "^0.60.0",
113
+ "@interstellar-tools/constants": "^0.61.0",
114
114
  "@interstellar-tools/temporal": "^0.60.0",
115
- "@interstellar-tools/types": "^0.60.0"
115
+ "@interstellar-tools/types": "^0.61.0"
116
116
  },
117
117
  "devDependencies": {
118
118
  "@types/node": "^24.19.2",
119
+ "fast-check": "4.10.2",
119
120
  "prettier": "^3.9.10",
120
121
  "typescript": "^6.0.3"
121
122
  },
@@ -1,47 +0,0 @@
1
- import type { CelestialBodyType, Radians, TemporalInterface } from '@interstellar-tools/types';
2
- /**
3
- * Computes the **mean anomaly** ($M$) of a celestial body for a given time step.
4
- *
5
- * **Mathematical Explanation:**
6
- *
7
- * The **mean anomaly** is a measure of the position of an orbiting body as if it moved
8
- * with uniform angular motion along a circular orbit with the same period as the actual
9
- * elliptical orbit. It is computed as:
10
- *
11
- * $$ M = M_0 + n \cdot \Delta T $$
12
- *
13
- * where:
14
- * - $M_0$ is the **initial mean anomaly** (converted from true anomaly if necessary).
15
- * - $n$ is the **mean motion**, given by:
16
- * $$ n = \frac{2\pi}{P} $$
17
- * where $P$ is the orbital period in days.
18
- * - $\Delta T$ is the time step.
19
- *
20
- * @param {CelestialBodyType} body - The celestial body for which to compute the mean anomaly.
21
- * @param {TemporalInterface} timeStep - The time step over which to compute the change.
22
- * @returns {Radians} The computed mean anomaly in radians.
23
- *
24
- * @throws {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError | RangeError} If the body's eccentricity is outside the range $0 \leq e < 1$.
25
- *
26
- * @example
27
- * ```ts
28
- * import { meanToEccentricAnomaly } from '@interstellar-tools/equations';
29
- *
30
- * const mars: CelestialBodyType = {
31
- * name: 'Mars',
32
- * e: 0.0934, // Eccentricity of Mars' orbit
33
- * angle: 1.047, // Initial true anomaly (in radians)
34
- * period: { value: 687, unit: 'day' }, // Orbital period in days
35
- * };
36
- *
37
- * const timeStep: TemporalInterface = { value: 1, unit: 'day' }; // 1-day step
38
- * const meanAnomaly = meanToEccentricAnomaly(mars, timeStep);
39
- * console.log(meanAnomaly); // Output: Computed mean anomaly in radians
40
- * ```
41
- *
42
- * @see [Mean Anomaly (Wikipedia)](https://en.wikipedia.org/wiki/Mean_anomaly)
43
- * @see [Orbital Mechanics (NASA)](https://solarsystem.nasa.gov/basics/chapter2-2/)
44
- * @group Anomalies
45
- */
46
- export declare const meanToEccentricAnomaly: (body: CelestialBodyType, timeStep: TemporalInterface) => Radians;
47
- //# sourceMappingURL=mean-to-eccentric-anomaly.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mean-to-eccentric-anomaly.d.ts","sourceRoot":"","sources":["../../../src/categories/anomalies/mean-to-eccentric-anomaly.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,iBAAiB,EACjB,OAAO,EACP,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AAQnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,eAAO,MAAM,sBAAsB,GACjC,MAAM,iBAAiB,EACvB,UAAU,iBAAiB,KAC1B,OAoCF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"mean-to-eccentric-anomaly.js","sourceRoot":"","sources":["../../../src/categories/anomalies/mean-to-eccentric-anomaly.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAOnE,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,2BAA2B;AAC3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,0BAA0B;AAC1B,MAAM,CAAC,MAAM,sBAAsB,GAAG,CACpC,IAAuB,EACvB,QAA2B,EAClB,EAAE;IACX,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAElC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACpB,MAAM,IAAI,UAAU,CAClB,yBAAyB,CAAC,6CAA6C,CACxE,CAAC;IACJ,CAAC;IAED,iDAAiD;IACjD,MAAM,YAAY,GAAG,mBAAmB,CAAC,MAAM,E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