MAC addresses are more likely to vary in the right octets than in the
left octets, so we compare them starting from the end rather than from
the beginning.
Clang compiles faster than GCC and is supposed to give more meaningful
error messages, so let's use it at least for development.
OwlPS Positioner does not compile with clang++, so we are stuck with g++
(or colorgcc).
If the autocalibration request port was not specified, a warning was
issued. This is now fixed by issuing a warning only if the port is too
big, but not if it is zero.
This commit changes the way the APs are selected. Until now, the two
most acute angles were selected. Now, the angles are signed, i.e. we
differentiate the APs that are before the point to generate on the
trigonometric circle, and those that are after.
Some more refactoring was achieved, and some bugs fixed.
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.