owlps/owlps-positioner/trilaterationmethod.hh

47 lines
1.5 KiB
C++

/*
* 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
* https://code.lm7.fr/mcy/owlps/src/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 COPYRIGHT.t2t file's contents.
*/
#ifndef _OWLPS_POSITIONING_TRILATERATIONMETHOD_HH_
#define _OWLPS_POSITIONING_TRILATERATIONMETHOD_HH_
class CapturePoint ;
#include "point3d.hh"
#include <unordered_map>
/// Super-class of all trilateration methods
/**
* The source data is a list of capture points associated with the
* distances to the mobile. These distances are estimated using a
* TrilaterationAlgorithm.
*/
class TrilaterationMethod
{
public:
TrilaterationMethod(void) {}
virtual ~TrilaterationMethod(void) {}
/// Selects a point in 3D space
virtual Point3D trilaterate(
const std::unordered_map<const CapturePoint*, float> &cp_distances) = 0 ;
/// Selects a point in 2D space, given its vertical coordinate (z)
virtual Point3D trilaterate_2d(
const std::unordered_map<const CapturePoint*, float> &cp_distances,
const float z) = 0 ;
} ;
#endif // _OWLPS_POSITIONING_TRILATERATIONMETHOD_HH_