[Positioner] Add Measurement::get_std_deviation()
This commit is contained in:
parent
dad6e0aa11
commit
2cc7f373dd
|
@ -61,14 +61,21 @@ public:
|
|||
|
||||
/** @name Read accessors */
|
||||
//@{
|
||||
/// Returns the AccessPoint associated with the Measurement
|
||||
AccessPoint* get_ap() const ;
|
||||
/// Returns the mean of the SS list, in dBm
|
||||
float get_average_dbm() const ;
|
||||
/// Returns the variance of the SS list
|
||||
float get_variance() const ;
|
||||
/// Returns the standard deviation of the SS list
|
||||
float get_std_deviation() const ;
|
||||
/// Returns the number of SS in the SS list
|
||||
int get_nb_ss() const ;
|
||||
//@}
|
||||
|
||||
/** @name Write accessors */
|
||||
//@{
|
||||
/// Associate the Measurement with an AccessPoint
|
||||
void set_ap(const AccessPoint *_ap) ;
|
||||
/// Adds a signal strength (in dBm) to #ss_list
|
||||
void add_ss(const pkt_id_t packet_id, const ss_t ss_dbm) ;
|
||||
|
@ -76,6 +83,7 @@ public:
|
|||
void add_ss_list(const std::map<pkt_id_t, ss_t> &_ss_list) ;
|
||||
/// Merges a given Measurement into the current Measurement
|
||||
void merge(const Measurement &source) ;
|
||||
/// Reset all the attributes
|
||||
void clear(void) ;
|
||||
//@}
|
||||
|
||||
|
@ -132,6 +140,12 @@ inline float Measurement::get_variance() const
|
|||
}
|
||||
|
||||
|
||||
inline float Measurement::get_std_deviation() const
|
||||
{
|
||||
return sqrt(variance) ;
|
||||
}
|
||||
|
||||
|
||||
inline int Measurement::get_nb_ss() const
|
||||
{
|
||||
return ss_list.size() ;
|
||||
|
|
Loading…
Reference in New Issue