Wiselib
|
Local Coordinate System. More...
#include <localization_local_coordinate_system.h>
Classes | |
struct | CorrectionData |
Container for data of correction of LCS. More... | |
Public Types | |
typedef OsModel_P | OsModel |
typedef node_id_t_P | node_id_t |
typedef Neighborhood_P | Neighborhood |
typedef LocationMap_P | LocationMap |
typedef Arithmatic_P | Arithmatic |
typedef LocationMap::iterator | LocationMapIterator |
typedef LocalizationLocalCoordinateSystem < OsModel, node_id_t, Neighborhood, LocationMap, Arithmatic > | self_type |
Public Member Functions | |
construction / destruction | |
LocalizationLocalCoordinateSystem () | |
LocalizationLocalCoordinateSystem (const self_type &) | |
~LocalizationLocalCoordinateSystem () | |
nodes | |
void | update_basic_nodes (node_id_t, node_id_t, Neighborhood &) |
void | update_node (node_id_t) |
Add a node to the current LCS, if there can be a position computed. | |
void | set_src_node (node_id_t) |
Set src position and adapt all positions of neighbors in LCS. | |
void | set_position (Vec< Arithmatic_P > &) |
Set src position and adapt all positions of neighbors in LCS. | |
information | |
Arithmatic | epsilon (void) |
void | set_epsilon (Arithmatic) |
Set epsilon. | |
bool | is_valid (void) |
int | size (void) |
node_id_t | src_node (void) |
bool | has_neighbor (node_id_t) |
const Vec< Arithmatic_P > & | node_position (node_id_t) |
Vec< Arithmatic_P > & | src_position (void) |
special methods on LCS | |
void | perform_correction (CorrectionData &) |
Perform the correction of LCS based on given CorrectionData. | |
void | rotate (Arithmatic) |
Rotate all coordinates by given angle. | |
void | mirror_x (void) |
Mirror coordinate system on x-axis. | |
void | mirror_y (void) |
Mirror coordinate system on y-axis. | |
bool | correct_lcs (self_type &, CorrectionData &) |
Correct LCS in respect to the given one. | |
bool | correct_lcs_to_real_ncs (CorrectionData &) |
Correct LCS to the direction of the real global coordinate system. | |
internal methods | |
void | clear (void) |
Delete all internal data. |
Local Coordinate System.
Class representing a single Local Coordinate System This class represents a single LCS such as described in the paper by Capkun, Hamdi and Hubaux, GPS-free positioning in mobile ad-hoc networks.
typedef Arithmatic_P wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::Arithmatic |
typedef LocationMap_P wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::LocationMap |
typedef LocationMap::iterator wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::LocationMapIterator |
typedef Neighborhood_P wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::Neighborhood |
typedef node_id_t_P wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::node_id_t |
typedef OsModel_P wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::OsModel |
typedef LocalizationLocalCoordinateSystem<OsModel, node_id_t, Neighborhood, LocationMap, Arithmatic> wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::self_type |
wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::LocalizationLocalCoordinateSystem | ( | ) |
wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::LocalizationLocalCoordinateSystem | ( | const self_type & | ) |
wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::~LocalizationLocalCoordinateSystem | ( | ) |
void wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::clear | ( | void | ) |
Delete all internal data.
bool wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::correct_lcs | ( | self_type & | , |
CorrectionData & | |||
) |
Correct LCS in respect to the given one.
At first it is turned by a computed correction angle and then, if necessary, mirrored by x- and/or y-axis.
LocalizationLocalCoordinateSystem | LCS |
true
, if computation succeeds. bool wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::correct_lcs_to_real_ncs | ( | CorrectionData & | cd | ) |
Correct LCS to the direction of the real global coordinate system.
Therefor the real positions of self and the basic nodes p and q are taken.
true
, if computation succeeds. LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::Arithmatic wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::epsilon | ( | void | ) |
bool wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::has_neighbor | ( | node_id_t | node | ) |
Node | neighbor to search for |
bool wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::is_valid | ( | void | ) |
void wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::mirror_x | ( | void | ) |
Mirror coordinate system on x-axis.
void wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::mirror_y | ( | void | ) |
Mirror coordinate system on y-axis.
const Vec< Arithmatic_P > & wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::node_position | ( | node_id_t | node | ) |
void wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::perform_correction | ( | CorrectionData & | cd | ) |
Perform the correction of LCS based on given CorrectionData.
void wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::rotate | ( | Arithmatic | angle | ) |
Rotate all coordinates by given angle.
void wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::set_epsilon | ( | Arithmatic | epsilon | ) |
Set epsilon.
void wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::set_position | ( | Vec< Arithmatic_P > & | new_src_pos | ) |
Set src position and adapt all positions of neighbors in LCS.
void wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::set_src_node | ( | node_id_t | src_node | ) |
Set src position and adapt all positions of neighbors in LCS.
int wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::size | ( | void | ) |
LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::node_id_t wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::src_node | ( | void | ) |
Vec< Arithmatic_P > & wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::src_position | ( | void | ) |
void wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::update_basic_nodes | ( | node_id_t | p, |
node_id_t | q, | ||
Neighborhood & | nbrh | ||
) |
void wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::update_node | ( | node_id_t | j | ) |
Add a node to the current LCS, if there can be a position computed.