\subsection{Real World}

To demonstrate the real time capabilities of the proposed method a real world scenario was chosen, namely indoor localization. 
The given problem is to localize a pedestrian walking inside a building. 
Ebner et al. proposed a method, which incorporate multiple sensors, e.g. Wi-Fi, barometer, step-detection and turn-detection \cite{Ebner-15}. 
At a given time $t$ the system estimates a state consisting of the three-dimensional position.
It is implemented using a particle filter with sample importance resampling and \SI{5000} particles.
The dynamics are modelled realistically, which constrains the movement according to walls, doors and stairs. 

We arranged a \SI{223}{\meter} long walk within the first floor of a \SI{2500}{m$^2$} museum, which was build in the 13th century and therefore offers non-optimal conditions for localization. 
%The measurements for the walks were recorded using a Motorola Nexus 6 at 2.4 GHz band only.
%
Since this work only focuses on processing a given sample set, further details of the localisation system and the described scenario can be looked up in \cite{Ebner17} and \cite{Fetzer17}.
The spacing $\delta$ of the grid was set to \SI{20}{\centimeter} for $x$ and $y$-direction.
The bivariate state estimation was calculated whenever a step was recognized, about every \SI{500}{\milli  \second}.
%The intention of a real world experiment is to investigate the advantages and disadvantages of the here proposed method for finding a best estimate of the pedestrian's position in the wild, compared to conventional used methods like the weighted-average or choosing the maximum weighted particle.

\begin{figure}
	\input{gfx/walk.tex}
	\caption{Occurring bimodal distribution, caused by uncertain measurements. After \SI{20.8}{\second}, the distribution gets unimodal. The weigted-average estimation (blue) provides an high error compared to the ground truth (solid black), while the boxKDE approach (green) does not. }
	\label{fig:realWorldMulti}
\end{figure}
%
Fig. \ref{fig:realWorldMulti} illustrates a frequently occurring situation, where the particle set splits apart, due to uncertain measurements and multiple possible walking directions.
This results in a bimodal posterior distribution, which reaches its maximum distances between the modes at \SI{13.4}{\second} (black dotted line).
Thus estimating the most probable state using the weighted-average results in the blue line, describing the pedestrian's position to be somewhere outside the building (light green area). 
In contrast, the here proposed method (green line) is able to retrieve a good estimate compared the the ground truth path shown by the black solid line.
Due to a right turn, the distribution gets unimodal after \SI{20.8}{\second}. 
This happens since the lower red particles are walking against a wall and thus punished with a low weight.

This example highlights the main benefits using our approach. 
While being fast enough to be computed in real time, the proposed method reduces the estimation error of the state in this situation, as it is possible to distinguish the two modes of the density.
It is clearly visible, that it enables the system to recover the real state if multimodalities arise.
However, in situations with highly uncertain measurements, the estimation error could further increase since the real estimate is not equal to the best estimate, i.e. the real position of the pedestrian.

The error over time for different estimation methods of the complete walk can be seen in fig. \ref{fig:realWorldTime}.
It is given by calculating the distance between estimation and ground truth at a specific time $t$.
Estimates provided by simply choosing the maximum particle stand out the most. 
As one could have expected beforehand, this method provides many strong peaks through continues jumping between single particles. 
Additionally, in most real world scenarios many particles share the same weight and thus multiple highest-weighted particles exist.

\begin{figure}
	\input{gfx/errorOverTime.tex}
	\caption{Error development over time calculated between estimation and ground truth. Between \SI{230}{\second} and \SI{290}{\second} to pedestrian was not moving.}
	\label{fig:realWorldTime}
\end{figure}

Further investigating fig. \ref{fig:realWorldTime}, the boxKDE performs slightly better then the weighted-average, however after deploying \SI{100} MC runs, the difference becomes insignificant.
The main reason for this are again multimodalities caused by faulty or delayed measurements, especially when entering or leaving rooms. 
Within our experiments the problem occurred due to slow and attenuated Wi-Fi signals inside thick-walled rooms. 
While the system's dynamics are moving the particles outside, the faulty Wi-Fi readings are holding back a majority by assigning corresponding weights. 
Therefore, the average between the modes of the distribution is often closer to the ground truth as the real estimate, which is located on the \qq{wrong} mode. 
With new measurements coming from the hallway or other parts of the building, the distribution and thus the estimation are able to recover.

Nevertheless, it could be seen that our approach is able to resolve multimodalities even under real world conditions. 
It does not always provide the lowest error, since it depends more on an accurate sensor model then a weighted-average approach, but is very suitable as a good indicator about the real performance of a sensor fusion system.
At the end, in the here shown examples we only searched for a global maxima, even though the boxKDE approach opens a wide range of other possibilities for finding a best estimate. 

%springt nicht so viel wie maximum
%sehr ähnlich zu weighted-average. in 1000 mc runs ist sind average und std sehr ähnlich.
%das lässt den schluss, dass boxKDE den Fehler nicht reduziert, aber in bestmmten situationen einfach einen realistischeren pfad liefert. 

