Commit Graph

301 Commits

Author SHA1 Message Date
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 a9ac8616e8 [Positioning] MinMax: Fix start/stop and < vs. <= 2011-03-16 14:36:23 +01:00
Matteo Cypriani 814ff2b651 [Positioning] Positioning & UserInterface: add Interlink 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 a30b08ac3c [Positioning] Stock: add Building list & complete tests 2011-03-16 14:36:23 +01:00
Matteo Cypriani f4e8d7a1b7 [Positioning] Building: guarantee unique areas & waypoints
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<<().
2011-03-16 14:36:23 +01:00
Matteo Cypriani 2d4c90e4cd [Positioning] TextFileReader: handle comments
TextFileReader::read_nonblank_line() now skips lines beginning with a #,
or with blank characters and then #.
2011-03-16 14:36:22 +01:00
Matteo Cypriani 675d2d7213 [Positioning] Simplify exceptions in posexcept 2011-03-16 14:36:22 +01:00
Matteo Cypriani 8e6883cfc9 [Positioning] Add class CSVFileReader
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.
2011-03-16 14:36:22 +01:00
Matteo Cypriani c82b95f8f0 [Positioning] Stock::find_create_{ap,mobile}()
Add function find_create_ap() and find_create_mobile() in Stock.
Use these functions in InputCSV instead of Stock::get_mobile() and try…
catch blocks.
2011-03-16 14:36:22 +01:00
Matteo Cypriani b707dae1f1 [Positioning] Fix dependencies in Makefile 2011-03-16 14:36:22 +01:00
Matteo Cypriani 24a328fc16 [Positioning] Fix Timestamp on 32 bits architectures 2011-03-16 14:36:22 +01:00
Matteo Cypriani 30e4e47ca8 [Positioning] UserInterface: categorise options 2011-03-16 14:36:22 +01:00
Matteo Cypriani 58ed434d6b [Positioning] Add class TextFileReader
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.
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 1a51d234c6 [Positioning] Add InterlinkNetworks, MinMax & associates
Add classes:
- MultilaterationMethod
- MinMax (extends MultilaterationMethod)
- MultilaterationAlgorithm (extends PositioningAlgorithm)
- InterlinkNetworks (extends MultilaterationAlgorithm)
2011-03-16 14:36:22 +01:00
Matteo Cypriani 9f907b4db5 [Positioning] AccessPoint: frequency in Hz
The AP frequency was (by mistake) in MHz. It is now in Hz, as
documented.

Function PosUtil::channel_to_frequency() is renamed
wifi_channel_to_hz().
2011-03-16 14:36:22 +01:00
Matteo Cypriani f0831db109 [Positioning] Point3D: set_coordinates(), distance_to_sphere()
- 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).
2011-03-16 14:36:22 +01:00
Matteo Cypriani 64715f7a79 [Positioning] OutputFileMedium -> TextFileWriter
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.
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 84789f2ed2 [Positioning] Add class OutputFileMedium
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.
2011-03-16 14:36:22 +01:00
Matteo Cypriani 5f0bb90d45 [Positioning] TestUtil: clean set_up(), add Result list
TestUtil:
- Split set_up() into several functions.
- Add a list of Result, which will be useful very soon.
2011-03-16 14:36:22 +01:00
Matteo Cypriani 3a9498a0b5 [Positioning] Result: read accessors const 2011-03-16 14:36:22 +01:00
Matteo Cypriani 7bd6f8b261 [Positioning] owlps-positioning is almost usable
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".
2011-03-16 14:36:21 +01:00
Matteo Cypriani 454579d9b7 [Positioning] InputCSV: fix null direction 2011-03-16 14:36:21 +01:00
Matteo Cypriani 8bb0036512 [Positioning] Request: timestamp -> time_sent 2011-03-16 14:36:21 +01:00
Matteo Cypriani ee0499afad [Positioning] Code and comments clean-up
- 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.
2011-03-16 14:36:21 +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 175719db6d [Positioning] PosUtil: channel defs -> posutil.cc
Move channels defines into posutil.cc.
Remove some useless includes in PosUtil and InputCSV.
2011-03-16 14:36:21 +01:00
Matteo Cypriani 80fe1c505d [Positioning] ASSERT(a != b) instead of ASSERT_DIFFERS(a, b)
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).
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 7088e524d4 [Positioning] Add OutputMedium & OutputTerminal
OutputMedium is the super-class of all output media.
OutputTerminal prints a Result on the terminal (or on any stream).
2011-03-16 14:36:21 +01:00
Matteo Cypriani 7c8038edc2 [Positioning] Result::operator<< and minor fixes
Result: add operator<<().

