owlps/owlps-positioning/treatment.hh

58 lines
1.6 KiB
C++

#ifndef _TREATMENT_HH_
#define _TREATMENT_HH_
#include <iostream>
#include <vector>
#include <cmath>
#include <cstdio>
#include "point.hh"
#include "measurement.hh"
#include "accesspoint.hh"
#include "referencepoint.hh"
#define LIGHT_SPEED 300000000
#define MINMAX_STEP 0.5
#define MINMAX_X_START 0.5
#define MINMAX_Y_START 0.5
#define MINMAX_Z_START 0
#define MINMAX_X_STOP 10
#define MINMAX_Y_STOP 31.5
#define MINMAX_Z_STOP 6
using namespace std;
class Treatment
{
private:
vector<AccessPoint> access_point_list;
vector<ReferencePoint> reference_point_list;
public:
Treatment(vector<AccessPoint> access_point, vector<ReferencePoint> reference_point)
{
access_point_list = access_point;
reference_point_list = reference_point;
};
~Treatment()
{
access_point_list.clear();
};
bool apExists(const string &)const;
unsigned int apIndex(const string &)const;
vector<Point> getkClosestInSs(const vector<Measurement> &m, const unsigned int &k, const Point *point_ignored)const;
Point kPointsAverage(const vector<Point> &vp)const;
Point fbcm(const vector<Measurement> &m, const int &client_idx)const;
Point fbcm_friis( const vector<Measurement> &m, const vector<float> friis_idx_list, const float &z)const;
Point interlink(const vector<Measurement> &m, const int &client_idx)const;
vector<float> computeFriisFromRefList(const Point &p, const vector<Measurement> &m);
Point getkWeightedInSs(const vector<Measurement> &m, const unsigned int &k, const Point *point_ignored)const ;
};
#endif