Commit Graph

814 Commits

Author SHA1 Message Date
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
Matteo Cypriani 9ec71b800e [lib*] Merge Makefile and Makefile_atheros_openwrt
In libowlps and libowlps-client (libowlps-resultreader does not have an
Atheros Makefile).
2012-05-09 17:38:37 +02:00
Matteo Cypriani 92485f3f67 Add common.mk
Adapt all the Makefiles to use it.
Rename all the Makefile_atheros_openwrt-10.03 to
Makefile_atheros_openwrt.
2012-05-09 15:55:17 +02:00
Matteo Cypriani b0c9905ecc Add the OwlPS logo 2012-05-09 11:09:01 +02:00
Matteo Cypriani 811bb8053e Add Makefile_atheros_openwrt 2012-05-09 10:48:22 +02:00
Matteo Cypriani 00613d8524 Update TODO 2012-05-02 17:32:01 +02:00
Matteo Cypriani 38f34a693a [Positioner] s/level/floor/ 2012-05-02 17:32:01 +02:00
Matteo Cypriani d2f40bb49e [Positioner] Autocalibration: compute origin angle
The angle P-RX-O (formerly named angle_p) was left uninitialised. This
is fixed, and the variable was renamed origin_angle.
2012-05-02 17:32:01 +02:00
Matteo Cypriani efba4fa09b [Positioner] Fix Autocalibration::sort_reference_aps()
Fix the angle calculation in sort_reference_aps() and better comment the
code.
2012-05-02 17:32:00 +02:00
Matteo Cypriani c51d9c1c12 [Positioner] Autocalibration: fix reference angle 2012-05-02 17:32:00 +02:00
Matteo Cypriani 300c338023 [Positioner] Autocalibration: signed angles
This commit changes the way the APs are selected. Until now, the two
most acute angles were selected. Now, the angles are signed, i.e. we
differentiate the APs that are before the point to generate on the
trigonometric circle, and those that are after.

Some more refactoring was achieved, and some bugs fixed.
2012-05-02 17:32:00 +02:00
Matteo Cypriani 291ef457f5 [Positioner] Add Point3D::rotate_2d() 2012-05-02 17:32:00 +02:00
Matteo Cypriani 88a90a7abd [Positioner] Add PosUtil::deg2rad() 2012-05-02 17:32:00 +02:00
Matteo Cypriani 90fc329f82 [Positioner] Autocalibration: refactor generate_ss() 2012-05-02 17:32:00 +02:00
Matteo Cypriani 7a631e3962 [Positioner] Add class Autocalibration
The new class Autocalibration contains the code from the former huge
function Stock::generate_reference_point(). It is refactored a bit, but
still needs work. The function Stock::generate_reference_points() stays
in the Stock class for now.
2012-05-02 17:32:00 +02:00
Matteo Cypriani d479f9d080 [Positioner] posexcept: add autocalibration_error 2012-05-02 17:32:00 +02:00
Matteo Cypriani 579adbee1c [Positioner] Point3D: angle() becomes angle_2d() 2012-05-02 17:32:00 +02:00
Matteo Cypriani 8d4fa6883d [Positioner] Point3D: add square_distance_2d() 2012-05-02 17:32:00 +02:00
Matteo Cypriani 007594683c [Positioner] Point3D: delete unused distance()
Delete unused functions distance(x,y,z) and square_distance(x,y,z).
2012-05-02 17:32:00 +02:00
Matteo Cypriani 987773a4df [Positioner] s/multilateration/trilateration/
This fixes an old, forgotten, vocabulary mistake.
2012-05-02 17:32:00 +02:00
Matteo Cypriani 153d4c0ea6 [Positioner] Add similarity method "interval2" 2012-05-02 17:32:00 +02:00
Matteo Cypriani 54a387190f [Positioner] Add Measurement::nb_in_interval()
Refactor Measurement::similarity() thanks to this new function.
2012-05-02 17:32:00 +02:00
Matteo Cypriani 6a8d8ec3be [Positioner] Add PosUtil::is_in_interval() 2012-05-02 17:32:00 +02:00
Matteo Cypriani 1704ebc6b1 [Positioner] "similarity" instead of "distance"
Standardise the use of the term "similarity" instead of
"(ss_square_)distance" in the functions' and variables' names.
2012-05-02 17:32:00 +02:00
Matteo Cypriani 596c72b7a8 [Positioner] Option ss-similarity
The option positioning.ss-similarity introduced in this commit allows to
chose the desired algorithm to compare two measurements. One can chose
between the historical mean euclidean distance algorithm and the new
algorithm using the number of values within the interval
[mean-std.dev.;mean+std.dev.].
2012-05-02 17:32:00 +02:00
Matteo Cypriani ecedf307ef [Positioner] Request: fix nb_packets's type 2012-05-02 17:32:00 +02:00
Matteo Cypriani 60626196d5 [Positioner] Option generate-single-packet-RPs
The new option positioning.generate-single-packet-reference-points
allows either to generate one single packet in each generated reference
point, or try to match the real requests by generating packets
independently.
2012-05-02 17:32:00 +02:00
Matteo Cypriani 4c5ad300c3 [Positioner] Stock::generate_RP(): fix update mobile
In generate_reference_point(), update the mobile's attributes *before*
to test if the current AP should be skipped.
2012-05-02 17:32:00 +02:00
Matteo Cypriani fb9d2d0cef [Positioner] Stock::generate_RP(): cosmetic changes 2012-05-02 17:32:00 +02:00
Matteo Cypriani 833c647220 [Positioner] Add ReferencePoint::friis_idx(AP, pkt)
This function allows to get the Friis index for a single packet in a
measurement instead of for the whole measurement.
2012-05-02 17:32:00 +02:00