Input: delete log media in destructor.

Request: typo, suppress some useless Doxygen comments.
2011-03-16 14:36:21 +01:00
Matteo Cypriani 9a334ad028 [Positioning] Add PositioningAlgorithm & RealPosition
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).
2011-03-16 14:36:21 +01:00
Matteo Cypriani 96808115bd [Positioning] Add class Result 2011-03-16 14:36:21 +01:00
Matteo Cypriani 0430b1a5da [Positioning] Redesign Timestamp
Use almost only operators for the public interface.
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
Matteo Cypriani 7264080536 [Positioning] Check code with cppcheck
- Replace occurences of `container.size() == 0` with
  `container.empty()`.
- Fix an allocation in posexcept.cc (false positive?).
- UserInterface: in constructor, handle bad_alloc exception possibly
  thrown by `new`.
2011-03-16 14:36:20 +01:00
Matteo Cypriani bc46fc1af2 [Positioning] Direction: Remove operator<< 2011-03-16 14:36:20 +01:00
Matteo Cypriani 49ba6ab320 [Positioning] InputLogCSV: Handle calib. requests
InputLogCSV now handles calibration requests.

TestUtil:
- Request list become a Request pointer list (to handle polymorphism).
- Add a ReferencePoint list.
- Reorganise create_test_csv_file().
2011-03-16 14:36:20 +01:00
Matteo Cypriani e70a255083 [Positioning] InputCSV: handle calib. requests (end)
InputCSV now handles CalibrationRequest, adding position and direction
information.

Input:
- Add add_request_to_stock().

Stock:
- Add list of ReferencePoint.
- Add list of CalibrationRequest.
2011-03-16 14:36:20 +01:00
Matteo Cypriani 9dd30a50c9 [Positioning] Add CalibrationRequest::direction
CalibrationRequest:
- Add Direction attribute.
- Add reference_point_backward_link().
2011-03-16 14:36:20 +01:00
Matteo Cypriani cf7e41358b [Positioning] Makefile: fix test dependencies 2011-03-16 14:36:20 +01:00
Matteo Cypriani 516a1d9196 [Positioning] Update TODO 2011-03-16 14:36:20 +01:00
Matteo Cypriani abb5536fdc [Positioning] Add class Direction
The new class Direction will be used to represent the direction of a
calibration request.

Update posexcept.hh to add new exception bad_direction, used in class
Direction.
2011-03-16 14:36:20 +01:00
Matteo Cypriani 6ad31f9af4 [Positioning] InputCSV: prepare handling CalibrationRequest
InputMedium:
- Split into two files (inputmedium.{hh,cc}).
- Add polymorphic handling of CalibrationRequest.
- Write unit tests.

InputCSV:
- Use new code of InputMedium to handle calibration requests.
- We detect if the read request is a calibration request, but
  specific attributes are not initialised.
2011-03-16 14:36:20 +01:00
Matteo Cypriani 1ceab071a2 [Positioning] InputMedium: current_request now pointer
To handle calibration requests, we will need to make current_request be
either a Request or a CalibrationRequest, so we must dynamically
allocate it.
2011-03-16 14:36:20 +01:00
Matteo Cypriani 0b461bf4d0 [Positioning] InputCSV: read direction as int
Prepare handling of calibration requests.
2011-03-16 14:36:20 +01:00
Matteo Cypriani ce92f0979e [Positioning] +CalibrationRequest, -CalibrationMeasurement
Delete class CalibrationMeasurement and add class CalibrationRequest:
the ReferencePoint must be linked by the Request, not by each
Measurement of the Request.

Adapt ReferencePoint to link a CalibrationRequest instead of a
CalibrationMeasurement.

Request:
- Destructor is now virtual to allow polymorphism.
- Reactivate tests on get_measurements() and set_measurements().
2011-03-16 14:36:20 +01:00
Matteo Cypriani a5aa1af433 [Positioning] Add logging support
Add interface InputLogMedium and class InputLogCSV.

Input: Add logging support.

UserInterface: Add logging options.

