2009-12-07 16:03:53 +01:00
|
|
|
#ifndef _OWLPS_POSITIONING_REFERENCEPOINT_HH_
|
|
|
|
#define _OWLPS_POSITIONING_REFERENCEPOINT_HH_
|
|
|
|
|
2010-01-06 01:18:14 +01:00
|
|
|
class CalibrationMeasurement ;
|
|
|
|
|
2009-12-07 16:03:53 +01:00
|
|
|
#include "point3d.hh"
|
2008-04-11 10:11:29 +02:00
|
|
|
|
|
|
|
#include <vector>
|
2010-01-06 01:18:14 +01:00
|
|
|
#include <ostream>
|
Incorporation de la dernière version de Julien
Extrait de son courriel :
« Par rapport à la précédente j'ai surtout corrigé des bugs. »
Note : la version du listener portable sur Fonera, envoyée en même temps
par Julien, viendra plus tard (le temps que je l'incorpore).
Détail des changements après analyse du code :
aggregator : correction de bogues.
positioning :
* Ajout d'un fichier de config format boost (cfg/config.cfg).
* Makefile : implantation des cibles "install" et "uninstall" ; la cible
"astyle" devient "style".
* accesspoint.{hh,cc}, area.cc, measurement.hh, point.{hh,cc},
referencepoint.{hh,cc} : cosmétique.
* owlps-positioning.c : correction de la lecture du fichier de config
(ajout d'une option permettant de spécifier un fichier alternatif).
* server.cc : essentiellement correction des requêtes.
* libowlps-positioning.{hh,cc} : passage de "unsigned long long" à
"uint64_t" comme type de retour de timeval_to_ms().
writeInDb :
* Ajout de la gestion d'un fichier de config.
* Ajout de deux scripts pour la BDD.
git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@96 785a6c6c-259e-4ff1-8b91-dc31627914f0
2009-07-01 15:39:58 +02:00
|
|
|
|
2009-12-07 16:03:53 +01:00
|
|
|
class ReferencePoint: public Point3D
|
2010-05-21 10:35:15 +02:00
|
|
|
{
|
|
|
|
protected:
|
2010-01-04 17:10:42 +01:00
|
|
|
std::vector<CalibrationMeasurement*> measurements ;
|
2010-05-21 10:35:15 +02:00
|
|
|
|
|
|
|
public:
|
2009-12-11 13:52:21 +01:00
|
|
|
ReferencePoint(const float &_x = 0, const float &_y = 0, const float &_z = 0):
|
|
|
|
Point3D(_x, _y, _z) {}
|
2009-12-07 16:03:53 +01:00
|
|
|
ReferencePoint(const Point3D &p): Point3D(p) {}
|
2009-12-11 13:52:21 +01:00
|
|
|
ReferencePoint(const ReferencePoint &rp):
|
|
|
|
Point3D(rp), measurements(rp.measurements) {}
|
2009-12-07 16:03:53 +01:00
|
|
|
|
|
|
|
~ReferencePoint() ;
|
|
|
|
|
2010-01-13 15:29:44 +01:00
|
|
|
const std::vector<CalibrationMeasurement*>& get_measurements(void) const ;
|
2009-12-07 16:03:53 +01:00
|
|
|
|
2009-12-14 15:45:16 +01:00
|
|
|
void add_measurement(const CalibrationMeasurement *cm) ;
|
2009-12-11 17:56:31 +01:00
|
|
|
// float get_ss_square_distance(const vector<CalibrationMeasurement> &m) const ;
|
2009-12-07 16:03:53 +01:00
|
|
|
// bool get_power_for_ap(const string &ap_mac, float *p) const ;
|
|
|
|
|
2010-01-13 15:29:44 +01:00
|
|
|
const ReferencePoint& operator=(const ReferencePoint &rp) ;
|
2009-12-14 15:45:16 +01:00
|
|
|
bool operator==(const ReferencePoint &rp) const ;
|
|
|
|
bool operator!=(const ReferencePoint &rp) const ;
|
2009-12-07 16:03:53 +01:00
|
|
|
|
2010-01-04 17:10:42 +01:00
|
|
|
friend std::ostream &operator<<(std::ostream &os, const ReferencePoint &rp) ;
|
2009-12-07 16:03:53 +01:00
|
|
|
} ;
|
|
|
|
|
2010-01-05 11:50:24 +01:00
|
|
|
|
|
|
|
|
|
|
|
/*** Accesseurs lecture ***/
|
|
|
|
|
|
|
|
|
2010-01-13 15:29:44 +01:00
|
|
|
inline const
|
|
|
|
std::vector<CalibrationMeasurement*>& ReferencePoint::get_measurements() const
|
2010-01-05 11:50:24 +01:00
|
|
|
{
|
|
|
|
return measurements ;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*** Accesseurs écriture ***/
|
|
|
|
|
|
|
|
|
|
|
|
inline void ReferencePoint::add_measurement(const CalibrationMeasurement *cm)
|
|
|
|
{
|
|
|
|
measurements.push_back((CalibrationMeasurement *) cm) ;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*** Opérateurs ***/
|
|
|
|
|
|
|
|
|
|
|
|
inline bool ReferencePoint::operator!=(const ReferencePoint &rp) const
|
|
|
|
{
|
|
|
|
return !(*this == rp) ;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-07 16:03:53 +01:00
|
|
|
#endif // _OWLPS_POSITIONING_REFERENCEPOINT_HH_
|