\subsection{Real World}

To demonstrate the 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 incorporates multiple sensors, \eg{} Wi-Fi, barometer, step-detection and turn-detection \cite{Ebner-15}. 
At a given time $t$ the system estimates a state providing the most probable position of the pedestrian.
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 \mbox{\SI{76}{} $\times$ \SI{71}{\meter}} sized museum, which was built in the 13th century and 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 localization 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{27}{\centimeter} for $x$ and $y$-direction, resulting in a grid size of $G=74019$.
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 in the first \SI{13.4}{\second} of the walk. After \SI{20.8}{\second}, the distribution gets unimodal. The weigted-average estimation (blue) provides a high error compared to the ground truth (solid black), while the BoxKDE approach (orange) 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 over time 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 (orange line) is able to retrieve a good estimate compared to 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 therefore are 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 this 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, \ie{} the real position of the pedestrian.

The error over time for different estimation methods of the complete walk can be seen in \figref{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 expected beforehand, this method provides many strong peaks through continuously jumping between single particles. 

\begin{figure}
	\input{gfx/errorOverTime.tex}
	\caption{Error development over time of a single Monte Carlo run of the walk 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 \figref{fig:realWorldTime}, the BoxKDE performs slightly better than the weighted-average in this specific Monte Carlo run.
However after deploying \SI{100} Monte Carlo 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 can 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 than a weighted-average approach, but it is very suitable as a good indicator about the real performance of a sensor fusion system.
In the here shown examples we only searched for a global maximum, 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. 

