Indoor Navigation Using Smartphones

Indoor Navigation Using Smartphones

Assessing the Quality of Integrated Sensors

Nowadays, navigation systems have become an integral part of everyday life. But since GNSS-based systems do not work in locations where no GNSS signals can be received, a navigation solution can offer an interesting solution in such places – such as at congresses, in shopping malls, at train stations or in large office buildings. The HafenCity University in Hamburg, Germany, started exploring the possibilities of indoor navigation solutions in 2009, and especially in conjunction with smartphones since 2011. In order to devise a successful indoor navigation solution, it is important to understand the quality of smartphones’ integrated sensors. This article describes initial studies of the gyroscope and the barometer in the test smartphone, a Samsung Galaxy Nexus. It outlines a method for calibrating the gyroscope with a total station. Finally, the pressure from the barometer is used to identify different storeys in the HCU building..

Since 2011, the usage of smartphones in indoor navigation has been in the foreground at HafenCity University (HCU) in Hamburg, Germany. Just one example of a previous indoor navigation research project was a system with a backpack which included computing hardware, batteries, cables and sensors such as GPS and a camera, which was unsuitable for use in everyday life. Today’s smartphones, such as the test device Samsung Galaxy Nexus (Figure 1), already include sensors which can be used to calculate a relative position. Hence a smartphone-based indoor navigation solution offers two key benefits: firstly, the widespread use of smartphones in society and, secondly, a reduction in or even independence from additional hardware on the navigation device.

In addition to typical MEMS (MicroElectronicalMechanical Systems) sensors such as a camera and WLAN receiver, the Samsung Galaxy Nexus features an accelerometer, a gyroscope, a magnetic field sensor and a barometer. Because of their small size, these sensors are relatively inaccurate and their data include considerable measurement noise. In order to devise an indoor navigation solution based on smartphones, it is necessary to first analyse the MEMS sensors. The integrated gyroscope registers angular velocities from rotating the smartphone, and this can be used to calculate a relative orientation. The measured atmospheric pressure coming from the integrated barometer allows the device to calculate a relative height. In the tests described here, the smartphone is fixed on a modified total station and rotated in fixed angle velocities in order to make fair comparisons. Pressure data are then measured by the barometer in the same stairwell on four different floors of a building to test the resolution from this sensor.

Comparing gyroscopes

The accuracy of multi-axis gyroscopes is usually assessed using rotary tables which, depending on model and type, can often cost over EUR500,000. Therefore, a modified Leica TCRA 1105 total station is used in this research instead. The modification includes a mounting for smartphones to check the angle velocities from the gyroscope integrated in the smartphone (Figure 2). The angle velocities from the total station are compared against the angle velocities from the gyroscope.

The motorisation of the total station allows rotation around the total station’s horizontal and vertical axes, thus generating angles or angle velocities. The maximal angle velocity is 0.7rad/sec (40°/sec). The communication to the Leica TCRP 1105 total station can be realised using the integrated GeoCom interface which enables a serial port connection between a computer and the total station. The GeoCom interface includes various commands including to start the total station, to control its motorisation and to output measured data. Hence, this allows the total station to be operated by a program written in Matlab or C++ which includes a test scenario.

To check the defined angle velocities, a Leica AT901 laser tracker is used. A laser tracker is often used in automotive and aircraft construction to solve problematic industrial measurement situations. The accuracy of 3D points measured with the Leica AT901 laser tracker is ±0.03mm and the time between measured points has a resolution of 0.001ms and a drift up to 0.020ms/sec. To generate reference data for the angle velocities of the modified total station, a reflector is fixed offset from the total station’s rotation axis. For at least 10 seconds, the reflector is pursued by the AT901 laser tracker which measures points the whole time. This approach is repeated for different angle velocities. The geometric data and the timestamps between the first and last point are used to calculate reference angle velocities. Another low-cost alternative for generating angle velocities is to use a light sensor, which sends a signal to a stopwatch whenever the rotation laser from the total station passes over it. The full circle (360°) and the detected time between two measurements are needed to generate the angle velocities.

A test routine is used to generate different angle velocities for the z-rotation by three Galaxy Nexus smartphones. The scale and offset to reference data are calculated. The offset is not significant but the multiple measurements by smartphones 1 and 2 show that the scale can be calibrated.





value (diff-ref)






phone 1






phone 2











phone 3







Table 1, Calibration results of angle velocities of z-axis for three Galaxy Nexus smartphones.


Assessing the barometer

A fundamental question regarding the usage of a smartphone’s barometer in indoor navigation is whether it can identify individual storeys. To test this, a series of measurements are carried out in the stairwell of a HCU building which has four different levels and a total height difference of 12.8m. The heights of each floor are measured with a levelling instrument and measuring tape. The Samsung Galaxy Nexus then calculates the height of each level for a period of four minutes by measuring the atmospheric pressure using the built-in barometer (Figure 3) and in the following sequence of storeys: 4-3-2-1-1-2-3-4. To calculate relative heights from atmospheric pressure, the first pressure is used as reference pressure. The average deviation of all calculated heights is 0.1m with an uncertainty (95%) of ±0.85m.

