Documentation / @interstellar-tools/equations / specificAngularMomentum
Function: specificAngularMomentum()
ts
function specificAngularMomentum(
r: Vector3DTupleType,
v: Vector3DTupleType
): number;Defined in: orbits/specific-angular-momentum.ts:57
Specific angular momentum (
Definitions
Useful identities:
(For orbital elements, one also has (
Units
- Inputs: (
) in meters (m), ( ) in m/s. - Output: (
) in m²/s.
INFO
- Returns the magnitude of (
) (not the vector). - (
) iff ( ) (purely radial motion) or ( ). - In a two-body Keplerian model, (
) is constant along the orbit.
Invariants (floating-point tolerance aside)
- (
) - (
) and ( ) (directional property; this function returns only ( )).
Parameters
| Parameter | Type | Description |
|---|---|---|
r | Vector3DTupleType | Inertial position vector ( |
v | Vector3DTupleType | Inertial velocity vector ( |
Returns
number
Specific angular momentum (
Throws
Error If any component of r/v is non-finite; if r has zero length; or if v is invalid (NaN).
Example
ts
// LEO-like state: r ⟂ v
const r: [number, number, number] = [6778e3, 0, 0]; // m
const v: [number, number, number] = [0, 7.67e3, 0]; // m/s
const h = specificAngularMomentum(r, v); // ≈ 5.20e10 m²/sSee
- https://en.wikipedia.org/wiki/Specific_angular_momentum
- specificAngularMomentumFromElements (if you compute from (
))