Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JPDA and SystematicResampler Fixes (updated) #193

Merged
merged 3 commits into from
May 6, 2020

Conversation

sglvladi
Copy link
Collaborator

@sglvladi sglvladi commented Apr 15, 2020

This PR supersedes #152. The following changes have been applied:

  • The branch has been rebased to the latest master commit.
  • An attrgetter is now used when sorting the weights in SystematicResampler
  • Minor formatting has been applied to JPDA.

@sglvladi sglvladi changed the title Ultra public dev (updated) JPDA and SystematicResampler Fixes (updated) Apr 15, 2020
@codecov-io
Copy link

codecov-io commented Apr 20, 2020

Codecov Report

Merging #193 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #193   +/-   ##
=======================================
  Coverage   92.47%   92.48%           
=======================================
  Files         113      113           
  Lines        4027     4030    +3     
  Branches      576      577    +1     
=======================================
+ Hits         3724     3727    +3     
  Misses        223      223           
  Partials       80       80           
Impacted Files Coverage Δ
stonesoup/dataassociator/probability.py 100.00% <100.00%> (ø)
stonesoup/resampler/particle.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7f6b95c...254a91f. Read the comment docs.

@sdhiscocks
Copy link
Member

@sglvladi - Could you please rebase this to drop the delete commits, and squash duplicate commits.

JPompeus and others added 3 commits May 5, 2020 23:53
Particles are sorted before calculating the cumulative sum array. Thus when particles are resampled, they are drawn from the ordered distribution, rather than randomly.
The prediction and measurement prediction were originally set for every hypothesis in the multihypothesis as for the missed detection state. This causes spurious results at the update step if the measurements in the multihypothesis are asynchronous (e.g. grouped by a time-windowing feeder class), and the sensor platform is moving. In this case, the updated state is calculated using the sensor's translation offset at the missed detection timestamp (i.e. the latest timestamp in the window), but for a position measurement taken at the measurement timestamp (which may be earlier in the window).
This fix attaches the prediction/measurement prediction calculated for the measurement to the relevant SingleHypothesis, such that the update is calculated using the correct sensor offset for the measurement timestamp.
@sglvladi
Copy link
Collaborator Author

sglvladi commented May 5, 2020

@sglvladi - Could you please rebase this to drop the delete commits, and squash duplicate commits.

@sdhiscocks I've had a go at it. Let me know if there's anything else that needs doing.

@sdhiscocks sdhiscocks merged commit c8e5537 into dstl:master May 6, 2020
@sdhiscocks
Copy link
Member

Thanks @sglvladi

@sdhiscocks sdhiscocks added the bug label Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants