owl_mac_bytes_to_string() now uses a static buffer, so the caller do not
need to free the returned buffer manually. Because of this static
buffer, it is not thread-safe anymore, therefore we introduce
owl_mac_bytes_to_string_r() that is a thread-safe version.
owlps-positioning/Makefile used to use colorgcc as the default compiler,
without testing its existence. This is fixed.
The makefiles for libowlps and infrastructure-centred modules now use
colorgcc when available.
posexcept: Add exception bad_channel.
PosUtil::wifi_channel_to_hz() now throw bad_channel if the argument is
not a valid channel nor a 802.11 frequency value in Hz.
CSVFileReader: Add function read_point3d().
Point3D: Add function set_coordinates(float[3]).
posexcept: Rename malformed_topology -> malformed_input_data.
TopologyReaderCSV:
- Use CSVFileReader::read_point3d() instead of the custom read_point().
- Rename occurrences of malformed_topology.
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.
This constant will be used instead of a constant value "300000000", with
a more accurate value.
Make MultilaterationAlgorithm use it, and fix the unit test.
Move the constant term computation from
InterlinkNetworks::estimate_distance() into the new function
MultilaterationAlgorithm::make_constant_term(). This will avoid
duplicate this code into the future FBCM::estimate_distance().
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().
CalibrationRequest::operator==() was not marked as const, which caused
trouble with unordered_set.
This commit corrects also CalibrationRequest::operator!=(),
Result::operator==() and Result::operator!=().
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).
InputDataReader handles all data input, i.e. data needed to prepare
computation (topology, calibration measurements, etc.).
TopologyReaderCSV reads topology from a CSV file (just Building and Area
for the moment).
cfg/topo.csv: change format (add building name and reorder coordinates).
UserInterface: add data input options.
posexcept: add data input exceptions.
Building:
- Display areas & waypoints statistics in operator<<().
- Use an unordered_map for areas.
- Use an unordered_set for waypoints.
(instead of two vectors)
Area: display building name in operator<<().
CSVFileReader is a specialisation of TextFileReader, that allow reading
a CSV line field by field.
TextFileReader:
- Make private attributes protected to allow derivation.
- Add attribute current_line_nb.
- Add function read_nonblank_line().
- Delete useless accessor get_name().
Update InputCSV to use CSVFileReader.
Adapt unit tests for InputCSV and InputLogCSV: EOF is not reached right
after reading the last line, but after trying (and failing) to read one
more line.
TextFileReader read lines from a text file. It is aimed to be used by
all classes that read from a text file, as TextFileWriter is used by
those which write to a text file.
Code of TextFileReader is taken from class InputCSV.
Minor fixes on the TextFileWriter unit test.
Fix mistake in TextFileWriter::TextFileWriter(), that thrown
error_opening_input_file instead of error_opening_output_file.
Creation of class error_opening_output_file in posexcept.