The new class Autocalibration contains the code from the former huge
function Stock::generate_reference_point(). It is refactored a bit, but
still needs work. The function Stock::generate_reference_points() stays
in the Stock class for now.
The option positioning.ss-similarity introduced in this commit allows to
chose the desired algorithm to compare two measurements. One can chose
between the historical mean euclidean distance algorithm and the new
algorithm using the number of values within the interval
[mean-std.dev.;mean+std.dev.].
The new option positioning.generate-single-packet-reference-points
allows either to generate one single packet in each generated reference
point, or try to match the real requests by generating packets
independently.
The returned distance is now "averaged" to take into account the number
of measurements in the lists. The former behaviour would lead two
couples of measurement lists with a different number of measurement to
have non-comparable distances.
The variance is now computed along with the average. Measurement has
three new attributes:
- average_mw (average in mW),
- variance,
- variance_m2 (variable used for the variance calculation).
In addition, average_ss has been renamed average_dbm (ditto for its
getter).
The computation method of the average has been changed to allow the
computation of the variance simultaneously.
The Aggregator now transmits the capture timestamp of each packet to the
positioning server. For now this timestamp is not stored, only displayed
(in verbose mode) when a request is received.
To generate the reference points, use only the APs at the same level as
the virtual mobile. This is very basic for now, please refer to the TODO
update for more details on what should be done.
Request::get_measurements(mac) is renamed Request::get_measurement(mac).
A Request can't store more than one measurement per AP, so it was a
mistake to return a vector. The new function returns a single pointer.
The prepared packet now includes the number of packets of the request
and the current packet ID. The packet ID is initialised to 1 for the
first packet.
To be consistent with the other modules, the positioning server must be
called OwlPS Positioner instead of Positioning, and the executable
owlps-positionerd (even if the daemon mode is not implemented yet).
That's a big commit for a tiny change.