1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
// XSensorXRespV3.cpp: Body of the XSensorXRespV3 class.
//
//////////////////////////////////////////////////////////////////////
#include "XSensorXRespV3.h"
#include <CigiSensorXRespV3.h>
#include <stdio.h>
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
XSensorXRespV3::XSensorXRespV3()
{
}
XSensorXRespV3::~XSensorXRespV3()
{
}
void XSensorXRespV3::OnPacketReceived(CigiBasePacket *Packet)
{
CigiSensorXRespV3 *InPckt = (CigiSensorXRespV3 *)Packet;
printf("Sensor Extended Response V3:\n");
printf("\tView ID = %u\n",InPckt->GetViewID());
printf("\tSensor ID = %u\n",InPckt->GetSensorID());
printf("\tSensor Status = %d : ",InPckt->GetSensorStat());
switch(InPckt->GetSensorStat())
{
case 0:
printf("Searching\n");
break;
case 1:
printf("Tracking\n");
break;
case 2:
printf("NearBrakeLock\n");
break;
case 3:
printf("BrakeLock\n");
break;
default:
printf("\n");
break;
}
printf("\tEntity Target = %d\n",InPckt->GetEntityTgt());
printf("\tEntity ID = %u\n",InPckt->GetEntityID());
printf("\tGate Size X = %u\n",InPckt->GetGateSzX());
printf("\tGate Size Y = %u\n",InPckt->GetGateSzY());
printf("\tGate X offset = %f\n",InPckt->GetGateXoff());
printf("\tGate Y offset = %f\n",InPckt->GetGateYoff());
printf("\tFrame Counter = %u\n",InPckt->GetFrameCntr());
printf("\tTrack Point Latitude = %f\n",InPckt->GetTrackPntLat());
printf("\tTrack Point Longitude = %f\n",InPckt->GetTrackPntLon());
printf("\tTrack Point Altitude = %f\n",InPckt->GetTrackPntAlt());
}
|