Mobile Localization with WLAN access points

Armin Fuhrmann - Senior IT-Consultant

Armin Fuhrmann
Senior IT-Consultant
Organon Informationssysteme GmbH

Mr. Fuhrmann is a full-stack developer and specializes in cloud computing, IT security and SEO strategies. He has been in the IT industry since 2001, is certified in various IT areas and has achieved some success with proven track recoord.

Triangulating signal strengths of individual WLAN access points

The possibility of positioning with mobile devices offers companies great added value in terms of position-based information flow control and indoor navigation.

A big hurdle in the technology of position determination is the necessary measurement of the position grid. Different procedures are available to facilitate this measurement.

In the course of the customer project, by determining the advantages and disadvantages of these methods, the most promising in this context was selected and implemented in software. The result of the customer project is to be an executable mobile application that is able to ensure the measurement of rooms by triangulating signal strengths (RSSIs) of individual WLAN access points. This is done in connection with a server for storing and processing the position data, which is also developed in the course of this project at Organon Informationssysteme GmbH.

Location services

Localization has always played an important role in many areas of business and society. In the past it was still necessary to determine the position of a foreign army or the location of merchant ships, today the position determination, with the use of navigation devices in automobiles, air, space and sea travel and even through targeted, position-based advertising on smartphones, has found its way into ours Kept everyday. Ever new technologies, which are also particularly promoted by mobile internet use, make it possible to change the position of electronic devices, e.g. Smartphones to determine with ever greater accuracy. Thanks to the development of radio technologies such as Bluetooth, Near Field Communication (NFC) and Wireless Local Area Network (WLAN), which are available in most smartphones, sometimes even in combination, positioning systems can achieve multiple benefits in a wide variety of areas of life.

Positioning procedure

There are different methods that can be used to determine the position individually or in combination, triangulation, trilateration and scene analysis. These are considered in detail below.


Triangulation has been used for distance measurement for hundreds of years and is still state of the art in land surveying. The position of the unknown position can be determined in the plane depending on the known values ​​using the angular relationships.

If the basic length c between the given points A and B is known, the lengths a and b can be determined by targeting the point C and the resulting angles α and β, and the coordinates of C.


In trilateration, the position of a certain point is calculated mathematically using the distance to known points.

Since a client in the WLAN has the signal strengths available from every connected access point, these can be used as input values ​​for the trilateration by using them for the distances, i.e. the values ​​r1, r2 and r3. In order to be able to work with the signal strengths, you first have to be aware of how the values ​​are to be interpreted. The values ​​of the signal strengths are in the negative number range and decrease with greater distance. In the WLAN there is a value of -35 dBm e.g. “Better” than a value of -57 dBm, between -80 dBm and -90 dBm the signal mostly breaks off. To be able to use the signal strengths in trilateration, you have to measure all distances with these signal strengths.

Scene analysis

When analyzing scenes, a grid is usually initially measured in order to determine the position of the object to be determined on the basis of this grid. The data determined in the preparation are stored in a database and the position of the object to be determined is compared with these values. There are different ways in which scene analysis is used.
For example, image data can be used for comparison, such as in robotics of autonomously moving robots, or you can use e.g. Reception strengths. For other localization methods, the reception strengths of the radio signals deteriorated due to distortion (due to interference factors such as walls, objects, other radio cells etc.) mean a great loss of accuracy. In the scene analysis, however, these deteriorations are compensated for, since a signal influenced by a source of interference has also previously been included in the measurement with this influence and thus still enables localization during the adjustment.
Merely a change in the location, be it through construction work, adding disruptive radio technology or even adjusting, removing or adding objects such as furniture, could make the values ​​in the sphere of influence of this source unusable and make it necessary to measure the location again.

Position determination in the WLAN

With the rapidly increasing number of mobile devices and the desire for flexibility and cost reduction, the use of wireless networking (WLAN) as a supplement and partly as a replacement for wired networking in computer networks has increased significantly. WLAN has become a matter of course in private households, companies and public institutions.
In order to guarantee a good signal across the board, companies and public institutions in particular work with multiple access points, so-called WLAN access points. As a result, the above-mentioned variants can be used to determine the position with comparatively little effort.
Many areas of everyday life can also benefit from this.

