Wiselib
|
Module that implements GPS-free Local Coordinate System building. More...
#include <localization_gpsfree_lcs_module.h>
Inherits wiselib::LocalizationModule< OsModel_P, Radio_P, SharedData_P >.
Public Types | |
typedef OsModel_P | OsModel |
typedef Radio_P | Radio |
typedef Clock_P | Clock |
typedef Distance_P | Distance |
typedef Debug_P | Debug |
typedef SharedData_P | SharedData |
typedef LocalizationGpsFreeLcsModule < OsModel, Radio, Clock, Distance, Debug, SharedData > | self_type |
typedef LocalizationModule < OsModel, Radio, SharedData > | base_type |
typedef Radio::size_t | size_t |
typedef Radio::node_id_t | node_id_t |
typedef Radio::block_data_t | block_data_t |
typedef Clock_P::time_t | time_t |
typedef SharedData::DistanceMap | DistanceMap |
typedef SharedData::LocalCoordinateSystem | LocalCoordinateSystem |
typedef SharedData::Neighborhood::NeighborhoodIterator | NeighborhoodIterator |
typedef LocalizationGpsFreeLcsInitMessage < OsModel, Radio > | GpsFreeLcsInitMessage |
typedef LocalizationGpsFreeLcsNeighborMessage < OsModel, Radio, DistanceMap > | GpsFreeLcsNeighborMessage |
typedef SharedData::Neighborhood | Neighborhood |
Public Member Functions | |
void | rollback (void) |
void | init (Radio &radio, Clock &clock, Debug &debug, SharedData &shared_data, Distance &distance) |
construction / destruction | |
LocalizationGpsFreeLcsModule () | |
~LocalizationGpsFreeLcsModule () | |
standard methods startup/simulation steps | |
void | receive (node_id_t from, size_t len, block_data_t *data) |
Handling of GPS-free-LCS-Messages. | |
void | work (void) |
Check, whether state can be set to finished or not. | |
module status info | |
bool | finished (void) |
basic access to owner, observer, neighborhood and local coordinate system | |
void | set_shared_data (SharedData &shared_data) |
This method sets the shared data object, which can be accessed by all available modules. | |
SharedData & | shared_data (void) |
Neighborhood & | neighborhood (void) |
LocalCoordinateSystem & | local_coord_sys (void) |
Protected Member Functions | |
processing gpsfree lcs messages | |
bool | process_gpsfree_lcs_init_message (node_id_t from, size_t len, block_data_t *data) |
This method processes initial messages. | |
void | broadcast_neighborhood (void) |
This method broadcasts the neighborhood generated by the initial messages. | |
bool | process_gpsfree_lcs_neighbor_message (node_id_t from, size_t len, block_data_t *data) |
This method processes neighborhood messages. | |
work | |
void | build_lcs (void) |
Build a local coordinate system just like described in the paper. | |
initial methods | |
void | set_lcs_epsilon (double epsilon) |
Read the given parameters, which have been set via simulator commands or configuration file. |
Module that implements GPS-free Local Coordinate System building.
This module implements the algorithm to get a local coordinate system just like described in GPS-free positioning in moblie ad hoc networks by Capkun, Hamdi, Hubeaux.
At first nodes build their 2-hop neighborhood by sending an initial message, receive initial messages from neighbors and send again a message contending constructed neighborhood to surrounding nodes.
After that nodes build their local coordinate system. [...]
Comment by the author This is not a full implementation of the above mentioned paper. Up to now there are two parts missing: On the one hand (just a little thing) the computation per triangulation of unknown nodes (the stuff with the node k, which is not neighbor of p and q and should be computed by using the position of node i and two other nodes for which the positions are already obtained) has not be done. On the other hand (the big part) the whole stuff with the Location Reference Group is still missing.
I think, that these parts are useless unless the algorithm has been optimized in two ways. First the nearly unrelevant one: By choosing nodes p and q to maximize the number of regular nodes in the LVS (see LocalizationGpsFreeLcsModule<OsModel_P, Radio_P, Clock_P, Distance_P, Debug_P, SharedData_P>::build_lcs()), the "up-to-now-solution" is a very unfortunaletly one, because the computation overhead is really big. Second (in my opinion the main argument against using this algorithm unless there appears a better solution) there is a problem with the triangulisation in the paper (see formula (3), deciding, on which side of the x-axis a node is located) and errors in distance measurement. The author mentioned, that the two angles can not be equal in practice and that some differences should be tolerated. Unfortunaletly I hadn't found any epsilon leading to satisfactorily solutions. Maybe it is an approach to look at the papers of K. Langendoen and D. Niculesco and their handling of the similar "euclidean-problem".
typedef LocalizationModule<OsModel, Radio, SharedData> wiselib::LocalizationGpsFreeLcsModule< OsModel_P, Radio_P, Clock_P, Distance_P, Debug_P, SharedData_P >::base_type |
typedef Radio::block_data_t wiselib::LocalizationGpsFreeLcsModule< OsModel_P, Radio_P, Clock_P, Distance_P, Debug_P, SharedData_P >::block_data_t |
Reimplemented from wiselib::LocalizationModule< OsModel_P, Radio_P, SharedData_P >.
typedef Clock_P wiselib::LocalizationGpsFreeLcsModule< OsModel_P, Radio_P, Clock_P, Distance_P, Debug_P, SharedData_P >::Clock |
typedef Debug_P wiselib::LocalizationGpsFreeLcsModule< OsModel_P, Radio_P, Clock_P, Distance_P, Debug_P, SharedData_P >::Debug |
typedef Distance_P wiselib::LocalizationGpsFreeLcsModule< OsModel_P, Radio_P, Clock_P, Distance_P, Debug_P, SharedData_P >::Distance |
typedef SharedData::DistanceMap wiselib::LocalizationGpsFreeLcsModule< OsModel_P, Radio_P, Clock_P, Distance_P, Debug_P, SharedData_P >::DistanceMap |
typedef LocalizationGpsFreeLcsInitMessage<OsModel, Radio> wiselib::LocalizationGpsFreeLcsModule< OsModel_P, Radio_P, Clock_P, Distance_P, Debug_P, SharedData_P >::GpsFreeLcsInitMessage |
typedef LocalizationGpsFreeLcsNeighborMessage<OsModel, Radio, DistanceMap> wiselib::LocalizationGpsFreeLcsModule< OsModel_P, Radio_P, Clock_P, Distance_P, Debug_P, SharedData_P >::GpsFreeLcsNeighborMessage |
typedef SharedData::LocalCoordinateSystem wiselib::LocalizationGpsFreeLcsModule< OsModel_P, Radio_P, Clock_P, Distance_P, Debug_P, SharedData_P >::LocalCoordinateSystem |
Reimplemented from wiselib::LocalizationModule< OsModel_P, Radio_P, SharedData_P >.
typedef SharedData::Neighborhood wiselib::LocalizationModule< OsModel_P, Radio_P, SharedData_P >::Neighborhood [inherited] |
Reimplemented in wiselib::LocalizationLaterationModule< OsModel_P, Radio_P, Debug_P, SharedData_P, Arithmatic_P >, wiselib::LocalizationMinMaxModule< OsModel_P, Radio_P, Debug_P, SharedData_P, Arithmatic_P >, and wiselib::LocalizationIterLaterationModule< OsModel_P, Radio_P, Distance_P, Debug_P, SharedData_P >.
typedef SharedData::Neighborhood::NeighborhoodIterator wiselib::LocalizationGpsFreeLcsModule< OsModel_P, Radio_P, Clock_P, Distance_P, Debug_P, SharedData_P >::NeighborhoodIterator |
typedef Radio::node_id_t wiselib::LocalizationGpsFreeLcsModule< OsModel_P, Radio_P, Clock_P, Distance_P, Debug_P, SharedData_P >::node_id_t |
Reimplemented from wiselib::LocalizationModule< OsModel_P, Radio_P, SharedData_P >.
typedef OsModel_P wiselib::LocalizationGpsFreeLcsModule< OsModel_P, Radio_P, Clock_P, Distance_P, Debug_P, SharedData_P >::OsModel |
Reimplemented from wiselib::LocalizationModule< OsModel_P, Radio_P, SharedData_P >.
typedef Radio_P wiselib::LocalizationGpsFreeLcsModule< OsModel_P, Radio_P, Clock_P, Distance_P, Debug_P, SharedData_P >::Radio |
Reimplemented from wiselib::LocalizationModule< OsModel_P, Radio_P, SharedData_P >.
typedef LocalizationGpsFreeLcsModule<OsModel, Radio, Clock, Distance, Debug, SharedData> wiselib::LocalizationGpsFreeLcsModule< OsModel_P, Radio_P, Clock_P, Distance_P, Debug_P, SharedData_P >::self_type |
Reimplemented from wiselib::LocalizationModule< OsModel_P, Radio_P, SharedData_P >.
typedef SharedData_P wiselib::LocalizationGpsFreeLcsModule< OsModel_P, Radio_P, Clock_P, Distance_P, Debug_P, SharedData_P >::SharedData |
Reimplemented from wiselib::LocalizationModule< OsModel_P, Radio_P, SharedData_P >.
typedef Radio::size_t wiselib::LocalizationGpsFreeLcsModule< OsModel_P, Radio_P, Clock_P, Distance_P, Debug_P, SharedData_P >::size_t |
Reimplemented from wiselib::LocalizationModule< OsModel_P, Radio_P, SharedData_P >.
typedef Clock_P::time_t wiselib::LocalizationGpsFreeLcsModule< OsModel_P, Radio_P, Clock_P, Distance_P, Debug_P, SharedData_P >::time_t |
wiselib::LocalizationGpsFreeLcsModule< OsModel_P, Radio_P, Clock_P, Distance_P, Debug_P, SharedData_P >::LocalizationGpsFreeLcsModule | ( | ) |
wiselib::LocalizationGpsFreeLcsModule< OsModel_P, Radio_P, Clock_P, Distance_P, Debug_P, SharedData_P >::~LocalizationGpsFreeLcsModule | ( | ) |
void wiselib::LocalizationGpsFreeLcsModule< OsModel_P, Radio_P, Clock_P, Distance_P, Debug_P, SharedData_P >::broadcast_neighborhood | ( | void | ) | [protected] |
This method broadcasts the neighborhood generated by the initial messages.
void wiselib::LocalizationGpsFreeLcsModule< OsModel_P, Radio_P, Clock_P, Distance_P, Debug_P, SharedData_P >::build_lcs | ( | void | ) | [protected] |
Build a local coordinate system just like described in the paper.
bool wiselib::LocalizationGpsFreeLcsModule< OsModel_P, Radio_P, Clock_P, Distance_P, Debug_P, SharedData_P >::finished | ( | void | ) |
true
, if module is finished. false
otherwise void wiselib::LocalizationGpsFreeLcsModule< OsModel_P, Radio_P, Clock_P, Distance_P, Debug_P, SharedData_P >::init | ( | Radio & | radio, |
Clock & | clock, | ||
Debug & | debug, | ||
SharedData & | shared_data, | ||
Distance & | distance | ||
) | [inline] |
LocalCoordinateSystem& wiselib::LocalizationModule< OsModel_P, Radio_P, SharedData_P >::local_coord_sys | ( | void | ) | [inline, inherited] |
Neighborhood& wiselib::LocalizationModule< OsModel_P, Radio_P, SharedData_P >::neighborhood | ( | void | ) | [inline, inherited] |
bool wiselib::LocalizationGpsFreeLcsModule< OsModel_P, Radio_P, Clock_P, Distance_P, Debug_P, SharedData_P >::process_gpsfree_lcs_init_message | ( | node_id_t | from, |
size_t | len, | ||
block_data_t * | data | ||
) | [protected] |
This method processes initial messages.
Source of message is added to neighborhood.
bool wiselib::LocalizationGpsFreeLcsModule< OsModel_P, Radio_P, Clock_P, Distance_P, Debug_P, SharedData_P >::process_gpsfree_lcs_neighbor_message | ( | node_id_t | from, |
size_t | len, | ||
block_data_t * | data | ||
) | [protected] |
This method processes neighborhood messages.
The neighbors of message source are added to neighborhood.
void wiselib::LocalizationGpsFreeLcsModule< OsModel_P, Radio_P, Clock_P, Distance_P, Debug_P, SharedData_P >::receive | ( | node_id_t | from, |
size_t | len, | ||
block_data_t * | data | ||
) |
Handling of GPS-free-LCS-Messages.
void wiselib::LocalizationGpsFreeLcsModule< OsModel_P, Radio_P, Clock_P, Distance_P, Debug_P, SharedData_P >::rollback | ( | void | ) |
void wiselib::LocalizationGpsFreeLcsModule< OsModel_P, Radio_P, Clock_P, Distance_P, Debug_P, SharedData_P >::set_lcs_epsilon | ( | double | epsilon | ) | [inline, protected] |
Read the given parameters, which have been set via simulator commands or configuration file.
void wiselib::LocalizationModule< OsModel_P, Radio_P, SharedData_P >::set_shared_data | ( | SharedData & | shared_data | ) | [inline, inherited] |
This method sets the shared data object, which can be accessed by all available modules.
LocalizationSharedData | Shared data between all modules. |
SharedData& wiselib::LocalizationModule< OsModel_P, Radio_P, SharedData_P >::shared_data | ( | void | ) | [inline, inherited] |
void wiselib::LocalizationGpsFreeLcsModule< OsModel_P, Radio_P, Clock_P, Distance_P, Debug_P, SharedData_P >::work | ( | void | ) |
Check, whether state can be set to finished or not.
Moreover, send initial messages and build local coordinate system.