Skip to content

Commit

Permalink
Change priors and sensor uncertainty to match optimised sensor manage…
Browse files Browse the repository at this point in the history
…ment tutorial
  • Loading branch information
nperree-dstl committed Aug 4, 2022
1 parent 34d7749 commit 8441dba
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
17 changes: 8 additions & 9 deletions docs/tutorials/sensormanagement/01_SingleSensorManagement.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
sensorA = RadarRotatingBearingRange(
position_mapping=(0, 2),
noise_covar=np.array([[np.radians(0.5) ** 2, 0],
[0, 0.75 ** 2]]),
[0, 1 ** 2]]),
ndim_state=4,
position=np.array([[10], [0]]),
rpm=60,
Expand All @@ -197,7 +197,7 @@
sensorB = RadarRotatingBearingRange(
position_mapping=(0, 2),
noise_covar=np.array([[np.radians(0.5) ** 2, 0],
[0, 0.75 ** 2]]),
[0, 1 ** 2]]),
ndim_state=4,
position=np.array([[10], [0]]),
rpm=60,
Expand Down Expand Up @@ -233,14 +233,13 @@
from stonesoup.types.state import GaussianState

priors = []
xdirection=1.5
ydirection=1.5

xdirection = 1.2
ydirection = 1.2
for j in range(0, ntruths):
priors.append(
GaussianState([[0], [xdirection], [yps[j]+0.5], [ydirection]], np.diag([1.5, 0.25, 1.5, 0.25] + np.random.normal(0, 5e-4, 4)),
timestamp=start_time))
xdirection*=-1
priors.append(GaussianState([[0], [xdirection], [yps[j]+0.1], [ydirection]],
np.diag([0.5, 0.5, 0.5, 0.5]+np.random.normal(0,5e-4,4)),
timestamp=start_time))
xdirection *= -1
if j % 2 == 0:
ydirection *= -1

Expand Down
13 changes: 7 additions & 6 deletions docs/tutorials/sensormanagement/02_MultiSensorManagement.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
sensor = RadarRotatingBearingRange(
position_mapping=(0, 2),
noise_covar=np.array([[np.radians(0.5) ** 2, 0],
[0, 0.75 ** 2]]),
[0, 1 ** 2]]),
ndim_state=4,
position=np.array([[10], [n * 50]]),
rpm=60,
Expand All @@ -157,7 +157,7 @@
sensor = RadarRotatingBearingRange(
position_mapping=(0, 2),
noise_covar=np.array([[np.radians(0.5) ** 2, 0],
[0, 0.75 ** 2]]),
[0, 1 ** 2]]),
ndim_state=4,
position=np.array([[10], [n * 50]]),
rpm=60,
Expand Down Expand Up @@ -195,15 +195,16 @@
from stonesoup.types.state import GaussianState

priors = []
xdirection = 1.5
ydirection = 1.5
xdirection = 1.2
ydirection = 1.2
for j in range(0, ntruths):
priors.append(GaussianState([[0], [xdirection], [yps[j]+0.5], [ydirection]],
np.diag([1.5, 0.25, 1.5, 0.25]+np.random.normal(0,5e-4,4)),
priors.append(GaussianState([[0], [xdirection], [yps[j]+0.1], [ydirection]],
np.diag([0.5, 0.5, 0.5, 0.5]+np.random.normal(0,5e-4,4)),
timestamp=start_time))
xdirection *= -1
if j % 2 == 0:
ydirection *= -1

# %%
# Initialise the tracks by creating an empty list and appending the priors generated. This needs to be done
# separately for both sensor manager methods as they will generate different sets of tracks.
Expand Down

0 comments on commit 8441dba

Please sign in to comment.