Wiselib
Classes | Public Types
wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P > Class Template Reference

Local Coordinate System. More...

#include <localization_local_coordinate_system.h>

List of all members.

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.

Detailed Description

template<typename OsModel_P, typename node_id_t_P, typename Neighborhood_P, typename LocationMap_P, typename Arithmatic_P>
class wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >

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.


Member Typedef Documentation

template<typename OsModel_P, typename node_id_t_P, typename Neighborhood_P, typename LocationMap_P, typename Arithmatic_P>
typedef Arithmatic_P wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::Arithmatic
template<typename OsModel_P, typename node_id_t_P, typename Neighborhood_P, typename LocationMap_P, typename Arithmatic_P>
typedef LocationMap_P wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::LocationMap
template<typename OsModel_P, typename node_id_t_P, typename Neighborhood_P, typename LocationMap_P, typename Arithmatic_P>
typedef LocationMap::iterator wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::LocationMapIterator
template<typename OsModel_P, typename node_id_t_P, typename Neighborhood_P, typename LocationMap_P, typename Arithmatic_P>
typedef Neighborhood_P wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::Neighborhood
template<typename OsModel_P, typename node_id_t_P, typename Neighborhood_P, typename LocationMap_P, typename Arithmatic_P>
typedef node_id_t_P wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::node_id_t
template<typename OsModel_P, typename node_id_t_P, typename Neighborhood_P, typename LocationMap_P, typename Arithmatic_P>
typedef OsModel_P wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::OsModel
template<typename OsModel_P, typename node_id_t_P, typename Neighborhood_P, typename LocationMap_P, typename Arithmatic_P>
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

Constructor & Destructor Documentation

template<typename OsModel_P , typename node_id_t_P , typename Neighborhood_P , typename LocationMap_P , typename Arithmatic_P >
wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::LocalizationLocalCoordinateSystem ( )
template<typename OsModel_P, typename node_id_t_P, typename Neighborhood_P, typename LocationMap_P, typename Arithmatic_P>
wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::LocalizationLocalCoordinateSystem ( const self_type )
template<typename OsModel_P , typename node_id_t_P , typename Neighborhood_P , typename LocationMap_P , typename Arithmatic_P >
wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::~LocalizationLocalCoordinateSystem ( )

Member Function Documentation

template<typename OsModel_P , typename node_id_t_P , typename Neighborhood_P , typename LocationMap_P , typename Arithmatic_P >
void wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::clear ( void  )

Delete all internal data.

template<typename OsModel_P, typename node_id_t_P, typename Neighborhood_P, typename LocationMap_P, typename Arithmatic_P>
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.

Parameters:
LocalizationLocalCoordinateSystemLCS
Returns:
true, if computation succeeds.
template<typename OsModel_P , typename node_id_t_P , typename Neighborhood_P , typename LocationMap_P , typename Arithmatic_P >
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.

Returns:
true, if computation succeeds.
template<typename OsModel_P , typename node_id_t_P , typename Neighborhood_P , typename LocationMap_P , typename Arithmatic_P >
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  )
Returns:
Used epsilon
template<typename OsModel_P , typename node_id_t_P , typename Neighborhood_P , typename LocationMap_P , typename Arithmatic_P >
bool wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::has_neighbor ( node_id_t  node)
Parameters:
Nodeneighbor to search for
Returns:
if neighbor exists
template<typename OsModel_P , typename node_id_t_P , typename Neighborhood_P , typename LocationMap_P , typename Arithmatic_P >
bool wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::is_valid ( void  )
Returns:
/c true, if LCS is valid.
template<typename OsModel_P , typename node_id_t_P , typename Neighborhood_P , typename LocationMap_P , typename Arithmatic_P >
void wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::mirror_x ( void  )

Mirror coordinate system on x-axis.

template<typename OsModel_P , typename node_id_t_P , typename Neighborhood_P , typename LocationMap_P , typename Arithmatic_P >
void wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::mirror_y ( void  )

Mirror coordinate system on y-axis.

template<typename OsModel_P , typename node_id_t_P , typename Neighborhood_P , typename LocationMap_P , typename Arithmatic_P >
const Vec< Arithmatic_P > & wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::node_position ( node_id_t  node)
Returns:
Position of given node.
template<typename OsModel_P , typename node_id_t_P , typename Neighborhood_P , typename LocationMap_P , typename Arithmatic_P >
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.

template<typename OsModel_P , typename node_id_t_P , typename Neighborhood_P , typename LocationMap_P , typename Arithmatic_P >
void wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::rotate ( Arithmatic  angle)

Rotate all coordinates by given angle.

template<typename OsModel_P , typename node_id_t_P , typename Neighborhood_P , typename LocationMap_P , typename Arithmatic_P >
void wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::set_epsilon ( Arithmatic  epsilon)

Set epsilon.

template<typename OsModel_P , typename node_id_t_P , typename Neighborhood_P , typename LocationMap_P , typename Arithmatic_P>
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.

template<typename OsModel_P , typename node_id_t_P , typename Neighborhood_P , typename LocationMap_P , typename Arithmatic_P >
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.

template<typename OsModel_P , typename node_id_t_P , typename Neighborhood_P , typename LocationMap_P , typename Arithmatic_P >
int wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::size ( void  )
Returns:
number of nodes of current LCS (include the basic nodes p and q)
template<typename OsModel_P , typename node_id_t_P , typename Neighborhood_P , typename LocationMap_P , typename Arithmatic_P >
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  )
Returns:
Src-Node.
template<typename OsModel_P , typename node_id_t_P , typename Neighborhood_P , typename LocationMap_P , typename Arithmatic_P >
Vec< Arithmatic_P > & wiselib::LocalizationLocalCoordinateSystem< OsModel_P, node_id_t_P, Neighborhood_P, LocationMap_P, Arithmatic_P >::src_position ( void  )
Returns:
Position of src node.
template<typename OsModel_P , typename node_id_t_P , typename Neighborhood_P , typename LocationMap_P , typename Arithmatic_P >
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 
)
template<typename OsModel_P , typename node_id_t_P , typename Neighborhood_P , typename LocationMap_P , typename Arithmatic_P >
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.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines