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.
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.
For each calibration request read, a new ReferencePoint was created in
Stock. This is because of the behaviour of unordered_set: as pertaining
to unordered_set, two elements are not considered equal if the hashes
alone are identical, they must also be actually equal (operator==).
The problem was fixed by using a custom equality check function that
checks the equality only on the coordinates of the ReferencePoint (as if
it was a Point3D).
ReferencePoint::complete_with_dummy_measurements(
map<string, Measurement>,
map<string, Measurement>)
becomes PosUtil::complete_with_dummy_measurements(
unordered_map<string, Measurement>,
unordered_map<string, Measurement>)
ReferencePoint::compute_ss_square_distance(
map<string, Measurement>,
map<string, Measurement>)
becomes PosUtil::ss_square_distance(
unordered_map<string, Measurement>,
unordered_map<string, Measurement>)
map<string, Measurement> ReferencePoint::get_all_measurements_sorted()
is now private, returns an unordered_map instead of a map, and is
renamed ReferencePoint::get_all_measurements().
Note that we now use unordered_maps for these functions. The use of
sorted lists (maps) was useless, as stated in the commit message of
e9eab687 (Wed Jun 2 12:37:43 2010 +0200).
Add class FRBHMBasic, which derives FBCM and RADAR.
ReferencePoint: Add functions friis_index_for_ap() and
friis_indexes_for_ap() (that takes code away from
Stock::update_all_friis_indexes()).
CartographyAlgorithm and MultilaterationAlgorithm now extend
PositioningAlgorithm with "public virtual" instead of "public".
CartographyAlgorithm: select_point() must now return a ReferencePoint.
MultilaterationMethod: Add pure virtual function multilaterate_2d().
MinMax: Add function multilaterate_2d().
MultilaterationAlgorithm: Add function multilaterate_2d() to map
MultilaterationMethod::multilaterate_2d().
Makefile: Fix some dependencies.
Add classes RADAR and CartographyAlgorithm, which is the super-class of
SS map based algorithms.
Measurement: Add functions:
- add_ss_list(), to add several SS in one operation.
- merge(), to merge a Measurement into another.
- ss_square_distance() (from old commented code), to compute the
distance to a SS value or another Measurement.
posexcept: Add exception cannot_merge, used by Measurement::merge().
ReferencePoint:
- Add ss_square_distance() and functions used by it:
complete_with_dummy_measurements(), compute_ss_square_distance() and
get_all_measurements_sorted(). Use of sorted values (map instead of
unordered_map) is useless, should be fixed soon.
- Delete old commented code: getPowerForAp(), addMeasurement() and old
getSsSquareDistance().
Stock: Add function closest_reference_point().
For object types that we needed to store into an unordered_set, we used
string-based hashes, defined into stock.cc. We now define new hash
functions as friend of target classes, based on boost::hash_combine.
The following classes now have a hash_value() function:
- Request
- CalibrationRequest
- Direction
- Timestamp
- Point3D
- ReferencePoint
- Where possible, use initialisation lists in class definition instead
of explicit variable initialisations in source file.
- Rename some variables (use of "source" in copy constructors and
operators…).
- Suppress useless Doxygen comments, allow non-documented members in
Doxyfile.