\section{Recursive State Estimation}

We consider indoor localisation as a time-sequential, non-linear and non-Gaussian state estimation problem. 
Using a recursive Bayes filter that satisfies the Markov property, the posterior distribution at time $t$ can be written as
%
\begin{equation}
	\arraycolsep=1.2pt
	\begin{array}{ll}
		&p(\mStateVec_{t} \mid \mObsVec_{1:t}) \propto\\ 
			&\underbrace{p(\mObsVec_{t} \mid \mStateVec_{t})}_{\text{evaluation}}
			\int \underbrace{p(\mStateVec_{t} \mid \mStateVec_{t-1}, \mObsVec_{t})}_{\text{transition}}
			\underbrace{p(\mStateVec_{t-1} \mid \mObsVec_{1:t-1})d\vec{q}_{t-1}}_{\text{recursion}} \enspace,
	\end{array}
	\label{equ:bayesInt}
\end{equation}
%
where $\mObsVec_{1:t} = \mObsVec_{1}, \mObsVec_{1}, ..., \mObsVec_{t}$ is a series of observations up to time $t$. 
The hidden state $\mStateVec$ is given by
\begin{equation}
	\mStateVec = (x, y, z, \mObsHeading, \mStatePressure),\enskip
	x,y,z,\mStatePressure \in \R \enspace,
\end{equation}
where $x, y, z$ represent the 3D position, $\mObsHeading$ the user's heading and $\mStatePressure$ the relative pressure prediction in hectopascal (hPa). 
The recursive part of the density estimation contains all information up to time $t$.
Further, the state transition models the pedestrian’s movement based upon random walks on graphs, which will be described in section \ref{sec:trans}. 
It should be noted, that we also include the current observation $\mObsVec_{t}$ in it. 

Containing all relevant sensor measurements to evaluate the current state, the observation vector is defined as follows:
%
\begin{equation}
	\mObsVec = (\mRssiVec_\text{wifi}, \mRssiVec_\text{ib}, \mObsHeading, \mObsSteps, \mObsPressure) \enspace,
\end{equation}
%
where $\mRssiVec_\text{wifi}$ is the Wi-Fi and $\mRssiVec_\text{ib}$ the iBeacon signal strength vector. 
The information, if a step or turn was detected, is given as a Boolean value. 
\commentByToni{Wie sieht die Observation nun genau aus? Fehlt da nicht Step und Turn?}
Finally, $\mObsPressure$ is the relative barometric pressure with respect to some fixed point in time. 
For incorporating the highly different sensor types, one should refer to the process of probabilistic sensor fusion \cite{Khaleghi2013}.
By assuming statistical independence of all sensor models, the probability density of the state evaluation is given by 
%
\begin{equation}
	\begin{split}
		&p(\vec{o}_t \mid \vec{q}_t, \vec{q}_{t-1}) = \\
		&p(\vec{o}_t \mid \vec{q}_t)_\text{baro} 
		\,p(\vec{o}_t \mid \vec{q}_t)_\text{ib}
		\,p(\vec{o}_t \mid \vec{q}_t)_\text{wifi}
	\end{split} \enspace.
	\label{eq:evalBayes}
\end{equation}
%
Here, every single component refers to a probabilistic sensor model. 
The barometer information is evaluated using $p(\vec{o}_t \mid \vec{q}_t)_\text{baro}$, whereby absolute position information is given by $p(\vec{o}_t \mid \vec{q}_t)_\text{ib}$ for iBeacons and by $p(\vec{o}_t \mid \vec{q}_t)_\text{wifi}$ for Wi-Fi. 

It is well known that finding analytic solutions for densities is very difficult and they only exit in rare cases.
Therefore, numerical solutions like Gaussian filters or the broad class of Monte Carlo methods are deployed \cite{sarkka2013bayesian}. 
Since we assume that indoor localisation is a time-sequential, non-linear and non-Gaussian process, a particle filter for approximating the posterior distribution is chosen. 
Within this work the state transition $p(\mStateVec_{t} \mid \mStateVec_{t-1}, \mObsVec_{t})$ is used as proposal distribution, what is also known as CONDENSATION algorithm \cite{Isard98:CCD}.


