62 lines
1.2 KiB
C++
62 lines
1.2 KiB
C++
#ifndef _REFERENCEPOINT_HH_
|
|
#define _REFERENCEPOINT_HH_
|
|
|
|
#include <iostream>
|
|
#include <vector>
|
|
|
|
#include "point.hh"
|
|
#include "measurement.hh"
|
|
|
|
using namespace std;
|
|
|
|
class ReferencePoint
|
|
{
|
|
protected:
|
|
Point coordinates;
|
|
vector<Measurement> measurement_list;
|
|
|
|
public:
|
|
ReferencePoint(const float &x = 0, const float &y = 0, const float &z = 0)
|
|
{
|
|
coordinates.setX(x);
|
|
coordinates.setY(y);
|
|
coordinates.setZ(z);
|
|
};
|
|
ReferencePoint(const ReferencePoint &rp)
|
|
{
|
|
coordinates = rp.coordinates;
|
|
measurement_list = rp.measurement_list;
|
|
};
|
|
ReferencePoint(const Point &c)
|
|
{
|
|
coordinates = c;
|
|
};
|
|
~ReferencePoint()
|
|
{
|
|
measurement_list.clear();
|
|
};
|
|
|
|
float getSsSquareDistance(const vector<Measurement> &m)const;
|
|
Point getCoordinates()const
|
|
{
|
|
return coordinates;
|
|
};
|
|
void addMeasurement(const string &mac_a, const int &value);
|
|
|
|
void setCoordinates(const Point &p)
|
|
{
|
|
coordinates = p;
|
|
};
|
|
vector<Measurement> getMeasurementList() const
|
|
{
|
|
return measurement_list;
|
|
} ;
|
|
bool getPowerForAp(const string &ap_mac, float *p) const ;
|
|
|
|
ReferencePoint operator=(const ReferencePoint &rp);
|
|
operator Point() const ;
|
|
friend ostream &operator<<(ostream &os, ReferencePoint &rp);
|
|
};
|
|
|
|
#endif
|