Skip to content

Commit

Permalink
Merge pull request #1075 from dstl/asd_fix
Browse files Browse the repository at this point in the history
Fix ASD with OOSM
  • Loading branch information
sdhiscocks authored Sep 2, 2024
2 parents 53ddb3b + 2f36abf commit 9b03203
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions stonesoup/predictor/asd.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,19 @@ def predict(self, prior, timestamp, **kwargs):

P_right_lower = prior.multi_covar[t_index * ndim:, t_index * ndim:]

# Calculate what would be the orignal predicted covariance
p_state_pred = GaussianState(
x_pred_m, correlation_matrices[t_index]['P'], prior.timestamp)
p_p_pred = self._predicted_covariance(
p_state_pred, predict_over_interval=predict_over_interval)

# add new correlation matrix with the present time step
correlation_matrices[t_index] = pred_from_corr_matrices = \
correlation_matrices[t_index].copy()
pred_from_corr_matrices['P_pred'] = p_pred_m
pred_from_corr_matrices['P_pred'] = p_p_pred
pred_from_corr_matrices['F'] = transition_matrix_m
pred_from_corr_matrices['PFP'] = (
pred_from_corr_matrices['P'] @ transition_matrix_m.T @ np.linalg.inv(p_pred_m))
pred_from_corr_matrices['P'] @ transition_matrix_m.T @ np.linalg.inv(p_p_pred))

correlation_matrices.insert(t_index, {})
correlation_matrices[t_index]['F'] = transition_matrix_m_plus_1
Expand Down

0 comments on commit 9b03203

Please sign in to comment.