Documentation / @interstellar-tools/equations / specificAngularMomentumFromElements
Function: specificAngularMomentumFromElements()
ts
function specificAngularMomentumFromElements(
a: number,
e: number,
mu: number
): number;Defined in: orbits/specific-angular-momentum-from-elements.ts:59
Specific angular momentum (
Definition
where (
Validity by conic
- Elliptic: (
) → ( ) ⇒ radicand ( ). - Hyperbolic: (
) → ( ) and ( ) ⇒ product still ( ). - Parabolic: (
) is not represented by finite ( ). Use state vectors or ( ) (with periapsis radius ( )).
Units
- Inputs: (
) in m, ( ) dimensionless, ( ) in m³/s². - Output: (
) in m²/s.
INFO
- This returns the magnitude of (
). - For numerical robustness, tiny negative radicands from FP cancellation are clamped to zero.
Parameters
| Parameter | Type | Description |
|---|---|---|
a | number | Semi-major axis ( |
e | number | Eccentricity ( |
mu | number | Gravitational parameter ( |
Returns
number
Specific angular momentum (
Throws
Error If (
Examples
ts
// Near-circular LEO-like elements
const muEarth = 3.986004418e14; // m³/s²
const a = 6778e3; // m
const e = 0.001;
const h = specificAngularMomentumFromElements(a, e, muEarth); // ≈ sqrt(μ a)ts
// Hyperbolic flyby example
const muEarth = 3.986004418e14; // m³/s²
const a = -50000e3; // m (negative for hyperbola)
const e = 1.2;
const h = specificAngularMomentumFromElements(a, e, muEarth);See
specificAngularMomentum - compute (