@interstellar-tools/equations 1.2.0 → 1.3.0

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.
@@ -0,0 +1,58 @@
1
+ import type { CwState, Vector3DTupleType } from '@interstellar-tools/types';
2
+ export interface CwTwoImpulseTransferInterface {
3
+ /** First burn, at the start, in m/s (LVLH). */
4
+ dv1: Vector3DTupleType;
5
+ /** Second burn, on arrival, in m/s (LVLH). */
6
+ dv2: Vector3DTupleType;
7
+ }
8
+ /**
9
+ * Compute the **two burns of a Clohessy–Wiltshire rendezvous**: from a relative state to a target state in a given time.
10
+ *
11
+ * $$
12
+ * \mathbf v_0^+ = \Phi_{rv}^{-1}\left(\mathbf r_f - \Phi_{rr}\,\mathbf r_0\right), \quad
13
+ * \Delta\mathbf v_1 = \mathbf v_0^+ - \mathbf v_0, \quad
14
+ * \Delta\mathbf v_2 = \mathbf v_f - \left(\Phi_{vr}\,\mathbf r_0 + \Phi_{vv}\,\mathbf v_0^+\right)
15
+ * $$
16
+ *
17
+ * with the blocks of $ \Phi(t) $ from {@link cwStateTransition}.
18
+ *
19
+ * **Units**
20
+ * - Inputs: states in **m** and **m/s**, `n` in **rad/s**, `t` in **s**.
21
+ * - Output: both burns in **m/s**, as vectors in the LVLH frame.
22
+ *
23
+ * ::: info Notes
24
+ *
25
+ * - The first burn puts the deputy on a path that reaches the target position after `t`; the second matches the target velocity there. For a rendezvous with the chief, the target state is all zeros.
26
+ * - Some transfer times can't be targeted: in the orbital plane, every whole number of orbits ($ nt = 2\pi k $), and out of plane, every half orbit, where the cross-track motion returns to $ \pm z_0 $ whatever the burn. At a half orbit the cross-track burn is zero if the target is already on that path, and otherwise the function throws.
27
+ * - Valid near a circular reference orbit, for small separations.
28
+ *
29
+ * :::
30
+ *
31
+ * @param state0 - Deputy's relative state before the first burn `[x, y, z, xDot, yDot, zDot]` (finite).
32
+ * @param target - State to arrive at `[x, y, z, xDot, yDot, zDot]` (finite); all zeros to rendezvous with the chief.
33
+ * @param n - Mean motion of the circular reference orbit in **rad/s** (finite, > 0).
34
+ * @param t - Transfer time in **s** (finite, > 0).
35
+ * @returns The two burns `dv1` and `dv2` in **m/s**.
36
+ * @throws {TypeError} If any input is not a finite number.
37
+ * @throws {RangeError} If `n <= 0`, `t <= 0`, or the transfer time can't be targeted.
38
+ * @group Manoeuvres
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * import type { CwState } from '@interstellar-tools/types';
43
+ *
44
+ * // 1 km behind the chief, at rest: rendezvous in a quarter of an orbit
45
+ * const n = 0.00113;
46
+ * const { dv1, dv2 } = cwTwoImpulseTransfer(
47
+ * [0, -1000, 0, 0, 0, 0],
48
+ * [0, 0, 0, 0, 0, 0],
49
+ * n,
50
+ * Math.PI / 2 / n
51
+ * );
52
+ * ```
53
+ *
54
+ * @see {@link cwPropagate}
55
+ * @see https://en.wikipedia.org/wiki/Clohessy%E2%80%93Wiltshire_equations Clohessy–Wiltshire equations
56
+ */
57
+ export declare const cwTwoImpulseTransfer: (state0: CwState, target: CwState, n: number, t: number) => CwTwoImpulseTransferInterface;
58
+ //# sourceMappingURL=cw-two-impulse-transfer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cw-two-impulse-transfer.d.ts","sourceRoot":"","sources":["../../../src/categories/manoeuvres/cw-two-impulse-transfer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAK5E,MAAM,WAAW,6BAA6B;IAC5C,+CAA+C;IAC/C,GAAG,EAAE,iBAAiB,CAAC;IACvB,8CAA8C;IAC9C,GAAG,EAAE,iBAAiB,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,eAAO,MAAM,oBAAoB,GAC/B,QAAQ,OAAO,EACf,QAAQ,OAAO,EACf,GAAG,MAAM,EACT,GAAG,MAAM,KACR,6BA+DF,CAAC"}
@@ -0,0 +1,104 @@
1
+ import { applyMatrix3 } from '../helpers/apply-matrix-3.js';
2
+ import { cwStateTransition } from '../orbits/cw-state-transition.js';
3
+ /**
4
+ * Compute the **two burns of a Clohessy–Wiltshire rendezvous**: from a relative state to a target state in a given time.
5
+ *
6
+ * $$
7
+ * \mathbf v_0^+ = \Phi_{rv}^{-1}\left(\mathbf r_f - \Phi_{rr}\,\mathbf r_0\right), \quad
8
+ * \Delta\mathbf v_1 = \mathbf v_0^+ - \mathbf v_0, \quad
9
+ * \Delta\mathbf v_2 = \mathbf v_f - \left(\Phi_{vr}\,\mathbf r_0 + \Phi_{vv}\,\mathbf v_0^+\right)
10
+ * $$
11
+ *
12
+ * with the blocks of $ \Phi(t) $ from {@link cwStateTransition}.
13
+ *
14
+ * **Units**
15
+ * - Inputs: states in **m** and **m/s**, `n` in **rad/s**, `t` in **s**.
16
+ * - Output: both burns in **m/s**, as vectors in the LVLH frame.
17
+ *
18
+ * ::: info Notes
19
+ *
20
+ * - The first burn puts the deputy on a path that reaches the target position after `t`; the second matches the target velocity there. For a rendezvous with the chief, the target state is all zeros.
21
+ * - Some transfer times can't be targeted: in the orbital plane, every whole number of orbits ($ nt = 2\pi k $), and out of plane, every half orbit, where the cross-track motion returns to $ \pm z_0 $ whatever the burn. At a half orbit the cross-track burn is zero if the target is already on that path, and otherwise the function throws.
22
+ * - Valid near a circular reference orbit, for small separations.
23
+ *
24
+ * :::
25
+ *
26
+ * @param state0 - Deputy's relative state before the first burn `[x, y, z, xDot, yDot, zDot]` (finite).
27
+ * @param target - State to arrive at `[x, y, z, xDot, yDot, zDot]` (finite); all zeros to rendezvous with the chief.
28
+ * @param n - Mean motion of the circular reference orbit in **rad/s** (finite, > 0).
29
+ * @param t - Transfer time in **s** (finite, > 0).
30
+ * @returns The two burns `dv1` and `dv2` in **m/s**.
31
+ * @throws {TypeError} If any input is not a finite number.
32
+ * @throws {RangeError} If `n <= 0`, `t <= 0`, or the transfer time can't be targeted.
33
+ * @group Manoeuvres
34
+ *
35
+ * @example
36
+ * ```ts
37
+ * import type { CwState } from '@interstellar-tools/types';
38
+ *
39
+ * // 1 km behind the chief, at rest: rendezvous in a quarter of an orbit
40
+ * const n = 0.00113;
41
+ * const { dv1, dv2 } = cwTwoImpulseTransfer(
42
+ * [0, -1000, 0, 0, 0, 0],
43
+ * [0, 0, 0, 0, 0, 0],
44
+ * n,
45
+ * Math.PI / 2 / n
46
+ * );
47
+ * ```
48
+ *
49
+ * @see {@link cwPropagate}
50
+ * @see https://en.wikipedia.org/wiki/Clohessy%E2%80%93Wiltshire_equations Clohessy–Wiltshire equations
51
+ */
52
+ export const cwTwoImpulseTransfer = (state0, target, n, t) => {
53
+ for (const [name, state] of [
54
+ ['state0', state0],
55
+ ['target', target]
56
+ ]) {
57
+ for (const x of state)
58
+ if (!Number.isFinite(x))
59
+ throw new TypeError(`${name} must have finite components. Received: ${x}`);
60
+ }
61
+ if (!Number.isFinite(t))
62
+ throw new TypeError(`t must be a finite number. Received: ${t}`);
63
+ if (t <= 0)
64
+ throw new RangeError(`t must be > 0. Received: ${t}`);
65
+ const { rr, rv, vr, vv } = cwStateTransition(n, t);
66
+ const r0 = [state0[0], state0[1], state0[2]];
67
+ const v0 = [state0[3], state0[4], state0[5]];
68
+ const fromR0 = applyMatrix3(rr, r0);
69
+ // Position the first burn's velocity has to cover
70
+ const dx = target[0] - fromR0[0];
71
+ const dy = target[1] - fromR0[1];
72
+ const dz = target[2] - fromR0[2];
73
+ // In-plane: invert the 2×2 block of Φrv
74
+ const [[a, b], [c, d]] = rv;
75
+ const det = a * d - b * c;
76
+ if (Math.abs(det) * n * n <= 1e-10)
77
+ throw new RangeError(`The transfer time is a whole number of orbits (nt = 2πk), which can't be targeted in the orbital plane. Received: nt=${n * t}`);
78
+ const xDot = (d * dx - b * dy) / det;
79
+ const yDot = (-c * dx + a * dy) / det;
80
+ // Out of plane: z(t) = c z0 + (s / n) zDot0
81
+ const sOverN = rv[2][2];
82
+ let zDot;
83
+ if (Math.abs(sOverN) * n > 1e-10) {
84
+ zDot = dz / sOverN;
85
+ }
86
+ else if (Math.abs(dz) <= 1e-9 * Math.max(1, Math.abs(target[2]))) {
87
+ zDot = v0[2];
88
+ }
89
+ else {
90
+ throw new RangeError(`At a half orbit (nt = πk) the cross-track position can't be changed. Received: nt=${n * t}`);
91
+ }
92
+ const v0Plus = [xDot, yDot, zDot];
93
+ const fromR = applyMatrix3(vr, r0);
94
+ const fromV = applyMatrix3(vv, v0Plus);
95
+ return {
96
+ dv1: [xDot - v0[0], yDot - v0[1], zDot - v0[2]],
97
+ dv2: [
98
+ target[3] - (fromR[0] + fromV[0]),
99
+ target[4] - (fromR[1] + fromV[1]),
100
+ target[5] - (fromR[2] + fromV[2])
101
+ ]
102
+ };
103
+ };
104
+ //# sourceMappingURL=cw-two-impulse-transfer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cw-two-impulse-transfer.js","sourceRoot":"","sources":["../../../src/categories/manoeuvres/cw-two-impulse-transfer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AASrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,MAAe,EACf,MAAe,EACf,CAAS,EACT,CAAS,EACsB,EAAE;IACjC,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI;QAC1B,CAAC,QAAQ,EAAE,MAAM,CAAC;QAClB,CAAC,QAAQ,EAAE,MAAM,CAAC;KACV,EAAE,CAAC;QACX,KAAK,MAAM,CAAC,IAAI,KAAK;YACnB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACrB,MAAM,IAAI,SAAS,CACjB,GAAG,IAAI,2CAA2C,CAAC,EAAE,CACtD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MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YACjC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YACjC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;SAClC;KACF,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,55 @@
1
+ import type { Radians } from '@interstellar-tools/types';
2
+ /**
3
+ * Compute how long to **wait for a phase angle**: when a target, leading a chaser on another circular orbit, will be at the angle a manoeuvre needs.
4
+ *
5
+ * The phase angle $ \theta $ is how far the target is ahead of the chaser, and it changes at the difference in mean motions:
6
+ *
7
+ * $$
8
+ * \dot\theta = n_\text{target} - n_\text{chaser}, \qquad
9
+ * t_\text{wait} = \frac{\theta_\text{required} - \theta_\text{now}}{n_\text{target} - n_\text{chaser}} \pmod{T_\text{syn}}
10
+ * $$
11
+ *
12
+ * returning the first time that's not negative.
13
+ *
14
+ * **Units**
15
+ * - Inputs: angles in **radians**, mean motions in **rad/s**.
16
+ * - Output: $ t_\text{wait} $ in **s**, in $ [0, T_\text{syn}) $.
17
+ *
18
+ * ::: info Notes
19
+ *
20
+ * - A chaser in a lower, faster orbit closes the gap: the phase angle shrinks.
21
+ * - For a Hohmann transfer to a target on a circular orbit, the required angle is $ \theta = \pi - n_\text{target}\, t_\text{transfer} $.
22
+ * - If the required angle is just behind, the wait is almost a whole synodic period; see {@link synodicPeriod}.
23
+ *
24
+ * :::
25
+ *
26
+ * @param thetaNow - Current phase angle, target ahead of chaser, in **radians** (finite).
27
+ * @param thetaRequired - Phase angle wanted, in **radians** (finite).
28
+ * @param nChaser - Chaser's mean motion in **rad/s** (finite, > 0).
29
+ * @param nTarget - Target's mean motion in **rad/s** (finite, > 0, not equal to `nChaser`).
30
+ * @returns Waiting time in **s**, in [0, synodic period).
31
+ * @throws {TypeError} If any input is not a finite number.
32
+ * @throws {RangeError} If a mean motion is `<= 0`, or both are equal (the phase never changes).
33
+ * @group Manoeuvres
34
+ *
35
+ * @example
36
+ * ```ts
37
+ * import type { Radians } from '@interstellar-tools/types';
38
+ *
39
+ * // Chaser 1° per orbit faster, target 10° ahead, burn when it's 4° ahead
40
+ * const nTarget = 0.00113;
41
+ * const nChaser = nTarget * (1 + 1 / 360);
42
+ * const t = phasingWaitTime(
43
+ * ((10 * Math.PI) / 180) as Radians,
44
+ * ((4 * Math.PI) / 180) as Radians,
45
+ * nChaser,
46
+ * nTarget
47
+ * );
48
+ * // t ≈ 6 orbits of the target
49
+ * ```
50
+ *
51
+ * @see {@link synodicPeriod}
52
+ * @see {@link hohmannTransferTime}
53
+ */
54
+ export declare const phasingWaitTime: (thetaNow: Radians, thetaRequired: Radians, nChaser: number, nTarget: number) => number;
55
+ //# sourceMappingURL=phasing-wait-time.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phasing-wait-time.d.ts","sourceRoot":"","sources":["../../../src/categories/manoeuvres/phasing-wait-time.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAEzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,eAAO,MAAM,eAAe,GAC1B,UAAU,OAAO,EACjB,eAAe,OAAO,EACtB,SAAS,MAAM,EACf,SAAS,MAAM,KACd,MA4BF,CAAC"}
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Compute how long to **wait for a phase angle**: when a target, leading a chaser on another circular orbit, will be at the angle a manoeuvre needs.
3
+ *
4
+ * The phase angle $ \theta $ is how far the target is ahead of the chaser, and it changes at the difference in mean motions:
5
+ *
6
+ * $$
7
+ * \dot\theta = n_\text{target} - n_\text{chaser}, \qquad
8
+ * t_\text{wait} = \frac{\theta_\text{required} - \theta_\text{now}}{n_\text{target} - n_\text{chaser}} \pmod{T_\text{syn}}
9
+ * $$
10
+ *
11
+ * returning the first time that's not negative.
12
+ *
13
+ * **Units**
14
+ * - Inputs: angles in **radians**, mean motions in **rad/s**.
15
+ * - Output: $ t_\text{wait} $ in **s**, in $ [0, T_\text{syn}) $.
16
+ *
17
+ * ::: info Notes
18
+ *
19
+ * - A chaser in a lower, faster orbit closes the gap: the phase angle shrinks.
20
+ * - For a Hohmann transfer to a target on a circular orbit, the required angle is $ \theta = \pi - n_\text{target}\, t_\text{transfer} $.
21
+ * - If the required angle is just behind, the wait is almost a whole synodic period; see {@link synodicPeriod}.
22
+ *
23
+ * :::
24
+ *
25
+ * @param thetaNow - Current phase angle, target ahead of chaser, in **radians** (finite).
26
+ * @param thetaRequired - Phase angle wanted, in **radians** (finite).
27
+ * @param nChaser - Chaser's mean motion in **rad/s** (finite, > 0).
28
+ * @param nTarget - Target's mean motion in **rad/s** (finite, > 0, not equal to `nChaser`).
29
+ * @returns Waiting time in **s**, in [0, synodic period).
30
+ * @throws {TypeError} If any input is not a finite number.
31
+ * @throws {RangeError} If a mean motion is `<= 0`, or both are equal (the phase never changes).
32
+ * @group Manoeuvres
33
+ *
34
+ * @example
35
+ * ```ts
36
+ * import type { Radians } from '@interstellar-tools/types';
37
+ *
38
+ * // Chaser 1° per orbit faster, target 10° ahead, burn when it's 4° ahead
39
+ * const nTarget = 0.00113;
40
+ * const nChaser = nTarget * (1 + 1 / 360);
41
+ * const t = phasingWaitTime(
42
+ * ((10 * Math.PI) / 180) as Radians,
43
+ * ((4 * Math.PI) / 180) as Radians,
44
+ * nChaser,
45
+ * nTarget
46
+ * );
47
+ * // t ≈ 6 orbits of the target
48
+ * ```
49
+ *
50
+ * @see {@link synodicPeriod}
51
+ * @see {@link hohmannTransferTime}
52
+ */
53
+ export const phasingWaitTime = (thetaNow, thetaRequired, nChaser, nTarget) => {
54
+ for (const [name, x] of [
55
+ ['thetaNow', thetaNow],
56
+ ['thetaRequired', thetaRequired],
57
+ ['nChaser', nChaser],
58
+ ['nTarget', nTarget]
59
+ ]) {
60
+ if (!Number.isFinite(x))
61
+ throw new TypeError(`${name} must be a finite number. Received: ${x}`);
62
+ }
63
+ for (const [name, x] of [
64
+ ['nChaser', nChaser],
65
+ ['nTarget', nTarget]
66
+ ]) {
67
+ if (x <= 0)
68
+ throw new RangeError(`${name} must be > 0. Received: ${x}`);
69
+ }
70
+ if (nChaser === nTarget)
71
+ throw new RangeError(`nChaser and nTarget must differ: the phase angle never changes. Received: ${nChaser}`);
72
+ const rate = nTarget - nChaser;
73
+ const synodic = (2 * Math.PI) / Math.abs(rate);
74
+ const t = (thetaRequired - thetaNow) / rate;
75
+ return ((t % synodic) + synodic) % synodic;
76
+ };
77
+ //# sourceMappingURL=phasing-wait-time.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phasing-wait-time.js","sourceRoot":"","sources":["../../../src/categories/manoeuvres/phasing-wait-time.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,QAAiB,EACjB,aAAsB,EACtB,OAAe,EACf,OAAe,EACP,EAAE;IACV,KAAK,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI;QACtB,CAAC,UAAU,EAAE,QAAQ,CAAC;QACtB,CAAC,eAAe,EAAE,aAAa,CAAC;QAChC,CAAC,SAAS,EAAE,OAAO,CAAC;QACpB,CAAC,SAAS,EAAE,OAAO,CAAC;KACZ,EAAE,CAAC;QACX,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;YACrB,MAAM,IAAI,SAAS,CAAC,GAAG,IAAI,uCAAuC,CAAC,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED,KAAK,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI;QACtB,CAAC,SAAS,EAAE,OAAO,CAAC;QACpB,CAAC,SAAS,EAAE,OAAO,CAAC;KACZ,EAAE,CAAC;QACX,IAAI,CAAC,IAAI,CAAC;YAAE,MAAM,IAAI,UAAU,CAAC,GAAG,IAAI,2BAA2B,CAAC,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED,IAAI,OAAO,KAAK,OAAO;QACrB,MAAM,IAAI,UAAU,CAClB,6EAA6E,OAAO,EAAE,CACvF,CAAC;IAEJ,MAAM,IAAI,GAAG,OAAO,GAAG,OAAO,CAAC;IAC/B,MAAM,OAAO,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC/C,MAAM,CAAC,GAAG,CAAC,aAAa,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC;IAE5C,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,GAAG,OAAO,CAAC,GAAG,OAAO,CAAC;AAC7C,CAAC,CAAC"}
@@ -0,0 +1,48 @@
1
+ import type { CwState } from '@interstellar-tools/types';
2
+ /**
3
+ * **Propagate** a Clohessy–Wiltshire / Hill relative state in closed form.
4
+ *
5
+ * $$
6
+ * \begin{pmatrix}\mathbf r \\ \mathbf v\end{pmatrix}(t) =
7
+ * \begin{bmatrix}\Phi_{rr} & \Phi_{rv} \\ \Phi_{vr} & \Phi_{vv}\end{bmatrix}
8
+ * \begin{pmatrix}\mathbf r_0 \\ \mathbf v_0\end{pmatrix}
9
+ * $$
10
+ *
11
+ * with $ \Phi(t) $ from {@link cwStateTransition}.
12
+ *
13
+ * **Units**
14
+ * - Inputs: `state` positions in **m** and velocities in **m/s**, `n` in **rad/s**, `t` in **s**.
15
+ * - Output: the state at `t`, in the same units.
16
+ *
17
+ * ::: info Notes
18
+ *
19
+ * - The exact solution of the equations {@link cwHillDerivatives} gives to a numerical integrator: no step size, no accumulated error.
20
+ * - Same LVLH frame and `CwState` layout as `cwHillDerivatives`: `[x, y, z, xDot, yDot, zDot]`, with $ x $ radial, $ y $ along-track, $ z $ cross-track.
21
+ * - A state with $ \dot y_0 = -2n x_0 $ has no along-track drift: it traces a closed ellipse around the chief.
22
+ *
23
+ * :::
24
+ *
25
+ * @param state - Relative state `[x, y, z, xDot, yDot, zDot]` (finite).
26
+ * @param n - Mean motion of the circular reference orbit in **rad/s** (finite, > 0).
27
+ * @param t - Time to propagate in **s** (finite; negative goes backwards).
28
+ * @returns The relative state at `t`.
29
+ * @throws {TypeError} If any input is not a finite number.
30
+ * @throws {RangeError} If `n <= 0`.
31
+ * @group Orbits
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * import type { CwState } from '@interstellar-tools/types';
36
+ *
37
+ * // 100 m below the chief with no drift: back where it started after one orbit
38
+ * const n = 0.00113;
39
+ * const start: CwState = [-100, 0, 0, 0, 2 * n * 100, 0];
40
+ * const later = cwPropagate(start, n, (2 * Math.PI) / n);
41
+ * // later ≈ start
42
+ * ```
43
+ *
44
+ * @see {@link cwStateTransition}
45
+ * @see {@link cwTwoImpulseTransfer}
46
+ */
47
+ export declare const cwPropagate: (state: CwState, n: number, t: number) => CwState;
48
+ //# sourceMappingURL=cw-propagate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cw-propagate.d.ts","sourceRoot":"","sources":["../../../src/categories/orbits/cw-propagate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAqB,MAAM,2BAA2B,CAAC;AAM5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,OAAO,EAAE,GAAG,MAAM,EAAE,GAAG,MAAM,KAAG,OAqBlE,CAAC"}
@@ -0,0 +1,68 @@
1
+ import { applyMatrix3 } from '../helpers/apply-matrix-3.js';
2
+ import { cwStateTransition } from './cw-state-transition.js';
3
+ /**
4
+ * **Propagate** a Clohessy–Wiltshire / Hill relative state in closed form.
5
+ *
6
+ * $$
7
+ * \begin{pmatrix}\mathbf r \\ \mathbf v\end{pmatrix}(t) =
8
+ * \begin{bmatrix}\Phi_{rr} & \Phi_{rv} \\ \Phi_{vr} & \Phi_{vv}\end{bmatrix}
9
+ * \begin{pmatrix}\mathbf r_0 \\ \mathbf v_0\end{pmatrix}
10
+ * $$
11
+ *
12
+ * with $ \Phi(t) $ from {@link cwStateTransition}.
13
+ *
14
+ * **Units**
15
+ * - Inputs: `state` positions in **m** and velocities in **m/s**, `n` in **rad/s**, `t` in **s**.
16
+ * - Output: the state at `t`, in the same units.
17
+ *
18
+ * ::: info Notes
19
+ *
20
+ * - The exact solution of the equations {@link cwHillDerivatives} gives to a numerical integrator: no step size, no accumulated error.
21
+ * - Same LVLH frame and `CwState` layout as `cwHillDerivatives`: `[x, y, z, xDot, yDot, zDot]`, with $ x $ radial, $ y $ along-track, $ z $ cross-track.
22
+ * - A state with $ \dot y_0 = -2n x_0 $ has no along-track drift: it traces a closed ellipse around the chief.
23
+ *
24
+ * :::
25
+ *
26
+ * @param state - Relative state `[x, y, z, xDot, yDot, zDot]` (finite).
27
+ * @param n - Mean motion of the circular reference orbit in **rad/s** (finite, > 0).
28
+ * @param t - Time to propagate in **s** (finite; negative goes backwards).
29
+ * @returns The relative state at `t`.
30
+ * @throws {TypeError} If any input is not a finite number.
31
+ * @throws {RangeError} If `n <= 0`.
32
+ * @group Orbits
33
+ *
34
+ * @example
35
+ * ```ts
36
+ * import type { CwState } from '@interstellar-tools/types';
37
+ *
38
+ * // 100 m below the chief with no drift: back where it started after one orbit
39
+ * const n = 0.00113;
40
+ * const start: CwState = [-100, 0, 0, 0, 2 * n * 100, 0];
41
+ * const later = cwPropagate(start, n, (2 * Math.PI) / n);
42
+ * // later ≈ start
43
+ * ```
44
+ *
45
+ * @see {@link cwStateTransition}
46
+ * @see {@link cwTwoImpulseTransfer}
47
+ */
48
+ export const cwPropagate = (state, n, t) => {
49
+ for (const x of state)
50
+ if (!Number.isFinite(x))
51
+ throw new TypeError(`state must have finite components. Received: ${x}`);
52
+ const { rr, rv, vr, vv } = cwStateTransition(n, t);
53
+ const r0 = [state[0], state[1], state[2]];
54
+ const v0 = [state[3], state[4], state[5]];
55
+ const rA = applyMatrix3(rr, r0);
56
+ const rB = applyMatrix3(rv, v0);
57
+ const vA = applyMatrix3(vr, r0);
58
+ const vB = applyMatrix3(vv, v0);
59
+ return [
60
+ rA[0] + rB[0],
61
+ rA[1] + rB[1],
62
+ rA[2] + rB[2],
63
+ vA[0] + vB[0],
64
+ vA[1] + vB[1],
65
+ vA[2] + vB[2]
66
+ ];
67
+ };
68
+ //# sourceMappingURL=cw-propagate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cw-propagate.js","sourceRoot":"","sources":["../../../src/categories/orbits/cw-propagate.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAc,EAAE,CAAS,EAAE,CAAS,EAAW,EAAE;IAC3E,KAAK,MAAM,CAAC,IAAI,KAAK;QACnB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;YACrB,MAAM,IAAI,SAAS,CAAC,gDAAgD,CAAC,EAAE,CAAC,CAAC;IAE7E,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACnD,MAAM,EAAE,GAAsB,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7D,MAAM,EAAE,GAAsB,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7D,MAAM,EAAE,GAAG,YAAY,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IAChC,MAAM,EAAE,GAAG,YAAY,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IAChC,MAAM,EAAE,GAAG,YAAY,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IAChC,MAAM,EAAE,GAAG,YAAY,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IAEhC,OAAO;QACL,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QACb,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QACb,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QACb,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QACb,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QACb,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;KACL,CAAC;AACb,CAAC,CAAC"}
@@ -0,0 +1,65 @@
1
+ import type { Matrix3x3Type } from '@interstellar-tools/types';
2
+ /**
3
+ * The Clohessy–Wiltshire state transition matrix $ \Phi(t) $, split into its four 3×3 blocks:
4
+ * $ \mathbf r(t) = \Phi_{rr}\mathbf r_0 + \Phi_{rv}\mathbf v_0 $ and $ \mathbf v(t) = \Phi_{vr}\mathbf r_0 + \Phi_{vv}\mathbf v_0 $.
5
+ *
6
+ * @group Orbits
7
+ */
8
+ export interface CwStateTransitionInterface {
9
+ /** Position from initial position. */
10
+ rr: Matrix3x3Type;
11
+ /** Position from initial velocity (s). */
12
+ rv: Matrix3x3Type;
13
+ /** Velocity from initial position (1/s). */
14
+ vr: Matrix3x3Type;
15
+ /** Velocity from initial velocity. */
16
+ vv: Matrix3x3Type;
17
+ }
18
+ /**
19
+ * Compute the **Clohessy–Wiltshire state transition matrix**: the closed-form solution of the CW / Hill equations.
20
+ *
21
+ * With $ s = \sin nt $ and $ c = \cos nt $, in the LVLH frame of {@link cwHillDerivatives}
22
+ * ($ x $ radial, $ y $ along-track, $ z $ cross-track):
23
+ *
24
+ * $$
25
+ * \Phi_{rr} = \begin{bmatrix} 4 - 3c & 0 & 0 \\ 6(s - nt) & 1 & 0 \\ 0 & 0 & c \end{bmatrix}, \quad
26
+ * \Phi_{rv} = \frac{1}{n}\begin{bmatrix} s & 2(1 - c) & 0 \\ -2(1 - c) & 4s - 3nt & 0 \\ 0 & 0 & s \end{bmatrix}
27
+ * $$
28
+ *
29
+ * $$
30
+ * \Phi_{vr} = \begin{bmatrix} 3ns & 0 & 0 \\ 6n(c - 1) & 0 & 0 \\ 0 & 0 & -ns \end{bmatrix}, \quad
31
+ * \Phi_{vv} = \begin{bmatrix} c & 2s & 0 \\ -2s & 4c - 3 & 0 \\ 0 & 0 & c \end{bmatrix}
32
+ * $$
33
+ *
34
+ * **Units**
35
+ * - Inputs: `n` in **rad/s**, `t` in **s**.
36
+ * - Output: dimensionless blocks, except $ \Phi_{rv} $ in **s** and $ \Phi_{vr} $ in **1/s**.
37
+ *
38
+ * ::: info Notes
39
+ *
40
+ * - Valid near a **circular** reference orbit, for separations small compared with its radius. Elliptic reference orbits need other solutions (e.g. Yamanaka–Ankersen).
41
+ * - The $ -3nt $ terms grow without bound: a deputy slightly lower than the chief drifts ahead every orbit.
42
+ * - $ \Phi(0) $ is the identity, and $ \Phi(t_1 + t_2) = \Phi(t_2)\,\Phi(t_1) $.
43
+ * - Negative `t` propagates backwards.
44
+ *
45
+ * :::
46
+ *
47
+ * @param n - Mean motion of the circular reference orbit $ n $ in **rad/s** (finite, > 0).
48
+ * @param t - Time since the initial state $ t $ in **s** (finite).
49
+ * @returns The four 3×3 blocks of $ \Phi(t) $.
50
+ * @throws {TypeError} If any input is not a finite number.
51
+ * @throws {RangeError} If `n <= 0`.
52
+ * @group Orbits
53
+ *
54
+ * @example
55
+ * ```ts
56
+ * // ISS-like orbit: n ≈ 0.00113 rad/s, a quarter of an orbit later
57
+ * const { rr, rv } = cwStateTransition(0.00113, (Math.PI / 2) / 0.00113);
58
+ * ```
59
+ *
60
+ * @see {@link cwPropagate}
61
+ * @see {@link cwTwoImpulseTransfer}
62
+ * @see https://en.wikipedia.org/wiki/Clohessy%E2%80%93Wiltshire_equations Clohessy–Wiltshire equations
63
+ */
64
+ export declare const cwStateTransition: (n: number, t: number) => CwStateTransitionInterface;
65
+ //# sourceMappingURL=cw-state-transition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cw-state-transition.d.ts","sourceRoot":"","sources":["../../../src/categories/orbits/cw-state-transition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D;;;;;GAKG;AACH,MAAM,WAAW,0BAA0B;IACzC,sCAAsC;IACtC,EAAE,EAAE,aAAa,CAAC;IAClB,0CAA0C;IAC1C,EAAE,EAAE,aAAa,CAAC;IAClB,4CAA4C;IAC5C,EAAE,EAAE,aAAa,CAAC;IAClB,sCAAsC;IACtC,EAAE,EAAE,aAAa,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,eAAO,MAAM,iBAAiB,GAC5B,GAAG,MAAM,EACT,GAAG,MAAM,KACR,0BAqCF,CAAC"}
@@ -0,0 +1,83 @@
1
+ /**
2
+ * Compute the **Clohessy–Wiltshire state transition matrix**: the closed-form solution of the CW / Hill equations.
3
+ *
4
+ * With $ s = \sin nt $ and $ c = \cos nt $, in the LVLH frame of {@link cwHillDerivatives}
5
+ * ($ x $ radial, $ y $ along-track, $ z $ cross-track):
6
+ *
7
+ * $$
8
+ * \Phi_{rr} = \begin{bmatrix} 4 - 3c & 0 & 0 \\ 6(s - nt) & 1 & 0 \\ 0 & 0 & c \end{bmatrix}, \quad
9
+ * \Phi_{rv} = \frac{1}{n}\begin{bmatrix} s & 2(1 - c) & 0 \\ -2(1 - c) & 4s - 3nt & 0 \\ 0 & 0 & s \end{bmatrix}
10
+ * $$
11
+ *
12
+ * $$
13
+ * \Phi_{vr} = \begin{bmatrix} 3ns & 0 & 0 \\ 6n(c - 1) & 0 & 0 \\ 0 & 0 & -ns \end{bmatrix}, \quad
14
+ * \Phi_{vv} = \begin{bmatrix} c & 2s & 0 \\ -2s & 4c - 3 & 0 \\ 0 & 0 & c \end{bmatrix}
15
+ * $$
16
+ *
17
+ * **Units**
18
+ * - Inputs: `n` in **rad/s**, `t` in **s**.
19
+ * - Output: dimensionless blocks, except $ \Phi_{rv} $ in **s** and $ \Phi_{vr} $ in **1/s**.
20
+ *
21
+ * ::: info Notes
22
+ *
23
+ * - Valid near a **circular** reference orbit, for separations small compared with its radius. Elliptic reference orbits need other solutions (e.g. Yamanaka–Ankersen).
24
+ * - The $ -3nt $ terms grow without bound: a deputy slightly lower than the chief drifts ahead every orbit.
25
+ * - $ \Phi(0) $ is the identity, and $ \Phi(t_1 + t_2) = \Phi(t_2)\,\Phi(t_1) $.
26
+ * - Negative `t` propagates backwards.
27
+ *
28
+ * :::
29
+ *
30
+ * @param n - Mean motion of the circular reference orbit $ n $ in **rad/s** (finite, > 0).
31
+ * @param t - Time since the initial state $ t $ in **s** (finite).
32
+ * @returns The four 3×3 blocks of $ \Phi(t) $.
33
+ * @throws {TypeError} If any input is not a finite number.
34
+ * @throws {RangeError} If `n <= 0`.
35
+ * @group Orbits
36
+ *
37
+ * @example
38
+ * ```ts
39
+ * // ISS-like orbit: n ≈ 0.00113 rad/s, a quarter of an orbit later
40
+ * const { rr, rv } = cwStateTransition(0.00113, (Math.PI / 2) / 0.00113);
41
+ * ```
42
+ *
43
+ * @see {@link cwPropagate}
44
+ * @see {@link cwTwoImpulseTransfer}
45
+ * @see https://en.wikipedia.org/wiki/Clohessy%E2%80%93Wiltshire_equations Clohessy–Wiltshire equations
46
+ */
47
+ export const cwStateTransition = (n, t) => {
48
+ for (const [name, x] of [
49
+ ['n', n],
50
+ ['t', t]
51
+ ]) {
52
+ if (!Number.isFinite(x))
53
+ throw new TypeError(`${name} must be a finite number. Received: ${x}`);
54
+ }
55
+ if (n <= 0)
56
+ throw new RangeError(`n must be > 0. Received: ${n}`);
57
+ const nt = n * t;
58
+ const s = Math.sin(nt);
59
+ const c = Math.cos(nt);
60
+ return {
61
+ rr: [
62
+ [4 - 3 * c, 0, 0],
63
+ [6 * (s - nt), 1, 0],
64
+ [0, 0, c]
65
+ ],
66
+ rv: [
67
+ [s / n, (2 * (1 - c)) / n, 0],
68
+ [(-2 * (1 - c)) / n, (4 * s - 3 * nt) / n, 0],
69
+ [0, 0, s / n]
70
+ ],
71
+ vr: [
72
+ [3 * n * s, 0, 0],
73
+ [6 * n * (c - 1), 0, 0],
74
+ [0, 0, -n * s]
75
+ ],
76
+ vv: [
77
+ [c, 2 * s, 0],
78
+ [-2 * s, 4 * c - 3, 0],
79
+ [0, 0, c]
80
+ ]
81
+ };
82
+ };
83
+ //# sourceMappingURL=cw-state-transition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cw-state-transition.js","sourceRoot":"","sources":["../../../src/categories/orbits/cw-state-transition.ts"],"names":[],"mappings":"AAmBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,CAAS,EACT,CAAS,EACmB,EAAE;IAC9B,KAAK,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI;QACtB,CAAC,GAAG,EAAE,CAAC,CAAC;QACR,CAAC,GAAG,EAAE,CAAC,CAAC;KACA,EAAE,CAAC;QACX,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;YACrB,MAAM,IAAI,SAAS,CAAC,GAAG,IAAI,uCAAuC,CAAC,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED,IAAI,CAAC,IAA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,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YACtB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;SACV;KACF,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Compute the **synodic period** of two bodies on circular orbits: the time between two alignments.
3
+ *
4
+ * $$
5
+ * T_\text{syn} = \frac{2\pi}{\lvert n_1 - n_2 \rvert}
6
+ * $$
7
+ *
8
+ * Where:
9
+ * - $ n_1 $, $ n_2 $ are the two mean motions (rad/s)
10
+ *
11
+ * **Units**
12
+ * - Inputs: `n1`, `n2` in **rad/s**.
13
+ * - Output: $ T_\text{syn} $ in **s**.
14
+ *
15
+ * ::: info Notes
16
+ *
17
+ * - The faster body gains $ 2\pi $ on the slower one every synodic period.
18
+ * - The closer the two orbits, the longer it takes: a chaser that's slightly lower gains only a little each orbit.
19
+ * - For planets, the same formula gives the time between launch windows, e.g. about 26 months for Earth and Mars.
20
+ *
21
+ * :::
22
+ *
23
+ * ::: practice Apollo 11, after lunar liftoff
24
+ *
25
+ * **41.8 h**
26
+ *
27
+ * _The LM in its 9.4 × 48.0 n mi orbit against the CSM in 56 × 62 n mi_
28
+ *
29
+ * The LM gained only about 16° on the CSM each orbit, so it had to lift off at the right moment: the whole rendezvous took 3 h 41 min.
30
+ *
31
+ * ```ts
32
+ * const nLM = meanMotion(1_790_552, 4.902800118e12);
33
+ * const nCSM = meanMotion(1_846_668, 4.902800118e12);
34
+ * synodicPeriod(nLM, nCSM) / 3600; // ≈ 41.8 h
35
+ * ```
36
+ *
37
+ * :::
38
+ *
39
+ * @param n1 - Mean motion of the first body in **rad/s** (finite, > 0).
40
+ * @param n2 - Mean motion of the second body in **rad/s** (finite, > 0, not equal to `n1`).
41
+ * @returns Synodic period in **s**.
42
+ * @throws {TypeError} If any input is not a finite number.
43
+ * @throws {RangeError} If `n1 <= 0`, `n2 <= 0`, or `n1 = n2` (the bodies never realign).
44
+ * @group Orbits
45
+ *
46
+ * @example
47
+ * ```ts
48
+ * // Earth and Mars, from their periods in days
49
+ * const day = 86_400;
50
+ * const t = synodicPeriod((2 * Math.PI) / (365.256 * day), (2 * Math.PI) / (686.98 * day));
51
+ * // t / day ≈ 780 days
52
+ * ```
53
+ *
54
+ * @see {@link phasingWaitTime}
55
+ * @see {@link meanMotion}
56
+ * @see https://en.wikipedia.org/wiki/Orbital_period#Synodic_period Synodic period
57
+ */
58
+ export declare const synodicPeriod: (n1: number, n2: number) => number;
59
+ //# sourceMappingURL=synodic-period.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"synodic-period.d.ts","sourceRoot":"","sources":["../../../src/categories/orbits/synodic-period.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,eAAO,MAAM,aAAa,GAAI,IAAI,MAAM,EAAE,IAAI,MAAM,KAAG,MAiBtD,CAAC"}
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Compute the **synodic period** of two bodies on circular orbits: the time between two alignments.
3
+ *
4
+ * $$
5
+ * T_\text{syn} = \frac{2\pi}{\lvert n_1 - n_2 \rvert}
6
+ * $$
7
+ *
8
+ * Where:
9
+ * - $ n_1 $, $ n_2 $ are the two mean motions (rad/s)
10
+ *
11
+ * **Units**
12
+ * - Inputs: `n1`, `n2` in **rad/s**.
13
+ * - Output: $ T_\text{syn} $ in **s**.
14
+ *
15
+ * ::: info Notes
16
+ *
17
+ * - The faster body gains $ 2\pi $ on the slower one every synodic period.
18
+ * - The closer the two orbits, the longer it takes: a chaser that's slightly lower gains only a little each orbit.
19
+ * - For planets, the same formula gives the time between launch windows, e.g. about 26 months for Earth and Mars.
20
+ *
21
+ * :::
22
+ *
23
+ * ::: practice Apollo 11, after lunar liftoff
24
+ *
25
+ * **41.8 h**
26
+ *
27
+ * _The LM in its 9.4 × 48.0 n mi orbit against the CSM in 56 × 62 n mi_
28
+ *
29
+ * The LM gained only about 16° on the CSM each orbit, so it had to lift off at the right moment: the whole rendezvous took 3 h 41 min.
30
+ *
31
+ * ```ts
32
+ * const nLM = meanMotion(1_790_552, 4.902800118e12);
33
+ * const nCSM = meanMotion(1_846_668, 4.902800118e12);
34
+ * synodicPeriod(nLM, nCSM) / 3600; // ≈ 41.8 h
35
+ * ```
36
+ *
37
+ * :::
38
+ *
39
+ * @param n1 - Mean motion of the first body in **rad/s** (finite, > 0).
40
+ * @param n2 - Mean motion of the second body in **rad/s** (finite, > 0, not equal to `n1`).
41
+ * @returns Synodic period in **s**.
42
+ * @throws {TypeError} If any input is not a finite number.
43
+ * @throws {RangeError} If `n1 <= 0`, `n2 <= 0`, or `n1 = n2` (the bodies never realign).
44
+ * @group Orbits
45
+ *
46
+ * @example
47
+ * ```ts
48
+ * // Earth and Mars, from their periods in days
49
+ * const day = 86_400;
50
+ * const t = synodicPeriod((2 * Math.PI) / (365.256 * day), (2 * Math.PI) / (686.98 * day));
51
+ * // t / day ≈ 780 days
52
+ * ```
53
+ *
54
+ * @see {@link phasingWaitTime}
55
+ * @see {@link meanMotion}
56
+ * @see https://en.wikipedia.org/wiki/Orbital_period#Synodic_period Synodic period
57
+ */
58
+ export const synodicPeriod = (n1, n2) => {
59
+ for (const [name, x] of [
60
+ ['n1', n1],
61
+ ['n2', n2]
62
+ ]) {
63
+ if (!Number.isFinite(x))
64
+ throw new TypeError(`${name} must be a finite number. Received: ${x}`);
65
+ if (x <= 0)
66
+ throw new RangeError(`${name} must be > 0. Received: ${x}`);
67
+ }
68
+ if (n1 === n2)
69
+ throw new RangeError(`n1 and n2 must differ: equal mean motions never realign. Received: ${n1}`);
70
+ return (2 * Math.PI) / Math.abs(n1 - n2);
71
+ };
72
+ //# sourceMappingURL=synodic-period.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"synodic-period.js","sourceRoot":"","sources":["../../../src/categories/orbits/synodic-period.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAAU,EAAE,EAAU,EAAU,EAAE;IAC9D,KAAK,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI;QACtB,CAAC,IAAI,EAAE,EAAE,CAAC;QACV,CAAC,IAAI,EAAE,EAAE,CAAC;KACF,EAAE,CAAC;QACX,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;YACrB,MAAM,IAAI,SAAS,CAAC,GAAG,IAAI,uCAAuC,CAAC,EAAE,CAAC,CAAC;QAEzE,IAAI,CAAC,IAAI,CAAC;YAAE,MAAM,IAAI,UAAU,CAAC,GAAG,IAAI,2BAA2B,CAAC,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED,IAAI,EAAE,KAAK,EAAE;QACX,MAAM,IAAI,UAAU,CAClB,sEAAsE,EAAE,EAAE,CAC3E,CAAC;IAEJ,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;AAC3C,CAAC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -41,6 +41,8 @@ export * from './categories/orbits/atmospheric-drag-acceleration.js';
41
41
  export * from './categories/orbits/characteristic-energy-c3.js';