Configuration:
- Rename functions (suppress "get_").
- Add functions to allow multiple values in one option (needed by
  logging options):
  - value_exists_in_string_vector()
  - string_vector_value()

InputCSV: Add a destructor.

posexcept.hh: Add no_log_csv_file exception.

TestUtil:
- Improve set_up().
- Add functions used in InputLogCSV_test:
  - functions to compare Request & Co,
  - functions to compare the sizes of two files.
2011-03-16 14:36:19 +01:00
Matteo Cypriani 8257e9e67d [Positioning] Tests: add global set up & tear down
Work on unit tests:
- TestUtil:
  - Add set_up(), that sets up lists of Request, Mobile and AccessPoint,
    primarily to be used with create_test_csv_file().
  - Add public attributes for these lists.
  - Update create_test_csv_file() to use these lists.
- Update InputCSV_test to use new TestUtil.
- Add class TestSetUp, a global fixture class. Before all tests off all
  test suites, it calls TestUtil::set_up().
- Update and clean Makefile.
2011-03-16 14:36:19 +01:00
Matteo Cypriani dbd58f8178 [Positioning] TestUtil: Add create_test_csv_file() 2011-03-16 14:36:19 +01:00
Matteo Cypriani b6ab3c841d [Positioning] Use new exceptions in posexcept
Replace use of standard exceptions (std::out_of_range,
std::runtime_error) by new exceptions in posexcept.
2011-03-16 14:36:19 +01:00
Matteo Cypriani fc1ceb25c7 [Positioning] Add Input & posexcept.{hh,cc}
- 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.
2011-03-16 14:36:19 +01:00
Matteo Cypriani 0ddef4c747 [Positioning] Add TestUtil, utilitary test class
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.
2011-03-16 14:36:19 +01:00
Matteo Cypriani c341f852b7 [Positioning] Clean Makefile 2011-03-16 14:36:19 +01:00
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 a9a2331cfa [Positioning] Finish unit tests for Area & Point3D
Area:
- Unit test: test inversion of points.
- Add reorder_coordinates().
- Remove all set_{x,y,z}_{min,max}() accessors.
- Remove set_p_min() and set_p_max().
- Add set_coordinates().
- The constructor now takes 2 Point3D instead of 6 float coordinates.

Point3D:
- Unit test: finish to test distances, test new cast operator.
- Add a cast to string operator.

Unit tests:
- Add valuetraits.hh with class to display correctly a Point3D in a
  wrong assertion.
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 0bce0ad2bd [Positioning] Point3D: beautify
Use "source" as parameter name for several functions.
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 bd28a26fa3 [Positioning] Add unit tests
Add tests for all (rewriten) classes, except for InputCSV.
2011-03-16 14:36:19 +01:00
Matteo Cypriani fb73ba03c1 [Positioning] Add README (CxxTest install how-to) 2011-03-16 14:36:18 +01:00
Matteo Cypriani d8c604f3ba [Positioning] Fix AccessPoint & WifiDevice
AccessPoint:
- Fix a bug with the frequency.
- Add an accessor set_channel() that calls set_frequency().

WifiDevice:
- Fix a bug with the antenna gain (which was converted with
  PosUtil::channel_to_frequency()).
- Pass float arguments as values and not references.
2011-03-16 14:36:10 +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 4e5db1af92 [Positioning] Fix #include and class declarations
Where possible, put the #include in the .cc file instead of the header
file.
Include <ostream> when <iostream> is not needed.

Fix a bug in operator<<() for Measurement: NULL value of ap and mobile
was not checked.
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 326f1245ed [Positioning] AccessPoint, Mobile, Measurement, ReferencePoint
- Adding WifiDevice and Mobile. AccessPoint and Mobile are sub-classes
  of WifiDevice.
- Measurement: link to Mobile and AccessPoint.
- Adding CalibrationMeasurement.
- ReferencePoint: add_measurement() and operators, link to
  CalibrationMeasurement (not Measurement).
- Area and Waypoint : using pointers (not references) for attribute
  setting.
- Deleted class ClientInfo (replaced by Mobile).
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
Matteo Cypriani 85cca4debd [Positioning] Rewriting begins
/!\ This branch does not compile! (But some single files can.)
/!\ All the following commits are broken code. (Hopefully it will work
/!\ in a few days.)

