owlps/owlps-positioning/posutil.hh

35 lines
787 B
C++

#ifndef _OWLPS_POSITIONING_POSUTIL_HH_
#define _OWLPS_POSITIONING_POSUTIL_HH_
#include <ctime>
#include <stdint.h> // <cstdint> is not C++ 98 compliant
/* Wi-Fi channel frequencies in Hz */
#define CHANNEL_1 2412
#define CHANNEL_2 2417
#define CHANNEL_3 2422
#define CHANNEL_4 2427
#define CHANNEL_5 2432
#define CHANNEL_6 2437
#define CHANNEL_7 2442
#define CHANNEL_8 2447
#define CHANNEL_9 2452
#define CHANNEL_10 2457
#define CHANNEL_11 2462
#define CHANNEL_12 2467
#define CHANNEL_13 2472
#define CHANNEL_14 2477
/// Utilitary class
class PosUtil
{
public:
/** @name Wi-Fi */
//@{
/// Converts a Wi-Fi channel to the corresponding frequency in Hz
static unsigned int channel_to_frequency(const int &channel) ;
//@}
} ;
#endif // _OWLPS_POSITIONING_POSUTIL_HH_