42
42
  export * from './categories/orbits/circular-speed.js';
43
43
  export * from './categories/orbits/cw-hill-derivatives.js';
44
+ export * from './categories/orbits/cw-propagate.js';
45
+ export * from './categories/orbits/cw-state-transition.js';
44
46
  export * from './categories/orbits/elements-to-state.js';
45
47
  export * from './categories/orbits/escape-speed.js';
46
48
  export * from './categories/orbits/flight-path-angle-from-true-anomaly.js';
@@ -62,15 +64,18 @@ export * from './categories/orbits/specific-mechanical-energy.js';
62
64
  export * from './categories/orbits/sphere-of-influence-radius.js';
63
65
  export * from './categories/orbits/state-to-elements.js';
64
66
  export * from './categories/orbits/surface-rotation-speed.js';
67
+ export * from './categories/orbits/synodic-period.js';
65
68
  export * from './categories/orbits/vis-viva-speed.js';
66
69
  export * from './categories/manoeuvres/burn-time.js';
67
70
  export * from './categories/manoeuvres/combine-burns-delta-v.js';
71
+ export * from './categories/manoeuvres/cw-two-impulse-transfer.js';
68
72
  export * from './categories/manoeuvres/gravity-assist-turning-angle.js';
69
73
  export * from './categories/manoeuvres/gravity-loss.js';
