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.
111 lines
3.3 KiB
111 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 "../gagua/crt_log.h"
|
|
#include "stream.h"
|
|
|
|
#include "camera.h"
|
|
#include "relay.h"
|
|
#include "areset.h"
|
|
|
|
typedef struct {
|
|
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;
|
|
|
|
typedef struct {
|
|
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
|
|
|
|
INT nDelaySST; //GA: For GLS Mirror delay for scan2scan tracking
|
|
|
|
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;
|
|
|
|
class CTracker{
|
|
public:
|
|
CTracker();
|
|
CTracker(CCRT_Log *CLG);
|
|
~CTracker();
|
|
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; }
|
|
void Invalidate();
|
|
void SetLogging(CCRT_Log *CLG, char *GID){
|
|
this->LG=CLG;
|
|
this->name=GID;
|
|
this->LogMsg("Tracker Connected to Logging",'G');
|
|
}
|
|
#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
|
|
BOOL GetTarget( PTARGET pTarget ) {
|
|
return m_TargetStream.Get( pTarget );
|
|
}
|
|
INT GetLastErrorOverflow() {
|
|
return m_TargetStream.GetOverflow();
|
|
}
|
|
INT GetLastErrorOverflowSST() {
|
|
INT nError = m_nErrorOverflowSST;
|
|
m_nErrorOverflowSST = 0;
|
|
return nError;
|
|
}
|
|
#ifdef DEBUG_GRAPH_SCREEN_SST
|
|
void SetIndex( INT nIndex ) { m_nIndex = nIndex; }
|
|
#endif
|
|
private:
|
|
CCRT_Log *LG; // Pointer to Global Logging Object
|
|
char *name; // Object ID for debugging purposes
|
|
void LogMsg(char *MSG,char cMType='Z'){
|
|
if (this->LG){
|
|
this->LG->print(MSG, cMType,this->name);
|
|
};
|
|
};
|
|
TARGET_EX m_pTargets[ LGS_MAX_TRACKER_TARGETS ];
|
|
PTARGET_EX m_ppTargets[ LGS_MAX_TRACKER_TARGETS ];
|
|
INT m_nTargetCount;
|
|
INT m_nLevel;
|
|
CFastStreamOverflow<TARGET,LGS_TRACKER_MAX_TARGETS> m_TargetStream;
|
|
INT m_nErrorOverflowSST;
|
|
#ifdef DEBUG_GRAPH_SCREEN_SST
|
|
INT m_nTargetColumn;
|
|
INT m_nIndex;
|
|
#endif
|
|
CCamera *m_pCamera;
|
|
CRelay *m_pRelay;
|
|
CAutoReset *m_pAutoReset;
|
|
BOOL m_bDisabled;
|
|
};
|
|
|
|
#endif
|