[Positioning] Several fixes
- Makefile: fix waypoint.o. - UTF-8 calibrationmeasurement.{hh,cc}, measurement.cc. - CalibrationMeasurement: fix destructor. - Measurement: fix const functions, add operator bool(). - Update TODO.
This commit is contained in:
parent
4e5db1af92
commit
1cf560309a
|
@ -32,7 +32,7 @@ all: $(TARGET)
|
|||
posutil.o: posutil.hh
|
||||
point3d.o: point3d.hh
|
||||
referencepoint.o : referencepoint.hh point3d.hh calibrationmeasurement.hh
|
||||
waypoint.o: point3d.hh building.hh
|
||||
waypoint.o: waypoint.hh point3d.hh building.hh
|
||||
building.o: building.hh
|
||||
area.o: area.hh building.hh point3d.hh
|
||||
wifidevice.o: wifidevice.hh posutil.hh
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
|
||||
- '\n' vs. endl.
|
||||
Utiliser '\n' plutôt que endl lorsque le vidage du tampon n'est pas
|
||||
nécessaire.
|
||||
|
||||
- Measurement : corriger le calcul de moyenne.
|
||||
|
||||
- AccessPoint : attribut float friis_index ?
|
||||
|
||||
- Mobile : attributs Viterbi ?
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
|
||||
|
||||
/*** Opérateurs ***/
|
||||
/*** Opérateurs ***/
|
||||
|
||||
|
||||
CalibrationMeasurement
|
||||
|
|
|
@ -21,7 +21,7 @@ public:
|
|||
CalibrationMeasurement(const Measurement &m):
|
||||
Measurement(m), reference_point(NULL) {}
|
||||
|
||||
~CalibrationMeasurement() ;
|
||||
~CalibrationMeasurement() {}
|
||||
|
||||
ReferencePoint* get_reference_point(void) const ;
|
||||
|
||||
|
|
|
@ -27,6 +27,10 @@ Measurement::Measurement(const Measurement &m)
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* Destructor
|
||||
* ap and mobile are not deleted.
|
||||
*/
|
||||
Measurement::~Measurement()
|
||||
{
|
||||
ss_list.clear() ;
|
||||
|
@ -34,7 +38,7 @@ Measurement::~Measurement()
|
|||
|
||||
|
||||
|
||||
/*** Accesseurs écriture ***/
|
||||
/*** Accesseurs écriture ***/
|
||||
|
||||
|
||||
void Measurement::update_average_ss()
|
||||
|
@ -62,7 +66,7 @@ void Measurement::add_ss(const int &ss)
|
|||
|
||||
|
||||
|
||||
/*** Opérateurs ***/
|
||||
/*** Opérateurs ***/
|
||||
|
||||
|
||||
Measurement Measurement::operator=(const Measurement &m)
|
||||
|
@ -79,7 +83,7 @@ Measurement Measurement::operator=(const Measurement &m)
|
|||
}
|
||||
|
||||
|
||||
bool Measurement::operator==(const Measurement &m)
|
||||
bool Measurement::operator==(const Measurement &m) const
|
||||
{
|
||||
if (this == &m)
|
||||
return true ;
|
||||
|
|
|
@ -36,8 +36,9 @@ public:
|
|||
void add_ss(const int &ss) ;
|
||||
|
||||
Measurement operator=(const Measurement &m) ;
|
||||
bool operator==(const Measurement &m) ;
|
||||
bool operator!=(const Measurement &m) ;
|
||||
bool operator==(const Measurement &m) const ;
|
||||
bool operator!=(const Measurement &m) const ;
|
||||
operator bool(void) const ;
|
||||
|
||||
friend std::ostream &operator<<(std::ostream &os, const Measurement &m) ;
|
||||
} ;
|
||||
|
@ -97,11 +98,24 @@ inline void Measurement::set_ap(const AccessPoint *_ap)
|
|||
/*** Opérateurs ***/
|
||||
|
||||
|
||||
inline bool Measurement::operator!=(const Measurement &m)
|
||||
inline bool Measurement::operator!=(const Measurement &m) const
|
||||
{
|
||||
return !(*this == m) ;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Returns false if the Measurement is empty, or true if at least one
|
||||
* attribute is initialised.
|
||||
*/
|
||||
inline Measurement::operator bool() const
|
||||
{
|
||||
return
|
||||
ap != NULL ||
|
||||
mobile != NULL ||
|
||||
ss_list.size() > 0 ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif // _OWLPS_POSITIONING_MEASUREMENT_HH_
|
||||
|
|
Loading…
Reference in New Issue