2012-02-06 16:44:09 +01:00
|
|
|
/*
|
2013-05-29 18:43:35 +02:00
|
|
|
* This file is part of the Owl Positioning System (OwlPS) project.
|
|
|
|
* It is subject to the copyright notice and license terms in the
|
|
|
|
* COPYRIGHT.t2t file found in the top-level directory of this
|
|
|
|
* distribution and at
|
|
|
|
* http://code.lm7.fr/p/owlps/source/tree/master/COPYRIGHT.t2t
|
|
|
|
* No part of the OwlPS Project, including this file, may be copied,
|
|
|
|
* modified, propagated, or distributed except according to the terms
|
|
|
|
* contained in the COPYRIGHT.t2t file; the COPYRIGHT.t2t file must be
|
|
|
|
* distributed along with this file, either separately or by replacing
|
|
|
|
* this notice by the COPYRITGHT.t2t file's contents.
|
2012-02-06 16:44:09 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2012-04-11 16:31:48 +02:00
|
|
|
#ifndef _OWLPS_POSITIONING_TRILATERATIONMETHOD_HH_
|
|
|
|
#define _OWLPS_POSITIONING_TRILATERATIONMETHOD_HH_
|
2010-03-22 13:47:19 +01:00
|
|
|
|
|
|
|
class AccessPoint ;
|
|
|
|
|
|
|
|
#include "point3d.hh"
|
|
|
|
|
|
|
|
#include <boost/tr1/unordered_map.hpp>
|
|
|
|
|
2012-04-11 16:31:48 +02:00
|
|
|
/// Super-class of all trilateration methods
|
2010-03-22 13:47:19 +01:00
|
|
|
/**
|
|
|
|
* The source data is a list of access points associated with the
|
|
|
|
* distances to the mobile. These distances are estimated using a
|
2012-04-11 16:31:48 +02:00
|
|
|
* TrilaterationAlgorithm.
|
2010-03-22 13:47:19 +01:00
|
|
|
*/
|
2012-04-11 16:31:48 +02:00
|
|
|
class TrilaterationMethod
|
2010-03-22 13:47:19 +01:00
|
|
|
{
|
|
|
|
public:
|
2012-04-11 16:31:48 +02:00
|
|
|
TrilaterationMethod(void) {}
|
|
|
|
virtual ~TrilaterationMethod(void) {}
|
2010-03-22 13:47:19 +01:00
|
|
|
|
2011-06-20 12:11:20 +02:00
|
|
|
/// Selects a point in 3D space
|
2012-04-11 16:31:48 +02:00
|
|
|
virtual Point3D trilaterate(
|
2010-03-22 13:47:19 +01:00
|
|
|
const std::tr1::unordered_map<AccessPoint*, float> &ap_distances) = 0 ;
|
2010-06-14 17:15:48 +02:00
|
|
|
|
2011-06-20 12:11:20 +02:00
|
|
|
/// Selects a point in 2D space, given its vertical coordinate (z)
|
2012-04-11 16:31:48 +02:00
|
|
|
virtual Point3D trilaterate_2d(
|
2010-06-14 17:15:48 +02:00
|
|
|
const std::tr1::unordered_map<AccessPoint*, float> &ap_distances,
|
|
|
|
float z) = 0 ;
|
2010-03-22 13:47:19 +01:00
|
|
|
} ;
|
|
|
|
|
2012-04-11 16:31:48 +02:00
|
|
|
#endif // _OWLPS_POSITIONING_TRILATERATIONMETHOD_HH_
|