@interstellar-tools/equations 1.0.0 → 1.2.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.
- package/dist/categories/anomalies/asymptote-true-anomaly.d.ts +50 -0
- package/dist/categories/anomalies/asymptote-true-anomaly.d.ts.map +1 -0
- package/dist/categories/anomalies/asymptote-true-anomaly.js +55 -0
- package/dist/categories/anomalies/asymptote-true-anomaly.js.map +1 -0
- package/dist/categories/anomalies/hyperbolic-to-true-anomaly.d.ts +38 -0
- package/dist/categories/anomalies/hyperbolic-to-true-anomaly.d.ts.map +1 -0
- package/dist/categories/anomalies/hyperbolic-to-true-anomaly.js +49 -0
- package/dist/categories/anomalies/hyperbolic-to-true-anomaly.js.map +1 -0
- package/dist/categories/anomalies/true-to-hyperbolic-anomaly.d.ts +40 -0
- package/dist/categories/anomalies/true-to-hyperbolic-anomaly.d.ts.map +1 -0
- package/dist/categories/anomalies/true-to-hyperbolic-anomaly.js +54 -0
- package/dist/categories/anomalies/true-to-hyperbolic-anomaly.js.map +1 -0
- package/dist/categories/helpers/misc.d.ts +18 -0
- package/dist/categories/helpers/misc.d.ts.map +1 -1
- package/dist/categories/helpers/misc.js +24 -0
- package/dist/categories/helpers/misc.js.map +1 -1
- package/dist/categories/kepler/solve-kepler-hyperbolic.d.ts +49 -0
- package/dist/categories/kepler/solve-kepler-hyperbolic.d.ts.map +1 -0
- package/dist/categories/kepler/solve-kepler-hyperbolic.js +90 -0
- package/dist/categories/kepler/solve-kepler-hyperbolic.js.map +1 -0
- package/dist/categories/manoeuvres/burn-time.d.ts +63 -0
- package/dist/categories/manoeuvres/burn-time.d.ts.map +1 -0
- package/dist/categories/manoeuvres/burn-time.js +87 -0
- package/dist/categories/manoeuvres/burn-time.js.map +1 -0
- package/dist/categories/manoeuvres/gravity-loss.d.ts +48 -0
- package/dist/categories/manoeuvres/gravity-loss.d.ts.map +1 -0
- package/dist/categories/manoeuvres/gravity-loss.js +74 -0
- package/dist/categories/manoeuvres/gravity-loss.js.map +1 -0
- package/dist/categories/manoeuvres/initial-mass-for-delta-v.d.ts +60 -0
- package/dist/categories/manoeuvres/initial-mass-for-delta-v.d.ts.map +1 -0
- package/dist/categories/manoeuvres/initial-mass-for-delta-v.js +79 -0
- package/dist/categories/manoeuvres/initial-mass-for-delta-v.js.map +1 -0
- package/dist/categories/manoeuvres/mass-flow-rate.d.ts +57 -0
- package/dist/categories/manoeuvres/mass-flow-rate.d.ts.map +1 -0
- package/dist/categories/manoeuvres/mass-flow-rate.js +73 -0
- package/dist/categories/manoeuvres/mass-flow-rate.js.map +1 -0
- package/dist/categories/manoeuvres/rocket-thrust.d.ts +48 -0
- package/dist/categories/manoeuvres/rocket-thrust.d.ts.map +1 -0
- package/dist/categories/manoeuvres/rocket-thrust.js +62 -0
- package/dist/categories/manoeuvres/rocket-thrust.js.map +1 -0
- package/dist/categories/manoeuvres/thrust-to-weight.d.ts +57 -0
- package/dist/categories/manoeuvres/thrust-to-weight.d.ts.map +1 -0
- package/dist/categories/manoeuvres/thrust-to-weight.js +73 -0
- package/dist/categories/manoeuvres/thrust-to-weight.js.map +1 -0
- package/dist/categories/orbits/elements-to-state.d.ts +61 -0
- package/dist/categories/orbits/elements-to-state.d.ts.map +1 -0
- package/dist/categories/orbits/elements-to-state.js +107 -0
- package/dist/categories/orbits/elements-to-state.js.map +1 -0
- package/dist/categories/orbits/hyperbolic-eccentricity.d.ts +56 -0
- package/dist/categories/orbits/hyperbolic-eccentricity.d.ts.map +1 -0
- package/dist/categories/orbits/hyperbolic-eccentricity.js +72 -0
- package/dist/categories/orbits/hyperbolic-eccentricity.js.map +1 -0
- package/dist/categories/orbits/hyperbolic-semi-major-axis.d.ts +53 -0
- package/dist/categories/orbits/hyperbolic-semi-major-axis.d.ts.map +1 -0
- package/dist/categories/orbits/hyperbolic-semi-major-axis.js +66 -0
- package/dist/categories/orbits/hyperbolic-semi-major-axis.js.map +1 -0
- package/dist/categories/orbits/hyperbolic-time-of-flight.d.ts +64 -0
- package/dist/categories/orbits/hyperbolic-time-of-flight.d.ts.map +1 -0
- package/dist/categories/orbits/hyperbolic-time-of-flight.js +86 -0
- package/dist/categories/orbits/hyperbolic-time-of-flight.js.map +1 -0
- package/dist/categories/orbits/inclination-from-launch-azimuth.d.ts +64 -0
- package/dist/categories/orbits/inclination-from-launch-azimuth.d.ts.map +1 -0
- package/dist/categories/orbits/inclination-from-launch-azimuth.js +76 -0
- package/dist/categories/orbits/inclination-from-launch-azimuth.js.map +1 -0
- package/dist/categories/orbits/launch-azimuth-for-inclination.d.ts +71 -0
- package/dist/categories/orbits/launch-azimuth-for-inclination.d.ts.map +1 -0
- package/dist/categories/orbits/launch-azimuth-for-inclination.js +87 -0
- package/dist/categories/orbits/launch-azimuth-for-inclination.js.map +1 -0
- package/dist/categories/orbits/rotating-launch-azimuth.d.ts +49 -0
- package/dist/categories/orbits/rotating-launch-azimuth.d.ts.map +1 -0
- package/dist/categories/orbits/rotating-launch-azimuth.js +65 -0
- package/dist/categories/orbits/rotating-launch-azimuth.js.map +1 -0
- package/dist/categories/orbits/state-to-elements.d.ts +82 -0
- package/dist/categories/orbits/state-to-elements.d.ts.map +1 -0
- package/dist/categories/orbits/state-to-elements.js +131 -0
- package/dist/categories/orbits/state-to-elements.js.map +1 -0
- package/dist/categories/orbits/surface-rotation-speed.d.ts +61 -0
- package/dist/categories/orbits/surface-rotation-speed.d.ts.map +1 -0
- package/dist/categories/orbits/surface-rotation-speed.js +74 -0
- package/dist/categories/orbits/surface-rotation-speed.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { cross, dot, norm, norm2pi, scale, sub } from '../helpers/misc.js';
|
|
2
|
+
/**
|
|
3
|
+
* Convert a **state vector** (position and velocity) to the six **classical orbital elements**.
|
|
4
|
+
*
|
|
5
|
+
* $$
|
|
6
|
+
* \mathbf h = \mathbf r \times \mathbf v, \quad
|
|
7
|
+
* \mathbf e = \frac{\mathbf v \times \mathbf h}{\mu} - \frac{\mathbf r}{r}, \quad
|
|
8
|
+
* \mathbf n = \hat{\mathbf k} \times \mathbf h, \quad
|
|
9
|
+
* a = -\frac{\mu}{2\varepsilon}, \quad
|
|
10
|
+
* \varepsilon = \frac{v^2}{2} - \frac{\mu}{r}
|
|
11
|
+
* $$
|
|
12
|
+
*
|
|
13
|
+
* $$
|
|
14
|
+
* i = \arccos\frac{h_z}{h}, \quad
|
|
15
|
+
* \Omega = \operatorname{atan2}(n_y, n_x), \quad
|
|
16
|
+
* \omega = \angle(\mathbf n, \mathbf e), \quad
|
|
17
|
+
* \nu = \angle(\mathbf e, \mathbf r)
|
|
18
|
+
* $$
|
|
19
|
+
*
|
|
20
|
+
* where each angle $ \angle $ is measured in the direction of motion, about $ \mathbf h $.
|
|
21
|
+
*
|
|
22
|
+
* **Units**
|
|
23
|
+
* - Inputs: `r` in **m**, `v` in **m/s**, `mu` in **m³/s²**.
|
|
24
|
+
* - Output: `a` in **m**, `e` dimensionless, angles in **radians**.
|
|
25
|
+
*
|
|
26
|
+
* ::: info Notes
|
|
27
|
+
*
|
|
28
|
+
* - Works for elliptic and hyperbolic orbits. A hyperbolic orbit has a negative `a`, and `nu` in [0, 2π) like the others: the incoming branch is just below 2π.
|
|
29
|
+
* - Some angles are undefined for special orbits. Below `tolerance`, the function uses these conventions, which {@link elementsToState} reverses:
|
|
30
|
+
* - **circular** ($ e \approx 0 $): `argp = 0`, and `nu` is measured from the ascending node (the argument of latitude);
|
|
31
|
+
* - **equatorial** ($ i \approx 0 $ or $ \pi $): `raan = 0`, and `argp` is measured from the x axis (the longitude of periapsis);
|
|
32
|
+
* - **circular and equatorial**: `raan = argp = 0`, and `nu` is measured from the x axis (the true longitude).
|
|
33
|
+
* - The frame is whatever inertial frame `r` and `v` are given in, centred on the body with parameter `mu`; the reference plane is its xy plane.
|
|
34
|
+
*
|
|
35
|
+
* :::
|
|
36
|
+
*
|
|
37
|
+
* ::: practice Apollo 11, leaving for the Moon
|
|
38
|
+
*
|
|
39
|
+
* **e = 0.977**
|
|
40
|
+
*
|
|
41
|
+
* _From the flown state at trans-lunar injection: 6 712.6 km from Earth's centre, 10 834.3 m/s, 7.367° above the horizontal_
|
|
42
|
+
*
|
|
43
|
+
* The AS-506 flight evaluation report gives 0.97696; the inputs here are rounded. An orbit that stretched reaches far beyond the Moon, but the Moon's gravity takes over long before.
|
|
44
|
+
*
|
|
45
|
+
* ```ts
|
|
46
|
+
* const r = 6_712_602; // m
|
|
47
|
+
* const v = 10_834.3; // m/s
|
|
48
|
+
* const gamma = toRad(7.367);
|
|
49
|
+
* stateToElements(
|
|
50
|
+
* [r, 0, 0],
|
|
51
|
+
* [v * Math.sin(gamma), v * Math.cos(gamma), 0],
|
|
52
|
+
* 3.986004418e14
|
|
53
|
+
* ).e; // ≈ 0.97715
|
|
54
|
+
* ```
|
|
55
|
+
*
|
|
56
|
+
* :::
|
|
57
|
+
*
|
|
58
|
+
* @param r - Position vector in **m** (finite components, not zero).
|
|
59
|
+
* @param v - Velocity vector in **m/s** (finite components).
|
|
60
|
+
* @param mu - Gravitational parameter $ \mu $ in **m³/s²** (finite, > 0).
|
|
61
|
+
* @param tolerance - Below this, `e` counts as circular and $ \sin i $ as equatorial. Defaults to `1e-10`.
|
|
62
|
+
* @returns The classical orbital elements.
|
|
63
|
+
* @throws {TypeError} If any input is not a finite number.
|
|
64
|
+
* @throws {RangeError} If `mu <= 0`, `tolerance < 0`, `r` is zero, or the motion is straight up or down (no angular momentum).
|
|
65
|
+
* @group Orbits
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* // Curtis, Orbital Mechanics for Engineering Students, in km and km/s
|
|
70
|
+
* const { a, e, i, raan, argp, nu } = stateToElements(
|
|
71
|
+
* [-6045e3, -3490e3, 2500e3],
|
|
72
|
+
* [-3.457e3, 6.618e3, 2.533e3],
|
|
73
|
+
* 398_600e9
|
|
74
|
+
* );
|
|
75
|
+
* // e ≈ 0.1712, i ≈ 153.2°, raan ≈ 255.3°, argp ≈ 20.07°, nu ≈ 28.45°
|
|
76
|
+
* ```
|
|
77
|
+
*
|
|
78
|
+
* @see {@link elementsToState}
|
|
79
|
+
* @see https://en.wikipedia.org/wiki/Orbital_elements Orbital elements
|
|
80
|
+
*/
|
|
81
|
+
export const stateToElements = (r, v, mu, tolerance = 1e-10) => {
|
|
82
|
+
for (const [name, vector] of [
|
|
83
|
+
['r', r],
|
|
84
|
+
['v', v]
|
|
85
|
+
]) {
|
|
86
|
+
for (const x of vector)
|
|
87
|
+
if (!Number.isFinite(x))
|
|
88
|
+
throw new TypeError(`${name} must have finite components. Received: ${x}`);
|
|
89
|
+
}
|
|
90
|
+
for (const [name, x] of [
|
|
91
|
+
['mu', mu],
|
|
92
|
+
['tolerance', tolerance]
|
|
93
|
+
]) {
|
|
94
|
+
if (!Number.isFinite(x))
|
|
95
|
+
throw new TypeError(`${name} must be a finite number. Received: ${x}`);
|
|
96
|
+
}
|
|
97
|
+
if (mu <= 0)
|
|
98
|
+
throw new RangeError(`mu must be > 0. Received: ${mu}`);
|
|
99
|
+
if (tolerance < 0)
|
|
100
|
+
throw new RangeError(`tolerance must be >= 0. Received: ${tolerance}`);
|
|
101
|
+
const rn = norm(r);
|
|
102
|
+
const vn = norm(v);
|
|
103
|
+
if (rn === 0)
|
|
104
|
+
throw new RangeError('r must not be the zero vector.');
|
|
105
|
+
const h = cross(r, v);
|
|
106
|
+
const hn = norm(h);
|
|
107
|
+
if (hn <= 1e-12 * rn * vn || hn === 0)
|
|
108
|
+
throw new RangeError('The motion is straight up or down (no angular momentum), so the orbit has no plane.');
|
|
109
|
+
const hHat = scale(h, 1 / hn);
|
|
110
|
+
const eVec = sub(scale(cross(v, h), 1 / mu), scale(r, 1 / rn));
|
|
111
|
+
const e = norm(eVec);
|
|
112
|
+
const energy = (vn * vn) / 2 - mu / rn;
|
|
113
|
+
const a = -mu / (2 * energy);
|
|
114
|
+
const i = Math.acos(Math.min(1, Math.max(-1, h[2] / hn)));
|
|
115
|
+
// The ascending node points along k × h
|
|
116
|
+
const node = [-h[1], h[0], 0];
|
|
117
|
+
const equatorial = Math.hypot(h[0], h[1]) <= tolerance * hn;
|
|
118
|
+
const circular = e <= tolerance;
|
|
119
|
+
// The angle from u to w, measured in the direction of motion
|
|
120
|
+
const angle = (u, w) => norm2pi(Math.atan2(dot(cross(u, w), hHat), dot(u, w)));
|
|
121
|
+
const reference = equatorial ? [1, 0, 0] : node;
|
|
122
|
+
return {
|
|
123
|
+
a,
|
|
124
|
+
e,
|
|
125
|
+
i: i,
|
|
126
|
+
raan: (equatorial ? 0 : norm2pi(Math.atan2(node[1], node[0]))),
|
|
127
|
+
argp: (circular ? 0 : angle(reference, eVec)),
|
|
128
|
+
nu: (circular ? angle(reference, r) : angle(eVec, r))
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
//# sourceMappingURL=state-to-elements.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state-to-elements.js","sourceRoot":"","sources":["../../../src/categories/orbits/state-to-elements.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAE3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8EG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,CAAoB,EACpB,CAAoB,EACpB,EAAU,EACV,SAAS,GAAG,KAAK,EACW,EAAE;IAC9B,KAAK,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI;QAC3B,CAAC,GAAG,EAAE,CAAC,CAAC;QACR,CAAC,GAAG,EAAE,CAAC,CAA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I,CAAC;IAEnE,OAAO;QACL,CAAC;QACD,CAAC;QACD,CAAC,EAAE,CAAY;QACf,IAAI,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAY;QACzE,IAAI,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC,CAAY;QACxD,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAY;KACjE,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { Radians } from '@interstellar-tools/types';
|
|
2
|
+
/**
|
|
3
|
+
* Compute the **eastward speed** of a point on a rotating body's surface, at a latitude.
|
|
4
|
+
*
|
|
5
|
+
* $$
|
|
6
|
+
* v_\text{rot} = \omega\, R \cos\varphi
|
|
7
|
+
* $$
|
|
8
|
+
*
|
|
9
|
+
* Where:
|
|
10
|
+
* - $ \omega $ is the body's rotation rate (rad/s), sidereal, not solar
|
|
11
|
+
* - $ R $ is the point's distance from the body's centre (m)
|
|
12
|
+
* - $ \varphi $ is the geocentric latitude (rad)
|
|
13
|
+
*
|
|
14
|
+
* **Units**
|
|
15
|
+
* - Inputs: `lat` in **radians**, `R` in **m**, `omega` in **rad/s**.
|
|
16
|
+
* - Output: $ v_\text{rot} $ in **m/s**, positive eastward.
|
|
17
|
+
*
|
|
18
|
+
* ::: info Notes
|
|
19
|
+
*
|
|
20
|
+
* - A rocket launched eastward gets this speed for free; one launched westward has to cancel it first.
|
|
21
|
+
* - Earth's sidereal rotation rate is about 7.2921150 × 10⁻⁵ rad/s.
|
|
22
|
+
* - A body that rotates backwards (Venus, Uranus) has a negative `omega`, and the result is negative: westward.
|
|
23
|
+
* - $ R\cos\varphi $ is the distance from the rotation axis. On an oblate body, pass the geocentric latitude and the point's distance from the body's centre, not the equatorial radius with a geodetic latitude (see [#186](https://github.com/phun-ky/interstellar-tools/issues/186)).
|
|
24
|
+
*
|
|
25
|
+
* :::
|
|
26
|
+
*
|
|
27
|
+
* ::: practice Apollo 11, on Pad 39A
|
|
28
|
+
*
|
|
29
|
+
* **408.6 m/s**
|
|
30
|
+
*
|
|
31
|
+
* _At 28.447° N geocentric, 6 373.3 km from Earth's centre, before the engines light_
|
|
32
|
+
*
|
|
33
|
+
* At the equator it's 465.1 m/s, which is one reason Europe launches from Kourou, at 5.2° N (463 m/s).
|
|
34
|
+
*
|
|
35
|
+
* ```ts
|
|
36
|
+
* surfaceRotationSpeed(toRad(28.447), 6_373_266, 7.292115e-5); // ≈ 408.6 m/s
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* :::
|
|
40
|
+
*
|
|
41
|
+
* @param lat - Geocentric latitude $ \varphi $ in **radians** (finite, in [-π/2, π/2]).
|
|
42
|
+
* @param R - Distance $ R $ from the body's centre in **m** (finite, > 0).
|
|
43
|
+
* @param omega - Rotation rate $ \omega $ in **rad/s** (finite).
|
|
44
|
+
* @returns Eastward surface speed $ v_\text{rot} $ in **m/s**.
|
|
45
|
+
* @throws {TypeError} If any input is not a finite number.
|
|
46
|
+
* @throws {RangeError} If `lat` is outside [-π/2, π/2] or `R <= 0`.
|
|
47
|
+
* @group Orbits
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* import type { Radians } from '@interstellar-tools/types';
|
|
52
|
+
*
|
|
53
|
+
* // Earth's equator
|
|
54
|
+
* surfaceRotationSpeed(0 as Radians, 6_378_137, 7.292115e-5); // ≈ 465.1 m/s
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* @see {@link inclinationFromLaunchAzimuth}
|
|
58
|
+
* @see {@link rotatingLaunchAzimuth}
|
|
59
|
+
*/
|
|
60
|
+
export declare const surfaceRotationSpeed: (lat: Radians, R: number, omega: number) => number;
|
|
61
|
+
//# sourceMappingURL=surface-rotation-speed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surface-rotation-speed.d.ts","sourceRoot":"","sources":["../../../src/categories/orbits/surface-rotation-speed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAEzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,eAAO,MAAM,oBAAoB,GAC/B,KAAK,OAAO,EACZ,GAAG,MAAM,EACT,OAAO,MAAM,KACZ,MAgBF,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compute the **eastward speed** of a point on a rotating body's surface, at a latitude.
|
|
3
|
+
*
|
|
4
|
+
* $$
|
|
5
|
+
* v_\text{rot} = \omega\, R \cos\varphi
|
|
6
|
+
* $$
|
|
7
|
+
*
|
|
8
|
+
* Where:
|
|
9
|
+
* - $ \omega $ is the body's rotation rate (rad/s), sidereal, not solar
|
|
10
|
+
* - $ R $ is the point's distance from the body's centre (m)
|
|
11
|
+
* - $ \varphi $ is the geocentric latitude (rad)
|
|
12
|
+
*
|
|
13
|
+
* **Units**
|
|
14
|
+
* - Inputs: `lat` in **radians**, `R` in **m**, `omega` in **rad/s**.
|
|
15
|
+
* - Output: $ v_\text{rot} $ in **m/s**, positive eastward.
|
|
16
|
+
*
|
|
17
|
+
* ::: info Notes
|
|
18
|
+
*
|
|
19
|
+
* - A rocket launched eastward gets this speed for free; one launched westward has to cancel it first.
|
|
20
|
+
* - Earth's sidereal rotation rate is about 7.2921150 × 10⁻⁵ rad/s.
|
|
21
|
+
* - A body that rotates backwards (Venus, Uranus) has a negative `omega`, and the result is negative: westward.
|
|
22
|
+
* - $ R\cos\varphi $ is the distance from the rotation axis. On an oblate body, pass the geocentric latitude and the point's distance from the body's centre, not the equatorial radius with a geodetic latitude (see [#186](https://github.com/phun-ky/interstellar-tools/issues/186)).
|
|
23
|
+
*
|
|
24
|
+
* :::
|
|
25
|
+
*
|
|
26
|
+
* ::: practice Apollo 11, on Pad 39A
|
|
27
|
+
*
|
|
28
|
+
* **408.6 m/s**
|
|
29
|
+
*
|
|
30
|
+
* _At 28.447° N geocentric, 6 373.3 km from Earth's centre, before the engines light_
|
|
31
|
+
*
|
|
32
|
+
* At the equator it's 465.1 m/s, which is one reason Europe launches from Kourou, at 5.2° N (463 m/s).
|
|
33
|
+
*
|
|
34
|
+
* ```ts
|
|
35
|
+
* surfaceRotationSpeed(toRad(28.447), 6_373_266, 7.292115e-5); // ≈ 408.6 m/s
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* :::
|
|
39
|
+
*
|
|
40
|
+
* @param lat - Geocentric latitude $ \varphi $ in **radians** (finite, in [-π/2, π/2]).
|
|
41
|
+
* @param R - Distance $ R $ from the body's centre in **m** (finite, > 0).
|
|
42
|
+
* @param omega - Rotation rate $ \omega $ in **rad/s** (finite).
|
|
43
|
+
* @returns Eastward surface speed $ v_\text{rot} $ in **m/s**.
|
|
44
|
+
* @throws {TypeError} If any input is not a finite number.
|
|
45
|
+
* @throws {RangeError} If `lat` is outside [-π/2, π/2] or `R <= 0`.
|
|
46
|
+
* @group Orbits
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* import type { Radians } from '@interstellar-tools/types';
|
|
51
|
+
*
|
|
52
|
+
* // Earth's equator
|
|
53
|
+
* surfaceRotationSpeed(0 as Radians, 6_378_137, 7.292115e-5); // ≈ 465.1 m/s
|
|
54
|
+
* ```
|
|
55
|
+
*
|
|
56
|
+
* @see {@link inclinationFromLaunchAzimuth}
|
|
57
|
+
* @see {@link rotatingLaunchAzimuth}
|
|
58
|
+
*/
|
|
59
|
+
export const surfaceRotationSpeed = (lat, R, omega) => {
|
|
60
|
+
for (const [name, v] of [
|
|
61
|
+
['lat', lat],
|
|
62
|
+
['R', R],
|
|
63
|
+
['omega', omega]
|
|
64
|
+
]) {
|
|
65
|
+
if (!Number.isFinite(v))
|
|
66
|
+
throw new TypeError(`${name} must be a finite number. Received: ${v}`);
|
|
67
|
+
}
|
|
68
|
+
if (Math.abs(lat) > Math.PI / 2)
|
|
69
|
+
throw new RangeError(`lat must be in [-π/2, π/2]. Received: ${lat}`);
|
|
70
|
+
if (R <= 0)
|
|
71
|
+
throw new RangeError(`R must be > 0. Received: ${R}`);
|
|
72
|
+
return omega * R * Math.cos(lat);
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=surface-rotation-speed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surface-rotation-speed.js","sourceRoot":"","sources":["../../../src/categories/orbits/surface-rotation-speed.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,GAAY,EACZ,CAAS,EACT,KAAa,EACL,EAAE;IACV,KAAK,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI;QACtB,CAAC,KAAK,EAAE,GAAG,CAAC;QACZ,CAAC,GAAG,EAAE,CAAC,CAAC;QACR,CAAC,OAAO,EAAE,KAAK,CAAC;KACR,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,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC;QAC7B,MAAM,IAAI,UAAU,CAAC,yCAAyC,GAAG,EAAE,CAAC,CAAC;IAEvE,IAAI,CAAC,IAAI,CAAC;QAAE,MAAM,IAAI,UAAU,CAAC,4BAA4B,CAAC,EAAE,CAAC,CAAC;IAElE,OAAO,KAAK,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACnC,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -23,10 +23,14 @@ export * from './categories/helpers/rot-3.js';
|
|
|
23
23
|
export * from './categories/helpers/transpose-3.js';
|
|
24
24
|
export * from './categories/anomalies/advance-mean-anomaly.js';
|
|
25
25
|
export * from './categories/anomalies/anomaly-at.js';
|
|
26
|
+
export * from './categories/anomalies/asymptote-true-anomaly.js';
|
|
26
27
|
export * from './categories/anomalies/eccentric-to-true-anomaly.js';
|
|
28
|
+
export * from './categories/anomalies/hyperbolic-to-true-anomaly.js';
|
|
27
29
|
export * from './categories/anomalies/true-to-mean-anomaly.js';
|
|
30
|
+
export * from './categories/anomalies/true-to-hyperbolic-anomaly.js';
|
|
28
31
|
export * from './categories/kepler/solve-kepler-bisection.js';
|
|
29
32
|
export * from './categories/kepler/solve-kepler-high-eccentricity.js';
|
|
33
|
+
export * from './categories/kepler/solve-kepler-hyperbolic.js';
|
|
30
34
|
export * from './categories/kepler/solve-kepler-newton-raphson.js';
|
|
31
35
|
export * from './categories/kepler/solve-kepler.js';
|
|
32
36
|
export * from './categories/gravity/acceleration-on1-by2.js';
|
|
@@ -37,24 +41,39 @@ export * from './categories/orbits/atmospheric-drag-acceleration.js';
|
|
|
37
41
|
export * from './categories/orbits/characteristic-energy-c3.js';
|
|
38
42
|
export * from './categories/orbits/circular-speed.js';
|
|
39
43
|
export * from './categories/orbits/cw-hill-derivatives.js';
|
|
44
|
+
export * from './categories/orbits/elements-to-state.js';
|
|
40
45
|
export * from './categories/orbits/escape-speed.js';
|
|
41
46
|
export * from './categories/orbits/flight-path-angle-from-true-anomaly.js';
|
|
47
|
+
export * from './categories/orbits/hyperbolic-eccentricity.js';
|
|
42
48
|
export * from './categories/orbits/hyperbolic-periapsis-speed.js';
|
|
49
|
+
export * from './categories/orbits/hyperbolic-semi-major-axis.js';
|
|
50
|
+
export * from './categories/orbits/hyperbolic-time-of-flight.js';
|
|
51
|
+
export * from './categories/orbits/inclination-from-launch-azimuth.js';
|
|
43
52
|
export * from './categories/orbits/j2-argument-of-perigee-rate.js';
|
|
44
53
|
export * from './categories/orbits/j2-nodal-precession-rate.js';
|
|
45
54
|
export * from './categories/orbits/kepler-period.js';
|
|
55
|
+
export * from './categories/orbits/launch-azimuth-for-inclination.js';
|
|
46
56
|
export * from './categories/orbits/mean-motion.js';
|
|
47
57
|
export * from './categories/orbits/peri-apoapsis-radii.js';
|
|
58
|
+
export * from './categories/orbits/rotating-launch-azimuth.js';
|
|
48
59
|
export * from './categories/orbits/specific-angular-momentum-from-elements.js';
|
|
49
60
|
export * from './categories/orbits/specific-angular-momentum.js';
|
|
50
61
|
export * from './categories/orbits/specific-mechanical-energy.js';
|
|
51
62
|
export * from './categories/orbits/sphere-of-influence-radius.js';
|
|
63
|
+
export * from './categories/orbits/state-to-elements.js';
|
|
64
|
+
export * from './categories/orbits/surface-rotation-speed.js';
|
|
52
65
|
export * from './categories/orbits/vis-viva-speed.js';
|
|
66
|
+
export * from './categories/manoeuvres/burn-time.js';
|
|
53
67
|
export * from './categories/manoeuvres/combine-burns-delta-v.js';
|
|
54
68
|
export * from './categories/manoeuvres/gravity-assist-turning-angle.js';
|
|
69
|
+
export * from './categories/manoeuvres/gravity-loss.js';
|
|
55
70
|
export * from './categories/manoeuvres/hohmann-transfer.js';
|
|
71
|
+
export * from './categories/manoeuvres/initial-mass-for-delta-v.js';
|
|
72
|
+
export * from './categories/manoeuvres/mass-flow-rate.js';
|
|
56
73
|
export * from './categories/manoeuvres/oberth-energy-gain.js';
|
|
57
74
|
export * from './categories/manoeuvres/plane-change-delta-v.js';
|
|
58
75
|
export * from './categories/manoeuvres/rocket-delta-v-from-isp.js';
|
|
59
76
|
export * from './categories/manoeuvres/rocket-delta-v-from-ve.js';
|
|
77
|
+
export * from './categories/manoeuvres/rocket-thrust.js';
|
|
78
|
+
export * from './categories/manoeuvres/thrust-to-weight.js';
|
|
60
79
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -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,cAAc,qDAAqD,CAAC;AAEpE,cAAc,gDAAgD,CAAC;
|
|
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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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;AAItD,cAAc,sCAAsC,CAAC;AAErD,cAAc,kDAAkD,CAAC;AAEjE,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,iDAAiD,CAAC;AAEhE,cAAc,oDAAoD,CAAC;AAEnE,cAAc,mDAAmD,CAAC;AAElE,cAAc,0CAA0C,CAAC;AAEzD,cAAc,6CAA6C,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -27,11 +27,15 @@ export * from './categories/helpers/transpose-3.js';
|
|
|
27
27
|
// categories/anomalies
|
|
28
28
|
export * from './categories/anomalies/advance-mean-anomaly.js';
|
|
29
29
|
export * from './categories/anomalies/anomaly-at.js';
|
|
30
|
+
export * from './categories/anomalies/asymptote-true-anomaly.js';
|
|
30
31
|
export * from './categories/anomalies/eccentric-to-true-anomaly.js';
|
|
32
|
+
export * from './categories/anomalies/hyperbolic-to-true-anomaly.js';
|
|
31
33
|
export * from './categories/anomalies/true-to-mean-anomaly.js';
|
|
34
|
+
export * from './categories/anomalies/true-to-hyperbolic-anomaly.js';
|
|
32
35
|
// categories/kepler (solvers)
|
|
33
36
|
export * from './categories/kepler/solve-kepler-bisection.js';
|
|
34
37
|
export * from './categories/kepler/solve-kepler-high-eccentricity.js';
|
|
38
|
+
export * from './categories/kepler/solve-kepler-hyperbolic.js';
|
|
35
39
|
export * from './categories/kepler/solve-kepler-newton-raphson.js';
|
|
36
40
|
export * from './categories/kepler/solve-kepler.js';
|
|
37
41
|
// categories/gravity
|
|
@@ -44,25 +48,40 @@ export * from './categories/orbits/atmospheric-drag-acceleration.js';
|
|
|
44
48
|
export * from './categories/orbits/characteristic-energy-c3.js';
|
|
45
49
|
export * from './categories/orbits/circular-speed.js';
|
|
46
50
|
export * from './categories/orbits/cw-hill-derivatives.js';
|
|
51
|
+
export * from './categories/orbits/elements-to-state.js';
|
|
47
52
|
export * from './categories/orbits/escape-speed.js';
|
|
48
53
|
export * from './categories/orbits/flight-path-angle-from-true-anomaly.js';
|
|
54
|
+
export * from './categories/orbits/hyperbolic-eccentricity.js';
|
|
49
55
|
export * from './categories/orbits/hyperbolic-periapsis-speed.js';
|
|
56
|
+
export * from './categories/orbits/hyperbolic-semi-major-axis.js';
|
|
57
|
+
export * from './categories/orbits/hyperbolic-time-of-flight.js';
|
|
58
|
+
export * from './categories/orbits/inclination-from-launch-azimuth.js';
|
|
50
59
|
export * from './categories/orbits/j2-argument-of-perigee-rate.js';
|
|
51
60
|
export * from './categories/orbits/j2-nodal-precession-rate.js';
|
|
52
61
|
export * from './categories/orbits/kepler-period.js';
|
|
62
|
+
export * from './categories/orbits/launch-azimuth-for-inclination.js';
|
|
53
63
|
export * from './categories/orbits/mean-motion.js';
|
|
54
64
|
export * from './categories/orbits/peri-apoapsis-radii.js';
|
|
65
|
+
export * from './categories/orbits/rotating-launch-azimuth.js';
|
|
55
66
|
export * from './categories/orbits/specific-angular-momentum-from-elements.js';
|
|
56
67
|
export * from './categories/orbits/specific-angular-momentum.js';
|
|
57
68
|
export * from './categories/orbits/specific-mechanical-energy.js';
|
|
58
69
|
export * from './categories/orbits/sphere-of-influence-radius.js';
|
|
70
|
+
export * from './categories/orbits/state-to-elements.js';
|
|
71
|
+
export * from './categories/orbits/surface-rotation-speed.js';
|
|
59
72
|
export * from './categories/orbits/vis-viva-speed.js';
|
|
60
73
|
// categories/manoeuvres
|
|
74
|
+
export * from './categories/manoeuvres/burn-time.js';
|
|
61
75
|
export * from './categories/manoeuvres/combine-burns-delta-v.js';
|
|
62
76
|
export * from './categories/manoeuvres/gravity-assist-turning-angle.js';
|
|
77
|
+
export * from './categories/manoeuvres/gravity-loss.js';
|
|
63
78
|
export * from './categories/manoeuvres/hohmann-transfer.js';
|
|
79
|
+
export * from './categories/manoeuvres/initial-mass-for-delta-v.js';
|
|
80
|
+
export * from './categories/manoeuvres/mass-flow-rate.js';
|
|
64
81
|
export * from './categories/manoeuvres/oberth-energy-gain.js';
|
|
65
82
|
export * from './categories/manoeuvres/plane-change-delta-v.js';
|
|
66
83
|
export * from './categories/manoeuvres/rocket-delta-v-from-isp.js';
|
|
67
84
|
export * from './categories/manoeuvres/rocket-delta-v-from-ve.js';
|
|
85
|
+
export * from './categories/manoeuvres/rocket-thrust.js';
|
|
86
|
+
export * from './categories/manoeuvres/thrust-to-weight.js';
|
|
68
87
|
//# sourceMappingURL=index.js.map
|
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;AAE7E,cAAc,qDAAqD,CAAC;AAEpE,cAAc,4DAA4D,CAAC;AAE3E,qBAAqB;AAErB,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;AAEpD,uBAAuB;AAEvB,cAAc,gDAAgD,CAAC;AAE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wD,CAAC;AAEvE,cAAc,oDAAoD,CAAC;AAEnE,cAAc,iDAAiD,CAAC;AAEhE,cAAc,sCAAsC,CAAC;AAErD,cAAc,uDAAuD,CAAC;AAEtE,cAAc,oCAAoC,CAAC;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,wBAAwB;AAExB,cAAc,sCAAsC,CAAC;AAErD,cAAc,kDAAkD,CAAC;AAEjE,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,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.
|
|
3
|
+
"version": "1.2.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",
|