Commit Graph

893 Commits

Author SHA1 Message Date
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 d8f3fe0508 Update TODO 2012-06-08 19:27:49 +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 573b62f3ba common.mk: -O2 only (instead of -O2 -O) 2012-06-01 17:17:58 +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 bf9681a0e7 Update TODO 2012-05-31 20:42:11 +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 b594505ea7 [lib] Optimise owl_mac_equals()
MAC addresses are more likely to vary in the right octets than in the
left octets, so we compare them starting from the end rather than from
the beginning.
2012-05-25 12:23:06 +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 bb45348f05 [Client] Fix printf conversion for MAX_PKT_SIZE 2012-05-23 18:46:55 +02:00
Matteo Cypriani 24a07f9e01 Use clang as the default C compiler
Clang compiles faster than GCC and is supposed to give more meaningful
error messages, so let's use it at least for development.

OwlPS Positioner does not compile with clang++, so we are stuck with g++
(or colorgcc).
2012-05-23 18:44:42 +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
Matteo Cypriani e239dffa4f [Listener] Do not print a warning if AC_port == 0
If the autocalibration request port was not specified, a warning was
issued. This is now fixed by issuing a warning only if the port is too
big, but not if it is zero.
2012-05-14 14:06:05 +02:00
Matteo Cypriani c4e03520f3 [Listener] Display the packet size 2012-05-10 11:38:21 +02:00
Matteo Cypriani 59a0ac12bd [Positioning] Autocalibration: #include <vector> 2012-05-10 11:38:21 +02:00
Matteo Cypriani 412b77d37f [Client] Refactor make_packet() 2012-05-10 11:38:21 +02:00
Matteo Cypriani 775687a1dc [Client] Add option -s (packet size) 2012-05-10 11:38:21 +02:00
Matteo Cypriani 07f5b16ca0 [Listener] Receive the new request format
Read the packet number and number of packets after the request type.
A bit of refactoring was done.
2012-05-10 11:29:17 +02:00
Matteo Cypriani 96d1c54e54 Send number of packets at the beginning of request
The packet number and number of packets are now sent right after the
packet type, instead of at the end of the request.
2012-05-09 21:13:52 +02:00
Matteo Cypriani f0e23521c3 [Positioner] OutputNetworkSocket: include unistd.h 2012-05-09 17:48:06 +02:00