Backup commit. Beginning of the rewriting work on OWLPS Positioning,
following the new class diagram.
2011-03-16 14:07:23 +01:00
Matteo Cypriani d35e0dd5e5 [Positioning] Reindent with astyle 1.24 2011-03-16 14:07:23 +01:00
Matteo Cypriani c2f18d715e [Positioning] Intégration commentaires de Julien
git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@105 785a6c6c-259e-4ff1-8b91-dc31627914f0
2011-03-16 14:07:23 +01:00
Matteo Cypriani 92194b4f50 [Positioning] Fix -f option
git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@102 785a6c6c-259e-4ff1-8b91-dc31627914f0
2011-03-16 14:07:23 +01:00
Matteo Cypriani d619b621ff [Positioning] Revue code Julien
Début de revue du code de Julien sur owlps-positioning :
* Cosmétique.
* owlps-positioning.cc, server.cc : correction/amélioration de la
  gestion des arguments.
* Fichiers de config : suppression de cfg/config.cfg et
  déplacement-renommage de ./owlps-positioning.cfg dans
  cfg/owlps-positioning.conf.
* Makefile : passage de Boost 1.35 à 1.38, l'option
  -lboost_program_options devient -lboost_program_options-mt.

git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@101 785a6c6c-259e-4ff1-8b91-dc31627914f0
2011-03-16 14:07:23 +01:00
Julien Graeffly b9bdb9400a Incorporation de la dernière version de Julien
Extrait de son courriel :
  « Par rapport à la précédente j'ai surtout corrigé des bugs. »

