Documentation / @interstellar-tools/equations / gravityLoss
Function: gravityLoss()
ts
function gravityLoss(
g: number | readonly number[],
gamma: readonly Radians[],
dt: number
): number;Defined in: manoeuvres/gravity-loss.ts:48
Compute the gravity loss of a burn from samples of gravity and flight-path angle.
integrated with the trapezoidal rule over equally spaced samples.
Where:
is the local gravitational acceleration (m/s²) is the flight-path angle above the local horizontal (rad) is the burn time (s)
Units
- Inputs:
gin m/s²,gammain radians,dtin s. - Output:
in m/s.
Notes
- Thrust spent holding a rocket up against gravity doesn't speed it up. The loss is largest for a vertical climb (
) and zero for a horizontal burn ( ). - The delta-v a rocket must carry is its orbital delta-v plus its gravity, drag and steering losses.
- Pass
gas one number when it's constant over the burn, or as samples matchinggamma.
Parameters
| Parameter | Type | Description |
|---|---|---|
g | number | readonly number[] |
gamma | readonly Radians[] | Flight-path angles dt seconds (at least 2 samples, each finite). |
dt | number | Time between samples in s (finite, > 0). |
Returns
number
Gravity loss
Throws
- If any input is not a finite number, or
gandgammahave different lengths. - If
gammahas fewer than 2 samples,dt <= 0or anyg < 0.
Example
ts
import type { Radians } from '@interstellar-tools/types';
// A 10 s vertical climb in constant Earth gravity
const vertical = Array.from({ length: 11 }, () => (Math.PI / 2) as Radians);
gravityLoss(9.80665, vertical, 1); // ≈ 98.07 m/sSee
https://en.wikipedia.org/wiki/Gravity_drag Gravity drag