When a new calibration request is received, all the calibration requests
of the corresponding reference point are now cleared prior to add the
new request.
We should probably use a timeout to delete only the old calibration
requests and keep the recent ones.
The option positioning.accept-new-calibration-requests allows the
calibration requests sent during the positioning phase to be added to
the Stock. They are added to the calibration requests read by
InputDataReader during the start-up phase.
In InputUDPSocket, update the AP's coordinates when receiving a
calibration or autocalibration request that contains the coordinates.
This is done if the option positioning.update-ap-coordinates-online is
activated.
Add double Stock::ap_matrix_get_ss(transmitter, receiver).
This is the first step to handle self-calibration in owlps-positioning.
The idea is to simulates a square matrix of the listeners, with the
transmitters in one dimension and the receivers in the other dimension.
matrix[transmitter][receiver] is the signal strength received by
'receiver' from 'transmitter'.
The purpose of Stock::ap_matrix_get_ss() is precisely to access the
entry matrix[transmitter][receiver].
Note that the access is read-only, as the pseudo-matrix is (or will be)
filled by the standard mechanism of (auto)calibration requests and
measurements stored in Stock.
Add double ReferencePoint::average_measurements(string mac_transmitter),
that allows to get the average of all the Measurements sent by a given
transmitter.
Add, as protected functions, get_all_measurements(string
mac_transmitter) and get_requests(string mac_transmitter), that do the
same as get_all_measurements(void) and get_requests(void), but filtering
on the transmitter of the packets.
Instead of #define DEBUG, we now prefer to use either verbose levels
or, when needed, NDEBUG. Each Makefile was modified to be able to pass
-D NDEBUG to the compiler (but the corresponding lines are commented),
except in the modules where assert is never used, in which case the
Makefile passes -D DEBUG.
Long story short: to totally disable debugging code, comment-out the
"-D DEBUG" lines and uncomment the "-D NDEBUG" lines, in every Makefile.
I finally resigned myself to remove this old piece of code, which once
allowed one to create a database and import OwlPS CSV files into it.
But I must not bury my head in sand: OwlPS is not "ready for the
database" :-) (actually it is, but it would take some time I don't have
to implement correctly, and is currently of little interest).
The <endian.h> header is Glibc-specific. On BSD platforms, one have to
use <sys/endian.h>.
(This was the occasion to improve the preprocessor code here.)
Use snprintf() instead of sprintf() in mac_bytes_to_string_r(). This is
really useless, but I want to satisfy the snprintf BSD zealots and get
rid of the warning GCC gives me on OpenBSD.
setsockopt(... SO_BINDTODEVICE ...) does not work on OpenBSD. The only
way to force an interface seems to specify its IP address and to use
setsockopt(... IPPROTO_IP, IP_MULTICAST_IF ...). See the code of ping
(-I option).
libowlps-client now builds on OpenBSD!
-lrt is now added as needed in each module Makefile, but not directly in
the library. Furthermore, the Makefiles add -lrt only if the platform is
Linux.