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
|
2013-06-22 23:30:17 +02:00
|
|
|
* this notice by the COPYRIGHT.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
|
|
|
|
2013-06-14 21:54:26 +02:00
|
|
|
class CapturePoint ;
|
2010-03-22 13:47:19 +01:00
|
|
|
|
|
|
|
#include "point3d.hh"
|
|
|
|
|
2013-05-30 20:13:44 +02:00
|
|
|
#include <unordered_map>
|
2010-03-22 13:47:19 +01:00
|
|
|
|
2012-04-11 16:31:48 +02:00
|
|
|
/// Super-class of all trilateration methods
|
2010-03-22 13:47:19 +01:00
|
|
|
/**
|
2013-06-14 21:54:26 +02:00
|
|
|
* The source data is a list of capture points associated with the
|
2010-03-22 13:47:19 +01:00
|
|
|
* 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(
|
2013-06-14 21:54:26 +02:00
|
|
|
const std::unordered_map<CapturePoint*, float> &cp_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(
|
2013-06-14 21:54:26 +02:00
|
|
|
const std::unordered_map<CapturePoint*, float> &cp_distances,
|
2010-06-14 17:15:48 +02:00
|
|
|
float z) = 0 ;
|
2010-03-22 13:47:19 +01:00
|
|
|
} ;
|
|
|
|
|
2012-04-11 16:31:48 +02:00
|
|
|
#endif // _OWLPS_POSITIONING_TRILATERATIONMETHOD_HH_
|