Matteo Cypriani
ecae205955
[Positioner] Cosmetic changes, mainly comments
2013-07-17 18:09:13 -04:00
Matteo Cypriani
9144ef3740
[Positioner] RealPosition: fix calib request bug
...
Fix the RealPosition::compute() bug that prevented the real position to
be extracted for a CalibrationRequest.
2013-07-17 18:09:13 -04:00
Matteo Cypriani
e9f5f26504
[Positioner] Fix Request's destructor
...
real_position was not deleted in the destructor.
2013-07-17 18:09:13 -04:00
Matteo Cypriani
8b3a31fe3b
[Positioner] Fix Request::operator==()
2013-07-17 18:09:13 -04:00
Matteo Cypriani
6cffd61b0c
[Positioner] UserInterface: use const argc & argv
2013-07-17 18:09:13 -04:00
Matteo Cypriani
c358b6e6c7
[Positioner] Direction: use uint_fast8_t
...
Use uint_fast8_t instead of char as the inner direction type.
2013-07-17 18:09:13 -04:00
Matteo Cypriani
953e4c1d52
[Positioner] Un-inline Direction::is_valid()
2013-07-17 18:09:13 -04:00
Matteo Cypriani
dfc52a1de3
[Positioner] Un-inline Timestamp::set()
2013-07-17 18:09:12 -04:00
Matteo Cypriani
794d8b35d0
[Positioner] Fix CalibrationRequest(Request)
...
Fix CalibrationRequest's Request copy constructor: the default arguments
must be in the header file.
2013-07-17 18:09:12 -04:00
Matteo Cypriani
4ae0874e1f
[Positioner] Access Point -> Capture Point
...
Like in the other modules, we get rid of the old use of "access point".
This has user-visible changes, especially in the configuration (the name
of a few options has been changed).
2013-07-17 18:09:12 -04:00
Matteo Cypriani
69cba07122
[lib] Access Point -> Capture Point (API change)
...
Same work as for Aggregator and Listener to get rid of the old "AP"
terminology.
API change: structures with an ap_mac_addr_bytes field are modified.
2013-07-17 18:09:12 -04:00
Matteo Cypriani
bd48479d2d
[Positioner] Refactor InputCSV::fill_current_request()
...
Use the new function InputCSV::read_field() to read the fields and
display error messages as needed.
2013-07-17 18:09:12 -04:00
Matteo Cypriani
5bf1bcb4d2
Handle aggregation CSV format version
...
The first field of the Aggregator's CSV output files is now an unsigned
integer that announces the version of the CSV format used. Current
version is 1 and the subsequent fields are not modified, so that an
aggregation file generated with a previous version can still be used by
adding "1;" at the beginning of each line.
The Positioner has been adapted to handle this new format.
2013-07-17 18:08:27 -04:00
Matteo Cypriani
b97085d79f
[Positioner] Get rid of the src/ subdirectory
...
The src/ subdirectory is not needed any more, since we can build out of
tree with CMake.
2013-06-19 18:53:37 -04:00
Matteo Cypriani
5ddca24738
Print exit message only in verbose mode
...
Update the exit message printing in all the modules:
- print on standard error
- print only in verbose mode
- use "exiting" instead of "end"
2013-06-12 17:18:46 -04:00
Matteo Cypriani
9701a2d393
[Positioner] Allow building with clang++
...
This patch is to have clang++ (>= 3.2) happily build OwlPS Positioner.
For some reason it doesn't work on NetBSD, but it is fine on GNU/Linux
and (a couple of warnings apart) on DragonFly BSD.
2013-06-12 09:38:38 -04:00
Matteo Cypriani
d32813376b
CMake: pass installation prefix to programs
...
The file libowlps/owlps-config.h.in was added to allow CMake to pass the
installation prefix variable to the programs. That allows the programs
to look for their configuration file at the right position (i.e. in the
etc/owlps directory under the installation prefix).
2013-06-12 09:38:38 -04:00
Matteo Cypriani
9d640cd4d6
[Positioner] Doxygen: enable MULTILINE_CPP_IS_BRIEF
...
Enable Doxygen option MULTILINE_CPP_IS_BRIEF, so that we don't have to
use \brief: C++-style comments are for brief descriptions and C-style
comments for extended descriptions.
Fix some comments (use @param instead of @arg).
2013-06-12 09:38:00 -04:00
Matteo Cypriani
eb2715e249
CMake: make sure doxygen is available
2013-06-04 11:07:54 -04:00
Matteo Cypriani
df765e08b3
CMake: generate Positioner's doc out of tree
...
The Positioner's documentation is now generated in the build tree
instead of in the source tree.
2013-06-03 17:46:10 -04:00
Matteo Cypriani
4a3fd2ac8a
[Positioner] Use Markdown in Doxygen comments
...
Fix some comments as well, and uniformise the use of @returns instead of
@return.
2013-06-03 17:46:10 -04:00
Matteo Cypriani
486d2c9670
[Positioner] CSV*Reader: don't use namespace boost
...
Remove the using namespace boost declaration.
2013-06-03 17:46:10 -04:00
Matteo Cypriani
f352295e9d
[Positioner] Get rid of Boost's unordered_*
...
Stop using Boost for unordered_set, unordered_map and hashes.
2013-06-03 17:46:10 -04:00
Matteo Cypriani
081c559fc5
[Positioner] Fix a few small issues
...
Fix three minor performance issues signaled by cppcheck and a couple of
problems with Doxygen.
2013-06-03 17:46:10 -04:00
Matteo Cypriani
e9cecbe1c0
[Positioner] Update Doxyfile
...
Update Doxyfile to Doxygen 1.8.1.2 and change a couple of options.
2013-06-03 17:45:02 -04:00
Matteo Cypriani
80fd5b287b
Update and centralise copyright information
2013-05-29 13:19:06 -04:00
Matteo Cypriani
be6d369fcc
CMake: test for the presence of Boost (Positioner)
2013-05-22 18:36:21 -04:00
Matteo Cypriani
1cb5742ef9
CMake: rework compilation/link flags
...
- Default compiler and linker flags were added silently. They are now
set in the cache if no previous values are present.
- Debug flags and regular flags have been merged.
- Position-independent code (doesn't appear in the cache because CMake
lacks variables like CMAKE_EXE_COMPILE_FLAGS):
- Shared libraries are compiled with -fPIC.
- Executables and static libraries are compiled with -fPIE.
- Executables are linked with -pie -fPIE.
2013-05-22 18:36:21 -04:00
Matteo Cypriani
c41f6d9547
CMake: add installation targets
2013-05-22 18:36:21 -04:00
Matteo Cypriani
4264210dcc
CMake: add static targets
...
The pseudo-targets "semistatic" and "static" were added to build
everything in semistatic or static mode.
2013-05-22 18:36:20 -04:00
Matteo Cypriani
d4ef0cc306
CMake: add Positioner's extra targets
...
Add extra targets for the Positioner:
- indent_positioner calls astyle (old make target: "style")
- check_positioner calls cppcheck (old make target: "check")
2013-05-22 18:36:20 -04:00
Matteo Cypriani
0de28cb3eb
CMake: compile Positioner
2013-05-22 18:36:20 -04:00
Matteo Cypriani
005e5da12e
Delete Makefiles
2013-05-20 17:08:33 -04:00
Matteo Cypriani
453be9a588
[Positioner] request.cc: add missing #include
2013-05-20 17:07:57 -04:00
Matteo Cypriani
e749542ddc
[Positioner] PosUtil: improve assert_uppercase()
2013-05-18 23:38:31 -04:00
Matteo Cypriani
6745274c94
[Positioner] Configuration::autocalibration_enabled()
...
Add Configuration::autocalibration_enabled() as a shortcut to test if
the autocalibration is enabled.
2013-05-17 16:54:57 -04:00
Matteo Cypriani
4650c229ff
[Positioner] Allow to generate a RP list
...
Change the positioning.generate-reference-points option to offer
multiple choices (false, mesh, list, both) and add the
positioning.generated-points-list to allow the user to specify a list of
reference points to generate.
2013-05-17 16:54:57 -04:00
Matteo Cypriani
9ef599b42f
[Positioner] Add CSVStringReader(string)
...
Add a string constructor for CSVStringReader, for easier use outside of
CSVFileReader.
2013-05-17 16:54:57 -04:00
Matteo Cypriani
2e323be423
[Positioner] CSVStringReader: allow "(X;Y;Z)"
...
CSVStringReader::read_point3D() now allow the first of the three fields
forming a Point3D (that is, X) to start with an opening parenthesis, and
the last (Z) to end with a closing parenthesis. That allows an improved
clarity for strings containing several points, e.g. "(1;2;3);(4;5;6)".
2013-05-17 16:54:57 -04:00
Matteo Cypriani
9944fef40d
[Positioner] Switch to C++11
...
This is a very basic switch, we don't use any of the C++11 features yet.
2013-05-16 17:46:44 -04:00
Matteo Cypriani
f55672ef01
[Positioner] Add class CSVStringReader
...
Code separated from CSVFileReader, which now inherits from both
TextFileReader and CSVStringReader.
2013-05-16 16:59:15 -04:00
Matteo Cypriani
0614b52219
[lib] Stop defining owl_bool (use stdbool.h)
...
We don't define our own boolean type in owlps.h any more: bool (from
stdbool.h) is used instead.
2013-05-15 15:46:13 -04:00
Matteo Cypriani
aa2e72f423
[Positioner] positioner.conf: comment lines
...
Comment unnecessary lines from cfg/owlps-positioner.conf.
2013-05-14 13:37:18 -04:00
Matteo Cypriani
5a7d30ea84
[Positioner] InputUDPSocket: include unistd.h
...
Fixes compilation on DragonFly.
2013-05-01 13:41:05 -04:00
Matteo Cypriani
64c2ac9a58
Makefiles: move OS detection in common.mk
...
This fixes compilation on BSD.
2013-04-30 16:50:14 -04:00
Matteo Cypriani
2a23e31a28
Fix compilation warning/errors for OpenWrt
...
In lib-resultreader and Positioner.
2013-04-24 13:51:58 -04:00
Matteo Cypriani
4aed9c1ef0
Radiotap Antenna Signal field is signed
...
Using int8_t instead of uint8_t which was erroneously used to code the
Antenna Signal radiotap field.
2013-04-24 10:59:55 -04:00
Matteo Cypriani
ae1fa584a7
[Positioner] Measurement: intervals are uints
2012-11-03 16:51:13 +01:00
Matteo Cypriani
8455dd0d74
Add copyright & license information
...
Add the file COPYRIGHT, the CeCILL license's text, and update the source
files' headers with the copyright and license information.
2012-11-03 14:52:33 +01:00
Matteo Cypriani
69390a3f6b
[Positioner] Fix Request::to_csv() (missing ;)
2012-08-30 16:05:23 +02:00
Matteo Cypriani
3808c2ce6f
[Positioner] Add Request::to_csv()
...
Code moved from InputLogCSV.
2012-08-30 10:23:09 +02:00
Matteo Cypriani
8c93cc467e
[Positioner] Add option output.2d-error
2012-08-24 16:39:00 +02:00
Matteo Cypriani
5fd5f13b93
[Positioner] Add Point3D::distance_2d()
2012-08-24 16:33:47 +02:00
Matteo Cypriani
b11b63c46b
[Positioner] cfg: improve comments
2012-08-24 16:33:47 +02:00
Matteo Cypriani
8cf840ba1b
[Positioner] Reindent input.cc
2012-08-24 16:28:44 +02:00
Matteo Cypriani
18761a06ce
[Positioner] Input: fix calib. request handling
...
Reorganise the tests in order to really ignore calibration requests if
positioning.accept-new-calibration-requests = false and
positioning.position-calibration-requests = false.
Display a message when a calibration request is ignored.
2012-07-24 16:21:03 +02:00
Matteo Cypriani
f6fa26507f
[Positioner] EvAAL: do not send \0
...
The NULL character must not be sent at the end of the result string, or
the Socket Server behaves weirdly.
2012-07-10 16:15:45 +02:00
Matteo Cypriani
307da87760
[Positioner] EvAAL: fix AOI printing
...
The AOI (Area Of Interest) number must be printed only if greater than
zero.
2012-07-10 16:13:15 +02:00
Matteo Cypriani
db63c88a45
[Positioner] EvAAL: handle empty results' lists
2012-07-10 16:11:25 +02:00
Matteo Cypriani
2d2b8551fb
[Positioner] Rename cfg/listeners.csv (typo)
2012-06-28 21:44:00 +02:00
Matteo Cypriani
8f3bf50aa5
[Positioner] Fix "interval" similarity algorithm
...
The "interval" similarity algorithm now handles the case where no packet
is found within the interval.
2012-06-20 18:39:21 +02:00
Matteo Cypriani
1f22ece3d9
[Positioner] PosUtil::is_in_interval(): bound == 0
...
PosUtil::is_in_interval() now handles a zero interval width. That is
required in case of standard deviation equals to zero.
2012-06-20 18:36:30 +02:00
Matteo Cypriani
6a13e4fc54
[Positioner] Fix Point3D::operator bool()
2012-06-20 17:26:00 +02:00
Matteo Cypriani
91ff55ca0e
[Positioner] Measurement: variance in dBm
...
Along with the variance in mW, compute the variance of the dBm values.
2012-06-19 17:56:10 +02:00
Matteo Cypriani
6d40ecc8c5
[Positioner] Measurement: fix recalculate_average()
...
Adds the attribute variance_size to handle the number of elements taken
into account in the variance computation, instead of relying on
ss_list.size(), which is a mistake in the case of recalculate_average().
2012-06-19 17:41:10 +02:00
Matteo Cypriani
b952dc94ab
[Positioner] Measurement: rename variance variables
...
We compute only the variance for the milliwatt values, so the
variance-related variables are renamed with the _mw suffix.
2012-06-19 17:13:27 +02:00
Matteo Cypriani
812c616841
[Positioner] autocalibration.cc: missing includes
2012-06-14 13:42:05 +02:00
Matteo Cypriani
3640bcf0ba
[Positioner] replay option is boolean
...
Fixes the test of the replay option: it is a boolean, not a
configured/not configured option.
2012-06-08 19:27:49 +02:00
Matteo Cypriani
dce842bad3
[Positioner] Add option unique-calibration-requests
...
The default behaviour is preserved.
2012-06-08 19:27:49 +02:00
Matteo Cypriani
167cc1fcb6
[Positioner] Input: test the request earlier
...
Return before to update the current time if the request is empty.
2012-06-08 19:27:49 +02:00
Matteo Cypriani
85c955bb03
[Positioner] Clean requests in Input
...
Delete the old requests in the Input class rather than in Positioning,
so autocalibration does not use old requests.
2012-06-08 18:00:37 +02:00
Matteo Cypriani
f3c00334bf
[Positioner] cfg: add a few comments
2012-06-08 14:42:12 +02:00
Matteo Cypriani
f8f6ca4660
[Positioner] CR timeout depends on replay mode
...
In Stock::delete_calibration_requests_older_than(), test if we run in
replay mode or not.
2012-06-08 14:41:50 +02:00
Matteo Cypriani
4e3843a502
[Positioner] Verbose Timestamp::update_current_time()
2012-06-08 14:41:50 +02:00
Matteo Cypriani
451e665eda
[Positioner] Timestamp::elapsed(): use current time
...
Timestamp::elapsed() now calls Timestamp::get_current_time() instead of
comparing to now().
2012-06-08 14:41:50 +02:00
Matteo Cypriani
69461e5c94
[Positioner] Input: update current time (replay)
...
In replay mode, update the current time when getting a new request.
2012-06-08 14:41:50 +02:00
Matteo Cypriani
d44680751c
[Positioner] Timestamp: *current_time() use "replay"
...
Timestamp::get_current_time() now returns the current time if the replay
mode is unactivated, or the most recent request's time in replay mode.
2012-06-08 14:41:50 +02:00
Matteo Cypriani
692571e382
[Positioner] UserInterface: add option "replay"
2012-06-08 14:41:37 +02:00
Matteo Cypriani
0d527ec77d
[Positioner] Add Timestamp::current_time
2012-06-08 12:29:29 +02:00
Matteo Cypriani
ff5bab01cc
[Positioner] Timestamp: less/greater -> before/after
...
Renames less_than() and greater_than(), they become before() and
after().
2012-06-08 12:29:29 +02:00
Matteo Cypriani
57cdeeb360
[Positioner] Generated requests: time received=sent
...
For generated calibration requests, time_sent is now equals to
time_received.
2012-06-01 19:34:58 +02:00
Matteo Cypriani
7da5196627
[Positioner] CR timeout computed with time_received
...
In Stock::delete_calibration_requests_older_than(), use
request.time_received instead of request.time_sent to compute the
timeout.
2012-06-01 18:49:39 +02:00
Matteo Cypriani
edd0d48faa
[Positioner] InputMedium: initialise time_received
...
When reading a new request, set current_request.time_received.
2012-06-01 17:17:58 +02:00
Matteo Cypriani
7e55f8495c
[Positioner] Request: bool op -= time_received
...
Fixes Request::operator bool(): since time_received is initialised at
the creation, we must not take it into account.
2012-06-01 17:17:57 +02:00
Matteo Cypriani
a93653c299
[Positioner] Request: add time_received
...
Adds an attribute for the date at which Positioner received a request
from Aggregator.
2012-06-01 14:27:20 +02:00
Matteo Cypriani
b6f167c549
[Positioner] Rename single-packet option
...
Option positioning.generate-single-packet-reference-points becomes
positioning.generate-multi-packet-reference-points. The default is still
true, which means the default behaviour changed.
2012-05-31 20:18:49 +02:00
Matteo Cypriani
573cb2f256
[Positioner] InputUDPSocket: s/cout/cerr/
2012-05-31 19:47:28 +02:00
Matteo Cypriani
569cdefd94
[Positioner] Autocalibration & Stock: assertion
2012-05-31 19:47:02 +02:00
Matteo Cypriani
6e40e14863
[Positioner] Autocalibration: single packet if error
...
When generating multi-packets RPs, if the RPs associated with the two
APs have no packet in common, we fall back to generating a single-packet
(averaged) RP.
2012-05-31 19:47:02 +02:00
Matteo Cypriani
ecae107163
[Positioner] Fix Request(Request)
...
Copy constructor fixed to copy nb_packets and real_positon.
2012-05-31 19:47:02 +02:00
Matteo Cypriani
14eb08b37e
[Positioner] Autocalibration: fix multi-packet loop
...
Fixes the Autocalibration::compute_multi_packet_ss() loop that searches
for the first good measurement.
2012-05-31 19:47:02 +02:00
Matteo Cypriani
d3733c2083
[Positioner] AccessPoint: avoid division by zero
2012-05-31 19:47:02 +02:00
Matteo Cypriani
b8722b6a6c
[Positioner] ReferencePoint: fix comments
...
Fixes/adds comments in delete_generated_requests().
2012-05-31 19:47:01 +02:00
Matteo Cypriani
f54426c3bb
[Positioner] Fix calibration-requests-timeout
...
Fixes Stock::delete_calibration_requests_older_than(), by calling the
new function ReferencePoint::delete_request().
2012-05-31 19:46:57 +02:00
Matteo Cypriani
038c24da05
[Positioner] PosUtil: macrofy assert_uppercase()
...
PosUtil::assert_uppercase() becomes a macro, to avoid a warning when
compiling with -D NDEBUG. The new name is assert_uppercase(), still
defined in posutil.hh.
2012-05-26 13:34:19 +02:00
Matteo Cypriani
77b0a13896
[Positioner] Autocalibration: clean lists
...
Clean ref_aps and sorted_*_angles between two iterations.
2012-05-26 12:52:50 +02:00
Matteo Cypriani
98085172de
[Positioner] Cosmetics (InputCSV & Stock)
2012-05-26 12:24:00 +02:00
Matteo Cypriani
bc2129a36b
[Positioner] Autocalibration: fix segfault
2012-05-26 12:23:09 +02:00
Matteo Cypriani
316db76861
Makefiles: add common-rules.mk, drop openwrt files
...
This is the sequel of the work on the Makefiles' unification.
2012-05-24 14:19:04 +02:00
Matteo Cypriani
437c5fec8c
[Positioner] Makefile: specify astyle indentation
...
As of Artistic Style 2.02, the default indent size changed, so we force
it to 2 spaces.
2012-05-17 11:47:30 +02:00