From 735ba95a34fa55b93f2fdeb603ced1d4dc8b99ba Mon Sep 17 00:00:00 2001
From: Anton Kullberg <anton.kullberg@liu.se>
Date: Fri, 12 Nov 2021 16:32:39 +0100
Subject: [PATCH] bug: fixed update_track bug after rename

---
 src/trackers.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/trackers.py b/src/trackers.py
index 963b879..0ce9129 100644
--- a/src/trackers.py
+++ b/src/trackers.py
@@ -269,11 +269,11 @@ class GNN():
                 continue
             else:
                 # Update confirmed tracks
-                self._update_track(meas_k[:, unused_meas][:, row], tracks[col])
+                self.update_track(meas_k[:, unused_meas][:, row], tracks[col])
                 tracks[col]['associations'].append(k) # If we've associated something, add the time here (for plotting purposes)
         for i in range(len(tracks)):
             if i not in col_ind:
-                self._update_track(np.array([]), tracks[i])
+                self.update_track(np.array([]), tracks[i])
         # Remove any gated measurements from further consideration
         tmp = unused_meas[unused_meas] # Extract the unused measurements
         inds = np.where(validation_matrix.sum(axis=1))
@@ -497,10 +497,10 @@ class JPDA():
         meas = meas_k[:, unused_meas]
         for ti, track in enumerate(tracks):
             if validation_matrix[ti, 1:].any(): # If any measurements are validated to this track, update it accordingly
-                self._update_track(meas[:, validation_matrix[ti, 1:].flatten()], track, association_matrix[ti, validation_matrix[ti, :]])
+                self.update_track(meas[:, validation_matrix[ti, 1:].flatten()], track, association_matrix[ti, validation_matrix[ti, :]])
                 track['associations'].append(k) # If we've associated something, add the time here (for plotting purposes)
             else:
-                self._update_track(np.array([]), track, None)
+                self.update_track(np.array([]), track, None)
         # Measurements that are validated to any track can be removed from further association
         tmp = unused_meas[unused_meas]
         used_inds = np.where(validation_matrix[:, 1:].sum(axis=0))
@@ -775,7 +775,7 @@ class MHT():
                     # Update the tracks with associated measurements
                     for j, association in enumerate(associations):
                         if association < nt: # i.e. associated to a track
-                            self._update_track(meas_k[:, j], hypothesis[k][-1]['tracks'][association])
+                            self.update_track(meas_k[:, j], hypothesis[k][-1]['tracks'][association])
                             hypothesis[k][-1]['tracks'][association]['associations'].append(k)
                             unused_meas[j] = 0
                         # Update the proability of the hypothesis for this particular association
@@ -783,7 +783,7 @@ class MHT():
                     # Update tracks without an association in this particular hypothesis
                     for j in range(nt):
                         if j not in associations:
-                            self._update_track(np.array([]), hypothesis[k][-1]['tracks'][j])
+                            self.update_track(np.array([]), hypothesis[k][-1]['tracks'][j])
 
                     # For any still unused measurements, possibly initiate a new track
                     while unused_meas.any():
-- 
GitLab