You already got the answer at
Why did you not use the likelihood_piecewise_kalman_filter?
likelihood_piecewise_kalman_filter