70
74
  export * from './categories/manoeuvres/hohmann-transfer.js';
71
75
  export * from './categories/manoeuvres/initial-mass-for-delta-v.js';
72
76
  export * from './categories/manoeuvres/mass-flow-rate.js';
73
77
  export * from './categories/manoeuvres/oberth-energy-gain.js';
78
+ export * from './categories/manoeuvres/phasing-wait-time.js';
74
79
  export * from './categories/manoeuvres/plane-change-delta-v.js';
75
80
  export * from './categories/manoeuvres/rocket-delta-v-from-isp.js';
76
81
  export * from './categories/manoeuvres/rocket-delta-v-from-ve.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,+CAA+C,CAAC;AAE9D,cAAc,+BAA+B,CAAC;AAE9C,cAAc,kCAAkC,CAAC;AAEjD,cAAc,8BAA8B,CAAC;AAE7C,cAAc,iDAAiD,CAAC;AAEhE,cAAc,iCAAiC,CAAC;AAEhD,cAAc,+BAA+B,CAAC;AAE9C,cAAc,+BAA+B,CAAC;AAE9C,cAAc,qCAAqC,CAAC;AAIpD,cAAc,gDAAgD,CAAC;AAE/D,cAAc,sCAAsC,CAAC;AAErD,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6 +48,8 @@ export * from './categories/orbits/atmospheric-drag-acceleration.js';
