Skip to content

Documentation / @interstellar-tools/maps / isStableLanding

Function: isStableLanding() ​

ts
function isStableLanding(
  slope: Radians,
  dynamicTilt: Radians,
  rFootprint: number,
  hCoM: number
): boolean;

Defined in: landing/is-stable-landing.ts:54

Check whether a lander stays upright on a slope: whether its total tilt stays below its tip-over angle.

θterrain+θdynamic<arctan⁡rfootprinthCoM

Where:

  • θterrain is the slope of the ground under the lander (rad)
  • θdynamic is the extra tilt from the touchdown itself, the rock-up as the legs take the load (rad)
  • the right-hand side is tipOverAngle

Units

  • Inputs: slope and dynamicTilt in radians, rFootprint and hCoM in m.
  • Output: true if it stays up, false if it tips at or past the limit.

Notes

  • A static check, the first screen for a landing site: real landers also depend on touchdown speed, leg compression, friction and footpads digging in or sliding.
  • Pass the slope in the direction the lander is most likely to tip, and the footprint distance in that direction too.
  • For a whole elevation grid, safeLandingGrid combines it with each cell's slope and roughness.

Parameters ​

ParameterTypeDescription
slopeRadiansGround slope θterrain in radians (finite, >= 0).
dynamicTiltRadiansExtra tilt from touchdown θdynamic in radians (finite, >= 0).
rFootprintnumberDistance from the centre of mass to the tipping edge, horizontally, in m (finite, > 0).
hCoMnumberHeight of the centre of mass above the ground in m (finite, > 0).

Returns ​

boolean

true if the total tilt stays below the tip-over angle.

Throws ​

  • If any input is not a finite number.
  • If slope or dynamicTilt is negative, or rFootprint or hCoM is <= 0.

Example ​

ts
import type { Radians } from '@interstellar-tools/types';

const toRad = (deg: number) => ((deg * Math.PI) / 180) as Radians;

// Tips at 45°: fine on a 30° slope with 10° of rock-up, not on 40° with 10°
isStableLanding(toRad(30), toRad(10), 2, 2); // true
isStableLanding(toRad(40), toRad(10), 2, 2); // false

See ​