\section{Sensors}
\label{sec:sensors}

	\subsection{Barometer}
	\label{sec:sensBaro}
		%
		As stated by \cite{Muralidharan14-BPS}, ambient pressure readings are highly influenced by environmental conditions
		like the weather, time-of-day and others. Thus, relative pressure readings are preferred over absolute ones. 
		However, due to noisy sensors, more than one reading is required to estimate the relative base.
		Harnessing the usual setup time of a navigation-system (route calculation, user checking the route, etc.)
		we use the average of all barometer readings during this timeframe as estimated base $\overline{\mObsPressure}$. 
		Moreover, it is often necessary to omit some initial sensors readings, as the smartphone's sensor needs some time
		to settle. Besides, we use the setup timeframe to estimate the sensors uncertainty $\sigma_\text{baro}$ for later
		use within the evaluation. Fig. \ref{fig:baroSetupError} depicts actual sensor-readings including aforementioned
		error conditions.
		%		
		\begin{figure}
			\include{gfx/baro/baro_setup_issue}
			\caption{Sometimes the smartphone's barometer (here: Motorola Nexus 6) provides erroneous pressure readings
			during the first seconds. Those need to be omitted before $\sigma_\text{baro}$ and
			$\overline{\mObsPressure}$ are estimated.}
			\label{fig:baroSetupError}
		\end{figure}
		%	
		During each transition from $\mStateVec_{t-1}$ to $\mStateVec_t$, we need a corresponding, relative
		pressure prediction $\mStatePressure$ which is adjusted according to the resulting $z$-change:
		%		
		\begin{equation}
			\mState_{t}^{\mStatePressure} = \mState_{t-1}^{\mStatePressure} + \Delta z \cdot b
			,\enskip
			\Delta z = \mState_{t-1}^{z} - \mState_{t}^z
			,\enskip
			b \in \R
			.
			\label{eq:baroTransition}
		\end{equation}
		%
		In \refeq{eq:baroTransition}, $b$ denotes the usual pressure change in $\frac{\text{hPa}}{\text{m}}$.
		The evaluation, following the transition, compares the predicted relative pressure with the observed
		one using a normal distribution with the previously estimated $\sigma_\text{baro}$:
		%
		\begin{equation}
			p(\mObsVec_t \mid \mStateVec_t)_\text{baro} = \mathcal{N}(\mObs_t^{\mObsPressure} \mid \mState_t^{\mStatePressure}, \sigma_\text{baro}^2).
			\label{eq:baroEval}
		\end{equation}
		%		
		%
		%
	\subsection{Wi-Fi \& iBeacons}
		%
		Absolute location hints are provided by the smartphone's \docWIFI{} and \docIBeacon{} component,
		measuring the signal-strengths of nearby transmitters. As the positions of both \docAP{}s and \docIBeacon{}s
		are known beforehand, we compare each measurement with its corresponding signal strength prediction using
		the wall-attenuation-factor model \cite{Ebner-15}. This prediction depends on the 3D distance $d$ from the
		\docAPshort{} and the number of floors $\Delta f$ between the \docAPshort{} and the state-in-question:
		%	
		\begin{equation}
			P_r(d, \Delta f) = \mTXP - 10 \mPLE \log_{10}{\frac{\mMdlDist}{\mMdlDist_0}} + \Delta{f} \mWAF,
		\end{equation}
		%
		Assuming statistical independence of all \docAPshort{}s, 
		the probability to measure their predictions at a given location is:
		%		
		\begin{equation}
			\mProb(\mObsVec_t \mid \mStateVec_t)_\text{wifi} =
			\prod\limits_{i=1}^{n} \mathcal{N}(\mRssi_\text{wifi}^{i} \mid P_{r}(\mMdlDist_{i}, \Delta{f_{i}}), \sigma_{\text{wifi}}^2).
			\label{eq:wifiTotal}
		\end{equation}
		%
		For the \docWIFI{} component we thus need three parameters per \docAPshort{}: $\mTXP$ measured at a distance 
		$\mMdlDist_0$ (usually \SI{1}{\meter}), the path-loss exponent $\mPLE$ describing the environment
		and $\mWAF$ denoting the attenuation per floor.
		To reduce complexity and system setup time, we use the same values for all \docAP{}s at the cost of accuracy.
		While, $\mTXP$ is best determined using averaged measurements at a single location,
		a good estimation of $\mPLE$ and $\mWAF$ requires several measurements and numerical optimization
		\cite{PathLossPredictionModelsForIndoor}. $\mPLE$ and $\mWAF$ are thus chosen empirically.
		
		For the \docIBeacon{} component we also use \refeq{eq:wifiTotal} but $\mTXP$ is transmitted by each beacon. 
		Due to the short-range coverage the model parameters require less consideration of the senders ambient conditions
		(e.g. walls). Therefore, a smaller $\mPLE$ can be chosen to model the signal strength prediction for \docIBeacon{}s.
		%
		%
	\subsection{Step- \& Turn-Detection}
		%
		A big disadvantage of using the state transition as proposal distribution is the high possibility of sample
		impoverishment due to a small measurement noise. This happens since accurate observations result in high peaks
		of the evaluation density and therefore the proposal density is not able to sample outside that peak \cite{Isard98:CCD}. 
		Additionally, erroneous or delayed measurements from absolute positioning sensors like \docWIFI{} may lead to misplaced turns. 
		This causes a downvoting of the posterior distribution in areas where the heading deviates.
		Therefore, we incorporate the pedestrian's heading $\mObsHeading$, as well as the number of steps $\mObsSteps$, directly into the state transition
		$p(\mStateVec_{t} \mid \mStateVec_{t-1}, \mObsVec_{t-1})$, which leads to a directed sampling instead of a random one.
		Steps and turns are detected using the smartphone's IMU and are implemented as described in \cite{Ebner-15}. 
		%
