74 lines
2.7 KiB
C++
74 lines
2.7 KiB
C++
#ifndef _POSITIONING_HH_
|
|
#define _POSITIONING_HH_
|
|
|
|
#include "point.hh"
|
|
#include "referencepoint.hh"
|
|
#include "accesspoint.hh"
|
|
#include "area.hh"
|
|
#include "measurement.hh"
|
|
#include "libowlps-positioning.hh"
|
|
|
|
class Positioning
|
|
{
|
|
private:
|
|
vector<ReferencePoint> reference_point_list; // Liste des points de référence (calibration).
|
|
float** reference_point_matrix; // Matrice des distances entre les points de référence.
|
|
vector<AccessPoint> access_point_list; // Liste des AP connus.
|
|
vector<Point> waypoint_list; // Liste des points de passage entre les zones.
|
|
float** waypoint_matrix; // Matrice des distances entre les points de passage.
|
|
map<string, Area> area_list ; // Liste des zones homogènes (pièces).
|
|
|
|
public :
|
|
Positioning() {};
|
|
~Positioning() {};
|
|
|
|
void makeReferencePointListFromFile(const string &filename, const bool);
|
|
void makeApListFromFile(const string &filename);
|
|
void makeTopologyFromFile(const string &filename);
|
|
void makeWaypointListFromFile(const string &filename);
|
|
|
|
void makeReferencePointListFromDb(PGconn*, const bool);
|
|
void makeApListFromDb(PGconn*);
|
|
void makeTopologyFromDb(PGconn*);
|
|
void makeWaypointListFromDb(PGconn*);
|
|
|
|
void makeWaypointMatrix(set<Point>);
|
|
|
|
map<string, Area> inWhichAreas(const Point &p);
|
|
bool inTheSameArea(const Point &p1, const Point &p2);
|
|
float distanceTopology(const Point &p1, const Point &p2);
|
|
vector<Point> areaConnection(const Area &z1, const Area &z2);
|
|
vector<Point> areaConnection(const Area &z);
|
|
|
|
void makeReferencePointDistances();
|
|
bool checkTopology();
|
|
|
|
bool pointExists(const float &x, const float &y, const float &z)const;
|
|
bool pointExists(const Point &p)const;
|
|
bool pointExists(const vector<ReferencePoint> &point_list, const float &x, const float &y, const float &z) const ;
|
|
bool pointExists(const vector<ReferencePoint> &point_list, const Point &p) const ;
|
|
|
|
int pointIndex(const float &x, const float &y, const float &z) const;
|
|
int pointIndex(const Point &p) const;
|
|
int pointIndex(const vector<ReferencePoint> &point_list, const float &x, const float &y, const float &z) const ;
|
|
int pointIndex(const vector<ReferencePoint> &point_list, const Point &p) const ;
|
|
int pointIndex(const Point *tab, unsigned int &size, const Point &p) const ;
|
|
int pointIndex(const vector<Point> &point_list, const Point &p) const ;
|
|
|
|
vector<AccessPoint> getAccessPointList() const
|
|
{
|
|
return access_point_list;
|
|
};
|
|
vector<ReferencePoint> getReferencePointList() const
|
|
{
|
|
return reference_point_list;
|
|
};
|
|
|
|
void printReferencePointList();
|
|
void printPointList(vector<ReferencePoint> &point_list);
|
|
void printAccessPointList() const;
|
|
void printAreatList();
|
|
};
|
|
|
|
#endif // _POSITIONING_HH_
|