dstl / Stone-Soup

A software project to provide the target tracking community with a framework for the development and testing of tracking algorithms.
https://stonesoup.rtfd.io
MIT License
388 stars 128 forks source link

Progress Trackers Manually: Option B #779

Closed gawebb-dstl closed 7 months ago

gawebb-dstl commented 1 year ago

All current trackers require a detection feeder. It can be useful to progress a tracker manually without a detection feeder (see Multi-Sensor Fusion: Covariance Intersection Using Tracks as Measurements example).

All current trackers and start their __next__ function with:

time, detections = next(self.detector_iter)
# Some tracking logic

I've moved this line to the new Tracker baseclass and added an update_tracker function which takes the time and detections from the detection feeder as an input. With this being a separate function, you can access it directly and bypass the detection feeder which may be easier in instances

gawebb-dstl commented 1 year ago

See PR #742 for an alternative implementation

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.01 :warning:

Comparison is base (bf40a9a) 94.87% compared to head (610423a) 94.87%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #779 +/- ## ========================================== - Coverage 94.87% 94.87% -0.01% ========================================== Files 176 176 Lines 9757 9750 -7 Branches 1938 1940 +2 ========================================== - Hits 9257 9250 -7 Misses 356 356 Partials 144 144 ``` | Flag | Coverage Δ | | |---|---|---| | integration | `68.25% <91.66%> (-0.04%)` | :arrow_down: | | unittests | `89.89% <100.00%> (-0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dstl#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/dstl/Stone-Soup/pull/779?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dstl) | Coverage Δ | | |---|---|---| | [stonesoup/reader/yaml.py](https://codecov.io/gh/dstl/Stone-Soup/pull/779?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dstl#diff-c3RvbmVzb3VwL3JlYWRlci95YW1sLnB5) | `95.16% <100.00%> (-0.08%)` | :arrow_down: | | [stonesoup/tracker/base.py](https://codecov.io/gh/dstl/Stone-Soup/pull/779?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dstl#diff-c3RvbmVzb3VwL3RyYWNrZXIvYmFzZS5weQ==) | `100.00% <100.00%> (ø)` | | | [stonesoup/tracker/pointprocess.py](https://codecov.io/gh/dstl/Stone-Soup/pull/779?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dstl#diff-c3RvbmVzb3VwL3RyYWNrZXIvcG9pbnRwcm9jZXNzLnB5) | `93.22% <100.00%> (-0.33%)` | :arrow_down: | | [stonesoup/tracker/simple.py](https://codecov.io/gh/dstl/Stone-Soup/pull/779?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dstl#diff-c3RvbmVzb3VwL3RyYWNrZXIvc2ltcGxlLnB5) | `98.98% <100.00%> (-0.11%)` | :arrow_down: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dstl). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dstl)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

nperree-dstl commented 10 months ago

I've reviewed this and #742 and I think I prefer this approach. I can't say I've ever used the next method to use a tracker but if others do then would removing them be a (small) breaking change? Is it possible to keep __next__ and update_tracker methods?