[Positioning] Add Stock::is_ap_coordinate()

This commit is contained in:
Matteo Cypriani 2011-07-22 12:04:58 +02:00
parent d03d240568
commit a801eb84d1
2 changed files with 19 additions and 0 deletions

View File

@ -300,6 +300,21 @@ double Stock::ap_matrix_get_ss(const std::string &mac_transmitter,
}
/**
* @returns \em true if \em coord are the coordinates of an existing
* AP, \em false if not.
*/
bool Stock::is_ap_coordinate(const Point3D &coord)
{
for (unordered_map<string, AccessPoint>::const_iterator ap =
aps.begin() ; ap != aps.end() ; ++ap)
if (ap->second.get_coordinates() == coord)
return true ;
return false ;
}
/* *** ReferencePoint operations *** */

View File

@ -108,8 +108,12 @@ public:
static AccessPoint& getw_ap(const std::string &mac) ;
/// Updates the friis indexes of all the APs
static void update_all_friis_indexes(void) ;
/// \brief Returns the signal strenth received by an AP mac_receiver
/// from an AP mac_transmitter
static double ap_matrix_get_ss(const std::string &mac_transmitter,
const std::string &mac_receiver) ;
/// Checks if a Point3D is the coordinate of an existing AP
static bool is_ap_coordinate(const Point3D &coord) ;
//@}
/** @name ReferencePoint operations */