mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-peak.git
synced 2025-06-10 18:16:00 +00:00
Make correction step static
This commit is contained in:
parent
9b5b01908c
commit
570685b0bb
@ -78,7 +78,7 @@ public:
|
|||||||
* @param R The measurement noise covariance matrix.
|
* @param R The measurement noise covariance matrix.
|
||||||
* @return The corrected state of the Kalman filter.
|
* @return The corrected state of the Kalman filter.
|
||||||
*/
|
*/
|
||||||
KalmanState correct(KalmanState state, matrix z, matrix H, matrix R);
|
static KalmanState correct(KalmanState state, matrix z, matrix H, matrix R);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace math
|
} // namespace math
|
||||||
|
@ -60,7 +60,7 @@ KalmanState KalmanFilter::correct(KalmanState state, matrix z, matrix H, matrix
|
|||||||
state.x = state.x + K * (z - H * state.x); //TODO check transpose
|
state.x = state.x + K * (z - H * state.x); //TODO check transpose
|
||||||
state.x.show_serial();
|
state.x.show_serial();
|
||||||
// Update the error covariance matrix
|
// Update the error covariance matrix
|
||||||
state.error = (identity_ - K * H) * state.error;
|
state.error = (matrix::eye(state.x.get_rows()) - K * H) * state.error;
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user