Based on the measurements taken on each floor, it can be concluded that the barometer stayed within its specifications (±1.0m). For longer measurement periods, temperature of the smartphone should be observed since this might influence the results. In general, it is recommended to measure the temperature when atmospheric pressure is used to determine height; otherwise, the barometer data will start drifting. For optimum accuracy, temperature measurements should be done from within the smartphone.

Merging sensor data

Merging the measurement data obtained by the gyroscope and the accelerometer generates relative positions. During walking, the accelerometer from the Samsung Galaxy Nexus is used for step detection by emitting a repeating signal at each step. If the step length is known, these signals can be used to calculate the length of the trajectory. To receive a movement orientation, the angle velocities are integrated with known time steps during navigation. Using the dead reckoning method, these modified data from the accelerometer and gyroscope are combined to give a relative position. If the start position is known, thanks to the use of a QR-Code for instance, the navigation solution can be realised. Figure 4 shows an example of the data in combination with the dead reckoning method: one round of combined accelerometer and gyroscope data combined with dead reckoning on one level of the HCU building (red = raw data; green = data corrected by calibration; blue = corrected data by calibration and alignment). After walking for 1 minute (80m), the start position was reached again. The red trajectory shows the untreated data combined with dead reckoning. This illustrates that there is a significant drift in the gyroscope. Based on the data corrected by calibration with the total station, the trajectory (green) is slightly better. The biggest influence is the drift of the gyroscope, which cannot be calibrated because of instability. One way of minimising the effect of drift is to align the gyroscope before commencing navigation, which entails recording data from gyroscope for a short time (approx. 6 seconds) before navigation begins. During this period, any movement of the Samsung Galaxy Nexus should be avoided. From these recorded gyroscope data, correction parameters (scale and offset) can be derived and then used for the following trajectory (blue).

While an improvement is clearly shown, the solution’s performance deteriorates over time. In summary, while navigation with smartphones can be realised without GNSS, the smartphone requires supporting information at regular time intervals in order to continue to determine the right trajectory.


This article provides some initial ideas about indoor navigation using smartphones. It is possible to design a navigation solution based on a smartphone and its MEMS sensors rather than on GNSS. However, on its own the solution remains accurate for only a short time; it needs to receive supporting information periodically. The aim is to support individual sensor data using information with different stochastic behaviour. For example, an integrated angle (drift) created by angle velocities from the gyroscope is supported by azimuth calculations from magnetic field sensor (noise). Other ways to support the positioning solution can also be implemented. The signal strength to WLAN routers can be used to determine distances between the known router positions and the smartphone and hence support the positioning solution. Another option could be to use the topological information from the relevant building model; for example, a person can only navigate in a room after having entered through its door. The various support possibilities such as quality, dimension and frequency underline how complicated a positioning solution for indoor navigation can be. To process these different types of information, tools such as a Kalman filter and particle filter are needed. Future research will explore how to obtain an optimum position estimation using tools like these.

Further Reading

Lukianto, C. and Sternberg, H., ‘Custom MEMS-based inertial measurement unit for pedestrian navigation use’, International Conference on Indoor Positioning and Indoor Navigation (IPIN), 21-23 September 2011, Guimaraes, Portugal

Rosenberg, H., ‘Sensorfusion zur Navigation eines Fahrzeugs mit low-cost Intertialsensorik’, July 2006,, retrieved 10 April 2012

Molen, B., ‘Behind the glass: a detailed tour inside the Samsung Galaxy Nexus’,, retrieved 4 July 2012

Artese, G. and Trecroci, A., ‘Calibration of a low-cost MEMS INS sensor for an integrated navigation system’, ISPRS Congress Beijing 2008


Biographies of the Authors

Thomas Willemsen (MSc) has been a research assistant at HafenCity University in Hamburg since 2011. Prior to that, after graduating from the Jade University of Applied Sciences in Oldenburg in 2010, he worked for Dr Hesse & Partner Ing and Sigma3D from September 2010 to May 2011.

Friedrich Keller (MSc) has been a research assistant at HafenCity University in Hamburg ever since graduating from there in 2010.

Prof Dr-Ing Harald Sternberg has been a professor of engineering geodesy and geodetic metrology at HafenCity University since August 2001 and became vice president of teachings and studies in January 2009. He graduated from the University of the German Armed Forces in Munich in 1999.

e-mail: [email protected]


Figure Captions

Figure 1, Samsung Galaxy Nexus with coordinate system.

Figure 2, Modified Leica TCRA 1105 total station.

Figure 3, Calculated heights of the different storeys.

Figure 4, Dead reckoning in the HCU building.

Make your inbox more interesting

Receive a weekly summary of the biggest news, along with the best stories, case studies, and key market insights.