Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ASD with OOSM #1075

Merged
merged 1 commit into from
Sep 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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