[Positioning] Rename RADAR -> NSS

The algorithm RADAR is renamed "NSS", which is more neutral.
This commit is contained in:
Matteo Cypriani 2011-12-30 13:43:01 +01:00
parent 61124e4cfc
commit 3d05f203aa
11 changed files with 50 additions and 50 deletions

View File

@ -78,7 +78,7 @@ OBJ_LIST = \
interlinknetworks.o \ interlinknetworks.o \
fbcm.o \ fbcm.o \
frbhmbasic.o \ frbhmbasic.o \
radar.o \ nss.o \
realposition.o \ realposition.o \
configuration.o \ configuration.o \
userinterface.o \ userinterface.o \
@ -304,9 +304,9 @@ $(OBJ_DIR)/fbcm.o: \
$(OBJ_DIR)/configuration.o \ $(OBJ_DIR)/configuration.o \
$(OBJ_DIR)/stock.o $(OBJ_DIR)/stock.o
$(OBJ_DIR)/frbhmbasic.o: \ $(OBJ_DIR)/frbhmbasic.o: \
$(OBJ_DIR)/radar.o \ $(OBJ_DIR)/nss.o \
$(OBJ_DIR)/fbcm.o $(OBJ_DIR)/fbcm.o
$(OBJ_DIR)/radar.o: \ $(OBJ_DIR)/nss.o: \
$(OBJ_DIR)/cartographyalgorithm.o $(OBJ_DIR)/cartographyalgorithm.o
$(OBJ_DIR)/realposition.o: \ $(OBJ_DIR)/realposition.o: \
$(SRC_DIR)/positioningalgorithm.hh \ $(SRC_DIR)/positioningalgorithm.hh \
@ -320,7 +320,7 @@ $(OBJ_DIR)/positioning.o: \
$(OBJ_DIR)/fbcm.o \ $(OBJ_DIR)/fbcm.o \
$(OBJ_DIR)/frbhmbasic.o \ $(OBJ_DIR)/frbhmbasic.o \
$(OBJ_DIR)/interlinknetworks.o \ $(OBJ_DIR)/interlinknetworks.o \
$(OBJ_DIR)/radar.o \ $(OBJ_DIR)/nss.o \
$(OBJ_DIR)/resultlist.o \ $(OBJ_DIR)/resultlist.o \
$(OBJ_DIR)/output.o \ $(OBJ_DIR)/output.o \
$(OBJ_DIR)/configuration.o \ $(OBJ_DIR)/configuration.o \

View File

@ -57,7 +57,7 @@ csv-file = /tmp/owlps-positioning.log
#algorithm = Real #algorithm = Real
#algorithm = InterlinkNetworks #algorithm = InterlinkNetworks
#algorithm = FBCM #algorithm = FBCM
#algorithm = RADAR #algorithm = NSS
#algorithm = FRBHMBasic #algorithm = FRBHMBasic
# This option allows to create a new mobile when a request is sent by # This option allows to create a new mobile when a request is sent by
@ -117,9 +117,9 @@ csv-file = /tmp/owlps-positioning.log
# serve the positioning process, not to use it. # serve the positioning process, not to use it.
#position-calibration-requests = false #position-calibration-requests = false
[positioning.radar] [positioning.nss]
# This subsection contains the options related to the RADAR algorithm # This subsection contains the options related to the NSS (a.k.a. RADAR)
# and derivated. # algorithm and derivated.
# For a given positioning request, average all the calibration requests # For a given positioning request, average all the calibration requests
# associated with a reference point before to compute the SS distance. # associated with a reference point before to compute the SS distance.

View File

@ -8,7 +8,7 @@
# However, you can describe areas if you want to know when the mobile # However, you can describe areas if you want to know when the mobile
# is in a particular location. In that case be sure that the algorithm # is in a particular location. In that case be sure that the algorithm
# you use will be able to generate positions that match each described # you use will be able to generate positions that match each described
# area (in particular, with RADAR, at least one reference point should # area (in particular, with NSS, at least one reference point should
# be present in each area). # be present in each area).
# #
# ALSO IMPORTANT (EVEN IF YOU DON'T DESCRIBE THE TOPOLOGY): # ALSO IMPORTANT (EVEN IF YOU DON'T DESCRIBE THE TOPOLOGY):

