MIRA
RTLS.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) by
3  * MetraLabs GmbH (MLAB), GERMANY
4  * All rights reserved.
5  *
6  * Redistribution and modification of this code is strictly prohibited.
7  *
8  * IN NO EVENT SHALL "MLAB" BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
9  * SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE
10  * OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF "MLABS" HS BEEN
11  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12  *
13  * "MLAB" SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
14  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
15  * A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN
16  * "AS IS" BASIS, AND "MLAB" HAS NO OBLIGATION TO PROVIDE MAINTENANCE,
17  * SUPPORT, UPDATES, ENHANCEMENTS OR MODIFICATIONS.
18  */
19 
28 #ifndef _MLAB_LOCALIZATION_RTLS_H_
29 #define _MLAB_LOCALIZATION_RTLS_H_
30 
31 #include <serialization/adapters/std/vector>
32 
33 #include <geometry/Rect.h>
34 
35 #include <geometry/Point.h>
36 
37 namespace mira { namespace localization {
38 
40 
42 struct RTLSBeacon
43 {
44  RTLSBeacon() : pos(0.0f, 0.0f, 0.0f) {}
45 
46  template<typename Reflector>
47  void reflect(Reflector& r)
48  {
49  r.member("ID", id, "Identifier of the beacon.");
50  r.member("Pos", pos, "Global position of the beacon.");
51  r.member("Label", label, "Beacon label according to BeaconMap");
52  }
53 
54  std::string id;
56  std::string label;
57 };
58 
60 typedef std::vector<RTLSBeacon> RTLSBeaconMap;
61 
63 
66 {
67  RTLSMeasurement() : distance(-1.0f) {}
68 
69  template<typename Reflector>
70  void reflect(Reflector& r)
71  {
72  r.member("Beacon", beacon, "Measured beacon.");
73 
74  r.member("Distance", distance, "Measured distance in [m].");
75  r.member("RSSI", rssi, "RSSI value.");
76  r.member("Error", error, "Error value.");
77  }
78 
80 
81  float distance;
82  float rssi;
83  std::string error;
84 };
85 
87 typedef std::vector<RTLSMeasurement> RTLSMeasurementList;
88 
90 
93  float sensorZPosition, float* oError = NULL);
94 
96 
99  float sensorZPosition, Rect2f votingMap,
100  float* oError = NULL, int minIntersections = 3,
101  bool dynamicMapSize = true, float maxGridFactor = 0.5f,
102  float minGridSize = 0.25f, float shrinkFactor = 0.5f);
103 
105 
108  float sensorZPosition, float* oError = NULL);
109 
111 
112 }}
113 
114 #endif
Point2f rtlsMeasurementToPointXYIBLE(RTLSMeasurementList &measurements, float sensorZPosition, float *oError=NULL)
Intersection-Based Location Estimation (IBLE)
Point2f rtlsMeasurementToPointXYMultilateration(RTLSMeasurementList &measurements, float sensorZPosition, float *oError=NULL)
Multilateration.
Point3f pos
Definition: RTLS.h:55
float distance
Definition: RTLS.h:81
Point2f rtlsMeasurementToPointXYAVBLE(RTLSMeasurementList &measurements, float sensorZPosition, Rect2f votingMap, float *oError=NULL, int minIntersections=3, bool dynamicMapSize=true, float maxGridFactor=0.5f, float minGridSize=0.25f, float shrinkFactor=0.5f)
Adaptive Voting-Based Location Estimation (AVBLE)
RTLSMeasurement()
Definition: RTLS.h:67
RTLSBeacon beacon
Definition: RTLS.h:79
std::vector< RTLSMeasurement > RTLSMeasurementList
A vector of RTLS measurements.
Definition: RTLS.h:87
A measurement from a RTLS beacon.
Definition: RTLS.h:65
std::string id
Definition: RTLS.h:54
RTLSBeacon()
Definition: RTLS.h:44
void reflect(Reflector &r)
Definition: RTLS.h:70
A single RTLS beacon.
Definition: RTLS.h:42
std::string error
Definition: RTLS.h:83
std::string label
Definition: RTLS.h:56
void reflect(Reflector &r)
Definition: RTLS.h:47
float rssi
Definition: RTLS.h:82
std::vector< RTLSBeacon > RTLSBeaconMap
A vector of RTLS beacons.
Definition: RTLS.h:60