" live_tracks[col]['associations'].append(k) # If we've associated something, add the time here (for plotting purposes)\n",
" for i in range(len(live_tracks)):\n",
" if i not in col_ind:\n",
" live_tracks[i] = logic.score_logic(np.array([]), live_tracks[i]['filt'], live_tracks[i], logic_params) # If no meas associated, still update logic of track\n",
" \n",
" \n",
" tentative_tracks = [track for track in tracks if track['stage'] == 'tentative']\n",
" tentative_tracks[col]['associations'].append(k) # If we've associated something, add the time here (for plotting purposes)\n",
" if tentative_tracks[col]['stage'] == 'confirmed':\n",
" confirmed_tracks.append(tentative_tracks[col]) # If a track has been confirmed, add it to confirmed tracks\n",
" for i in range(len(tentative_tracks)):\n",
" if i not in col_ind:\n",
" tentative_tracks[i] = logic.score_logic(np.array([]), tentative_tracks[i]['filt'], tentative_tracks[i], logic_params) # If no meas associated, still update logic of track\n",
" \n",
" # Use the unused measurements to initiate new tracks\n",
cur_measurements[:,nclutter+nt]=y.flatten()# Add actual observation to array
cur_measurements=cur_measurements[~np.isnan(cur_measurements)].reshape(ny,-1)# Remove nan measurements (i.e. targets that did not generate a measurement)
tentative_tracks[col]['associations'].append(k)# If we've associated something, add the time here (for plotting purposes)
iftentative_tracks[col]['stage']=='confirmed':
confirmed_tracks.append(tentative_tracks[col])# If a track has been confirmed, add it to confirmed tracks
foriinrange(len(tentative_tracks)):
ifinotincol_ind:
tentative_tracks[i]=logic.score_logic(np.array([]),tentative_tracks[i]['filt'],tentative_tracks[i],logic_params)# If no meas associated, still update logic of track
# Use the unused measurements to initiate new tracks