Implementation of the software project

The implementation of the software project follows the company’s guidelines for developing software systems on its own behalf. A planning process takes place for each project, which divides the development into individual phases. At the beginning of this planning process, a kick-off meeting was held with an introduction to the project goal, definition of the work breakdown structure, responsibilities and milestones, as well as the decision for a process model. The procedure model to be used is decided in the individual case against the background of the requirements that the task to be solved, the knowledge of the employees involved and the experience from similar previous projects. The decision for the waterfall model was made for the practical project. Work packages were distributed to the participants as part of the meeting.

Requirements analysis

The aim of the requirements analysis, as a first step in software development, is to determine the client’s requirements for the system to be developed.
The basic idea of ​​the client, to develop a basic software for the location determination of objects and to provide this with a central database as well as with standard interfaces to extend application modules, emerged from an earlier preliminary project and after carrying out a market analysis.
First of all, it is desirable to use only one of the methods for determining the position in this practical project, but to design the development in such a way that the other two methods can be used individually or in combination at a later date.
After creating a requirement profile with basic information on functionality, the technology to be used, the necessary flexibility for the use of further technology, requirements for transaction throughput and scalability, availability, software quality, security and data protection, a specification with all requirement specifications was created.

Rough concept

The requirement specification created in the requirements analysis served as the basis for a rough concept of the future system. The rough concept includes some preliminary specifications regarding the hardware and software architecture to be used. The client-server model was defined as the architecture for the distribution of information and services, because in addition to changes and updates to the position data and the information and services to be distributed, this relieves the burden on the user devices, improves load distribution in the overall system, and simplifies maintenance and care for the individual Software and hardware components enabled.

For operation in the scene analysis mode, it is necessary to create a localization grid using position measurements. Here, the central server of the system and a special client application must be used, which are only used to measure the location grid. A service employee walks a grid with points at a distance of 1 m (4 points per square meter) and transmits the data to the server. A routine of the “LocalizationServer” software accepts these values ​​on the server and saves them under the corresponding position unit (e.g. room) in its database.
After the measurement of the location and the division into logical units based on the actual room layout has taken place, the position units are assigned information and services, stored in the database and any necessary co-routines called in the server. After this initial entry and assignment, the system should be able to start operation.

In order to be able to determine the position of a terminal, the user must first log into the WLAN with his terminal, the WLAN access point signal strengths of which are used to determine the position. First, when the service app (LocalizationClient) is started, a connection to the server is automatically established and the signal strengths received by the end device are transmitted to the server. The server then searches in its localization data for the closest values ​​and the information and services assigned to this unit in its database.

Software requirements

The software to be developed should make it possible to determine the position of a user’s device in the building. After the measurement of the company location, the rooms into which the location is divided due to the design are used as position units by means of the server software. Information and services that are linked to certain rooms should be made available to the user on the mobile device by the server.

Hardware requirements

In order to be able to determine the position as accurately as possible, it is necessary to have at least three access points available in the local WLAN. Since the application for determining the position should be used on mobile devices with as little effort as possible and competencies are already available in-house, the company has defined Android devices as the target platform. In order to avoid investments in the provision of hardware and to achieve a high degree of flexibility and scalability, the use of virtual systems was decided.

Software design

Software design is the design process for planning a software solution. It is part of the entire software development process and is based on the requirement analysis specification. The results of the software design are recorded in the so-called functional specification.

Software architecture

The design of the software architecture shows the relationships between the underlying requirements of the software system to be developed. It shows the components of the system and the connections between them. It is by no means a detailed design of the system, but rather the representation of e.g. Program modules, software layers, interfaces, data and function graphs. With the architectural design, fundamental decisions are made that have a significant influence on the further system design, the detailing of which takes place in the further phases of the design process.

Object oriented analysis and design

