Move code related to sending requests into the new library
libowlps-client. This library will also be used by the listener to send
autocalibration requests.
Currently, it is statically linked because a dynamic linking should be
useless (because client and listener aren't normally on the same
machine).
Symbolic link libowlps.so is required to dynamically compile, if
"-lowlps" is used instead of "../../libowlps/libowlps.so.1.0" (which is
now the case in the listener's makefiles, and will be soon for the
others too).
Fix Makefiles to use -D to activate the use of pthreads and libconfuse.
Comment out #defines in owlps-listener.h.
Fix lib order (needed for the static target).
Makefile_atheros:
- Add target 'static' to compile fully statically. (Note: does not
work in the OpenWRT 8.09 cross-compilation suite, since it does not
provide libiw.a)
- Add target 'semistatic', that compiles with static libowlps and
dynamic libiw and libpcap.
Fix (mostly) endianess issues:
- le32toh() is defined only in glibc >= 2.9, so owlps-listener did not
compile with older glibc or other libc (such as uClibc that we use to
cross-compile to OpenWRT).
We now define le32toh() manually, if needed.
- Additionally, the PLATFORM_ATHEROS define is removed. We should now
test the value of __BYTE_ORDER if needed.
posexcept: Add exception bad_channel.
PosUtil::wifi_channel_to_hz() now throw bad_channel if the argument is
not a valid channel nor a 802.11 frequency value in Hz.
CSVFileReader: Add function read_point3d().
Point3D: Add function set_coordinates(float[3]).
posexcept: Rename malformed_topology -> malformed_input_data.
TopologyReaderCSV:
- Use CSVFileReader::read_point3d() instead of the custom read_point().
- Rename occurrences of malformed_topology.
Add class FRBHMBasic, which derives FBCM and RADAR.
ReferencePoint: Add functions friis_index_for_ap() and
friis_indexes_for_ap() (that takes code away from
Stock::update_all_friis_indexes()).
CartographyAlgorithm and MultilaterationAlgorithm now extend
PositioningAlgorithm with "public virtual" instead of "public".
CartographyAlgorithm: select_point() must now return a ReferencePoint.
MultilaterationMethod: Add pure virtual function multilaterate_2d().
MinMax: Add function multilaterate_2d().
MultilaterationAlgorithm: Add function multilaterate_2d() to map
MultilaterationMethod::multilaterate_2d().
Makefile: Fix some dependencies.
This constant will be used instead of a constant value "300000000", with
a more accurate value.
Make MultilaterationAlgorithm use it, and fix the unit test.
Move the constant term computation from
InterlinkNetworks::estimate_distance() into the new function
MultilaterationAlgorithm::make_constant_term(). This will avoid
duplicate this code into the future FBCM::estimate_distance().
Add classes RADAR and CartographyAlgorithm, which is the super-class of
SS map based algorithms.
Measurement: Add functions:
- add_ss_list(), to add several SS in one operation.
- merge(), to merge a Measurement into another.
- ss_square_distance() (from old commented code), to compute the
distance to a SS value or another Measurement.
posexcept: Add exception cannot_merge, used by Measurement::merge().
ReferencePoint:
- Add ss_square_distance() and functions used by it:
complete_with_dummy_measurements(), compute_ss_square_distance() and
get_all_measurements_sorted(). Use of sorted values (map instead of
unordered_map) is useless, should be fixed soon.
- Delete old commented code: getPowerForAp(), addMeasurement() and old
getSsSquareDistance().
Stock: Add function closest_reference_point().
CalibrationRequest::operator==() was not marked as const, which caused
trouble with unordered_set.
This commit corrects also CalibrationRequest::operator!=(),
Result::operator==() and Result::operator!=().
For object types that we needed to store into an unordered_set, we used
string-based hashes, defined into stock.cc. We now define new hash
functions as friend of target classes, based on boost::hash_combine.
The following classes now have a hash_value() function:
- Request
- CalibrationRequest
- Direction
- Timestamp
- Point3D
- ReferencePoint