Skip to content

Documentation / @interstellar-tools/maps / groundSampleDistance

Function: groundSampleDistance() ​

ts
function groundSampleDistance(distance: number, ifov: Radians): number;

Defined in: imaging/ground-sample-distance.ts:60

Compute the ground sample distance: how much ground one pixel covers, looking straight down.

GSD=2Htan⁡IFOV2≈HIFOV=Hpf

Where:

  • H is the distance to the ground along the line of sight (m)
  • IFOV is the pixel's instantaneous field of view (rad), from instantaneousFieldOfView

Units

  • Inputs: distance in m, ifov in radians.
  • Output: GSD in m per pixel.

Notes

  • Grows in step with the distance: twice as high, pixels twice as large.
  • Flat ground seen straight down. Looking off to the side, the slant distance is longer and pixels stretch further along the look direction, by about 1/cos⁡e for an emission angle e.
  • The smallest object a camera can recognise is a few pixels across, not one.
In practiceHiRISE, over Mars

30 cm

One pixel of the Mars Reconnaissance Orbiter's HiRISE camera, 1 µrad, from 300 km

HiRISE's 12 m focal length gives each pixel a field of view of one microradian: small enough to make out a rover and its tracks from orbit.

ts
groundSampleDistance(300_000, 1e-6); // ≈ 0.30 m

Parameters ​

ParameterTypeDescription
distancenumberDistance H to the ground in m (finite, > 0).
ifovRadiansInstantaneous field of view in radians (finite, > 0, < π).

Returns ​

number

The ground sample distance in m.

Throws ​

  • If any input is not a finite number.
  • If distance <= 0, or ifov is outside (0, π).

Example ​

ts
import { instantaneousFieldOfView } from '@interstellar-tools/maps';

// 7 µm pixels, a 700 mm lens, 50 km up
groundSampleDistance(50_000, instantaneousFieldOfView(7e-6, 0.7)); // ≈ 0.5 m

See ​