Skip to content

Commit

Permalink
Merge pull request #723 from dstl/clutter
Browse files Browse the repository at this point in the history
Add clutter model usage in RadarRotatingBearingRange
  • Loading branch information
sdhiscocks committed Sep 23, 2022
2 parents a85f1e0 + 006846a commit e5955f6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
6 changes: 6 additions & 0 deletions stonesoup/sensor/radar/radar.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,12 @@ def measure(self, ground_truths: Set[GroundTruthState], noise: Union[np.ndarray,
groundtruth_path=truth)
detections.add(detection)

# Generate clutter at this time step
if self.clutter_model is not None:
self.clutter_model.measurement_model = measurement_model
clutter = self.clutter_model.function(ground_truths)
detections = set.union(detections, clutter)

return detections


Expand Down
12 changes: 11 additions & 1 deletion stonesoup/sensor/radar/tests/test_radar.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,8 +678,18 @@ def test_target_rcs():
position_mapping=[0, 2, 4],
noise_covar=np.eye(3)),
((-50, 50), (-50, 50), (-50, 50))),
(RadarRotatingBearingRange(ndim_state=4,
position_mapping=[0, 2],
noise_covar=np.array([[np.radians(0.5) ** 2, 0],
[0, 1 ** 2]]),
position=np.array([[0], [1]]),
rpm=60,
fov_angle=np.radians(30),
dwell_centre=StateVector([0.0]),
max_range=np.inf),
((-50, 50), (-50, 50)))
],
ids=["RadarBearingRange", "RadarElevationBearingRange"]
ids=["RadarBearingRange", "RadarElevationBearingRange", "RadarRotatingBearingRange"]
)
def test_clutter_model(radar, clutter_params):
# Test that the radar correctly adds clutter when it has a clutter
Expand Down

0 comments on commit e5955f6

Please sign in to comment.