Note : la version du listener portable sur Fonera, envoyée en même temps
par Julien, viendra plus tard (le temps que je l'incorpore).

Détail des changements après analyse du code :

aggregator : correction de bogues.

positioning :
* Ajout d'un fichier de config format boost (cfg/config.cfg).
* Makefile : implantation des cibles "install" et "uninstall" ; la cible
  "astyle" devient "style".
* accesspoint.{hh,cc}, area.cc, measurement.hh, point.{hh,cc},
  referencepoint.{hh,cc} : cosmétique.
* owlps-positioning.c : correction de la lecture du fichier de config
  (ajout d'une option permettant de spécifier un fichier alternatif).
* server.cc : essentiellement correction des requêtes.
* libowlps-positioning.{hh,cc} : passage de "unsigned long long" à
  "uint64_t" comme type de retour de timeval_to_ms().

writeInDb :
* Ajout de la gestion d'un fichier de config.
* Ajout de deux scripts pour la BDD.

git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@96 785a6c6c-259e-4ff1-8b91-dc31627914f0
2011-03-16 14:07:22 +01:00
Julien Graeffly f1e1122091 Reconstitution du dépôt, étape 5 (et dernière)
Le commentaire de révision initial figure ci-dessous. Les différences
par rapport à ce commit sont :
- Dans code/infrastructure-centred/owlps-client/ : importation des
  modifs de Julien dans la dernière version du client (Julien avait
  utilisé comme base une ancienne version).
- Dans code/infrastructure-centred/owlps-listener/ : idem.
- Dans code/owlps-positioning/ :
    ° Suppression de client (déplacé dans les archives).
    ° Makefile : ajout d'une pseudo-cible .PHONY.
- code/writeInDb/ :
    ° Le binaire n'est pas versionné.
    ° Application de astyle --style=gnu.

| r93 | jgraeffly | 2009-05-27 14:51:40 +0200 (mer 27 mai 2009) | 23 lines
| Chemins modifiés :
|    R /code/infrastructure-centred/owlps-aggregator/owlps-aggregator.h
|    R /code/infrastructure-centred/owlps-aggregator/owlps-aggregatord.c
|    R /code/infrastructure-centred/owlps-client/owlps-client.c
|    R /code/infrastructure-centred/owlps-listener/owlps-listener.h
|    R /code/infrastructure-centred/owlps-listener/owlps-listenerd.c
|    R /code/libowlps/owlps.h
|    R /code/owlps-positioning/Makefile
|    D /code/owlps-positioning/client
|    A /code/owlps-positioning/libowlps-positioning.cc
|    A /code/owlps-positioning/libowlps-positioning.hh
|    R /code/owlps-positioning/owlps-positioning.cc
|    A /code/owlps-positioning/owlps-positioning.cfg
|    R /code/owlps-positioning/owlps-positioning.hh
|    R /code/owlps-positioning/positioning.cc
|    R /code/owlps-positioning/positioning.hh
|    R /code/owlps-positioning/server.cc
|    R /code/owlps-positioning/server.hh
|    R /code/owlps-positioning/treatment.cc
|    R /code/owlps-positioning/treatment.hh
|    A /code/writeInDb
|    A /code/writeInDb/writeindb
|    A /code/writeInDb/writeindb.cc
|    A /code/writeInDb/writeindb.hh
|
| - Mise à jour du positioner :
|         Prise en charge de la BdD pour utilisation ainsi que pour la
|           sauvegarde des résultats
|         Envoi du résultat au client
|         Prise en compte du fichier de configuration ainsi que des
|           lignes de commande avec la library boost
|
| - Mise à jour de l'aggregator :
|         Pris en compte de la BdD pour la sauvegarde des requetes de
|           calibration ou de localisation
|         Envoi des demandes de localisation uniquement vers le
|           positioner
|         Ajout des options utilisables en ligne de commande et dans le
|           fichier de conf
|
| - Mise à jour du listener :
|         Ajout de l'envoi de l'adresse IP du mobile
|
| - Mise à jour du mobile :
|         Ajout de la socket de récupération de la réponse du serveur la
|           réponse est sous forme de 3 float (x, y, z) et non d'un Point.
|
| - Mise à jour de owlps.h :
|         Ajout des ports par défaut du positioner ainsi que du mobile.
|
| - Ajout de writeInDb :
|         Programme permettant de mettre les données contenu dans un
|           fichier dans la BdD

git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@94 785a6c6c-259e-4ff1-8b91-dc31627914f0
2011-03-16 14:07:22 +01:00
Julien Graeffly 61ceb8bb0f Reconstitution du dépôt, étape 3
Le commentaire de révision initial figure ci-dessous. Différences par
rapport à ce commit : ajout d'une règle "astyle" au Makefile, qui refait
l'indentation de tous les fichiers (à utiliser avant un commit).

| r91 | jgraeffly | 2009-05-15 15:18:47 +0200 (ven 15 mai 2009) | 1 line
| Chemins modifiés :
|    M /code/owlps-positioning/Makefile
|    M /code/owlps-positioning/server.hh

git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@92 785a6c6c-259e-4ff1-8b91-dc31627914f0
2011-03-16 14:07:22 +01:00
Julien Graeffly 418970d68b Reconstitution du dépôt, étape 2
Le commentaire de révision initial figure ci-dessous. Différences par
rapport à ce commit : avant les modifications, j'ai renommé guinumo.* en
owlps-positioning.*.

| r90 | jgraeffly | 2009-05-15 15:08:42 +0200 (ven 15 mai 2009) | 1 line
| Chemins modifiés :
|    A /code/owlps-positioning/owlps-positioning.cc
|    A /code/owlps-positioning/owlps-positioning.hh

git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@91 785a6c6c-259e-4ff1-8b91-dc31627914f0
2011-03-16 14:07:22 +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 4784fb00df Reconstitution du dépôt, étape 0
Backup du 15-05-2009, restauré pour effacer les mauvais commits de
Julien (mauvaise compréhension de SVN -> mauvaises utilisation).

Du coup j'en profite pour préparer le terrain : un petit coup de astyle
sur chaque fichier, pour que les diffs soient intéressants.
DÉSORMAIS, ASTYLE DEVRA ÊTRE UTILISÉ AVANT CHAQUE COMMIT !

Pour ce faire :
  astyle --style=gnu *.cc *.hh

git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@89 785a6c6c-259e-4ff1-8b91-dc31627914f0
2011-03-16 14:07:22 +01:00
Matteo Cypriani f02fd800db Correction des Makefiles
git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@83 785a6c6c-259e-4ff1-8b91-dc31627914f0
2011-03-16 13:52:46 +01:00
Matteo Cypriani 7a5fd431f4 Rien de très transcendant
Retouches mineures et décommentaire de checkTopology() dans le
constructeur de Server.

git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@78 785a6c6c-259e-4ff1-8b91-dc31627914f0
2011-03-16 13:52:46 +01:00
Matteo Cypriani 3268b3d298 Correction du Makefile de positioning
Cibles d'installation et de désinstallation factices pour éviter les
erreurs.

git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@76 785a6c6c-259e-4ff1-8b91-dc31627914f0
2011-03-16 13:52:45 +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