In the “Object-oriented analysis and design” phase, the knowledge gained in the previous requirements analysis is used to create use cases and then detailed class diagrams from the requirements, which are then used as models for the subsequent development phase. There are some software solutions that use the design patterns of this phase to generate source code and thus make the classes previously created in UML available as bodies for further programming.

First, class diagrams are created for the LocalizationServer, LocalizationClient and ServiceClient.
A room is defined in addition to its local attributes via the “Position” class. A room is therefore based on a set (here: ArrayList) of positions that form the grid with the unique room number in which the client moves. A position consists of three position values ​​based on three WLAN access points. An expansion with any number of position values, i.e. additional WLAN access points to improve localization, is planned in the future, but has not yet been implemented in this software version. The minimum number of three WLAN access points must not be undercut, as otherwise reliable localization can no longer take place.
The class diagram also shows that depending on the type of client, either the ServiceClient helper class or the LocalizationClient helper class are generated by the LocalizationServer class as soon as a connection is established. Depending on the helper class, different functions for administration or for calling up information and services are then made available.

The “ConnectActivity” class controls the establishment of the TCP / IP connection. This class is generated by the main class and destroyed when the connection is closed via the context menu of the main class. As in the LocalizationServer, there is a class position in which the three values ​​for each WLAN access point are stored. In the main class, the positionListener () method constantly ensures that the “position” variable is filled with the signal strengths of the current position. The current room is overwritten by a command from the LocalizationServer as soon as the position transmitted to the server returns a different room number. The rooms stored on the server are determined by a service employee using the Android application “ServiceClient”.

If you compare the “ServiceClient” class with the “LocalizationClient” class, the “collectGridPositions ()” method is included in the former, which defines a defined space by a set of position values. These position values ​​are added manually (by pressing a button on the screen of the smartphone) to the “PosArray” list of the ArrayList type. After the definition of a room has been completed, the stored position values ​​are transmitted to the server together with the room number.

After completing the software design phase, an architecture review was carried out to avoid the risk of undesirable developments in the subsequent implementation. The results of the software design were released in the review meeting.


The specification as a result of the design phase is the starting point for programming.
First, the “LocalizationServer” and LocalizationClient “projects were created and the client-server connection was programmed. In parallel to these projects, independent test projects were created for individual components in order to develop the components independently and combine them later.
The next step was to program an Android app that reads the signal strengths of the available WLAN access points and transfers this data to the server in a specially defined protocol in JSON (JavaScript Object Notation). This Android app was used as a template for LocalizationClient and ServiceClient. Corresponding surfaces were generated for the ServiceClient, which are suitable for measuring the initial grid, the surfaces of the LocalizationClient were designed for the display of information. The individual software elements on the clients and the server were implemented in accordance with the object-oriented analysis & design (OOA and OOD).
A software documentation was created parallel to the programming. In addition to this software documentation, more detailed OOA and OOD diagrams, a relational database model and a roadmap for product launch were created. For quality assurance, test cases were specified that were used in the respective module tests.

System and integration test

To validate the overall system, it was our task to create a test plan based on the use cases and the requirement definitions, and to describe numerous test cases for functional and non-functional requirements. The test cases were created on test case forms, which were also used to log the test results. Each test case contains the test procedure, the inputs and the expected result.

On the basis of the test plan, all test cases were checked, the test results documented and, in the event of an error, after being rectified, checked again. To validate the multi-user capability of the system, a series of tests with several employees was carried out in one or more rooms in accordance with the test plan. Due to some bugs in the tests, additional test cases had to be added. It was possible to react quickly to all difficulties and malfunctions and to adapt the software.
The tests on the reliability of the position units calculated by the server from the transmitted signal strengths and returned to the clients showed a satisfactory position determination as long as the client was not too close to the wall area.
The final tests showed a satisfactory localization of the clients and a smooth transmission of information. The test plan and all test case documents are archived for verification purposes and for later reuse.

The software has been successfully used by one of our customers. The customer does not want to be named here.

How useful was this post?

Click on a star to rate it!

Average rating / 5. Vote count:

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?