1 # Description of deployment area topology (rooms).
8 # However, you can describe areas if you want to know when the mobile
9 # is in a particular location. In that case be sure that the algorithm
10 # you use will be able to generate positions that match each described
11 # area (in particular, with RADAR, at least one reference point should # area (in particular, with NSS, at least one reference point should
12 # be present in each area).
13 #
14 # ALSO IMPORTANT (EVEN IF YOU DON'T DESCRIBE THE TOPOLOGY):

View File

@ -2,10 +2,10 @@
#define _OWLPS_POSITIONING_FRBHMBASIC_HH_ #define _OWLPS_POSITIONING_FRBHMBASIC_HH_
#include "fbcm.hh" #include "fbcm.hh"
#include "radar.hh" #include "nss.hh"
/// Computes a position using the Interlink Networks formula /// Computes a position using the Interlink Networks formula
class FRBHMBasic: public FBCM, public RADAR class FRBHMBasic: public FBCM, public NSS
{ {
protected: protected:
ReferencePoint const *closest_in_ss ; ReferencePoint const *closest_in_ss ;

View File

@ -1,13 +1,13 @@
#include "radar.hh" #include "nss.hh"
#include "stock.hh" #include "stock.hh"
#include "configuration.hh" #include "configuration.hh"
const ReferencePoint& RADAR::select_point(const Request &request) const ReferencePoint& NSS::select_point(const Request &request)
{ {
if (Configuration::bool_value( if (Configuration::bool_value(
"positioning.radar.average-reference-points")) "positioning.nss.average-reference-points"))
return Stock::closest_reference_point(request) ; return Stock::closest_reference_point(request) ;
const CalibrationRequest &cr = const CalibrationRequest &cr =

View File

@ -0,0 +1,22 @@
#ifndef _OWLPS_POSITIONING_NSS_HH_
#define _OWLPS_POSITIONING_NSS_HH_
#include "cartographyalgorithm.hh"
/// Computes a position selecting the closest point in SS cartography
/**
* This algorithm was introduced by Paramvir Bahl and Venkata N.
* Padmanabhan in their paper "RADAR: An In-Building RF-Based User
* Location and Tracking System" (2000). For more details, see:
* http://citeseer.ist.psu.edu/bahl00radar.html
*/
class NSS: public CartographyAlgorithm
{
public:
NSS(void): PositioningAlgorithm("NSS") {}
~NSS(void) {}
const ReferencePoint& select_point(const Request &request) ;
} ;
#endif // _OWLPS_POSITIONING_NSS_HH_

View File

@ -3,7 +3,7 @@
#include "fbcm.hh" #include "fbcm.hh"
#include "frbhmbasic.hh" #include "frbhmbasic.hh"
#include "interlinknetworks.hh" #include "interlinknetworks.hh"
#include "radar.hh" #include "nss.hh"
#include "resultlist.hh" #include "resultlist.hh"
#include "configuration.hh" #include "configuration.hh"
#include "posexcept.hh" #include "posexcept.hh"
@ -103,12 +103,12 @@ void Positioning::initialise_algorithms()
algorithms.push_back(new InterlinkNetworks) ; algorithms.push_back(new InterlinkNetworks) ;
} }
else if (*i == "RADAR") else if (*i == "NSS")
{ {
pair<unordered_set<string>::iterator, bool> stored = pair<unordered_set<string>::iterator, bool> stored =
stored_algos.insert("RADAR") ; stored_algos.insert("NSS") ;
if (stored.second) // Check if there was no previous instance if (stored.second) // Check if there was no previous instance
algorithms.push_back(new RADAR) ; algorithms.push_back(new NSS) ;
} }
else else

View File

@ -1,22 +0,0 @@
#ifndef _OWLPS_POSITIONING_RADAR_HH_
#define _OWLPS_POSITIONING_RADAR_HH_
#include "cartographyalgorithm.hh"
/// Computes a position selecting the 1-closest point in SS cartography
/**
* This class is named after the positioning system conceived by Paramvir
* Bahl and Venkata N. Padmanabhan in their paper "RADAR: An In-Building
* RF-Based User Location and Tracking System" (2000). For more details,
* see: http://citeseer.ist.psu.edu/bahl00radar.html
*/
class RADAR: public CartographyAlgorithm
{
public:
RADAR(void): PositioningAlgorithm("RADAR") {}
~RADAR(void) {}
const ReferencePoint& select_point(const Request &request) ;
} ;
#endif // _OWLPS_POSITIONING_RADAR_HH_

View File

@ -383,7 +383,7 @@ closest_reference_point(const Request &request)
" list is empty!") ; " list is empty!") ;
bool ignore_aps = Configuration::bool_value( bool ignore_aps = Configuration::bool_value(
"positioning.radar.ignore-ap-reference-points") ; "positioning.nss.ignore-ap-reference-points") ;
unordered_set<ReferencePoint>::const_iterator i = unordered_set<ReferencePoint>::const_iterator i =
reference_points.begin() ; reference_points.begin() ;
@ -664,7 +664,7 @@ closest_calibration_request(const Request &request)
" requests' list is empty!") ; " requests' list is empty!") ;
bool ignore_aps = Configuration::bool_value( bool ignore_aps = Configuration::bool_value(
"positioning.radar.ignore-ap-reference-points") ; "positioning.nss.ignore-ap-reference-points") ;
unordered_set<CalibrationRequest>::const_iterator i = unordered_set<CalibrationRequest>::const_iterator i =
calibration_requests.begin() ; calibration_requests.begin() ;

