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.
- Add function set_coordinates(float, float, float).
- Add function distance_to_sphere().
- Suppress calls by reference for simple types (use const float instead
of const &float).
TextFileWriter:
- OutputFileMedium becomes TextFileWriter.
- Method write_string_to_file() becomes write_text() and is made public.
- Add a unit test.
InputLogCSV and OutputCSV do not extend OutputFileMedium anymore, but
use a TextFileWriter as an attribute.
OutputCSV writes Result to a CSV file. It extends OutputFileMedium.
Update:
- Output.
- UserInterface (add option "output.csv-file").
- posexcept (add class no_output_csv_file).
OutputFileMedium is designed to be a super-class for classes that need
to write to a text file. It could also be a simple writer if the method
write_string_to_file() was public (maybe we should change that and
rename OutputFileMedium to OutputFileWriter or something like that).
InputLogCSV:
- Now extends InputLogMedium *and* OutputFileMedium.
- Make log_request() inline.
Add Positioning creation in owlps-positioning, so the program is usable,
configuration is checked in Positioning, Input and Output, and objects
are created and run normally.
UserInterface: Minor modification, config_file_name is not initialised
in constructor anymore, it is now a default value of the configuration
entry "config-file".
- 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.
In cxxtest, TS_ASSERT_DIFFERS(a, b) tests !(a == b) and not (a != b).
Therefore, to test a::operator!=(b), we must avoid TS_ASSERT_DIFFERS()
(that will test !a::operator==(b)) and write instead TS_ASSERT(a != b).
The new class Positioning is the interface between Input and Output,
using positioning algorithms to compute results from requests.
Update UserInterface to add option "positioning.algorithm"; update posexcept.
PositioningAlgorithm is the super-class of all positioning algorithms.
RealPosition is the first "positioning algorithm" (it actually computes
nothing, but returns the position declared in a CalibrationRequest).