"Bi Directional" Kalman Filter
Anuar Y, Welcome to the DSP community.

What you're talking about is called smoothing.
Let me explain, assume we have samples $ {\left\{ x \left[ n \right] \right\}}_{n = 0}^{N - 1} $ and we want to build estimator for $ x \left[ k \right] $ which we will define as $ \hat{x} \left[ k \right] $.

Now, we have 3 types of estimation:


The case $ k &gt; N - 1 $ is called prediction.
This is usually what we employ Kalman Filter for.
The case $ k = N - 1 $ is called filtration.
This is easy as we basically filter data we have.
The case $ k &lt; N - 1 $ is called smoothing.
This is basically what you're after.


So, there is plenty of information about the Kalman Filter in the Smoothing framework:


Derivation of Kalman Filtering and Smoothing Equations.
Kalman Filtering and Smoothing.
Fixed Leg Smoother.


If there is something specific you need, let us know and we'll assist you.