View File

@ -200,7 +200,7 @@ void UserInterface::fill_positioning_options()
po::value< vector<string> >()->composing(), po::value< vector<string> >()->composing(),
"Algorithms used to compute positions. You can specify" "Algorithms used to compute positions. You can specify"
" this option more than once (but at least once). Allowed: Real," " this option more than once (but at least once). Allowed: Real,"
" FBCM, FRBHMBasic, InterlinkNetworks, RADAR.") " FBCM, FRBHMBasic, InterlinkNetworks, NSS.")
("positioning.accept-new-mobiles", ("positioning.accept-new-mobiles",
po::value<bool>()->default_value(false), po::value<bool>()->default_value(false),
"When receiving requests, add unknown mobiles (mobiles which are not" "When receiving requests, add unknown mobiles (mobiles which are not"
@ -251,16 +251,16 @@ void UserInterface::fill_positioning_options()
" calibration requests to be positioned as normal requests." " calibration requests to be positioned as normal requests."
" The default is to add them to the calibration requests' list" " The default is to add them to the calibration requests' list"
" without position them.") " without position them.")
("positioning.radar.average-reference-points", ("positioning.nss.average-reference-points",
po::value<bool>()->default_value(false), po::value<bool>()->default_value(false),
"With the RADAR algorithm, for a given positioning request, average" "With the NSS algorithm, for a given positioning request, average"
" all the calibration requests associated with a reference point" " all the calibration requests associated with a reference point"
" before to compute the SS distance." " before to compute the SS distance."
" The default is false, i.e the positioning request is compared" " The default is false, i.e the positioning request is compared"
" directly to each calibration request.") " directly to each calibration request.")
("positioning.radar.ignore-ap-reference-points", ("positioning.nss.ignore-ap-reference-points",
po::value<bool>()->default_value(false), po::value<bool>()->default_value(false),
"With the RADAR algorithm, try to avoid selecting the reference" "With the NSS algorithm, try to avoid selecting the reference"
" points which are coordinates of an AP.") " points which are coordinates of an AP.")
; ;

View File

@ -1,14 +1,14 @@
#include <cxxtest/TestSuite.h> #include <cxxtest/TestSuite.h>
#include "radar.hh" #include "nss.hh"
class RADAR_test: public CxxTest::TestSuite class NSS_test: public CxxTest::TestSuite
{ {
public: public:
void test_select_point(void) void test_select_point(void)
{ {
CartographyAlgorithm *algo = new RADAR() ; CartographyAlgorithm *algo = new NSS() ;
/* /*
* TODO: implement the test. * TODO: implement the test.