Commit Graph

529 Commits

Author SHA1 Message Date
Matteo Cypriani 3c00c3bb19 [lib] Add request type "generated"
This new type of request will only be used in owlps-positioning, to
distinct the calibration requests that are issued from a real
measurement and those that are generated by the self-calibration
process.
2011-07-29 23:02:25 +02:00
Matteo Cypriani 2b12e49374 [Positioning] Fix ReferencePoint::delete_generated_requests()
Use a while loop instead of for to check the requests.
2011-07-29 23:02:25 +02:00
Matteo Cypriani 232551c150 [Positioning] ReferencePoint::delete_generated_requests() 2011-07-29 23:02:25 +02:00
Matteo Cypriani 6c48bc7e29 [Positioning] Add Stock::get_aps() 2011-07-29 23:02:25 +02:00
Matteo Cypriani d1b575c95e [Positioning] Add Stock::nb_virtual_mobiles 2011-07-29 23:02:25 +02:00
Matteo Cypriani 1abe54b7be [Positioning] Add PosUtil::int_to_mac() 2011-07-29 23:02:25 +02:00
Matteo Cypriani a2a289f651 [Positioning] Debug checks for CR deletion
Add asserts and debug messages in ReferencePoint::delete_requests() and
Stock::delete_calibration_request().
2011-07-29 23:02:14 +02:00
Matteo Cypriani 9c76d87b0c [Positioning] Add option accept-new-mobiles
The option positioning.accept-new-mobiles allows the program to add
on-line mobiles that are not declared in the mobiles' configuration
file. This was the default till now; now this option is unactivated by
default to avoid unexpected Wi-Fi devices retransmitting positioning
requests.
2011-07-25 14:18:17 +02:00
Matteo Cypriani 6b662a597a [Positioning] Add Stock::mobile_exists() 2011-07-25 14:18:17 +02:00
Matteo Cypriani 0b43e7f5fc [Positioning] Read mobiles characteristics
Add MobilesReaderCSV, that reads the known mobiles from a CSV file.
2011-07-25 14:18:17 +02:00
Matteo Cypriani 8878bb2390 [Positioning] Add Stock::nb_mobiles() 2011-07-25 14:18:17 +02:00
Matteo Cypriani b04cd1cdb8 [Positioning] Add Stock::find_create_mobile(Mobile&) 2011-07-25 14:18:17 +02:00
Matteo Cypriani d9bfd9e2c2 [Positioning] AccessPointsReaderCSV: s/ap/device/ 2011-07-25 14:18:17 +02:00
Matteo Cypriani f5a4f4fedc [Positioning] Point3D: fix angle()
Use doubles instead of floats.
Handle the cases where points are equal.
2011-07-25 14:18:16 +02:00
Matteo Cypriani 33b027d472 [Positioning] Tweak ReferencePoint::friis_indexes_for_ap() 2011-07-25 14:18:16 +02:00
Matteo Cypriani f418fc15f1 [Positioning] Add Point3D::angle() 2011-07-25 14:18:16 +02:00
Matteo Cypriani 855291b31d [Positioning] Add PosUtil::rad2deg() 2011-07-25 14:18:16 +02:00
Matteo Cypriani 948bd577a2 [Positioning] Output*: do not output empty RequestList 2011-07-25 14:18:16 +02:00
Matteo Cypriani 773fd559cd [Positioning] Add ResultList::empty() 2011-07-25 14:18:16 +02:00
Matteo Cypriani d43267fcd3 [Positioning] Positioning: catch compute exceptions
Catch the exception potentially thrown by
PositioningAlgorithm::compute().
2011-07-25 14:18:16 +02:00
Matteo Cypriani 0df91eaa94 [Positioning] Input*: skip requests without measurements 2011-07-25 14:18:16 +02:00
Matteo Cypriani 1f46075aa3 [Positioning] Add option accept-new-aps
The option positioning.accept-new-aps allows the program to add on-line
APs that are not declared in the APs' configuration file.
2011-07-25 14:18:16 +02:00
Matteo Cypriani 2b1248fbec [Positioning] Add Stock::ap_exists() 2011-07-25 14:18:16 +02:00
Matteo Cypriani 68b97451aa [Positioning] Print new created APs when verbose 2011-07-25 14:18:16 +02:00
Matteo Cypriani 37997242c5 [Positioning] Uppercase all MAC addresses on input 2011-07-25 14:18:16 +02:00
Matteo Cypriani e9e8308a9c [Positioning] PosUtil: add string functions
Add PosUtil::to_upper(string) and PosUtil::assert_uppercase(string).
2011-07-25 14:18:16 +02:00
Matteo Cypriani 05859da49b [Positioning] Reorder 2 headers in stock.hh 2011-07-25 14:18:16 +02:00
Matteo Cypriani 0491fe0a62 [Positioning] Input: del RP's requests on new CR
When a new calibration request is received, all the calibration requests
of the corresponding reference point are now cleared prior to add the
new request.
We should probably use a timeout to delete only the old calibration
requests and keep the recent ones.
2011-07-25 14:18:16 +02:00
Matteo Cypriani b8bd2acf44 [Positioning] Add option accept-new-calibration-requests
The option positioning.accept-new-calibration-requests allows the
calibration requests sent during the positioning phase to be added to
the Stock. They are added to the calibration requests read by
InputDataReader during the start-up phase.
2011-07-25 14:18:16 +02:00
Matteo Cypriani 586cfdb77e [Positioning] Stock::store_calibration_request()
InputDataReader::stock_calibration_request() becomes
Stock::store_calibration_request(), so other classes can use it.
2011-07-25 14:18:16 +02:00
Matteo Cypriani de9513e4b4 [Positioning] Add option update-ap-coordinates-online
In InputUDPSocket, update the AP's coordinates when receiving a
calibration or autocalibration request that contains the coordinates.
This is done if the option positioning.update-ap-coordinates-online is
activated.
2011-07-25 14:18:16 +02:00
Matteo Cypriani 0dd57b8ea7 [Positioning] InputUDPSocket: use AP's coordinates
Use the transmitting AP's coordinates when receiving an autocalibration
request that does not contain the coordinates.
2011-07-25 14:18:16 +02:00
Matteo Cypriani 71784342e7 [Positioning] Add Stock::ap_matrix_get_ss()
Add double Stock::ap_matrix_get_ss(transmitter, receiver).
This is the first step to handle self-calibration in owlps-positioning.

