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.
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).
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.
- 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.
InputCSV now handles CalibrationRequest, adding position and direction
information.
Input:
- Add add_request_to_stock().
Stock:
- Add list of ReferencePoint.
- Add list of CalibrationRequest.
- Add files posexcept.{hh,cc} that contains exception classes.
- Add class Input, that handles InputMedium (and InputLogMedium, in the
future). Note that for the moment, the unit test is *very* minimal.
- UserInterface: Add options for the input medium and the CSV file.
Add the class TestUtil, that provides functions used in several unit
tests. For the moment, it contains two function:
- fill_file(), that creates and fills a test file.
- remove_file(), that deletes a test file.
- Add class Configuration, a stock for the configuration structure.
- Add class UserInterface, that handles the configuration input.
- Update owlps-positioning.cc (delete old stuff like configuration) and
delete owlps-positioning.hh: we now have a compilable executable.
This commit pass finally all unit tests without any warning!
Measurement:
- Finish unit test (test the average SS).
- Fix update_average_ss() and add_ss().
- average_ss is now double.
InputCSV:
- Add eof_close() to automatically close the file when EOF is reached.
- Add read_next_line(), that read the next non-blank line and skips
blank characters.
- Add current_line, a string containing the current line data.
- Update unit test.
InputMedium:
- Rename InputMedium::current_line to current_line_nb.
Fix some errors revealed during writing of unit tests.
Building: Fix wrong #ifndef in building.hh.
Measurement: New default constructor.
PosUtil:
- Remove nanosecond-precision functions.
- Add timespec_round_to_ms() to lower the precision of a struct timespec
to millisecond.
- Add timespec_equals to compare two struct timespec (maybe an
operator==() would be better?).
- In all classes where we used a C-style cast to suppress const, we now
use a const_cast.
- Area: Add operator=().
- InputCSV:
- Document get_next_request().
- Handle exception when using Stock::get_{ap,mobile}().
- In constructor, throw an exception in case of error when opening the
input file.
- CalibrationMeasurement: Remove operator<<() which is useless (it is a
simple call to Measurement operator<<()).
- Makefile: Add target 'check'.
- Add/update comments to be Doxygen compliant. Translate existing
comments in English.
- Various fixes (more or less importants):
- NULL pointer verification when adding an element to a vector of
pointers.
- Add some missing accessors.
- Add some more error handling with exceptions. Class Stock: correct
accessors (pure read accessors do not create a missing element any
more, but throw an exception).
- Makefile: Add 'doc' target.
- Update TODO (some things noticed when reviewing the code for
comments).
In all classes:
- Read accessors return a const reference instead of a value.
- operator=() returns a const reference.
- Use '\n' instead of std::endl in all stream manipulations, when
buffer flush is not required.
- Use pre-incrementing where possible, instead of post-incrementing.
- Point3D: Destructor must be virtual (thanks cppcheck!).
- Update TODO.
== code/owlps-positioning ==
- Add new class Request (split of Measurement).
- Update Measurement and CalibrationMeasurement (suppress the 'mobile'
attribute).
- Update InputCSV (and InputMedium) to use Request instead of
Measurement. Complete the file reading (mobile & ap pointers remain to
be implemented).
- PosUtil: Add timespec_to_ms(), timespec_to_ns(), ms_to_timespec(), and
ns_to_timespec().
- Makefile: Update to use stlport, fix all deps and add new classes.
- Minor fixes.
- TODO: Add UML-related things, updates Measurement & Request.
== code ==
- libowlps: Add ms_to_timeval() (commented), may be useful later.
- Add TODO.
- Add classes InputMedium and InputCSV. They handle Measurements.
- Measurement: add set_ss_list() and clear().
- Add new files in Makefile.
- TODO: thinking about Measurement vs. a new class Request.
- Add section « C++ en action » in TODO.
- Where possible, class declarations instead of #include.
- Use of iterators and at() instead of operator[] for vectors.
- Const arguments for operator<< where forgotten.
- Updated Makefile to be able to compile each class.
- Fixed some compilation errors (CalibrationMeasurement, Point3D,
ReferencePoint, WayPoint) and a warning in Measurement.
Modification of AccessPoint and Measurement to fit the class diagram.
Adding class PosUtil, for static utilitary functions (will be the
successor of the false library libowlps-positioning).
Le commentaire de révision initial figure ci-dessous. Les différences
par rapport à ce commit sont les suivantes :
- client/ : la version binaire n'est pas versionnée, ni "toutes.csv".
- Non-suppression de clientinfo.* et de guinumo.* (on verra plus tard).
- Les fichiers de conf restent dans le répertoire "cfg", qui n'est pas
supprimé.
- Le répertoire "csv" reste vide (les données d'entrée n'ont pas à être
versionnées).
- Le répertoire "log" n'est pas supprimé.
| r89 | jgraeffly | 2009-05-15 14:54:13 +0200 (ven 15 mai 2009) | 11 lines
| Chemins modifiés :
| R /code/owlps-positioning/Makefile
| D /code/owlps-positioning/TODO
| D /code/owlps-positioning/cfg
| A /code/owlps-positioning/client
| A /code/owlps-positioning/client/Client
| A /code/owlps-positioning/client/Client.cc
| A /code/owlps-positioning/client/toutes.csv
| D /code/owlps-positioning/clientinfo.cc
| D /code/owlps-positioning/clientinfo.hh
| R /code/owlps-positioning/csv
| A /code/owlps-positioning/csv/minipc.cfg
| A /code/owlps-positioning/csv/topo.csv
| A /code/owlps-positioning/csv/toutes.csv
| A /code/owlps-positioning/csv/waypoints.csv
| D /code/owlps-positioning/guinumo.cc
| D /code/owlps-positioning/guinumo.hh
| D /code/owlps-positioning/log
| A /code/owlps-positioning/positioning.cc
| A /code/owlps-positioning/positioning.hh
| R /code/owlps-positioning/server.cc
| R /code/owlps-positioning/server.hh
| A /code/owlps-positioning/treatment.cc
| A /code/owlps-positioning/treatment.hh
|
| - Création du serveur qui reçois les informations à partir du client
| se trouvant dans le dossier client/
| - Implémentation de la partie calcul dans le serveur (les résultats
| sont cependant les mêmes qu'avant il n'y a pour l'instant pas eu de
| modifications sur le traitement).
| - En sortie, on retrouve le résultat de chaques algo.
| - Sur cette version il n'y a pas encore de commentaires ceci a été
| fait afin d'avoir une meilleure visualisation du programme.
| - La réception des données se fait pour l'instant toujours grâce à un
| vector
| - positioning.cc est une classe qui contient les informations sur la
| topologie les AP ainsi que les points de référence.
| - server.cc contient les méthodes qui permet de recevoir les clients
| et implémente positioning.cc avec les informations reçues par des
| fichiers ces fichiers sont dans csv/
| - treatment.cc est une classe contenant les différents Algo permettant
| de calculer la position.
| - Pour éxécuter le programme : owlps-positioningd csv/minipc.cfg
| csv/toutes.csv csv/topo.csv csv/waypoints.csv
git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@90 785a6c6c-259e-4ff1-8b91-dc31627914f0