48
48
  export * from './categories/orbits/characteristic-energy-c3.js';
49
49
  export * from './categories/orbits/circular-speed.js';
50
50
  export * from './categories/orbits/cw-hill-derivatives.js';
51
+ export * from './categories/orbits/cw-propagate.js';
52
+ export * from './categories/orbits/cw-state-transition.js';
51
53
  export * from './categories/orbits/elements-to-state.js';
52
54
  export * from './categories/orbits/escape-speed.js';
53
55
  export * from './categories/orbits/flight-path-angle-from-true-anomaly.js';
@@ -69,16 +71,19 @@ export * from './categories/orbits/specific-mechanical-energy.js';
69
71
  export * from './categories/orbits/sphere-of-influence-radius.js';
70
72
  export * from './categories/orbits/state-to-elements.js';
71
73
  export * from './categories/orbits/surface-rotation-speed.js';
74
+ export * from './categories/orbits/synodic-period.js';
72
75
  export * from './categories/orbits/vis-viva-speed.js';
73
76
  // categories/manoeuvres
74
77
  export * from './categories/manoeuvres/burn-time.js';
75
78
  export * from './categories/manoeuvres/combine-burns-delta-v.js';
79
+ export * from './categories/manoeuvres/cw-two-impulse-transfer.js';
76
80
  export * from './categories/manoeuvres/gravity-assist-turning-angle.js';
