Skip to content

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 (h) (scalar magnitude).

Definitions

h=‖r×v‖

Useful identities:

h=rv⊥,(circular)  v⊥=μ/r⇒h=μr

(For orbital elements, one also has (h=μa(1−e2)), not used here.)

Units

  • Inputs: (r) in meters (m), (v) in m/s.
  • Output: (h) in m²/s.

INFO

  • Returns the magnitude of (h=r×v) (not the vector).
  • (h=0) iff (r∥v) (purely radial motion) or (v=0).
  • In a two-body Keplerian model, (h) is constant along the orbit.

Invariants (floating-point tolerance aside)

  • (h≥0)
  • (h⊥r) and (h⊥v) (directional property; this function returns only (‖h‖)).

Parameters ​

ParameterTypeDescription
rVector3DTupleTypeInertial position vector (r=[x,y,z]) (m).
vVector3DTupleTypeInertial velocity vector (v=[vx,vy,vz]) (m/s).

Returns ​

number

Specific angular momentum (h) (m²/s).

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²/s

See ​