[Positioner] Add option positioning.smallest-ss

The smallest possible received SS is not hard coded into PosUtil any
more. The default value is now -99 dBm instead of -98.
This commit is contained in:
Matteo Cypriani 2011-12-30 12:21:59 +01:00
parent 427c88fd99
commit a3b8b90760
3 changed files with 12 additions and 1 deletions

View File

@ -91,6 +91,12 @@ csv-file = /tmp/owlps-positioner.log
#area-start = -2;-2;0
#area-stop = 20;30;6
# Smallest possible value for a received signal strength, in dBm. This
# depends on the sensibility of the APs' Wi-Fi hardware. It is used to
# compensate for APs that are not in coverage in a given measurement.
# The default value is -99 dBm, which should be fine in most cases.
#smallest-ss = -99
# Generate reference points from the (auto)calibration requests
# received.
#generate-reference-points = false

View File

@ -8,6 +8,7 @@
#include "posutil.hh"
#include "posexcept.hh"
#include "stock.hh"
#include "configuration.hh"
#include "measurement.hh"
#include <owlps.h>
@ -48,7 +49,7 @@ void PosUtil::complete_with_dummy_measurements(
assert(! measurements2.empty()) ;
Measurement dummy ;
dummy.add_ss(1, -98) ; // FIXME: should be the smallest possible value
dummy.add_ss(1, Configuration::int_value("positioning.smallest-ss")) ;
for (unordered_map<string, Measurement>::const_iterator i =
measurements1.begin() ; i != measurements1.end() ; ++i)

View File

@ -27,6 +27,7 @@ namespace po = boost::program_options ;
/* Positioning options */
#define DEFAULT_MESHING_GRAIN 0.5
#define DEFAULT_SMALLEST_SS -99
/* Output options */
#define DEFAULT_TCPEVAAL_HOST "127.0.0.1"
@ -233,6 +234,9 @@ void UserInterface::fill_positioning_options()
po::value<string>(),
"Coordinates of the last point of the deployment area"
" (string format: \"X;Y;Z\").")
("positioning.smallest-ss",
po::value<int>()->default_value(DEFAULT_SMALLEST_SS),
"Smallest possible value for a received signal strength, in dBm.")
("positioning.generate-reference-points",
po::value<bool>()->default_value(false),
"Generate reference points from the (auto)calibration requests"