\section{Indoor Positioning System} \label{sec:system} Our smartphone-based indoor localization system estimates the current location and heading using recursive density estimation. A graph based movement model provides the transition, %$p(\mStateVec_{t} \mid \mStateVec_{t-1}, \mObsVec_{t-1})$ while the smartphone's accelerometer, gyroscope, magnetometer provide the observations for the following evaluation step to infer the hidden state, namely the pedestrian's location and heading \cite{Ebner-16, Fetzer-16}. \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}} \enspace, \end{array} \label{eq:recursiveDensity} \end{equation} The hidden state $\mStateVec$ is given by \begin{equation} \mStateVec = (x, y, z, \mStateHeading),\enskip x, y, z, \mStateHeading \in \R \enspace, \end{equation} % where $x, y, z$ represent the pedestrian's position in 3D space and $\mStateHeading$ his current (absolute) heading. % The corresponding observation vector is defined as % \begin{equation} \mObsVec = (\mRssiVecWiFi{}, \mObsSteps, \mObsHeadingRel, \mObsHeadingAbs, \mObsGPS) \enspace. \end{equation} % $\mRssiVecWiFi$ contains the measurements of all nearby \docAP{}s (\docAPshort{}s), $\mObsSteps$ describes the number of steps detected since the last filter-step, $\mObsHeadingRel$ the (relative) angular change since the last filter-step, $\mObsHeadingAbs$ the current, vague absolute heading and $\mObsGPS = ( \mObsGPSlat, \mObsGPSlon )$ the current location (if available) given by the GPS. Assuming statistical independence, the state evaluation's density can be written as % \begin{equation} %\begin{split} p(\vec{o}_t \mid \vec{q}_t) = p(\vec{o}_t \mid \vec{q}_t)_\text{wifi}\enskip p(\vec{o}_t \mid \vec{q}_t)_\text{gps} \enspace. \label{eq:evalDensity} \end{equation} % The remaining observations, namely: detected steps, relative- and absolute heading are used within the transition model, where potential movements $p(\mStateVec_{t} \mid \mStateVec_{t-1}, \mObsVec_{t-1})$ are sampled based on those sensor values. As this work focuses on \docWIFI{} optimization, not all parts of the localization system are discussed in detail. For missing explanations please refer to \cite{Ebner-16}. % Since then, absolute heading and GPS have been added as additional sensors to further enhance the localization by comparing the sensor values using some distribution. \todo{neues resampling?} \todo{ueberleitung} \todo{ die absolute positionierung kommt aus dem wlant, dafür braucht man entweder viele fingerprints oder ein modell } As GPS will only work outdoors, e.g. when moving from one building into another, the system's absolute position indoors is solely provided by the \docWIFI{} component. Therefore its crucial for this component to provide location estimations that are as accurate as possible, while ensuring fast setup and maintenance times.