[Positioner] s/multilateration/trilateration/

This fixes an old, forgotten, vocabulary mistake.
This commit is contained in:
Matteo Cypriani 2012-04-11 16:31:48 +02:00
parent 153d4c0ea6
commit 987773a4df
17 changed files with 106 additions and 106 deletions

View File

@ -117,14 +117,14 @@ OBJ_LIST = \
inputlogcsv.o
OBJ_NOTEST_LIST = \
posexcept.o \
multilaterationalgorithm.o \
trilaterationalgorithm.o \
cartographyalgorithm.o \
outputnetworksocket.o \
inputmedium.o
INTERFACES_LIST = \
inputlogmedium.hh \
outputmedium.hh \
multilaterationmethod.hh \
trilaterationmethod.hh \
positioningalgorithm.hh
OBJ = $(OBJ_LIST:%=$(OBJ_DIR)/%)
@ -306,7 +306,7 @@ $(OBJ_DIR)/output.o: \
$(OBJ_DIR)/outputtcpsocketevaal.o \
$(OBJ_DIR)/configuration.o \
$(OBJ_DIR)/posexcept.o
$(OBJ_DIR)/multilaterationalgorithm.o: \
$(OBJ_DIR)/trilaterationalgorithm.o: \
$(SRC_DIR)/positioningalgorithm.hh \
$(OBJ_DIR)/minmax.o \
$(OBJ_DIR)/mobile.o \
@ -316,13 +316,13 @@ $(OBJ_DIR)/cartographyalgorithm.o: \
$(SRC_DIR)/positioningalgorithm.hh \
$(OBJ_DIR)/referencepoint.o
$(OBJ_DIR)/minmax.o: \
$(SRC_DIR)/multilaterationmethod.hh \
$(SRC_DIR)/trilaterationmethod.hh \
$(OBJ_DIR)/point3d.o \
$(OBJ_DIR)/accesspoint.o
$(OBJ_DIR)/interlinknetworks.o: \
$(OBJ_DIR)/multilaterationalgorithm.o
$(OBJ_DIR)/trilaterationalgorithm.o
$(OBJ_DIR)/fbcm.o: \
$(OBJ_DIR)/multilaterationalgorithm.o \
$(OBJ_DIR)/trilaterationalgorithm.o \
$(OBJ_DIR)/configuration.o \
$(OBJ_DIR)/stock.o
$(OBJ_DIR)/frbhmbasic.o: \

View File

@ -83,10 +83,10 @@ csv-file = /tmp/owlps-positioner.log
# Coordinates of the deployment area.
# This is used to delimit the area in which reference points are
# generated (when generate-reference-points is activated), and also
# by the MinMax multilateration method.
# Since MinMax is currently the only multilateration method implemented
# by the MinMax trilateration method.
# Since MinMax is currently the only trilateration method implemented
# in OwlPS, you should define these parameters if you use any of the
# multilateration-based algorithms (InterlinkNetworks, FBCM, FRBHM).
# trilateration-based algorithms (InterlinkNetworks, FBCM, FRBHM).
# With the autocalibration, the Z coordinate is the level's number, not
# a true coordinate in meters.
# They are declared as strings (X;Y;Z). Do not quote!

View File

@ -12,7 +12,7 @@
# be present in each area).
#
# ALSO IMPORTANT (EVEN IF YOU DON'T DESCRIBE THE TOPOLOGY):
# If you use the MinMax multilateration method, or the autocalibration,
# If you use the MinMax trilateration method, or the autocalibration,
# you must provide area-start and area-stop options that match the
# deployment area. That is, the cuboid formed by these two points
# should include the whole deployment area.

1 # Description of deployment area topology (rooms).
12 # be present in each area).
13 #
14 # ALSO IMPORTANT (EVEN IF YOU DON'T DESCRIBE THE TOPOLOGY):
15 # If you use the MinMax multilateration method, or the autocalibration, # If you use the MinMax trilateration method, or the autocalibration,
16 # you must provide area-start and area-stop options that match the
17 # deployment area. That is, the cuboid formed by these two points
18 # should include the whole deployment area.

