target.h
Go to the documentation of this file.
1 /**************************************************************************************************
2  Software License Agreement (BSD License)
3 
4  Copyright (c) 2011-2013, LAR toolkit developers - University of Aveiro - http://lars.mec.ua.pt
5  All rights reserved.
6 
7  Redistribution and use in source and binary forms, with or without modification, are permitted
8  provided that the following conditions are met:
9 
10  *Redistributions of source code must retain the above copyright notice, this list of
11  conditions and the following disclaimer.
12  *Redistributions in binary form must reproduce the above copyright notice, this list of
13  conditions and the following disclaimer in the documentation and/or other materials provided
14  with the distribution.
15  *Neither the name of the University of Aveiro nor the names of its contributors may be used to
16  endorse or promote products derived from this software without specific prior written permission.
17 
18  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
19  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
21  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
24  IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
25  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 ***************************************************************************************************/
32 #ifndef _TARGET_H_
33 #define _TARGET_H_
34 
35 #include <vector>
36 #include <string>
37 
38 #include <mtt/measurement.h>
39 #include <mtt/motionModel.h>
40 #include <mtt/metrics.h>
41 
42 using namespace std;
43 
46 typedef boost::shared_ptr<Measurement> MeasurementPtr;
47 
48 class Target;
50 typedef boost::shared_ptr<Target> TargetPtr;
51 
52 class Target: public MotionModel
53 {
54  public:
55 
56  double stt;
57 
59  long _cluster;
60  long _id;
62  string _variant;
63  long _uid;
64  long _exuid;
65 // static long _euid;
66 // static long _ntotal;
67  static long _euid;
68  static long _ntotal;
69 
70  double _aux1;
71 
72  vector<MeasurementPtr> _assigned_measurements;
73  vector<long> _concurrent_targets;
74  vector<Vector5d> _past_states;
75 
76  Target();
77 
78  ~Target();
79 
80  Target(TargetPtr prev_target);
81 
82  Target(TargetPtr prev_target,MeasurementPtr measurement);
83 
84  Target(MeasurementPtr measurement);
85 
86  void incrementMissedAssociations(int inc=1);
87 
88  void decrementMissedAssociations(int dec=1);
89 
90  void zeroMissedAssociations(void);
91 
92  double getDistance(MeasurementPtr& mes,int algorithm=0);
93 
94  double getDistanceToPredictedPosition(TargetPtr& target,int algorithm=0);
95 
96  void cleanTargetAssociations(void);
97 
98  friend ostream& operator<<(ostream& o,Target& t);
99 };
100 
104 
105 
106 #endif
double stt
Definition: target.h:56
static long _euid
Definition: target.h:67
boost::shared_ptr< Measurement > MeasurementPtr
Definition: cluster.h:47
bool compareTargetsById(TargetPtr t1, TargetPtr t2)
Definition: target.cpp:304
Definition: target.h:52
vector< Vector5d > _past_states
Definition: target.h:74
double _aux1
Definition: target.h:70
bool compareTargetsByAux1Descending(TargetPtr t1, TargetPtr t2)
Definition: target.cpp:314
Measurement class type.
Definition: measurement.h:60
ostream & operator<<(ostream &o, vector< ClusterPtr > &c)
Cluster vector print function.
Definition: cluster.cpp:133
Measurement class declaration.
long _id
Definition: target.h:60
long _cluster
Definition: target.h:59
static long _ntotal
Definition: target.h:68
vector< MeasurementPtr > _assigned_measurements
Definition: target.h:72
boost::shared_ptr< Measurement > MeasurementPtr
Shared pointer to the Measurement class.
Definition: target.h:44
Motion model class declaration.
long _exuid
Definition: target.h:64
Timer t
Definition: k_best.cpp:34
long _missed_associations
Definition: target.h:61
bool compareTargetsByAux1(TargetPtr t1, TargetPtr t2)
Definition: target.cpp:309
Nonholonomic Motion model abstraction layer.
Definition: motionModel.h:46
boost::shared_ptr< Target > TargetPtr
Shared pointer to the Target class.
Definition: hypothesis.h:37
string _variant
Definition: target.h:62
long _hypothesis
Definition: target.h:58
vector< long > _concurrent_targets
Definition: target.h:73
boost::shared_ptr< Target > TargetPtr
Shared pointer to the Target class.
Definition: target.h:48
long _uid
Definition: target.h:63
Distance metrics declaration.


mtt
Author(s): Jorge Almeida
autogenerated on Mon Mar 2 2015 01:32:18