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.
125 lines
3.3 KiB
125 lines
3.3 KiB
//----------------------------------------------------------------------------
|
|
// Laser Guard Ltd.
|
|
// Copyright © 2000-2002. All Rights Reserved.
|
|
// Version 1.0 01/01/2000
|
|
// Last modification: 08/10/2003
|
|
// PROJECT:
|
|
// SUBSYSTEM:
|
|
// FILE: Tracker.h
|
|
// AUTHOR: Sergey Chizhevskiy
|
|
// OVERVIEW
|
|
// ~~~~~~~~
|
|
// Header file of Tracker.h
|
|
//----------------------------------------------------------------------------
|
|
#ifndef __TRACKER__H__INCLUDED__
|
|
#define __TRACKER__H__INCLUDED__
|
|
|
|
#include "StdAfx.h"
|
|
#include "..\lglib\comm\lgsm.h"
|
|
#include "stream.h"
|
|
|
|
#include "camera.h"
|
|
#include "relay.h"
|
|
#include "areset.h"
|
|
|
|
#ifdef INCLUDE_WINDOWS_DEFINITIONS
|
|
// #include "camera.h"
|
|
// #include "relay.h"
|
|
#else
|
|
/* class CCamera
|
|
{
|
|
public:
|
|
void OnTarget( INT nAngle, INT nRange ){}
|
|
void Invalidate( DWORD nSlowTimer, WORD nFastTimer, BOOL bFastTimeValid ){}
|
|
};
|
|
class CRelay
|
|
{
|
|
public:
|
|
void OnTarget( INT nAngle, INT nRange ){}
|
|
void Invalidate( WORD nFastTimer, DWORD nSlowTimer ) {}
|
|
};
|
|
*/
|
|
#endif
|
|
|
|
class CTracker
|
|
{
|
|
public:
|
|
CTracker();
|
|
~CTracker();
|
|
void RemoveTarget( INT nTargetID );
|
|
public:
|
|
BOOL Create( BOOL bDisabled, CCamera *pCamera, CRelay *pRelay, CAutoReset *pAutoReset );
|
|
void Reset();
|
|
void Destroy();
|
|
void SetLevel( INT nLevel ) { m_nLevel = nLevel; }
|
|
INT GetLevel() { return m_nLevel; }
|
|
public:
|
|
void Invalidate();
|
|
#ifdef LGS_TEST_SEND_TARGET_WIDTH
|
|
BOOL AddTarget( BYTE bType, INT nAngle, INT nRange, LONG nWidth );
|
|
#else
|
|
BOOL AddTarget( BYTE bType, INT nAngle, INT nRange );
|
|
#endif
|
|
|
|
public:
|
|
typedef struct TARGET
|
|
{
|
|
BYTE bType; // target type
|
|
INT nAngle; // target angle
|
|
INT nRange; // target range
|
|
#ifdef LGS_TEST_SEND_TARGET_WIDTH
|
|
LONG nWidth; // target width
|
|
#endif
|
|
}TARGET, *PTARGET;
|
|
BOOL GetTarget( PTARGET pTarget ) { return m_TargetStream.Get( pTarget ); }
|
|
|
|
public:
|
|
INT GetLastErrorOverflow() { return m_TargetStream.GetOverflow(); }
|
|
INT GetLastErrorOverflowSST() { INT nError = m_nErrorOverflowSST; m_nErrorOverflowSST = 0; return nError; }
|
|
|
|
private:
|
|
typedef struct TARGET_EX
|
|
{
|
|
TARGET target;
|
|
INT nRemoveTime; // time when target shuld be removed as false alarm
|
|
INT nDetectionTime; // time when begins comparison with other incoming targets
|
|
INT nLevel; // current level of target
|
|
#ifdef LGS_MIRROR
|
|
INT nDelaySST; // Delay SST decrement for LGS Mirror system
|
|
#endif
|
|
INT nAngleMin; // scan2scan area left order in board angle units
|
|
INT nAngleMax; // scan2scan area right order in board angle units
|
|
INT nRangeMin; // scan2scan area bottom offset in board range units
|
|
INT nRangeMax; // scan2scan area top offset in board range units
|
|
#ifdef DEBUG_GRAPH_SCREEN_SST
|
|
LONG nP[4];
|
|
#endif
|
|
}TARGET_EX, *PTARGET_EX, far*LPTARGET_EX;
|
|
|
|
private:
|
|
TARGET_EX m_pTargets[ LGS_MAX_TRACKER_TARGETS ];
|
|
PTARGET_EX m_ppTargets[ LGS_MAX_TRACKER_TARGETS ];
|
|
INT m_nTargetCount;
|
|
INT m_nLevel;
|
|
|
|
private:
|
|
CFastStreamOverflow<TARGET,LGS_TRACKER_MAX_TARGETS> m_TargetStream;
|
|
INT m_nErrorOverflowSST;
|
|
|
|
#ifdef DEBUG_GRAPH_SCREEN_SST
|
|
public:
|
|
void SetIndex( INT nIndex ) { m_nIndex = nIndex; }
|
|
private:
|
|
INT m_nTargetColumn;
|
|
INT m_nIndex;
|
|
#endif
|
|
private:
|
|
CCamera *m_pCamera;
|
|
CRelay *m_pRelay;
|
|
CAutoReset *m_pAutoReset;
|
|
|
|
private:
|
|
BOOL m_bDisabled;
|
|
};
|
|
|
|
#endif
|