I have to estimate location w.r.t a given map of the environment. The state is expressed as
$ X = \begin{bmatrix} x \\ y \\ \theta \end{bmatrix}$
Given ,
$ X_{t-1} = \begin{bmatrix} x_{t-1} \\ y_{t-1} \\ \theta_{t-1} \end{bmatrix}$ and it's covariance $P_{t-1}, $ a 3X3 matrix .
I have a measurement model which detects lines representing obstacles , so , in one measurement there can be any number of lines , these lines are represented as $$ Z = \begin{bmatrix} \alpha \\ r \end{bmatrix}$$ normal form of line.
I have successfully completed all the steps until the calculation of innovation covariance i.e.
$ S = H_t\hat{P_t}H_t^T + R_t$ ,
where $H_t$ is the measurement Jacobian , $\hat{P_t}$ is the estimated motion covariance and $R_t$ is the measurement noise matrix.
When I have single line measurement , the measurement Jacobian, $H_t$ is a 2-Dimensional $2\times 3$ matrix and the measurement noise matrix , $R_t$ is $2\times 2$. But , when there are multiple line measurements , for example 8 lines , $H_t$ becomes $2\times 3 \times 8$ three-dimensional matrix and $R_t$ a $2\times 2 \times 8$ three-dimensional matrix.
Because of this change in dimension I cannot carry out the calculation of innovation covariance $S$ as $\hat{P_t}$ is a $3 \times 3$ matrix.
How can I incorporate multiple line readings and suppress the three-dimensional matrix to match innovation covariance equation ?