[Positioner] s/multilateration/trilateration/
This fixes an old, forgotten, vocabulary mistake.
This commit is contained in:
parent
153d4c0ea6
commit
987773a4df
|
@ -117,14 +117,14 @@ OBJ_LIST = \
|
||||||
inputlogcsv.o
|
inputlogcsv.o
|
||||||
OBJ_NOTEST_LIST = \
|
OBJ_NOTEST_LIST = \
|
||||||
posexcept.o \
|
posexcept.o \
|
||||||
multilaterationalgorithm.o \
|
trilaterationalgorithm.o \
|
||||||
cartographyalgorithm.o \
|
cartographyalgorithm.o \
|
||||||
outputnetworksocket.o \
|
outputnetworksocket.o \
|
||||||
inputmedium.o
|
inputmedium.o
|
||||||
INTERFACES_LIST = \
|
INTERFACES_LIST = \
|
||||||
inputlogmedium.hh \
|
inputlogmedium.hh \
|
||||||
outputmedium.hh \
|
outputmedium.hh \
|
||||||
multilaterationmethod.hh \
|
trilaterationmethod.hh \
|
||||||
positioningalgorithm.hh
|
positioningalgorithm.hh
|
||||||
|
|
||||||
OBJ = $(OBJ_LIST:%=$(OBJ_DIR)/%)
|
OBJ = $(OBJ_LIST:%=$(OBJ_DIR)/%)
|
||||||
|
@ -306,7 +306,7 @@ $(OBJ_DIR)/output.o: \
|
||||||
$(OBJ_DIR)/outputtcpsocketevaal.o \
|
$(OBJ_DIR)/outputtcpsocketevaal.o \
|
||||||
$(OBJ_DIR)/configuration.o \
|
$(OBJ_DIR)/configuration.o \
|
||||||
$(OBJ_DIR)/posexcept.o
|
$(OBJ_DIR)/posexcept.o
|
||||||
$(OBJ_DIR)/multilaterationalgorithm.o: \
|
$(OBJ_DIR)/trilaterationalgorithm.o: \
|
||||||
$(SRC_DIR)/positioningalgorithm.hh \
|
$(SRC_DIR)/positioningalgorithm.hh \
|
||||||
$(OBJ_DIR)/minmax.o \
|
$(OBJ_DIR)/minmax.o \
|
||||||
$(OBJ_DIR)/mobile.o \
|
$(OBJ_DIR)/mobile.o \
|
||||||
|
@ -316,13 +316,13 @@ $(OBJ_DIR)/cartographyalgorithm.o: \
|
||||||
$(SRC_DIR)/positioningalgorithm.hh \
|
$(SRC_DIR)/positioningalgorithm.hh \
|
||||||
$(OBJ_DIR)/referencepoint.o
|
$(OBJ_DIR)/referencepoint.o
|
||||||
$(OBJ_DIR)/minmax.o: \
|
$(OBJ_DIR)/minmax.o: \
|
||||||
$(SRC_DIR)/multilaterationmethod.hh \
|
$(SRC_DIR)/trilaterationmethod.hh \
|
||||||
$(OBJ_DIR)/point3d.o \
|
$(OBJ_DIR)/point3d.o \
|
||||||
$(OBJ_DIR)/accesspoint.o
|
$(OBJ_DIR)/accesspoint.o
|
||||||
$(OBJ_DIR)/interlinknetworks.o: \
|
$(OBJ_DIR)/interlinknetworks.o: \
|
||||||
$(OBJ_DIR)/multilaterationalgorithm.o
|
$(OBJ_DIR)/trilaterationalgorithm.o
|
||||||
$(OBJ_DIR)/fbcm.o: \
|
$(OBJ_DIR)/fbcm.o: \
|
||||||
$(OBJ_DIR)/multilaterationalgorithm.o \
|
$(OBJ_DIR)/trilaterationalgorithm.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: \
|
||||||
|
|
|
@ -83,10 +83,10 @@ csv-file = /tmp/owlps-positioner.log
|
||||||
# Coordinates of the deployment area.
|
# Coordinates of the deployment area.
|
||||||
# This is used to delimit the area in which reference points are
|
# This is used to delimit the area in which reference points are
|
||||||
# generated (when generate-reference-points is activated), and also
|
# generated (when generate-reference-points is activated), and also
|
||||||
# by the MinMax multilateration method.
|
# by the MinMax trilateration method.
|
||||||
# Since MinMax is currently the only multilateration method implemented
|
# Since MinMax is currently the only trilateration method implemented
|
||||||
# in OwlPS, you should define these parameters if you use any of the
|
# 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
|
# With the autocalibration, the Z coordinate is the level's number, not
|
||||||
# a true coordinate in meters.
|
# a true coordinate in meters.
|
||||||
# They are declared as strings (X;Y;Z). Do not quote!
|
# They are declared as strings (X;Y;Z). Do not quote!
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
# 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):
|
||||||
# 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
|
# you must provide area-start and area-stop options that match the
|
||||||
# deployment area. That is, the cuboid formed by these two points
|
# deployment area. That is, the cuboid formed by these two points
|
||||||
# should include the whole deployment area.
|
# should include the whole deployment area.
|
||||||
|
|
|
|
@ -17,7 +17,7 @@ Result FBCM::compute(const Request &_request)
|
||||||
// Friis indexes each time we calculate a position
|
// Friis indexes each time we calculate a position
|
||||||
if (Configuration::bool_value("positioning.generate-reference-points"))
|
if (Configuration::bool_value("positioning.generate-reference-points"))
|
||||||
Stock::update_all_friis_indexes() ;
|
Stock::update_all_friis_indexes() ;
|
||||||
return MultilaterationAlgorithm::compute(_request) ;
|
return TrilaterationAlgorithm::compute(_request) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,10 +8,10 @@
|
||||||
#ifndef _OWLPS_POSITIONING_FBCM_HH_
|
#ifndef _OWLPS_POSITIONING_FBCM_HH_
|
||||||
#define _OWLPS_POSITIONING_FBCM_HH_
|
#define _OWLPS_POSITIONING_FBCM_HH_
|
||||||
|
|
||||||
#include "multilaterationalgorithm.hh"
|
#include "trilaterationalgorithm.hh"
|
||||||
|
|
||||||
/// Computes a position using the Interlink Networks formula
|
/// Computes a position using the Interlink Networks formula
|
||||||
class FBCM: public MultilaterationAlgorithm
|
class FBCM: public TrilaterationAlgorithm
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
float friis_index(const AccessPoint *const ap) const ;
|
float friis_index(const AccessPoint *const ap) const ;
|
||||||
|
|
|
@ -17,7 +17,7 @@ Result FRBHMBasic::compute(const Request &_request)
|
||||||
closest_in_ss = &select_point(_request) ;
|
closest_in_ss = &select_point(_request) ;
|
||||||
|
|
||||||
compute_ap_distance_circles() ;
|
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) ;
|
return Result(request, name, position) ;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,10 +8,10 @@
|
||||||
#ifndef _OWLPS_POSITIONING_INTERLINKNETWORKS_HH_
|
#ifndef _OWLPS_POSITIONING_INTERLINKNETWORKS_HH_
|
||||||
#define _OWLPS_POSITIONING_INTERLINKNETWORKS_HH_
|
#define _OWLPS_POSITIONING_INTERLINKNETWORKS_HH_
|
||||||
|
|
||||||
#include "multilaterationalgorithm.hh"
|
#include "trilaterationalgorithm.hh"
|
||||||
|
|
||||||
/// Computes a position using the Interlink Networks formula
|
/// Computes a position using the Interlink Networks formula
|
||||||
class InterlinkNetworks: public MultilaterationAlgorithm
|
class InterlinkNetworks: public TrilaterationAlgorithm
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
InterlinkNetworks(void): PositioningAlgorithm("InterlinkNetworks") {}
|
InterlinkNetworks(void): PositioningAlgorithm("InterlinkNetworks") {}
|
||||||
|
|
|
@ -12,7 +12,7 @@ using std::tr1::unordered_map ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Point3D MinMax::multilaterate(
|
Point3D MinMax::trilaterate(
|
||||||
const unordered_map<AccessPoint*, float> &_ap_distances)
|
const unordered_map<AccessPoint*, float> &_ap_distances)
|
||||||
{
|
{
|
||||||
min = INFINITE ;
|
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)
|
const unordered_map<AccessPoint*, float> &_ap_distances, float z)
|
||||||
{
|
{
|
||||||
min = INFINITE ;
|
min = INFINITE ;
|
||||||
|
|
|
@ -8,10 +8,10 @@
|
||||||
#ifndef _OWLPS_POSITIONING_MINMAX_HH_
|
#ifndef _OWLPS_POSITIONING_MINMAX_HH_
|
||||||
#define _OWLPS_POSITIONING_MINMAX_HH_
|
#define _OWLPS_POSITIONING_MINMAX_HH_
|
||||||
|
|
||||||
#include "multilaterationmethod.hh"
|
#include "trilaterationmethod.hh"
|
||||||
|
|
||||||
/// Multilaterates using the Lassabe's MinMax algorithm
|
/// Multilaterates using the Lassabe's MinMax algorithm
|
||||||
class MinMax: public MultilaterationMethod
|
class MinMax: public TrilaterationMethod
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
float min ;
|
float min ;
|
||||||
|
@ -37,9 +37,9 @@ public:
|
||||||
|
|
||||||
~MinMax(void) {}
|
~MinMax(void) {}
|
||||||
|
|
||||||
Point3D multilaterate(
|
Point3D trilaterate(
|
||||||
const std::tr1::unordered_map<AccessPoint*, float> &_ap_distances) ;
|
const std::tr1::unordered_map<AccessPoint*, float> &_ap_distances) ;
|
||||||
Point3D multilaterate_2d(
|
Point3D trilaterate_2d(
|
||||||
const std::tr1::unordered_map<AccessPoint*, float> &_ap_distances,
|
const std::tr1::unordered_map<AccessPoint*, float> &_ap_distances,
|
||||||
float z) ;
|
float z) ;
|
||||||
} ;
|
} ;
|
||||||
|
|
|
@ -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_
|
|
|
@ -5,7 +5,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "multilaterationalgorithm.hh"
|
#include "trilaterationalgorithm.hh"
|
||||||
#include "minmax.hh"
|
#include "minmax.hh"
|
||||||
#include "mobile.hh"
|
#include "mobile.hh"
|
||||||
#include "configuration.hh"
|
#include "configuration.hh"
|
||||||
|
@ -19,10 +19,10 @@ using std::tr1::unordered_map ;
|
||||||
/* *** Constructors *** */
|
/* *** Constructors *** */
|
||||||
|
|
||||||
|
|
||||||
MultilaterationAlgorithm::MultilaterationAlgorithm():
|
TrilaterationAlgorithm::TrilaterationAlgorithm():
|
||||||
request(NULL)
|
request(NULL)
|
||||||
{
|
{
|
||||||
// Will be changed when other multilateration methods will be
|
// Will be changed when other trilateration methods will be
|
||||||
// implemented.
|
// implemented.
|
||||||
|
|
||||||
if (! Configuration::is_configured("positioning.area-start") ||
|
if (! Configuration::is_configured("positioning.area-start") ||
|
||||||
|
@ -36,13 +36,13 @@ MultilaterationAlgorithm::MultilaterationAlgorithm():
|
||||||
Point3D minmax_stop(
|
Point3D minmax_stop(
|
||||||
Configuration::string_value("positioning.area-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 *** */
|
/* *** Operations *** */
|
||||||
|
|
||||||
|
|
||||||
double MultilaterationAlgorithm::
|
double TrilaterationAlgorithm::
|
||||||
make_constant_term(const Measurement &measurement)
|
make_constant_term(const Measurement &measurement)
|
||||||
{
|
{
|
||||||
assert(request) ;
|
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 ;
|
request = &_request ;
|
||||||
|
|
||||||
compute_ap_distance_circles() ;
|
compute_ap_distance_circles() ;
|
||||||
Point3D position(multilaterate()) ;
|
Point3D position(trilaterate()) ;
|
||||||
|
|
||||||
return Result(request, name, position) ;
|
return Result(request, name, position) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MultilaterationAlgorithm::compute_ap_distance_circles()
|
void TrilaterationAlgorithm::compute_ap_distance_circles()
|
||||||
{
|
{
|
||||||
ap_distances.clear() ;
|
ap_distances.clear() ;
|
||||||
|
|
|
@ -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_
|
|
@ -5,8 +5,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef _OWLPS_POSITIONING_MULTILATERATIONMETHOD_HH_
|
#ifndef _OWLPS_POSITIONING_TRILATERATIONMETHOD_HH_
|
||||||
#define _OWLPS_POSITIONING_MULTILATERATIONMETHOD_HH_
|
#define _OWLPS_POSITIONING_TRILATERATIONMETHOD_HH_
|
||||||
|
|
||||||
class AccessPoint ;
|
class AccessPoint ;
|
||||||
|
|
||||||
|
@ -14,26 +14,26 @@ class AccessPoint ;
|
||||||
|
|
||||||
#include <boost/tr1/unordered_map.hpp>
|
#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
|
* The source data is a list of access points associated with the
|
||||||
* distances to the mobile. These distances are estimated using a
|
* distances to the mobile. These distances are estimated using a
|
||||||
* MultilaterationAlgorithm.
|
* TrilaterationAlgorithm.
|
||||||
*/
|
*/
|
||||||
class MultilaterationMethod
|
class TrilaterationMethod
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MultilaterationMethod(void) {}
|
TrilaterationMethod(void) {}
|
||||||
virtual ~MultilaterationMethod(void) {}
|
virtual ~TrilaterationMethod(void) {}
|
||||||
|
|
||||||
/// Selects a point in 3D space
|
/// Selects a point in 3D space
|
||||||
virtual Point3D multilaterate(
|
virtual Point3D trilaterate(
|
||||||
const std::tr1::unordered_map<AccessPoint*, float> &ap_distances) = 0 ;
|
const std::tr1::unordered_map<AccessPoint*, float> &ap_distances) = 0 ;
|
||||||
|
|
||||||
/// Selects a point in 2D space, given its vertical coordinate (z)
|
/// 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,
|
const std::tr1::unordered_map<AccessPoint*, float> &ap_distances,
|
||||||
float z) = 0 ;
|
float z) = 0 ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
#endif // _OWLPS_POSITIONING_MULTILATERATIONMETHOD_HH_
|
#endif // _OWLPS_POSITIONING_TRILATERATIONMETHOD_HH_
|
|
@ -228,7 +228,7 @@ void UserInterface::fill_positioning_options()
|
||||||
("positioning.area-start",
|
("positioning.area-start",
|
||||||
po::value<string>(),
|
po::value<string>(),
|
||||||
"Coordinates of the first point of the deployment area; this is"
|
"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"
|
" method tests points and in which the reference points are"
|
||||||
" generated, if the corresponding options are activated"
|
" generated, if the corresponding options are activated"
|
||||||
" (string format: \"X;Y;Z\").")
|
" (string format: \"X;Y;Z\").")
|
||||||
|
|
|
@ -8,7 +8,7 @@ public:
|
||||||
|
|
||||||
void test_select_point(void)
|
void test_select_point(void)
|
||||||
{
|
{
|
||||||
MultilaterationAlgorithm *algo = new FBCM() ;
|
TrilaterationAlgorithm *algo = new FBCM() ;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* TODO: implement the test.
|
* TODO: implement the test.
|
||||||
|
|
|
@ -8,7 +8,7 @@ public:
|
||||||
|
|
||||||
void test_distance(void)
|
void test_distance(void)
|
||||||
{
|
{
|
||||||
MultilaterationAlgorithm *algo = new InterlinkNetworks() ;
|
TrilaterationAlgorithm *algo = new InterlinkNetworks() ;
|
||||||
|
|
||||||
// Initialise algo->request
|
// Initialise algo->request
|
||||||
char mobile_gain = 3, mobile_power = 15 ;
|
char mobile_gain = 3, mobile_power = 15 ;
|
||||||
|
|
|
@ -6,11 +6,11 @@ class MinMax_test: public CxxTest::TestSuite
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void test_multilaterate(void)
|
void test_trilaterate(void)
|
||||||
{
|
{
|
||||||
Point3D start(0,0,0), stop(10,10,4) ;
|
Point3D start(0,0,0), stop(10,10,4) ;
|
||||||
float step = 0.5 ;
|
float step = 0.5 ;
|
||||||
MultilaterationMethod *minmax = new MinMax(start, stop, step) ;
|
TrilaterationMethod *minmax = new MinMax(start, stop, step) ;
|
||||||
|
|
||||||
AccessPoint
|
AccessPoint
|
||||||
ap1(Point3D(0,0,0)),
|
ap1(Point3D(0,0,0)),
|
||||||
|
@ -24,7 +24,7 @@ public:
|
||||||
ap_distances[&ap4] = 4 ;
|
ap_distances[&ap4] = 4 ;
|
||||||
Point3D wanted_result(5,5,0) ;
|
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):
|
// Wrong with a step of 0.1 (for this test case):
|
||||||
TS_ASSERT_EQUALS(result, wanted_result) ;
|
TS_ASSERT_EQUALS(result, wanted_result) ;
|
||||||
// We can then use something like that:
|
// We can then use something like that:
|
||||||
|
|
Loading…
Reference in New Issue