Skip to content

Geometry

Geometric range, range-rate, and flight-path calculations.

Computes the instantaneous range and range-rate between a radar platform and a target given their 3-D position and velocity vectors. Also provides helpers for SAR flight-path generation and slant-range computation.

flight_path(n_pulses, pulse_spacing, altitude=0.0)

Generates a straight, level flight path centred at the origin.

The platform moves along the x-axis (along-track) at a fixed altitude. Positions are centred so that pulse n_pulses // 2 is at x = 0.

Parameters:

Name Type Description Default
n_pulses int

Number of aperture positions.

required
pulse_spacing float

Along-track distance between successive positions [m].

required
altitude float

Platform altitude above the scene plane [m].

0.0

Returns:

Type Description
ndarray

Platform positions with shape (n_pulses, 3), columns [x, y, z].

Source code in src/rad_lab/geometry.py
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
def flight_path(n_pulses: int, pulse_spacing: float, altitude: float = 0.0) -> np.ndarray:
    """Generates a straight, level flight path centred at the origin.

    The platform moves along the *x*-axis (along-track) at a fixed altitude.
    Positions are centred so that pulse ``n_pulses // 2`` is at *x* = 0.

    Args:
        n_pulses: Number of aperture positions.
        pulse_spacing: Along-track distance between successive positions [m].
        altitude: Platform altitude above the scene plane [m].

    Returns:
        Platform positions with shape ``(n_pulses, 3)``, columns ``[x, y, z]``.
    """
    x = (np.arange(n_pulses) - n_pulses / 2) * pulse_spacing
    positions = np.zeros((n_pulses, 3))
    positions[:, 0] = x
    positions[:, 2] = altitude
    return positions

range_and_rangerate(plat_pos, plat_vel, tgt_pos, tgt_vel)

Calculate the range vector, range magnitude, and range-rate of a target relative to a platform.

Parameters:

Name Type Description Default
plat_pos list

Cartesian position of the platform [x, y, z].

required
plat_vel list

Velocity vector of the platform [vx, vy, vz].

required
tgt_pos list

Cartesian position of the target [x, y, z].

required
tgt_vel list

Velocity vector of the target [vx, vy, vz].

required

Returns:

Name Type Description
R_vec ndarray

The displacement vector from the platform to the target.

R_mag float

The Euclidean distance (range) between the platform and target.

R_dot float

The scalar range-rate (radial velocity) of the target relative to the platform.

Source code in src/rad_lab/geometry.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
def range_and_rangerate(
    plat_pos: list, plat_vel: list, tgt_pos: list, tgt_vel: list
) -> tuple[np.ndarray, float, float]:
    """
    Calculate the range vector, range magnitude, and range-rate of a target relative to a platform.

    Args:
        plat_pos (list): Cartesian position of the platform [x, y, z].
        plat_vel (list): Velocity vector of the platform [vx, vy, vz].
        tgt_pos (list): Cartesian position of the target [x, y, z].
        tgt_vel (list): Velocity vector of the target [vx, vy, vz].

    Returns:
        R_vec (np.ndarray): The displacement vector from the platform to the target.
        R_mag (float): The Euclidean distance (range) between the platform and target.
        R_dot (float): The scalar range-rate (radial velocity) of the target relative to the platform.
    """
    R_vec = np.array(tgt_pos) - np.array(plat_pos)
    R_mag = norm(R_vec)
    R_unit_vec = R_vec / R_mag
    R_dot = np.dot(tgt_vel, R_unit_vec) - np.dot(plat_vel, R_unit_vec)

    return R_vec, R_mag, R_dot

slant_range(platform_positions, target_position)

Computes the Euclidean slant range from each platform position to a target.

Parameters:

Name Type Description Default
platform_positions ndarray

Platform positions with shape (n_pulses, 3) [m].

required
target_position list[float]

Target [x, y, z] coordinates [m].

required

Returns:

Type Description
ndarray

1-D array of slant ranges with shape (n_pulses,) [m].

Source code in src/rad_lab/geometry.py
58
59
60
61
62
63
64
65
66
67
68
69
def slant_range(platform_positions: np.ndarray, target_position: list[float]) -> np.ndarray:
    """Computes the Euclidean slant range from each platform position to a target.

    Args:
        platform_positions: Platform positions with shape ``(n_pulses, 3)`` [m].
        target_position: Target ``[x, y, z]`` coordinates [m].

    Returns:
        1-D array of slant ranges with shape ``(n_pulses,)`` [m].
    """
    diff = platform_positions - np.asarray(target_position)
    return norm(diff, axis=1)