This page describes how to optimize the algorithm using out optimizetool

Because every environment is different, there is no best configuration for the our location calculation algorithm and their parameters. In one environment, the DistanceOrderedFingerprintCorrelator might work fine, whereas you could be better suited with a the combination of a PenaltyAddingCorrelator which gets his values from an AveragingDifferenceSumCorrelator; you have to try and see which works best for your environment.
To see what kind of LocationCalculators are available, take a look at the ArchitecturalOverview

Prepare your data

Because all this trying can be a rather long procedure, we have created a small tool which tries all possible variations and calculates the best versions for you. In order to get this to work, you need two different datasets, both provided as a backup-zip. The first zip, I'll refere to it as the, is the dataset under test, which contains all the Fingerprints taken. The second one is the datzaset containing some testpoints( contains a few seperatly taken fingerprints, but the same maps. They have to be positioned on a map like the Fingerprints in To create both this zips, please take a look at and


Note that this tool is not perfect nor is it well documented; using it requires some basic undestanding in java and on how our IWPS works. Although we provide a precompiled jarfile, containing the Optimizer, to fully use it, you need to take a look at the source and experiment with some parameters. The tool isn't fully configurable over the GUI, the GUI simply provides the most common modifications.

Using the tool

Having these two zips, you are ready the launch the Optimizer. Download the newest Version from our Hudson Start the jar and you sould see something like this:


Browse your and In the section below, you can specify the ranges of the parameters used by the tool. The tool will iterate over your settings, each time executing the algorithm with the current parameters and recording the results.

A Parameter is a value which is needed by the location-calculation-Algorithm and influences the result. Each parameter has a type, for example integer or LocationCalculator and concrete values(3 or WeightBasedLocationCalculator). The location-calculation-Algorithm has 4 parameters which are described below, the FPCount, the %MacEqual, the Correlator and the LocationCalculator. If you haven't already read the ArchitecturalOverview now would be a good time.

These are the Parameters settable throught GUI:

  • FPCount: This is the number of Fingerprints considered when calculating a location. If more Fingerprints than that number are found during the getSimalarFingerprint(), only the best, limited by FPCount, are taken.
  • %MacEquals: The parameter specifies the percentage on mathing Mac-Addresses two Fingerprints must have in common to be classified as simalar during the getSimalarFingerprint()

Parameters not settable in the GUI:

  • Correlator: The Tool sets this to the following correlators:
    • new DistanceOrderedFingerprintCorrelator()
    • new OverlappingOrderedFingerprintCorrelator()
    • new PenaltyAddingCorrelator(new AveragingDifferenceSumCorrelator())
  • LocationCalculator: The Tool sets by default the following locationCalculatos
    • new WeightBasedLocationCalculator()
    • new NearestLocationLocationCalculator()

Now let me explain what the Optimizer does.

First of all, it identifies every possible combination of the contrete parameter values. That means each concrete Corrlator with each concrete LocationCalculator,...
There are a lot of possible combinations, exponentially growing with the amount of concrete parameter values.

For each found combination, the tool executes a accuracy test. An Accuracy test consists of the following procedure:

  1. Loading the Fingerprints from and storing them in a testpointlist.
  2. Loading the Fingerprints from and initializing the calculation-environment.
  3. Setting the algorithm to the concrete parameter.
  4. for each Fingerprint in the testpointlist
    1. extracting the measured Readings(Mac and corresponding strenght)
    2. faking a wlan-measurement and calculating the current position
    3. comparing the calculated position with the real position of the current testpoint
    4. recording the results
  5. Average the results and do some statistical analyzation.

Here is a short version of how the Optimizer works

  1. Collecting parameter and concrete possible parameter values(Done in GUI)
  2. Identifying the possible combinations of the concrete parameter values(Happens when you click 'run')
  3. for each possible combination
    1. Perform Accuracy test
  4. Identify the best combination based on the results
  5. Print a report


The top 5 parameter combinations are displayed after a run, but also the full results are available, nicely formated to and ready to be copied into excel. There you can perform additional analysis, for example graph the data.
The resulting data is categorized into IN-Values(these are the combinations of the possbile parameter values) and OUT-Values(Values measured after the algorithm execution). Depending on what your goal is you should set the algorithm to the IN-Values(Either directly in sourcecode or in the GUI of the IndoorWPSPcLocator) To see how to programatically set these parameters, I recommend you taking a closer look at the runAlgorithm() method of ch.hsr.indoorwps.service.LocatorAlgorithmTester.