29#ifndef MULTILATERATION_H
30#define MULTILATERATION_H
33#include <itpp/itexports.h>
89 enum Type {MULTI_FAILURE = -1,
96 algo_(
NULL), nb_fails_part(0), nb_fails_pos(0), type_(MULTI_FAILURE), method_(
itpp::bvec()), bs_pos_(
NULL), nb_bs_(0)
109 algo_(
NULL), nb_fails_part(0), nb_fails_pos(0), type_(MULTI_FAILURE), method_(
itpp::bvec()), bs_pos_(
NULL), nb_bs_(0) {
124 void setup(
const itpp::bvec &method,
127 if((
false == set_bs_pos(
bs_pos)) || (
false == set_method(method))) {
128 it_error(
"cannot init multilateration");
159 return nb_fails_part;
175 double get_crlb(
const vec &
ms_pos,
182 bool set_method(
const itpp::bvec &method);
184 bool set_bs_pos(
const itpp::mat &
bs_pos);
186 bool hybrid2spherical(Point *
bs_pos,
double *
meas);
193 bool prod(
double *
out,
const double *
AT,
const unsigned int *d,
unsigned int cols,
unsigned int rows);
195 unsigned int nb_fails_part;
196 unsigned int nb_fails_pos;
Multilateration class for 3D indoor localization
bool get_pos(itpp::vec &ms_pos, const itpp::mat &measures)
Computes the mobile station position for hyperbolic multilateration.
Type
Multilateration types as detected from user input (method binary vector)
@ MULTI_HYPERBOLIC
hyperbolic multilateration
@ MULTI_SPHERICAL
spherical multilateration
bool get_pos(itpp::vec &ms_pos, const itpp::vec &measures)
Computes the mobile station position for spherical and hybrid multilateration.
unsigned int get_nb_fails_part() const
Gets the number of failures of the partitioning algorithm used internally by the ML-estimator.
Multilateration(const itpp::bvec &method, const itpp::mat &bs_pos)
Multilateration class constructor
Multilateration()
Multilateration class default constructor
Type get_type() const
Gets the type of the multilateration method currently used by the ML-estimator.
void setup(const itpp::bvec &method, const itpp::mat &bs_pos)
Setup function for specifying the multilateration method and the base station positions.
unsigned int get_nb_fails_pos() const
Gets the number of failures of the positioning algorithm used internally by the ML-estimator.
void reset_err_counters()
Resets the error counters (number of failures for the partitioning and positioning algorithms)
#define it_error(s)
Abort unconditionally.
T prod(const Vec< T > &v)
The product of all elements in the vector.
Include file for the IT++ base module.