Commit Graph

212 Commits

Author SHA1 Message Date
Matteo Cypriani 243dc321b9 [Positioner] explicit ReferencePoint(Point3D&)
Make ReferencePoint's Point3D copy constructor explicit. This implied
the following changes:

* Stock::get_reference_point(ReferencePoint&) becomes
  get_reference_point(Point3D&). Reference points were always
  retrieved by their coordinates only in the Stock anyway.

* Stock::find_create_reference_point(Point3D&) was added, since it can
  have a different outcome than its (ReferencePoint&) counterpart.

* The unit tests for Stock were improved.
2016-11-04 22:30:21 -04:00
Matteo Cypriani c0db11a890 [Positioner] More explicit constructors 2016-11-04 11:11:28 -04:00
Matteo Cypriani 6c17646cc3 [Positioner] Use explicit constructors
Wherever it's possible without further code change, mark one-argument
constructors as explicit.
2016-11-04 11:11:06 -04:00
Matteo Cypriani dce4416bc6 Fix missing/wrong includes for BSD
Fix a few missing includes that prevented building on BSD systems.

* Client: the proper way to get MAXHOSTNAMELEN is from <sys/param.h>,
  not from <rpc/types.h>.

* Positioner/Direction: std::hash is declared in <functional>.

* Positioner/OutputNetworkSocket: get struct sockaddr from
  <sys/socket.h>, not from <netinet/in.h>.
2016-11-03 22:08:06 -04:00
Matteo Cypriani 41640da203 [Positioner] Mobile: fix copy constructor segfault 2016-11-03 22:08:06 -04:00
Matteo Cypriani ecb9a689b5 [Positioner] Mobile: fix operator=() & operator==() 2016-11-03 22:08:06 -04:00
Matteo Cypriani df0c08c271 [Positioner] Add missing ResultList::operator!=() 2016-11-03 22:08:01 -04:00
Matteo Cypriani 16d4422a2b [Positionner] tests: improve Mobile tests 2016-11-03 22:06:18 -04:00
Matteo Cypriani a77ee05239 [Positioner] Point3D: add missing <vector> include 2016-11-03 22:06:17 -04:00
Matteo Cypriani 759db45a50 A few old cosmetic changes 2016-11-03 22:00:33 -04:00
Matteo Cypriani bc6ec14fa8 Update COPYRIGHT.t2t URL 2016-11-03 22:00:33 -04:00
Matteo Cypriani 7d84e7c957 [doc] positionerd: add filter options
Also add default value explanation in owlps-positioner.conf.
2014-10-31 11:36:34 -04:00
Matteo Cypriani e4b8e7239b Update Doxygen files (Doxyfile) to 1.8.8 2014-10-31 11:18:15 -04:00
Matteo Cypriani a56a8d3d5d [Positioner] New option filter.max-speed-cp
The new option positioning.filter.max-speed-cp allows to set an
alternative maximum speed when the mobile is found to be within
cp-reset-distance, instead of completely disabling the filter.
2014-05-28 17:01:13 -04:00
Matteo Cypriani a1c8e0a093 [Positioner] New option filter.cp-reset-distance
The new option positioning.filter.cp-reset-distance allows to disable
the filter when the unfiltered location of the mobile terminal is found
to be close enough to a capture point.
2014-05-28 17:01:12 -04:00
Matteo Cypriani 36cf7c13cb [Positioner] Add Stock::distance_from_closest_cp() 2014-05-28 17:01:12 -04:00
Matteo Cypriani 9d3c079b45 [Positioner] sqrtf() instead of sqrt() with float
Use sqrtf() instead of sqrt() when returning a float.
2014-05-28 17:01:12 -04:00
Matteo Cypriani 7e3b41a46f [Positioner] Positioning::filter() (refactoring)
Refactor the filtering code into a separate function,
Positioning::filter().
2014-05-28 17:01:12 -04:00
Matteo Cypriani f35215388b [Positioner] Use nullptr instead of NULL 2014-05-28 17:01:12 -04:00
Matteo Cypriani 92db007d6b [Positioner] Test pointers as booleans 2014-05-28 17:01:12 -04:00
Matteo Cypriani ec8c1244cd [Positioner] Eliminate a couple of C-style casts 2014-05-28 17:01:12 -04:00
Matteo Cypriani f06c866f8f [Positioner] Add basic filtering
The new configuration option positioning.filter.max-speed allows to
specify the maximum speed at which the mobile terminals can travel; the
distance between two results for a given mobile will be limited to the
distance that it could have travelled, according to the two requests'
timestamps.
2014-05-28 17:01:12 -04:00
Matteo Cypriani e8f3479cdd [Positioner] Add Mobile::last_request
The last request transmitted by (received from) a mobile is now stored
along with last_results instead of relying on last_results.request which
is not guaranteed to be a valid pointer.
2014-05-13 16:41:51 -04:00
Matteo Cypriani 7b0aacd212 [Positioner] Add ResultList::set_request()
It is now possible to update the Request in a ResultList.
2014-05-13 16:41:51 -04:00
Matteo Cypriani f38527cd93 [Positioner] Add Result::set_position() 2014-05-12 19:41:38 -04:00
Matteo Cypriani 1a40fe3366 [Positioner] Point3D: new interpolation function
Add Point3D::interpolate(point, speed, duration), that returns a single
interpolated point computed according to speed and duration of the
mobile's movement.
2014-05-12 19:15:34 -04:00
Matteo Cypriani 52940bcfc3 [Positioner] Add ResultList::get_result_for_algo() 2014-05-12 14:58:59 -04:00
Matteo Cypriani feb5a715fa [Positioner] Add Mobile::last_results
Allow to store the last results for each algorithm in a Mobile.
2014-05-12 12:30:30 -04:00
Matteo Cypriani ebeef80bac [Positioner] cfg: warn about CPs in mobiles.csv 2014-05-05 13:04:47 -04:00
Matteo Cypriani 9c83ae3593 [Positioner] using instead of typedef
Declare type aliases with "using" instead of "typedef".
2014-02-25 18:11:59 -05:00
Matteo Cypriani 5ddcdeed2f [Positioner] Fix two catches (catch by reference) 2014-02-18 11:47:58 -05:00
Matteo Cypriani 4d78da4721 Doc and comments: some typos & small additions 2014-02-18 10:22:35 -05:00
Matteo Cypriani 0c79e230b9 [Positioner] Rework Building::add_area()
Don't take a pointer reference as argument, throw an exception instead
of deleting the area, clarify comments.
2013-10-02 17:34:00 -04:00
Matteo Cypriani 939ef17d6a [Positioner] posexcept: add element_already_exists 2013-10-02 17:33:02 -04:00
Matteo Cypriani 5520541217 [Positioner] Make Building::areas const 2013-10-02 17:31:05 -04:00
Matteo Cypriani ea01f09b5e [Positioner] Use auto for iterators
Use the 'auto' keyword instead of declaring explicitly an iterator type,
where possible.
2013-10-02 16:23:34 -04:00
Matteo Cypriani 17dd3ee6bf [Positioner] Don't pass primitive types const refs
Quit using constant references function arguments  or return values for
primitive types.
2013-10-02 16:12:47 -04:00
Matteo Cypriani a495d51f02 [Positioner] Work on const function arguments
The function arguments were reviewed to add missing 'const' keywords,
and some classes were modified more deeply to make some pointer class
variables constant.
2013-10-02 16:12:47 -04:00
Matteo Cypriani e5883d99d5 Finish supporting getaddrinfo()
- For static buffers, use a size suited for host names and not only IP
  addresses.
