File: XPositionRespV3.cpp

package info (click to toggle)
cigi-ccl 3.3.3a%2Bsvn818-7
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 7,332 kB
  • ctags: 7,175
  • sloc: cpp: 62,566; makefile: 541; ruby: 400; ansic: 313; sh: 68
file content (84 lines) | stat: -rw-r--r-- 1,814 bytes parent folder | download | duplicates (2)
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
// XPositionRespV3.cpp: Body of the XPositionRespV3 class.
//
//////////////////////////////////////////////////////////////////////

#include "XPositionRespV3.h"
#include <CigiPositionRespV3.h>

#include <stdio.h>

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

XPositionRespV3::XPositionRespV3()
{

}

XPositionRespV3::~XPositionRespV3()
{

}


void XPositionRespV3::OnPacketReceived(CigiBasePacket *Packet)
{
   CigiPositionRespV3 *InPckt = (CigiPositionRespV3 *)Packet;


   printf("Position Response V3:\n");
   printf("\tObject ID = %u\n",InPckt->GetObjectID());
   printf("\tArticulated Part ID = %u\n",InPckt->GetArtPartID());

   printf("\tObject Class = %d : ",InPckt->GetObjectClass());
   switch(InPckt->GetObjectClass())
   {
   case 0:
      printf("Entity\n");
      break;
   case 1:
      printf("ArtPart\n");
      break;
   case 2:
      printf("View\n");
      break;
   case 3:
      printf("ViewGrp\n");
      break;
   case 4:
      printf("MotionTracker\n");
      break;
   default:
      printf("\n");
      break;
   }


   printf("\tCoordinate System = %d : ",InPckt->GetCoordSys());
   switch(InPckt->GetCoordSys())
   {
   case 0:
      printf("Geodetic\n");
      break;
   case 1:
      printf("ParentEntity\n");
      break;
   case 2:
      printf("Submodel\n");
      break;
   default:
      printf("\n");
      break;
   }

   printf("\tLat or X offset = %f\n",InPckt->GetLatOrXoff());
   printf("\tLon or Y offset = %f\n",InPckt->GetLonOrYoff());
   printf("\tAlt or Z offset = %f\n",InPckt->GetAltOrZoff());
   printf("\tRoll = %f\n",InPckt->GetRoll());
   printf("\tPitch = %f\n",InPckt->GetPitch());
   printf("\tYaw = %f\n",InPckt->GetYaw());

}