Commit Graph

23 Commits

Author SHA1 Message Date
Matteo Cypriani 9cf4daca3b [Positioning] Add Configuration and UserInterface
- 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.
2011-03-16 14:36:19 +01:00
Matteo Cypriani 12d14b805f [Positioning] Measurement: test avg. computation
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.
2011-03-16 14:36:19 +01:00
Matteo Cypriani b921263795 [Positioning] Add class Timestamp
Add a class Timestamp that boxes the structure timespec from <ctime>.
timespec manipulation functions are removed from PosUtil.
2011-03-16 14:36:19 +01:00
Matteo Cypriani 1ddebc9cf4 [Positioning] Area: Suppress debug cout
Suppress the last preprocessor-controlled debug display in Area.
2011-03-16 14:36:19 +01:00
Matteo Cypriani c5eff5f857 [Positioning] const_iterators instead of iterators 2011-03-16 14:36:19 +01:00
Matteo Cypriani 910d9a04d9 [Positioning] InputCSV: handle auto EOF & closing
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.
2011-03-16 14:36:19 +01:00
Matteo Cypriani ec10ed71a1 [Positioning] Add test for InputCSV
- Add unit test for InputCSV.
- Request: Add get_measurements().
- Stock:
  - Add clear().
  - Update tests to use it.
2011-03-16 14:36:19 +01:00
Matteo Cypriani efac35a515 [Positioning] Get rid of STLport, complete Request
- Now use Boost.TR1 instead of STLport, for unordered_map.
- Add operator=(), operator==(), operator!=() and a copy constructor to
  Request.
2011-03-16 14:36:10 +01:00
Matteo Cypriani 7c6492645d [Positioning] Fix some errors
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?).
2011-03-16 14:36:10 +01:00
Matteo Cypriani f4c825c2d9 [Positioning] const_cast & other minor enhancements
- 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'.
2011-03-16 14:36:10 +01:00
Matteo Cypriani 1f1d7de4f5 [Positioning] Doxygen comments + fixes
- 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).
2011-03-16 14:36:10 +01:00
Matteo Cypriani ab3302ff28 [Positioning] Beautify code
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.
2011-03-16 14:36:10 +01:00
Matteo Cypriani cc31b5dcc6 [Positioning] Add class Stock, finish InputCSV
Add AP and mobile management in InputCSV. Lists of known APs and mobiles
are static attributes of the class Stock.
2011-03-16 14:36:10 +01:00
Matteo Cypriani 5f8f955a3d [Positioning] Add Request, complete InputCSV
== 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.
2011-03-16 14:35:56 +01:00
Matteo Cypriani 8f071d13b0 [Positioning] Add classes InputMedium & InputCSV
- 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.
2011-03-16 14:35:45 +01:00
Matteo Cypriani 1cf560309a [Positioning] Several fixes
- Makefile: fix waypoint.o.
- UTF-8 calibrationmeasurement.{hh,cc}, measurement.cc.
- CalibrationMeasurement: fix destructor.
- Measurement: fix const functions, add operator bool().
- Update TODO.
2011-03-16 14:07:24 +01:00
Matteo Cypriani d156e91379 [Positioning] Inline short functions
Short functions (accessors and simple operators) are declared inline and
moved in header files, after the class definition.
2011-03-16 14:07:24 +01:00
Matteo Cypriani 96023d8285 [Positioning] Suppress "using" directives in *.hh
(and add .gitignore)
2011-03-16 14:07:24 +01:00
Matteo Cypriani 40617901f6 [Positioning] Class declarations, vector.at(), iterators
- 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.
2011-03-16 14:07:24 +01:00
Matteo Cypriani d257d08d8d [Positioning] Makefile & Compilation fixes
- Updated Makefile to be able to compile each class.
- Fixed some compilation errors (CalibrationMeasurement, Point3D,
  ReferencePoint, WayPoint) and a warning in Measurement.
2011-03-16 14:07:24 +01:00
Matteo Cypriani 1808acd870 [Positioning] Work on AccessPoint and 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).
2011-03-16 14:07:23 +01:00
Julien Graeffly 191109c5b0 Reconstitution du dépôt, étape 1
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
2011-03-16 14:07:22 +01:00
Matteo Cypriani 2c30b04a49 Migration vers le nouveau nom OWLPS
git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@71 785a6c6c-259e-4ff1-8b91-dc31627914f0

git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@73 785a6c6c-259e-4ff1-8b91-dc31627914f0

git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@74 785a6c6c-259e-4ff1-8b91-dc31627914f0

  Renommage des fichiers et adaptation des makefiles.

git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@75 785a6c6c-259e-4ff1-8b91-dc31627914f0

  Adaptation des #include, fin d'adaptation des makefiles.

  Reste à faire : renommage des fichiers de GuiNuMo, adaptation dans le
  code, amélioration du makefile (cible d'installation).
2011-03-16 13:52:45 +01:00