Commit Graph

16 Commits

Author SHA1 Message Date
Matteo Cypriani 6b7e5668fa Add/update headers on the top of each source file 2012-02-06 16:44:09 +01:00
Matteo Cypriani 16eaecc53f Avoid displaying non-ASCII characters
Avoid displaying UTF-8 characters on the terminal (French quotes &
ellipsis).
2012-02-06 13:26:50 +01:00
Matteo Cypriani 6f0c0af5be [Positioning] PosUtil::wifi_channel_to_hz(): throw exception
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.
2011-03-16 14:36:24 +01:00
Matteo Cypriani 338e4f7dcd [Positioning] Code cleaning around CSV data reading
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.
2011-03-16 14:36:24 +01:00
Matteo Cypriani b21b7bd25f [Positioning] Correct some Doxygen comments
Turn REFERENCES_RELATION to YES in Doxyfile.
2011-03-16 14:36:24 +01:00
Matteo Cypriani e9eab6876d [Positioning] Add RADAR positioning algorithm
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().
2011-03-16 14:36:23 +01:00
Matteo Cypriani f85c7113ab [Positioning] Delete several exception classes
Create exceptions bad_configuration and missing_configuration and delete
all configuration-specific exceptions.
2011-03-16 14:36:23 +01:00
Matteo Cypriani 14902181af [Positioning] TopologyReaderCSV: read waypoints
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).
2011-03-16 14:36:23 +01:00
Matteo Cypriani 208c989c53 [Positioning] Add InputDataReader & TopologyReaderCSV
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.
2011-03-16 14:36:23 +01:00
Matteo Cypriani 675d2d7213 [Positioning] Simplify exceptions in posexcept 2011-03-16 14:36:22 +01:00
Matteo Cypriani 866013248f [Positioning] TextFileWriter throws error_opening_output_file
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.
2011-03-16 14:36:22 +01:00
Matteo Cypriani 56c45b3334 [Positioning] Add class OutputCSV
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).
2011-03-16 14:36:22 +01:00
Matteo Cypriani be8f0cf728 [Positioning] Add class posexcept
posexcept derivates from std::exception.
Exception classes defined in posexcept.hh are now derivated from
posexcept instead of std::exception.
2011-03-16 14:36:21 +01:00
Matteo Cypriani 92e58686f8 [Positioning] Add class Positioning
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.
2011-03-16 14:36:21 +01:00
Matteo Cypriani 9ed1000bb3 [Positioning] Add class Output
Add class Output to handle outputs.
Update UserInterface to add option "output.medium"; update posexcept.
2011-03-16 14:36:21 +01:00
Matteo Cypriani c559b827ee [Positioning] Directory reorganization
Move "new" source files in src/.
Update Doxyfile and Makefile.

Delete old useless files:
- libowlps-positioning.*
- positioning.*
- server.*
- treatment.*
2011-03-16 14:36:21 +01:00