Stone-Soup icon indicating copy to clipboard operation
Stone-Soup copied to clipboard

Out of Sequence Tracker - Two Tracker (One current, one delayed)

Open gawebb-dstl opened this issue 3 years ago • 0 comments

The idea is that you have two trackers. One running at the current time, one running ‘x’ seconds behind. If you receive an ‘old’ measurement, you run the last ‘x’ seconds of measurements through the old tracker in order. This method is computational expensive but I think it offers the optimal tracking performance for out of sequence measurements. I think this method could be useful to have in stone-soup’s framework because it gives an upper bound on the ability of any other out of sequence measurements methods.

I an Out of Sequence measurement wrapper for a SingleTargetTracker, I kept running into problems that caused me deviate away from the stone-soup framework. I’d like to make it agnostic of the tracker

detection_buffer = []  # contains detections between ‘now’ and ‘now+ ‘x’ seconds
tracker_current = Tracker(x)
tracker_late = Tracker(x)

# new detection comes in
detection_buffer.append(new_detection)
sort(detection_buffer)

if new_detection.time >= tracker_now.state.time  # detection is in sequence
  tracker_now.add_detection(new_detection)
elif  new_detection.time < tracker_now.state.time  # detection out of sequence
  tracker_now = copy(tracker_late)
  tracker_now.add_detection(detection_buffer)

One of the major problems with this implementation is on the second to last line of the code. You can’t copy a tracker, with the ‘state’ of the generator. It restarts the generator, which breaks this implementation as we need to copy the state of the generator when we copy it

gawebb-dstl avatar Mar 02 '21 14:03 gawebb-dstl