Radar Detection#

class PointDetection(position, velocity, power)#

Bases: object

A single radar point detection.

Parameters:
  • position (np.ndarray) – Cartesian position of the detection in cartesian coordinates.

  • velocity (np.ndarray) – Velocity vector of the detection in m/s

  • power (float) – Power of the detection.

Raises:

ValueError – If position is not three-dimensional. If velocity is not three-dimensional. If power is smaller or equal to zero.

classmethod FromSpherical(zenith, azimuth, range, velocity, power)#

Generate a point detection from radar cube spherical coordinates.

Parameters:
  • zenith (float) – Zenith angle in Radians.

  • azimuth (float) – Azimuth angle in Radians.

  • range (float) – Point distance to coordiante system origin in m/s.

  • velocity (float) – Velocity from / to the coordinate system origin in m/s.

  • power (float) – Point power indicator.

Return type:

PointDetection

property position: ndarray#

Position of the detection.

Returns:

Cartesian position in m.

Return type:

np.ndarray

property velocity: ndarray#

Velocity of the detection.

Returns:

Velocity vector in m/s.

Return type:

np.ndarray

property power: float#

Detected power.

Returns:

Power.

Return type:

float

class RadarPointCloud(max_range=0.0)#

Bases: Visualizable

A sparse radar point cloud.

Parameters:

max_range (float, optional) – Maximal represented range. Used for visualization.

Raises:

ValueError – For max_range smaller than zero.

property max_range: float#

Maximal represented range.

Returns:

Maximal range in m. Zero if unknown.

property points: List[PointDetection]#

Points contained within the represented point cloud.

Returns: List of represented points.

property num_points: int#

Number of points contained within this point cloud.

Returns:

The number of points.

add_point(point)#

Add a new detection to the point cloud.

Parameters:

point (PointDetection) – The detection to be added.

Return type:

None

property title: str#

Title of the visualizable.

Returns: Title string.

class RadarDetector#

Bases: object

Base class for radar detection algorithms.

Radar detection algorithms convert a radar cube to a radar point cloud.

abstract detect(cube)#

Generate a point cloud from a radar cube.

Parameters:

cube (RadarCube) – The radar cube to be processed.

Return type:

RadarPointCloud

Returns:

The resulting (usually sparse) point cloud.

class ThresholdDetector(min_power, normalize=True, peak_detection=True)#

Bases: RadarDetector, Serializable

Extract points by a power threshold.

Parameters:
  • min_power (float) – Minmally required point power.

  • normalize (bool, optional) – Normalize the power during detection, so that min_power becomes a relative value betwee zero and one. Enabled by default.

  • peak_detection (bool, optional) – Run a peak detection algorithm to only extract points at power peaks. Enabled by default.

yaml_tag: Optional[str] = 'Threshold'#

YAML serialization tag.

property min_power: float#

Minimally required point power.

Returns:

Power (linear).

Raises:

ValueError – On powers smaller or equal to zero.

property normalize: bool#

Normalize cube power before detection.

Returns: Enabled flag.

property peak_detection: bool#

Run a peak search before detection.

Returns: Enabled flag.

detect(cube)#

Generate a point cloud from a radar cube.

Parameters:

cube (RadarCube) – The radar cube to be processed.

Return type:

RadarPointCloud

Returns:

The resulting (usually sparse) point cloud.

class MaxDetector#

Bases: RadarDetector, Serializable

Extracts the maximum point from the radar cube.

yaml_tag: Optional[str] = 'Max'#

YAML serialization tag.

detect(cube)#

Generate a point cloud from a radar cube.

Parameters:

cube (RadarCube) – The radar cube to be processed.

Return type:

RadarPointCloud

Returns:

The resulting (usually sparse) point cloud.