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 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.
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).
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
Stock: add Waypoint list and support functions.
Waypoint:
- Use an unordered_set instead of a vector for the Building list.
- Add functions add_building(), add_buildings() and remove_building().
- Add operator string().
cfg/waypoints.csv: change format (add building name).