\section{Recursive State Estimation}
\label{sec:rse}

Wie immer. bisschen umschreiben halt.


As mentioned before, most smoothing methods require a preceding filtering. 
Similar to our previous works, we consider indoor localisation as a time-sequential, non-linear and non-Gaussian state estimation problem. 
Therefore, a Bayes filter that satisfies the Markov property is used to calculate the posterior:
	%
	\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-1})}_{\text{transition}}
				\underbrace{p(\mStateVec_{t-1} \mid \mObsVec_{1:t-1})d\vec{q}_{t-1}}_{\text{recursion}}
		\end{array}
		\label{equ:bayesInt}
	\end{equation}
	%
Here, the previous observation $\mObsVec_{t-1}$ is included into the state transition \cite{Ebner-15}. 
For approximating eq. \eqref{equ:bayesInt} by means of MC methods, the transition is used as proposal distribution, also known as CONDENSATION algorithm \cite{isard1998smoothing}. 
This algorithm also performs a resampling step to handle the phenomenon of weight degeneracy.

In the context of indoor localisation, the hidden state $\mStateVec$ is defined as follows:
	\begin{equation}
		\mStateVec = (x, y, z, \mStateHeading, \mStatePressure),\enskip
		x, y, z, \mStateHeading, \mStatePressure \in \R \enspace,
	\end{equation}
	%
where $x, y, z$ represent the position in 3D space, $\mStateHeading$ the user's heading and $\mStatePressure$ the relative atmospheric pressure prediction in hectopascal (hPa). Further, the observation is given by
	%
	\begin{equation}
		\mObsVec = (\mRssiVec_\text{wifi}, \mRssiVec_\text{ib}, \mObsHeading, \mObsSteps, \mObsPressure, \mObsActivity) \enspace,
	\end{equation}
	%
covering all relevant sensor measurements. 
Here, $\mRssiVec_\text{wifi}$ and $\mRssiVec_\text{ib}$ contain the measurements of all nearby \docAP{}s (\docAPshort{}) and \docIBeacon{}s, respectively. 
$\mObsHeading$ and $\mObsSteps$ describe the relative angular change and the number of steps detected for the pedestrian. 
$\mObsPressure$ is the relative barometric pressure with respect to a fixed reference. 
Finally, $\mObsActivity$ contains the activity currently estimated for the pedestrian, which is one of:
unknown, standing, walking, walking up the stairs or walking down the stairs.

The probability density of the state evaluation is given by 
	%
	\begin{equation}
		%\begin{split}
			p(\vec{o}_t \mid \vec{q}_t) = 
			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}
			\enspace
		%\end{split}
		\label{eq:evalBayes}
	\end{equation}
	%
and therefore similar to \cite{Ebner-16}.
Here, we assume a statistical independence of all sensors and 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 \docIBeacon{}s and by $p(\vec{o}_t \mid \vec{q}_t)_\text{wifi}$ for \docWIFI{}. 


