\section{Introduction}

Since the advent of smartphones, location aware apps and services are ubiquitous and have become a natural part of our everyday life.
Whether driving a car, jogging or shopping in the streets, GNSS-based applications are making orientation easier,
point the way and even track our fitness achievements. But as soon as we drive into an underground car park or visit a shopping mall, most of them do not work at all.
That is because satellite signals are to weak to pass through obstacles like buildings' ceilings.
Moreover, their accuracy is not sufficient for individual parking spaces or office rooms.
Therefore, many different solutions for localizing a moving object within buildings have been developed in most recent years \cite{Ebner-15, Yang2015, Khaleghi2013, Fang09, Nurminen2014}.
Especially the hard problem of pedestrian localization and navigation has lately attracted a lot of interest. 

Most modern indoor localisation systems primarily use smartphones for determining the position of a pedestrian.
Especially the phone's inertial measurement unit (IMU) as well as external information like Wi-Fi or Bluetooth
are used for collecting the necessary data. Additionally, environmental knowledge is often incorporated by using
floor maps. This combination of highly different sensor types is also known as sensor fusion.

Here, probabilistic methods like particle- or Kalman filters are often used to approximate a probability
distribution describing describing the pedestrian's possible whereabouts.
This procedure can be separated into two probabilistic models:
The transition model represents the dynamics of the pedestrian
and predicts the next accessible locations,
while the evaluation model estimates the probability for the position also corresponding to the recent sensor measurements.
 %Therefore, the most accurate position is represented by a peak of the probability distribution. 
In our previous work we were able to present such a localisation system based on all the above mentioned
sensors including the phone's barometer \cite{Ebner-15}.

In pedestrian navigation, the human movement underlies the characteristics of walking speed and walking direction.
Additionally, environmental restrictions need to be considered as well, for example, walking through walls is in most cases impossible. Therefore, incorporating environmental knowledge is a necessary and gainful step.
Like other systems, we are using a graph-based approach to sample only valid locations.
The unique feature of our approach is the way in how we model the human movement.
This is done by using random walks on a graph, which are based upon the heading of the
pedestrian. 
Despite very good results and a robust position estimation, the system presented in \cite{Ebner-15} suffers from two drawbacks, we want to solve within this work.

Firstly, the transition model of our previous approach uses discrete floor-changes.
Although the overall systems provides viable results, it does not resemble real-world floor changes.
Especially the barometric sensor is affected due to its continuous pressure measurements.
The discrete model prevents the barometers full potential.
It could further be shown that a correct estimation strongly depends on the quality of $z$-transitions.
To address this problem we extended the graph by realistically shaped stairs, allowing a step-wise transition
in the $z$-direction.

Secondly, the heading for modelling the pedestrian's walking behaviour is calculated between two adjacent nodes.
This restricts the transition to perform only \SI{45}{\degree} turns. In most scenarios this assumption performs
well, since the... However, walking sharp turns and ... is not 
\commentByToni{Ich denke hier kann Frank E. noch bissle was schreiben, oder?} 
\commentByFrank{ja das werde ich noch anpassen, dass es stimmt und die probleme beschreibt}

To improve the complex problem of localising a person indoors, prior knowledge given by a pedestrian navigation can be used. 
Such applications are used to navigate a user to his desired destination.
This limits the unpredictability of human movement to a certain degree. 
So, based on this assumption the destination is known beforehand and the starting point is the current estimated position of the pedestrian. 
Regarding a graph-based transition model, one could suggest to use the shortest route between start and destination as the user's most-likely-to-walk path. 
By incorporating this prior knowledge into the state transition step, a new state can be sampled in a more targeted manner. 
However, for regular tessellated (grid) graphs, as used in \cite{Ebner-15}, this often leads to paths running very unnatural alongside walls. 
Therefore, we present a method that detects walls using the inverted graph (representing walls and obstacles) and a nearest-neighbour search. 

In order to express that areas near walls are less likely to be chosen for walking, a probabilistic weight is assigned to every node of the graph.
This allows a variety of options for integrating additional knowledge about the environment and enables us to address another problem:
Walking through a door has a lower probability than remaining on the corridor, since only a few nodes are representing it. 
This can be tackled by making such areas more likely.  
Therefore, a novel approach for detecting doors using again the inverted graph and the principal component analysis (PCA) \cite{Hotelling1933} is presented within this work.

Finally, it is now possible to calculate more natural and realistic paths using the weighted graph. We introduce two different methods which make use of the given destination and thereby provide a targeted movement. 



%Additionally, the human walking behaviour is highly affected by visual distractions, comfort, disorientation and many other factors. 