View File

@ -17,7 +17,7 @@ Result FBCM::compute(const Request &_request)
// Friis indexes each time we calculate a position
if (Configuration::bool_value("positioning.generate-reference-points"))
Stock::update_all_friis_indexes() ;
return MultilaterationAlgorithm::compute(_request) ;
return TrilaterationAlgorithm::compute(_request) ;
}

View File

@ -8,10 +8,10 @@
#ifndef _OWLPS_POSITIONING_FBCM_HH_
#define _OWLPS_POSITIONING_FBCM_HH_
#include "multilaterationalgorithm.hh"
#include "trilaterationalgorithm.hh"
/// Computes a position using the Interlink Networks formula
class FBCM: public MultilaterationAlgorithm
class FBCM: public TrilaterationAlgorithm
{
protected:
float friis_index(const AccessPoint *const ap) const ;

View File

@ -17,7 +17,7 @@ Result FRBHMBasic::compute(const Request &_request)
closest_in_ss = &select_point(_request) ;
compute_ap_distance_circles() ;
Point3D position(multilaterate_2d(closest_in_ss->get_z())) ;
Point3D position(trilaterate_2d(closest_in_ss->get_z())) ;
return Result(request, name, position) ;
}

View File

@ -8,10 +8,10 @@
#ifndef _OWLPS_POSITIONING_INTERLINKNETWORKS_HH_
#define _OWLPS_POSITIONING_INTERLINKNETWORKS_HH_
#include "multilaterationalgorithm.hh"
#include "trilaterationalgorithm.hh"
/// Computes a position using the Interlink Networks formula
class InterlinkNetworks: public MultilaterationAlgorithm
class InterlinkNetworks: public TrilaterationAlgorithm
{
public:
InterlinkNetworks(void): PositioningAlgorithm("InterlinkNetworks") {}

View File

@ -12,7 +12,7 @@ using std::tr1::unordered_map ;
Point3D MinMax::multilaterate(
Point3D MinMax::trilaterate(
const unordered_map<AccessPoint*, float> &_ap_distances)
{
min = INFINITE ;
@ -28,7 +28,7 @@ Point3D MinMax::multilaterate(
}
Point3D MinMax::multilaterate_2d(
Point3D MinMax::trilaterate_2d(
const unordered_map<AccessPoint*, float> &_ap_distances, float z)
{
min = INFINITE ;

View File

@ -8,10 +8,10 @@
#ifndef _OWLPS_POSITIONING_MINMAX_HH_
#define _OWLPS_POSITIONING_MINMAX_HH_
#include "multilaterationmethod.hh"
#include "trilaterationmethod.hh"
/// Multilaterates using the Lassabe's MinMax algorithm
class MinMax: public MultilaterationMethod
class MinMax: public TrilaterationMethod
{
private:
float min ;
@ -37,9 +37,9 @@ public:
~MinMax(void) {}
Point3D multilaterate(
Point3D trilaterate(
const std::tr1::unordered_map<AccessPoint*, float> &_ap_distances) ;
Point3D multilaterate_2d(
Point3D trilaterate_2d(
const std::tr1::unordered_map<AccessPoint*, float> &_ap_distances,
float z) ;
} ;

View File

@ -1,58 +0,0 @@
/*
* This file is part of the Owl Positioning System (OwlPS).
* OwlPS is a project of the University of Franche-Comté
* (Université de Franche-Comté), France.
*/
#ifndef _OWLPS_POSITIONING_MULTILATERATIONALGORITHM_HH_
#define _OWLPS_POSITIONING_MULTILATERATIONALGORITHM_HH_
#include "positioningalgorithm.hh"
#include "multilaterationmethod.hh"
/// Super-class of multilateration-based positioning algorithms
class MultilaterationAlgorithm: public virtual PositioningAlgorithm
{
protected:
const Request *request ;
std::tr1::unordered_map<AccessPoint*, float> ap_distances ;
MultilaterationMethod *multilateration_method ;
/** @name Operations */
//@{
double make_constant_term(const Measurement &measurement) ;
void compute_ap_distance_circles() ;
Point3D multilaterate() ;
Point3D multilaterate_2d(float z) ;
//@}
public:
MultilaterationAlgorithm(void) ;
virtual ~MultilaterationAlgorithm(void) ;
/** @name Operations */
//@{
Result compute(const Request &_request) ;
virtual float estimate_distance(const Measurement &measurement) = 0 ;
//@}
} ;
inline Point3D MultilaterationAlgorithm::multilaterate()
{
return multilateration_method->multilaterate(ap_distances) ;
}
inline Point3D MultilaterationAlgorithm::multilaterate_2d(float z)
{
return multilateration_method->multilaterate_2d(ap_distances, z) ;
}
#endif // _OWLPS_POSITIONING_MULTILATERATIONALGORITHM_HH_

View File

@ -5,7 +5,7 @@
*/
#include "multilaterationalgorithm.hh"
#include "trilaterationalgorithm.hh"
#include "minmax.hh"
#include "mobile.hh"
#include "configuration.hh"
@ -19,10 +19,10 @@ using std::tr1::unordered_map ;
/* *** Constructors *** */
MultilaterationAlgorithm::MultilaterationAlgorithm():
TrilaterationAlgorithm::TrilaterationAlgorithm():
request(NULL)
{
// Will be changed when other multilateration methods will be
// Will be changed when other trilateration methods will be
// implemented.
if (! Configuration::is_configured("positioning.area-start") ||
@ -36,13 +36,13 @@ MultilaterationAlgorithm::MultilaterationAlgorithm():
Point3D minmax_stop(
Configuration::string_value("positioning.area-stop")) ;
multilateration_method = new MinMax(minmax_start, minmax_stop) ;
trilateration_method = new MinMax(minmax_start, minmax_stop) ;
}
MultilaterationAlgorithm::~MultilaterationAlgorithm()
TrilaterationAlgorithm::~TrilaterationAlgorithm()
{
delete multilateration_method ;
delete trilateration_method ;
}
@ -50,7 +50,7 @@ MultilaterationAlgorithm::~MultilaterationAlgorithm()
/* *** Operations *** */
double MultilaterationAlgorithm::
double TrilaterationAlgorithm::
make_constant_term(const Measurement &measurement)
{
assert(request) ;
@ -66,18 +66,18 @@ make_constant_term(const Measurement &measurement)
}
Result MultilaterationAlgorithm::compute(const Request &_request)
Result TrilaterationAlgorithm::compute(const Request &_request)
{
request = &_request ;
compute_ap_distance_circles() ;
Point3D position(multilaterate()) ;
Point3D position(trilaterate()) ;
return Result(request, name, position) ;
}
void MultilaterationAlgorithm::compute_ap_distance_circles()
void TrilaterationAlgorithm::compute_ap_distance_circles()
{
ap_distances.clear() ;

View File

@ -0,0 +1,58 @@
/*
* This file is part of the Owl Positioning System (OwlPS).
* OwlPS is a project of the University of Franche-Comté
* (Université de Franche-Comté), France.
*/
#ifndef _OWLPS_POSITIONING_TRILATERATIONALGORITHM_HH_
#define _OWLPS_POSITIONING_TRILATERATIONALGORITHM_HH_
#include "positioningalgorithm.hh"
#include "trilaterationmethod.hh"
/// Super-class of trilateration-based positioning algorithms
class TrilaterationAlgorithm: public virtual PositioningAlgorithm
{
protected:
const Request *request ;
std::tr1::unordered_map<AccessPoint*, float> ap_distances ;
TrilaterationMethod *trilateration_method ;
/** @name Operations */
//@{
double make_constant_term(const Measurement &measurement) ;
void compute_ap_distance_circles() ;
Point3D trilaterate() ;
Point3D trilaterate_2d(float z) ;
//@}
public:
TrilaterationAlgorithm(void) ;
virtual ~TrilaterationAlgorithm(void) ;
/** @name Operations */
//@{
Result compute(const Request &_request) ;
virtual float estimate_distance(const Measurement &measurement) = 0 ;
//@}
} ;
inline Point3D TrilaterationAlgorithm::trilaterate()
{
return trilateration_method->trilaterate(ap_distances) ;
}
inline Point3D TrilaterationAlgorithm::trilaterate_2d(float z)
{
return trilateration_method->trilaterate_2d(ap_distances, z) ;
}
#endif // _OWLPS_POSITIONING_TRILATERATIONALGORITHM_HH_

View File

@ -5,8 +5,8 @@
*/
#ifndef _OWLPS_POSITIONING_MULTILATERATIONMETHOD_HH_
#define _OWLPS_POSITIONING_MULTILATERATIONMETHOD_HH_
#ifndef _OWLPS_POSITIONING_TRILATERATIONMETHOD_HH_
#define _OWLPS_POSITIONING_TRILATERATIONMETHOD_HH_
class AccessPoint ;
@ -14,26 +14,26 @@ class AccessPoint ;
#include <boost/tr1/unordered_map.hpp>
/// Super-class of all multilateration methods
/// Super-class of all trilateration methods
/**
* The source data is a list of access points associated with the
* distances to the mobile. These distances are estimated using a
* MultilaterationAlgorithm.
* TrilaterationAlgorithm.
*/
class MultilaterationMethod
class TrilaterationMethod
{
public:
MultilaterationMethod(void) {}
virtual ~MultilaterationMethod(void) {}
TrilaterationMethod(void) {}
virtual ~TrilaterationMethod(void) {}
/// Selects a point in 3D space
virtual Point3D multilaterate(
virtual Point3D trilaterate(
const std::tr1::unordered_map<AccessPoint*, float> &ap_distances) = 0 ;
/// Selects a point in 2D space, given its vertical coordinate (z)
virtual Point3D multilaterate_2d(
virtual Point3D trilaterate_2d(
const std::tr1::unordered_map<AccessPoint*, float> &ap_distances,
float z) = 0 ;
} ;
#endif // _OWLPS_POSITIONING_MULTILATERATIONMETHOD_HH_
#endif // _OWLPS_POSITIONING_TRILATERATIONMETHOD_HH_

View File

@ -228,7 +228,7 @@ void UserInterface::fill_positioning_options()
("positioning.area-start",
po::value<string>(),
"Coordinates of the first point of the deployment area; this is"
" used to delimit the area in which the MinMax multilateration"
" used to delimit the area in which the MinMax trilateration"
" method tests points and in which the reference points are"
" generated, if the corresponding options are activated"
" (string format: \"X;Y;Z\").")

View File

@ -8,7 +8,7 @@ public:
void test_select_point(void)
{
MultilaterationAlgorithm *algo = new FBCM() ;
TrilaterationAlgorithm *algo = new FBCM() ;
/*
* TODO: implement the test.

View File

@ -8,7 +8,7 @@ public:
void test_distance(void)
{
MultilaterationAlgorithm *algo = new InterlinkNetworks() ;
TrilaterationAlgorithm *algo = new InterlinkNetworks() ;
// Initialise algo->request
char mobile_gain = 3, mobile_power = 15 ;

View File

@ -6,11 +6,11 @@ class MinMax_test: public CxxTest::TestSuite
{
public:
void test_multilaterate(void)
void test_trilaterate(void)
{
Point3D start(0,0,0), stop(10,10,4) ;
float step = 0.5 ;
MultilaterationMethod *minmax = new MinMax(start, stop, step) ;
TrilaterationMethod *minmax = new MinMax(start, stop, step) ;
AccessPoint
ap1(Point3D(0,0,0)),
@ -24,7 +24,7 @@ public:
ap_distances[&ap4] = 4 ;
Point3D wanted_result(5,5,0) ;
Point3D result = minmax->multilaterate(ap_distances) ;
Point3D result = minmax->trilaterate(ap_distances) ;
// Wrong with a step of 0.1 (for this test case):
TS_ASSERT_EQUALS(result, wanted_result) ;
// We can then use something like that: