owlps/owlps-positioning/src/radar.cc
Matteo Cypriani 507072bd24 [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 :-)
2011-06-08 10:25:38 +02:00

17 lines
403 B
C++

#include "radar.hh"
#include "stock.hh"
#include "configuration.hh"
const ReferencePoint& RADAR::select_point(const Request &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() ;
}