47 lines
1.1 KiB
C++
47 lines
1.1 KiB
C++
#ifndef _OWLPS_POSITIONING_MEASUREMENT_HH_
|
|
#define _OWLPS_POSITIONING_MEASUREMENT_HH_
|
|
|
|
#include "mobile.hh"
|
|
#include "accesspoint.hh"
|
|
|
|
#include <iostream>
|
|
#include <string>
|
|
#include <vector>
|
|
#include <math.h>
|
|
|
|
class Measurement
|
|
{
|
|
protected:
|
|
Mobile *mobile ;
|
|
AccessPoint *ap ;
|
|
float average_ss ;
|
|
std::vector<int> ss_list ;
|
|
|
|
void update_average_ss(void) ;
|
|
|
|
public:
|
|
Measurement(const Mobile *_mobile = NULL, const AccessPoint *_ap = NULL,
|
|
const std::vector<int> &_ss_list = std::vector<int>()) ;
|
|
Measurement(const Measurement &m) ;
|
|
|
|
~Measurement() ;
|
|
|
|
Mobile* get_mobile() const ;
|
|
AccessPoint* get_ap() const ;
|
|
std::vector<int> get_ss_list() const ;
|
|
float get_average_ss() const ;
|
|
//float get_ss_square_distance(const float &ss) const ;
|
|
|
|
void set_mobile(const Mobile *_mobile) ;
|
|
void set_ap(const AccessPoint *_ap) ;
|
|
void add_ss(const int &ss) ;
|
|
|
|
Measurement operator=(const Measurement &m) ;
|
|
bool operator==(const Measurement &m) ;
|
|
bool operator!=(const Measurement &m) ;
|
|
|
|
friend std::ostream &operator<<(std::ostream &os, const Measurement &m) ;
|
|
} ;
|
|
|
|
#endif // _OWLPS_POSITIONING_MEASUREMENT_HH_
|