The idea is to simulates a square matrix of the listeners, with the
transmitters in one dimension and the receivers in the other dimension.
matrix[transmitter][receiver] is the signal strength received by
'receiver' from 'transmitter'.
The purpose of Stock::ap_matrix_get_ss() is precisely to access the
entry matrix[transmitter][receiver].

Note that the access is read-only, as the pseudo-matrix is (or will be)
filled by the standard mechanism of (auto)calibration requests and
measurements stored in Stock.
2011-07-25 14:18:16 +02:00
Matteo Cypriani f84276d8d7 [Positioning] ReferencePoint::average_measurements()
Add double ReferencePoint::average_measurements(string mac_transmitter),
that allows to get the average of all the Measurements sent by a given
transmitter.

Add, as protected functions, get_all_measurements(string
mac_transmitter) and get_requests(string mac_transmitter), that do the
same as get_all_measurements(void) and get_requests(void), but filtering
on the transmitter of the packets.
2011-07-25 14:18:16 +02:00
Matteo Cypriani 88aaded78c [Positioning] Add Stock::get_reference_point() 2011-07-25 14:18:16 +02:00
Matteo Cypriani a174a01e0f Rename Atheros Makefiles: specify OpenWrt version
*/Makefile_atheros become */Makefile_atheros_openwrt-8.09.
2011-07-25 13:13:21 +02:00
Matteo Cypriani f5895f23c4 [Aggregator] check_interval in ms
The check interval is now in milliseconds instead of microseconds.
2011-07-25 12:46:20 +02:00
Matteo Cypriani 1dae048f0c [lib-client] Delay in ms instead of microseconds
In owlclient_send_request(), the delay between two packets is now in
milliseconds.
Client & Listener updated to reflect the change.
2011-07-25 12:46:20 +02:00
Matteo Cypriani 69a93abf0f [lib] Throw error for non-LE, non-BE architectures 2011-07-25 12:46:20 +02:00
Matteo Cypriani f7add0d8b7 [lib-client] Fix header comment 2011-07-25 12:46:20 +02:00
Matteo Cypriani e976d80d73 [Listener] Makefiles: split OWLPSFLAGS
Split OWLPSFLAGS into several lines, in order to ease the (un)activation
of options.
2011-07-25 12:46:20 +02:00
Matteo Cypriani 051ce9147c Use -D DEBUG / NDEBUG in Makefiles
Instead of #define DEBUG, we now prefer to use either verbose levels
or, when needed, NDEBUG. Each Makefile was modified to be able to pass
-D NDEBUG to the compiler (but the corresponding lines are commented),
except in the modules where assert is never used, in which case the
Makefile passes -D DEBUG.

Long story short: to totally disable debugging code, comment-out the
"-D DEBUG" lines and uncomment the "-D NDEBUG" lines, in every Makefile.
2011-07-25 12:46:20 +02:00
Matteo Cypriani f008db0e1c [Listener] Use perror() after recvfrom() 2011-07-25 12:46:20 +02:00
Matteo Cypriani f71a56bb9a [Listener] Use verbose levels 2011-07-25 12:46:20 +02:00
Matteo Cypriani a62387e465 [Listener] Switch verbose mode to verbose level 2011-07-25 12:46:19 +02:00
Matteo Cypriani 371752ab98 Delete writeInDb
I finally resigned myself to remove this old piece of code, which once
allowed one to create a database and import OwlPS CSV files into it.
But I must not bury my head in sand: OwlPS is not "ready for the
database" :-) (actually it is, but it would take some time I don't have
to implement correctly, and is currently of little interest).
2011-07-25 12:46:19 +02:00
Matteo Cypriani 032f4b8fa0 [Positioning] Doxyfile: change project's name
Change from "OWLPS Positioning" to "OwlPS Positioning".
2011-07-25 12:46:19 +02:00
Matteo Cypriani e705801bb1 [Client] Add option -f (flood mode) 2011-07-25 12:46:19 +02:00
Matteo Cypriani f951ce95f2 [Aggregator] Use perror() after recvfrom()
Use perror() instead of fprintf() after the recvfrom() calls.
Fix the test in listen_for_aps().
2011-07-25 12:46:19 +02:00
Matteo Cypriani 0f54bd36a3 [Aggregator] Add option -q (quiet mode) 2011-07-25 12:46:15 +02:00