[Positioning] Option radar-average-reference-points

For RADAR, the default is now to compare the current positioning request
to each stored CalibrationRequest instead of each ReferencePoint
(averaging the calibration requests associated with the reference
point).

The new option --positioning.radar-average-reference-points allows to
activate the old behaviour (compare to reference points).

Note: the bug fixed in the previous commit caused the creation of
a ReferencePoint for each CalibrationRequest, implying the 'new'
default behaviour (one ReferencePoint was associated to only one
CalibrationRequest, so comparing each ReferencePoint or each
CalibrationRequest was giving the same result). Anyway, there was
(hopefully) no such bug in OwlPS v0.8, so it is actually the old
behaviour :-)
This commit is contained in:
Matteo Cypriani 2011-06-07 21:35:24 +02:00
parent d322221d21
commit 507072bd24
3 changed files with 21 additions and 1 deletions

View File

@ -53,6 +53,12 @@ csv-file = /tmp/owlps-positioning.log
#minmax-start = -2;-2;0
#minmax-stop = 20;30;6
# With the RADAR algorithm, for a given positioning request, average
# all the calibration requests associated with a reference point before
# to compute the SS distance. The default is false, i.e the positioning
# request is compared directly to each calibration request.
#radar-average-reference-points = false
[output]
# This is the default output if none is specified.

View File

@ -1,9 +1,16 @@
#include "radar.hh"
#include "stock.hh"
#include "configuration.hh"
const ReferencePoint& RADAR::select_point(const Request &request)
{
return Stock::closest_reference_point(request) ;
if (Configuration::bool_value(
"positioning.radar-average-reference-points"))
return Stock::closest_reference_point(request) ;
const CalibrationRequest &cr =
Stock::closest_calibration_request(request) ;
return *cr.get_reference_point() ;
}

View File

@ -178,6 +178,13 @@ method (string format: \"X;Y;Z\").")
("positioning.minmax-stop", po::value<string>(),
"Coordinates of the stop point of the MinMax multilateration \
method (string format: \"X;Y;Z\").")
("positioning.radar-average-reference-points",
po::value<bool>()->default_value(false),
"With the RADAR algorithm, for a given positioning request, average"
" all the calibration requests associated with a reference point"
" before to compute the SS distance."
" The default is false, i.e the positioning request is compared"
" directly to each calibration request.")
;
file_options->add(options) ;