77
81
  export * from './categories/manoeuvres/gravity-loss.js';
78
82
  export * from './categories/manoeuvres/hohmann-transfer.js';
79
83
  export * from './categories/manoeuvres/initial-mass-for-delta-v.js';
80
84
  export * from './categories/manoeuvres/mass-flow-rate.js';
81
85
  export * from './categories/manoeuvres/oberth-energy-gain.js';
86
+ export * from './categories/manoeuvres/phasing-wait-time.js';
82
87
  export * from './categories/manoeuvres/plane-change-delta-v.js';
83
88
  export * from './categories/manoeuvres/rocket-delta-v-from-isp.js';
84
89
  export * from './categories/manoeuvres/rocket-delta-v-from-ve.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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C;AAEnD,cAAc,4CAA4C,CAAC;AAE3D,cAAc,gDAAgD,CAAC;AAE/D,cAAc,gEAAgE,CAAC;AAE/E,cAAc,kDAAkD,CAAC;AAEjE,cAAc,mDAAmD,CAAC;AAElE,cAAc,mDAAmD,CAAC;AAElE,cAAc,0CAA0C,CAAC;AAEzD,cAAc,+CAA+C,CAAC;AAE9D,cAAc,uCAAuC,CAAC;AAEtD,cAAc,uCAAuC,CAAC;AAEtD,wBAAwB;AAExB,cAAc,sCAAsC,CAAC;AAErD,cAAc,kDAAkD,CAAC;AAEjE,cAAc,oDAAoD,CAAC;AAEnE,cAAc,yDAAyD,CAAC;AAExE,cAAc,yCAAyC,CAAC;AAExD,cAAc,6CAA6C,CAAC;AAE5D,cAAc,qDAAqD,CAAC;AAEpE,cAAc,2CAA2C,CAAC;AAE1D,cAAc,+CAA+C,CAAC;AAE9D,cAAc,8CAA8C,CAAC;AAE7D,cAAc,iDAAiD,CAAC;AAEhE,cAAc,oDAAoD,CAAC;AAEnE,cAAc,mDAAmD,CAAC;AAElE,cAAc,0CAA0C,CAAC;AAEzD,cAAc,6CAA6C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@interstellar-tools/equations",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
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",