- Change variable names.
- Adapt usage messages and documentation.
2013-09-23 17:03:51 -04:00
Matteo Cypriani 75e04cfc17 Quit handling useless network client structures
It is useless to handle a client structure on recvfrom() or accept()
when nothing is done with this information.
Changed in Aggregator, Listener, Positioner and UDP-to-HTTP.
2013-09-23 17:03:50 -04:00
Matteo Cypriani 25cc1ee67a [lib] getaddrinfo() in create_udp_trx_socket()
Use getaddrinfo() to resolve names in owl_create_udp_trx_socket(). The
client_description parameter has been removed from the function's
synopsis.
2013-09-23 17:03:50 -04:00
Matteo Cypriani 4dffac8216 [Positioner] CSVStringReader: remove useless init
Remove useless initialisation in CSVStringReader::set_str().
2013-07-25 18:31:30 -04:00
Matteo Cypriani 1c34eaee1e [Positioner] Add AutocalibrationLine
New autocalibration technique to generate points in line (use case:
underground tunnels). The handling of the
positioning.generate-reference-points has changed to be able to use
several autocalibration methods simultaneously.
2013-07-19 11:05:02 -04:00
Matteo Cypriani b100513265 Update .gitignore
Add a few more patterns to .gitignore.
Delete owlps-positioner/.gitignore, now useless thanks to CMake's
out-of-tree compliation.
2013-07-19 11:05:02 -04:00
Matteo Cypriani e7e4991000 [Positioner] AutocalibrationMesh: use 128 as error
Use 128 instead of 1 as error code in
AutocalibrationMesh::compute_multi_packet_ss(), since small positive
values can sometimes occur.

Some minor other cosmetics changes.
2013-07-19 11:05:02 -04:00
Matteo Cypriani 652ed7b706 [Positioner] is_cp_coordinates(): return pointer
Stock::is_cp_coordinates() now returns a pointer to the CP if found, or
NULL if not found.
2013-07-19 11:05:01 -04:00
Matteo Cypriani 2ac9cc2c1d [Positioner] Add AutocalibrationMesh (refactored)
Refactor pieces of Autocalibration into the new class
AutocalibrationMesh, in order to allow the addition of new
autocalibration sub-classes.
2013-07-19 11:05:01 -04:00
Matteo Cypriani b436526d40 [Positioner] Timestamp: print ns on 9 digits 2013-07-17 18:09:15 -04:00
Matteo Cypriani 10a1cfe1ca [Positioner] EvAAL: current format is 2012
The code for the EvAAL output was slightly updated in 2012 for the 2nd
contest. Although OwlPS doesn't handle sub-areas of interest, it was
indeed compatible with the 2012 evaluation system.
2013-07-17 18:09:15 -04:00
Matteo Cypriani a2ce042e48 [Positioner] Add Point3D::interpolate()
This new function allows to compute intermediate, interpolated points
between two points. It will be used to generate reference points in a
line between two points.
Sadly, OwlPS Positioner gets a new dependency on libclaw_tween.
2013-07-17 18:09:15 -04:00