owlps/owlps-positioning/src/posutil.hh

35 lines
1.0 KiB
C++
Raw Normal View History

#ifndef _OWLPS_POSITIONING_POSUTIL_HH_
#define _OWLPS_POSITIONING_POSUTIL_HH_
class Measurement ;
#include <boost/tr1/unordered_map.hpp>
/// Utilitary class
class PosUtil
{
public:
/// The speed of light, in m/s
static const unsigned long LIGHT_SPEED = 299792458 ;
/** @name Measurements */
//@{
/// Mutually completes two Measurement lists with missing APs
static void complete_with_dummy_measurements(
std::tr1::unordered_map<std::string, Measurement> &measurements1,
std::tr1::unordered_map<std::string, Measurement> &measurements2) ;
/// Computes the distance between two Measurement lists
static float ss_square_distance(
std::tr1::unordered_map<std::string, Measurement> &measurements1,
std::tr1::unordered_map<std::string, Measurement> &measurements2) ;
//@}
/** @name Wi-Fi */
//@{
/// Converts a Wi-Fi channel to the corresponding frequency in Hz
static unsigned long wifi_channel_to_hz(const unsigned long &channel) ;
//@}
} ;
#endif // _OWLPS_POSITIONING_POSUTIL_HH_