You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
2.1 KiB
73 lines
2.1 KiB
#ifndef __LRF_TARGETTRACKER_H_INCL__
|
|
#define __LRF_TARGETTRACKER_H_INCL__
|
|
|
|
#include "../../components/base/basicFunctionality.h"
|
|
#include "../../components/base/basicLogCollection.h"
|
|
#include "../../components/base/basicEventHeap.h"
|
|
#include "../../hardware/soc/general/3DLRF.h"
|
|
|
|
#include <math.h>
|
|
|
|
#define TRACKER_MAX_TARGETS_POOL 128
|
|
#define TRACKER_DEFAULT_TTL_VALUE 3 // Scans to live
|
|
|
|
typedef vector<uint32_t> vectorIDS;
|
|
|
|
typedef struct S_TRACKING_RECORD{
|
|
bool bActive;
|
|
bool bMaster;
|
|
bool bType;
|
|
// Time
|
|
uint32_t nUTS;
|
|
uint32_t nUTmS;
|
|
// Legacy
|
|
uint32_t beginID;
|
|
uint32_t endID;
|
|
uint8_t kernelID;
|
|
// Position in Sample Matrix
|
|
uint32_t beginColumn;
|
|
uint16_t beginRow;
|
|
uint32_t endColumn;
|
|
uint16_t endRow;
|
|
// Detected Sample Data
|
|
uint32_t area;
|
|
uint32_t reducedRange;
|
|
uint32_t areaCount;
|
|
// Tracking Purpose variables
|
|
uint32_t mTTL;
|
|
uint32_t mSST;
|
|
}TRACKING_RECORD;
|
|
|
|
/**
|
|
* TODO: Add class description
|
|
*
|
|
* @author gagua
|
|
*/
|
|
class LRF_TargetTracker {
|
|
private:
|
|
basicLogCollection * m_pLog;
|
|
basicEventHeap * m_pEventHeap;
|
|
uint32_t m_nSST;
|
|
bool m_bPoolOverflow;
|
|
uint32_t m_nWidth;
|
|
uint32_t m_nDelta;
|
|
uint32_t m_nSTS;
|
|
uint32_t m_nSTS_R;
|
|
TRACKING_RECORD m_aTargetsPool[TRACKER_MAX_TARGETS_POOL];
|
|
TRACKING_RECORD * createTrackingRecord( targetRecord *TR, bool master = true );
|
|
void clearTrackingRecord( int index );
|
|
bool compareTrackingRecords( TRACKING_RECORD *A, TRACKING_RECORD *B );
|
|
void extentTrackingRecord( TRACKING_RECORD *A, TRACKING_RECORD *B );
|
|
public:
|
|
// Constructor
|
|
explicit LRF_TargetTracker( int SST = 0, uint32_t Width = 0, uint32_t Delta = 32 );
|
|
|
|
// Destructor
|
|
virtual ~LRF_TargetTracker();
|
|
int validateTarget( targetRecord *TR, bool master = true );
|
|
void ScanComplete( void );
|
|
void MirrorComplete( void );
|
|
uint32_t getSST( void ){ return m_nSST; };
|
|
};
|
|
|
|
#endif // __LRF_TARGETTRACKER_H_INCL__
|