Note what we have to be careful of before we start using Unicode in the
[obnox/wireshark/wip.git] / epan / dissectors / packet-cigi.c
1 /* packet-cigi.c
2  * Routines for Common Image Generator Interface 
3  * (Versions 2 and 3 ) dissection
4  * CIGI - http://cigi.sourceforge.net/
5  * Copyright (c) 2005 The Boeing Company
6  *
7  * $Id: README.developer 15753 2005-09-10 19:43:41Z guy $
8  *
9  * Ethereal - Network traffic analyzer
10  * By Gerald Combs <gerald@ethereal.com>
11  * Copyright 1998 Gerald Combs
12  *
13  * This program is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU General Public License
15  * as published by the Free Software Foundation; either version 2
16  * of the License, or (at your option) any later version.
17  * 
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  * GNU General Public License for more details.
22  * 
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software
25  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26  *
27  * Contributers:
28  * Kyle J. Harms <kyle.j.harms@boeing.com>
29  * 
30  */
31
32 #ifdef HAVE_CONFIG_H
33 # include "config.h"
34 #endif
35
36 #include <stdio.h>
37 #include <stdlib.h>
38 #include <string.h>
39
40 #include <glib.h>
41
42 #include <epan/packet.h>
43 #include <epan/prefs.h>
44 #include <epan/emem.h>
45
46 /* Forward declaration */
47 void proto_reg_handoff_cigi(void);
48 static void range_delete_udp_callback(guint32);
49 static void range_add_udp_callback(guint32);
50 void cigi_add_tree(tvbuff_t*, proto_tree*);
51 gint cigi_add_data(tvbuff_t*, proto_tree*, gint);
52
53 void cigi2_add_tree(tvbuff_t*, proto_tree*);
54 gint cigi2_add_ig_control(tvbuff_t*, proto_tree*, gint);
55 gint cigi2_add_entity_control(tvbuff_t*, proto_tree*, gint);
56 gint cigi2_add_component_control(tvbuff_t*, proto_tree*, gint);
57 gint cigi2_add_articulated_parts_control(tvbuff_t*, proto_tree*, gint);
58 gint cigi2_add_rate_control(tvbuff_t*, proto_tree*, gint);
59 gint cigi2_add_environment_control(tvbuff_t*, proto_tree*, gint);
60 gint cigi2_add_weather_control(tvbuff_t*, proto_tree*, gint);
61 gint cigi2_add_view_control(tvbuff_t*, proto_tree*, gint);
62 gint cigi2_add_sensor_control(tvbuff_t*, proto_tree*, gint);
63 gint cigi2_add_trajectory_definition(tvbuff_t*, proto_tree*, gint);
64 gint cigi2_add_special_effect_definition(tvbuff_t*, proto_tree*, gint);
65 gint cigi2_add_view_definition(tvbuff_t*, proto_tree*, gint);
66 gint cigi2_add_collision_detection_segment_definition(tvbuff_t*, proto_tree*, gint);
67 gint cigi2_add_collision_detection_volume_definition(tvbuff_t*, proto_tree*, gint);
68 gint cigi2_add_height_above_terrain_request(tvbuff_t*, proto_tree*, gint);
69 gint cigi2_add_line_of_sight_occult_request(tvbuff_t*, proto_tree*, gint);
70 gint cigi2_add_line_of_sight_range_request(tvbuff_t*, proto_tree*, gint);
71 gint cigi2_add_height_of_terrain_request(tvbuff_t*, proto_tree*, gint);
72 gint cigi2_add_start_of_frame(tvbuff_t*, proto_tree*, gint);
73 gint cigi2_add_height_above_terrain_response(tvbuff_t*, proto_tree*, gint);
74 gint cigi2_add_line_of_sight_response(tvbuff_t*, proto_tree*, gint);
75 gint cigi2_add_collision_detection_segment_response(tvbuff_t*, proto_tree*, gint);
76 gint cigi2_add_sensor_response(tvbuff_t*, proto_tree*, gint);
77 gint cigi2_add_height_of_terrain_response(tvbuff_t*, proto_tree*, gint);
78 gint cigi2_add_collision_detection_volume_response(tvbuff_t*, proto_tree*, gint);
79 gint cigi2_add_image_generator_message(tvbuff_t*, proto_tree*, gint);
80
81 void cigi3_add_tree(tvbuff_t*, proto_tree*);
82 gint cigi3_add_ig_control(tvbuff_t*, proto_tree*, gint);
83 gint cigi3_add_entity_control(tvbuff_t*, proto_tree*, gint);
84 gint cigi3_add_conformal_clamped_entity_control(tvbuff_t*, proto_tree*, gint);
85 gint cigi3_add_component_control(tvbuff_t*, proto_tree*, gint);
86 gint cigi3_add_short_component_control(tvbuff_t*, proto_tree*, gint);
87 gint cigi3_add_articulated_part_control(tvbuff_t*, proto_tree*, gint);
88 gint cigi3_add_short_articulated_part_control(tvbuff_t*, proto_tree*, gint);
89 gint cigi3_add_rate_control(tvbuff_t*, proto_tree*, gint);
90 gint cigi3_add_celestial_sphere_control(tvbuff_t*, proto_tree*, gint);
91 gint cigi3_add_atmosphere_control(tvbuff_t*, proto_tree*, gint);
92 gint cigi3_add_environmental_region_control(tvbuff_t*, proto_tree*, gint);
93 gint cigi3_add_weather_control(tvbuff_t*, proto_tree*, gint);
94 gint cigi3_add_maritime_surface_conditions_control(tvbuff_t*, proto_tree*, gint);
95 gint cigi3_add_wave_control(tvbuff_t*, proto_tree*, gint);
96 gint cigi3_add_terrestrial_surface_conditions_control(tvbuff_t*, proto_tree*, gint);
97 gint cigi3_add_view_control(tvbuff_t*, proto_tree*, gint);
98 gint cigi3_add_sensor_control(tvbuff_t*, proto_tree*, gint);
99 gint cigi3_add_motion_tracker_control(tvbuff_t*, proto_tree*, gint);
100 gint cigi3_add_earth_reference_model_definition(tvbuff_t*, proto_tree*, gint);
101 gint cigi3_add_trajectory_definition(tvbuff_t*, proto_tree*, gint);
102 gint cigi3_add_view_definition(tvbuff_t*, proto_tree*, gint);
103 gint cigi3_add_collision_detection_segment_definition(tvbuff_t*, proto_tree*, gint);
104 gint cigi3_add_collision_detection_volume_definition(tvbuff_t*, proto_tree*, gint);
105 gint cigi3_add_hat_hot_request(tvbuff_t*, proto_tree*, gint);
106 gint cigi3_add_line_of_sight_segment_request(tvbuff_t*, proto_tree*, gint);
107 gint cigi3_add_line_of_sight_vector_request(tvbuff_t*, proto_tree*, gint);
108 gint cigi3_add_position_request(tvbuff_t*, proto_tree*, gint);
109 gint cigi3_add_environmental_conditions_request(tvbuff_t*, proto_tree*, gint);
110 gint cigi3_add_start_of_frame(tvbuff_t*, proto_tree*, gint);
111 gint cigi3_add_hat_hot_response(tvbuff_t*, proto_tree*, gint);
112 gint cigi3_add_hat_hot_extended_response(tvbuff_t*, proto_tree*, gint);
113 gint cigi3_add_line_of_sight_response(tvbuff_t*, proto_tree*, gint);
114 gint cigi3_add_line_of_sight_extended_response(tvbuff_t*, proto_tree*, gint);
115 gint cigi3_add_sensor_response(tvbuff_t*, proto_tree*, gint);
116 gint cigi3_add_sensor_extended_response(tvbuff_t*, proto_tree*, gint);
117 gint cigi3_add_position_response(tvbuff_t*, proto_tree*, gint);
118 gint cigi3_add_weather_conditions_response(tvbuff_t*, proto_tree*, gint);
119 gint cigi3_add_aerosol_concentration_response(tvbuff_t*, proto_tree*, gint);
120 gint cigi3_add_maritime_surface_conditions_response(tvbuff_t*, proto_tree*, gint);
121 gint cigi3_add_terrestrial_surface_conditions_response(tvbuff_t*, proto_tree*, gint);
122 gint cigi3_add_collision_detection_segment_notification(tvbuff_t*, proto_tree*, gint);
123 gint cigi3_add_collision_detection_volume_notification(tvbuff_t*, proto_tree*, gint);
124 gint cigi3_add_animation_stop_notification(tvbuff_t*, proto_tree*, gint);
125 gint cigi3_add_event_notification(tvbuff_t*, proto_tree*, gint);
126 gint cigi3_add_image_generator_message(tvbuff_t*, proto_tree*, gint);
127
128
129 /* CIGI Handle */
130 dissector_handle_t cigi_handle;
131         
132 /* Initialize the protocol and registered fields */
133 static int proto_cigi = -1;
134
135 static const true_false_string cigi_boolean_tfs = {
136     "True",
137     "False"
138 };
139
140 static const true_false_string cigi_enable_tfs = {
141     "Enable",
142     "Disable"
143 };
144
145 static const true_false_string cigi_active_tfs = {
146     "Active",
147     "Inactive"
148 };
149
150 static const true_false_string cigi_on_tfs = {
151     "On",
152     "Off"
153 };
154
155 static const true_false_string cigi_valid_tfs = {
156     "Valid",
157     "Invalid"
158 };
159
160
161 /* All CIGI Versions */
162 static int hf_cigi_src_port = -1;
163 static int hf_cigi_dest_port = -1;
164 static int hf_cigi_port = -1;
165
166 static int hf_cigi_packet_id = -1;
167 static int hf_cigi_packet_size = -1;
168 static int hf_cigi_version = -1;
169
170 static int hf_cigi_frame_size = -1;
171
172 static int hf_cigi_unknown = -1;
173
174
175 /*** Fields for CIGI2 ***/
176
177 /* CIGI2 Packet ID */
178 static int hf_cigi2_packet_id = -1;
179 #define CIGI2_PACKET_ID_IG_CONTROL                               1
180 #define CIGI2_PACKET_ID_ENTITY_CONTROL                           2
181 #define CIGI2_PACKET_ID_COMPONENT_CONTROL                        3
182 #define CIGI2_PACKET_ID_ARTICULATED_PARTS_CONTROL                4
183 #define CIGI2_PACKET_ID_RATE_CONTROL                             5
184 #define CIGI2_PACKET_ID_ENVIRONMENT_CONTROL                      6
185 #define CIGI2_PACKET_ID_WEATHER_CONTROL                          7
186 #define CIGI2_PACKET_ID_VIEW_CONTROL                             8
187 #define CIGI2_PACKET_ID_SENSOR_CONTROL                           9
188 #define CIGI2_PACKET_ID_TRAJECTORY_DEFINITION                   21
189 #define CIGI2_PACKET_ID_SPECIAL_EFFECT_DEFINITION               22
190 #define CIGI2_PACKET_ID_VIEW_DEFINITION                         23
191 #define CIGI2_PACKET_ID_COLLISION_DETECTION_SEGMENT_DEFINITION  24
192 #define CIGI2_PACKET_ID_COLLISION_DETECTION_VOLUME_DEFINITION   25
193 #define CIGI2_PACKET_ID_HEIGHT_ABOVE_TERRAIN_REQUEST            41
194 #define CIGI2_PACKET_ID_LINE_OF_SIGHT_OCCULT_REQUEST            42
195 #define CIGI2_PACKET_ID_LINE_OF_SIGHT_RANGE_REQUEST             43
196 #define CIGI2_PACKET_ID_HEIGHT_OF_TERRAIN_REQUEST               44
197 #define CIGI2_PACKET_ID_START_OF_FRAME                         101
198 #define CIGI2_PACKET_ID_HEIGHT_ABOVE_TERRAIN_RESPONSE          102
199 #define CIGI2_PACKET_ID_LINE_OF_SIGHT_RESPONSE                 103
200 #define CIGI2_PACKET_ID_COLLISION_DETECTION_SEGMENT_RESPONSE   104
201 #define CIGI2_PACKET_ID_SENSOR_RESPONSE                        105
202 #define CIGI2_PACKET_ID_HEIGHT_OF_TERRAIN_RESPONSE             106
203 #define CIGI2_PACKET_ID_COLLISION_DETECTION_VOLUME_RESPONSE    107
204 #define CIGI2_PACKET_ID_IMAGE_GENERATOR_MESSAGE                108
205 #define CIGI2_PACKET_ID_USER_DEFINABLE_MIN                     236
206 #define CIGI2_PACKET_ID_USER_DEFINABLE_MAX                     255
207 static const value_string cigi2_packet_id_vals[] = {
208     {CIGI2_PACKET_ID_IG_CONTROL, "IG Control"},
209     {CIGI2_PACKET_ID_ENTITY_CONTROL, "Entity Control"},
210     {CIGI2_PACKET_ID_COMPONENT_CONTROL, "Component Control"},
211     {CIGI2_PACKET_ID_ARTICULATED_PARTS_CONTROL, "Articulated Parts Control"},
212     {CIGI2_PACKET_ID_RATE_CONTROL, "Rate Control"},
213     {CIGI2_PACKET_ID_ENVIRONMENT_CONTROL, "Environment Control"},
214     {CIGI2_PACKET_ID_WEATHER_CONTROL, "Weather Control"},
215     {CIGI2_PACKET_ID_VIEW_CONTROL, "View Control"},
216     {CIGI2_PACKET_ID_SENSOR_CONTROL, "Sensor Control"},
217     {CIGI2_PACKET_ID_TRAJECTORY_DEFINITION, "Trajectory Definition"},
218     {CIGI2_PACKET_ID_SPECIAL_EFFECT_DEFINITION, "Special Effect Definition"},
219     {CIGI2_PACKET_ID_VIEW_DEFINITION, "View Definition"},
220     {CIGI2_PACKET_ID_COLLISION_DETECTION_SEGMENT_DEFINITION, "Collision Detection Segment Definition"},
221     {CIGI2_PACKET_ID_COLLISION_DETECTION_VOLUME_DEFINITION, "Collision Detection Volume Definition"},
222     {CIGI2_PACKET_ID_HEIGHT_ABOVE_TERRAIN_REQUEST, "Height Above Terrain Request"},
223     {CIGI2_PACKET_ID_LINE_OF_SIGHT_OCCULT_REQUEST, "Line of Sight Occult Request"},
224     {CIGI2_PACKET_ID_LINE_OF_SIGHT_RANGE_REQUEST, "Line of Sight Range Request"},
225     {CIGI2_PACKET_ID_HEIGHT_OF_TERRAIN_REQUEST, "Height of Terrain Request"},
226     {CIGI2_PACKET_ID_START_OF_FRAME, "Start of Frame"},
227     {CIGI2_PACKET_ID_HEIGHT_ABOVE_TERRAIN_RESPONSE, "Height Above Terrain Response"},
228     {CIGI2_PACKET_ID_LINE_OF_SIGHT_RESPONSE, "Line of Sight Response"},
229     {CIGI2_PACKET_ID_COLLISION_DETECTION_SEGMENT_RESPONSE, "Collision Detection Segment Response"},
230     {CIGI2_PACKET_ID_SENSOR_RESPONSE, "Sensor Response"},
231     {CIGI2_PACKET_ID_HEIGHT_OF_TERRAIN_RESPONSE, "Height of Terrain Response"},
232     {CIGI2_PACKET_ID_COLLISION_DETECTION_VOLUME_RESPONSE, "Collision Detection Volume Response"},
233     {CIGI2_PACKET_ID_IMAGE_GENERATOR_MESSAGE, "Image Generator Message"},
234     {CIGI2_PACKET_ID_USER_DEFINABLE_MIN, "User Definable"},
235     {CIGI2_PACKET_ID_USER_DEFINABLE_MIN+1, "User Definable"},
236     {CIGI2_PACKET_ID_USER_DEFINABLE_MIN+2, "User Definable"},
237     {CIGI2_PACKET_ID_USER_DEFINABLE_MIN+3, "User Definable"},
238     {CIGI2_PACKET_ID_USER_DEFINABLE_MIN+4, "User Definable"},
239     {CIGI2_PACKET_ID_USER_DEFINABLE_MIN+5, "User Definable"},
240     {CIGI2_PACKET_ID_USER_DEFINABLE_MIN+6, "User Definable"},
241     {CIGI2_PACKET_ID_USER_DEFINABLE_MIN+7, "User Definable"},
242     {CIGI2_PACKET_ID_USER_DEFINABLE_MIN+8, "User Definable"},
243     {CIGI2_PACKET_ID_USER_DEFINABLE_MIN+9, "User Definable"},
244     {CIGI2_PACKET_ID_USER_DEFINABLE_MIN+10, "User Definable"},
245     {CIGI2_PACKET_ID_USER_DEFINABLE_MIN+11, "User Definable"},
246     {CIGI2_PACKET_ID_USER_DEFINABLE_MIN+12, "User Definable"},
247     {CIGI2_PACKET_ID_USER_DEFINABLE_MIN+13, "User Definable"},
248     {CIGI2_PACKET_ID_USER_DEFINABLE_MIN+14, "User Definable"},
249     {CIGI2_PACKET_ID_USER_DEFINABLE_MIN+15, "User Definable"},
250     {CIGI2_PACKET_ID_USER_DEFINABLE_MIN+16, "User Definable"},
251     {CIGI2_PACKET_ID_USER_DEFINABLE_MIN+17, "User Definable"},
252     {CIGI2_PACKET_ID_USER_DEFINABLE_MIN+18, "User Definable"},
253     {CIGI2_PACKET_ID_USER_DEFINABLE_MAX, "User Definable"},
254     {0, NULL},
255 };
256
257 /* CIGI2 IG Control */
258 #define CIGI2_PACKET_SIZE_IG_CONTROL 16
259 static int hf_cigi2_ig_control = -1;
260 static int hf_cigi2_ig_control_db_number = -1;
261 static int hf_cigi2_ig_control_ig_mode = -1;
262 static int hf_cigi2_ig_control_tracking_enable = -1;
263 static int hf_cigi2_ig_control_boresight = -1;
264 static int hf_cigi2_ig_control_frame_ctr = -1;
265 static int hf_cigi2_ig_control_time_tag = -1;
266
267 static const value_string cigi2_ig_control_ig_mode_vals[] = {
268     {0, "Standby/Reset"},
269     {1, "Operate"},
270     {2,   "Debug"},
271         {0, NULL},
272 };
273
274 /* CIGI2 Entity Control */
275 #define CIGI2_PACKET_SIZE_ENTITY_CONTROL 56
276 static int hf_cigi2_entity_control = -1;
277 static int hf_cigi2_entity_control_entity_id = -1;
278 static int hf_cigi2_entity_control_entity_state = -1;
279 static int hf_cigi2_entity_control_attach_state = -1;
280 static int hf_cigi2_entity_control_collision_detect = -1;
281 static int hf_cigi2_entity_control_effect_state = -1;
282 static int hf_cigi2_entity_control_type = -1;
283 static int hf_cigi2_entity_control_parent_id = -1;
284 static int hf_cigi2_entity_control_opacity = -1;
285 static int hf_cigi2_entity_control_internal_temp = -1;
286 static int hf_cigi2_entity_control_roll = -1;
287 static int hf_cigi2_entity_control_pitch = -1;
288 static int hf_cigi2_entity_control_heading = -1;
289 static int hf_cigi2_entity_control_alt = -1;
290 static int hf_cigi2_entity_control_lat = -1;
291 static int hf_cigi2_entity_control_lon = -1;
292
293 static const value_string cigi2_entity_control_entity_state_vals[] = {
294     {0, "Load/Hide"},
295     {1, "Load/Show"},
296     {2, "Unload"},
297         {0, NULL},
298 };
299
300 static const true_false_string cigi2_entity_control_attach_state_tfs = {
301     "Attach",
302     "Detach"
303 };
304
305 static const value_string cigi2_entity_control_effect_state_vals[] = {
306     {0, "Stop"},
307     {1, "Play"},
308     {2, "Restart"},
309         {0, NULL},
310 };
311
312 /* CIGI2 Component Control */
313 #define CIGI2_PACKET_SIZE_COMPONENT_CONTROL 20
314 static int hf_cigi2_component_control = -1;
315 static int hf_cigi2_component_control_instance_id = -1;
316 static int hf_cigi2_component_control_component_class = -1;
317 static int hf_cigi2_component_control_component_id = -1;
318 static int hf_cigi2_component_control_component_state = -1;
319 static int hf_cigi2_component_control_component_val1 = -1;
320 static int hf_cigi2_component_control_component_val2 = -1;
321
322 static const value_string cigi2_component_control_component_class_vals[] = {
323     {0, "Entity"},
324     {1, "Environment"},
325     {2, "View"},
326     {3, "View Group"},
327     {4, "Sensor"},
328     {5, "System"},
329     {0, NULL},
330 };
331
332 /* CIGI2 Articulated Parts Control */
333 #define CIGI2_PACKET_SIZE_ARTICULATED_PARTS_CONTROL 32
334 static int hf_cigi2_articulated_parts_control = -1;
335 static int hf_cigi2_articulated_parts_control_entity_id = -1;
336 static int hf_cigi2_articulated_parts_control_part_id = -1;
337 static int hf_cigi2_articulated_parts_control_part_state = -1;
338 static int hf_cigi2_articulated_parts_control_xoff_enable = -1;
339 static int hf_cigi2_articulated_parts_control_yoff_enable = -1;
340 static int hf_cigi2_articulated_parts_control_zoff_enable = -1;
341 static int hf_cigi2_articulated_parts_control_roll_enable = -1;
342 static int hf_cigi2_articulated_parts_control_pitch_enable = -1;
343 static int hf_cigi2_articulated_parts_control_yaw_enable = -1;
344 static int hf_cigi2_articulated_parts_control_x_offset = -1;
345 static int hf_cigi2_articulated_parts_control_y_offset = -1;
346 static int hf_cigi2_articulated_parts_control_z_offset = -1;
347 static int hf_cigi2_articulated_parts_control_roll = -1;
348 static int hf_cigi2_articulated_parts_control_pitch = -1;
349 static int hf_cigi2_articulated_parts_control_yaw = -1;
350
351 /* CIGI2 Rate Control */
352 #define CIGI2_PACKET_SIZE_RATE_CONTROL 32
353 static int hf_cigi2_rate_control = -1;
354 static int hf_cigi2_rate_control_entity_id = -1;
355 static int hf_cigi2_rate_control_part_id = -1;
356 static int hf_cigi2_rate_control_x_rate = -1;
357 static int hf_cigi2_rate_control_y_rate = -1;
358 static int hf_cigi2_rate_control_z_rate = -1;
359 static int hf_cigi2_rate_control_roll_rate = -1;
360 static int hf_cigi2_rate_control_pitch_rate = -1;
361 static int hf_cigi2_rate_control_yaw_rate = -1;
362
363 /* CIGI2 Environmental Control */
364 #define CIGI2_PACKET_SIZE_ENVIRONMENT_CONTROL 36
365 static int hf_cigi2_environment_control = -1;
366 static int hf_cigi2_environment_control_hour = -1;
367 static int hf_cigi2_environment_control_minute = -1;
368 static int hf_cigi2_environment_control_ephemeris_enable = -1;
369 static int hf_cigi2_environment_control_humidity = -1;
370 static int hf_cigi2_environment_control_modtran_enable = -1;
371 static int hf_cigi2_environment_control_date = -1;
372 static int hf_cigi2_environment_control_air_temp = -1;
373 static int hf_cigi2_environment_control_global_visibility = -1;
374 static int hf_cigi2_environment_control_wind_speed = -1;
375 static int hf_cigi2_environment_control_wind_direction = -1;
376 static int hf_cigi2_environment_control_pressure = -1;
377 static int hf_cigi2_environment_control_aerosol = -1;
378
379 /* CIGI2 Weather Control */
380 #define CIGI2_PACKET_SIZE_WEATHER_CONTROL 44
381 static int hf_cigi2_weather_control = -1;
382 static int hf_cigi2_weather_control_entity_id = -1;
383 static int hf_cigi2_weather_control_weather_enable = -1;
384 static int hf_cigi2_weather_control_scud_enable = -1;
385 static int hf_cigi2_weather_control_random_winds = -1;
386 static int hf_cigi2_weather_control_severity = -1;
387 static int hf_cigi2_weather_control_phenomenon_type = -1;
388 static int hf_cigi2_weather_control_air_temp = -1;
389 static int hf_cigi2_weather_control_opacity = -1;
390 static int hf_cigi2_weather_control_scud_frequency = -1;
391 static int hf_cigi2_weather_control_coverage = -1;
392 static int hf_cigi2_weather_control_elevation = -1;
393 static int hf_cigi2_weather_control_thickness = -1;
394 static int hf_cigi2_weather_control_transition_band = -1;
395 static int hf_cigi2_weather_control_wind_speed = -1;
396 static int hf_cigi2_weather_control_wind_direction = -1;
397
398 static const value_string cigi2_weather_control_phenomenon_type_vals[] = {
399     {0, "Use Entity ID"},
400     {1, "Cloud Layer 1"},
401     {2, "Cloud Layer 2"},
402     {3, "Ground Fog"},
403     {4, "Rain"},
404     {5, "Snow"},
405     {6, "Sand"},
406         {0, NULL},
407 };
408
409 /* CIGI2 View Control */
410 #define CIGI2_PACKET_SIZE_VIEW_CONTROL 32
411 static int hf_cigi2_view_control = -1;
412 static int hf_cigi2_view_control_entity_id = -1;
413 static int hf_cigi2_view_control_view_id = -1;
414 static int hf_cigi2_view_control_view_group = -1;
415 static int hf_cigi2_view_control_xoff_enable = -1;
416 static int hf_cigi2_view_control_yoff_enable = -1;
417 static int hf_cigi2_view_control_zoff_enable = -1;
418 static int hf_cigi2_view_control_roll_enable = -1;
419 static int hf_cigi2_view_control_pitch_enable = -1;
420 static int hf_cigi2_view_control_yaw_enable = -1;
421 static int hf_cigi2_view_control_x_offset = -1;
422 static int hf_cigi2_view_control_y_offset = -1;
423 static int hf_cigi2_view_control_z_offset = -1;
424 static int hf_cigi2_view_control_roll = -1;
425 static int hf_cigi2_view_control_pitch = -1;
426 static int hf_cigi2_view_control_yaw = -1;
427
428 /* CIGI2 Sensor Control */
429 #define CIGI2_PACKET_SIZE_SENSOR_CONTROL 24
430 static int hf_cigi2_sensor_control = -1;
431 static int hf_cigi2_sensor_control_view_id = -1;
432 static int hf_cigi2_sensor_control_sensor_enable = -1;
433 static int hf_cigi2_sensor_control_polarity = -1;
434 static int hf_cigi2_sensor_control_line_dropout = -1;
435 static int hf_cigi2_sensor_control_sensor_id = -1;
436 static int hf_cigi2_sensor_control_track_mode = -1;
437 static int hf_cigi2_sensor_control_auto_gain = -1;
438 static int hf_cigi2_sensor_control_track_polarity = -1;
439 static int hf_cigi2_sensor_control_gain = -1;
440 static int hf_cigi2_sensor_control_level = -1;
441 static int hf_cigi2_sensor_control_ac_coupling = -1;
442 static int hf_cigi2_sensor_control_noise = -1;
443
444 static const true_false_string cigi2_sensor_control_polarity_tfs = {
445     "Black",
446     "White"
447 };
448
449 static const value_string cigi2_sensor_control_track_mode_vals[] = {
450     {0, "Off"},
451     {1, "Force Correlate"},
452     {2, "Scene"},
453     {3, "Target"},
454     {4, "Ship"},
455     {0, NULL},
456 };
457
458 /* CIGI2 Trajectory Definition */
459 #define CIGI2_PACKET_SIZE_TRAJECTORY_DEFINITION 16
460 static int hf_cigi2_trajectory_definition = -1;
461 static int hf_cigi2_trajectory_definition_entity_id = -1;
462 static int hf_cigi2_trajectory_definition_acceleration = -1;
463 static int hf_cigi2_trajectory_definition_retardation = -1;
464 static int hf_cigi2_trajectory_definition_terminal_velocity = -1;
465
466 /* CIGI2 Special Effect Definition */
467 #define CIGI2_PACKET_SIZE_SPECIAL_EFFECT_DEFINITION 32
468 static int hf_cigi2_special_effect_definition = -1;
469 static int hf_cigi2_special_effect_definition_entity_id = -1;
470 static int hf_cigi2_special_effect_definition_seq_direction = -1;
471 static int hf_cigi2_special_effect_definition_color_enable = -1;
472 static int hf_cigi2_special_effect_definition_red = -1;
473 static int hf_cigi2_special_effect_definition_green = -1;
474 static int hf_cigi2_special_effect_definition_blue = -1;
475 static int hf_cigi2_special_effect_definition_x_scale = -1;
476 static int hf_cigi2_special_effect_definition_y_scale = -1;
477 static int hf_cigi2_special_effect_definition_z_scale = -1;
478 static int hf_cigi2_special_effect_definition_time_scale = -1;
479 static int hf_cigi2_special_effect_definition_effect_count = -1;
480 static int hf_cigi2_special_effect_definition_separation = -1;
481 static int hf_cigi2_special_effect_definition_burst_interval = -1;
482 static int hf_cigi2_special_effect_definition_duration = -1;
483
484 static const true_false_string cigi2_special_effect_definition_seq_direction_tfs = {
485     "Backward",
486     "Forward"
487 };
488
489 /* CIGI2 View Definition */
490 #define CIGI2_PACKET_SIZE_VIEW_DEFINITION 32
491 static int hf_cigi2_view_definition = -1;
492 static int hf_cigi2_view_definition_view_id = -1;
493 static int hf_cigi2_view_definition_view_group = -1;
494 static int hf_cigi2_view_definition_view_type = -1;
495 static int hf_cigi2_view_definition_pixel_rep = -1;
496 static int hf_cigi2_view_definition_mirror = -1;
497 static int hf_cigi2_view_definition_tracker_assign = -1;
498 static int hf_cigi2_view_definition_near_enable = -1;
499 static int hf_cigi2_view_definition_far_enable = -1;
500 static int hf_cigi2_view_definition_left_enable = -1;
501 static int hf_cigi2_view_definition_right_enable = -1;
502 static int hf_cigi2_view_definition_top_enable = -1;
503 static int hf_cigi2_view_definition_bottom_enable = -1;
504 static int hf_cigi2_view_definition_fov_near = -1;
505 static int hf_cigi2_view_definition_fov_far = -1;
506 static int hf_cigi2_view_definition_fov_left = -1;
507 static int hf_cigi2_view_definition_fov_right = -1;
508 static int hf_cigi2_view_definition_fov_top = -1;
509 static int hf_cigi2_view_definition_fov_bottom = -1;
510
511 static const value_string cigi2_view_definition_pixel_rep_vals[] = {
512     {0, "No Replicate"},
513     {1, "1×2 Pixel Replicate"},
514     {2, "2×1 Pixel Replicate"},
515     {3, "2×2 Pixel Replicate"},
516     {4, "TBD"},
517     {5, "TBD"},
518     {6, "TBD"},
519     {0, NULL},
520 };
521
522 static const value_string cigi2_view_definition_mirror_vals[] = {
523     {0, "None"},
524     {1, "Horizontal"},
525     {2, "Vertical"},
526     {3, "Horizontal and Vertical"},
527     {0, NULL},
528 };
529
530 /* CIGI2 Collision Detection Segment Definition */
531 #define CIGI2_PACKET_SIZE_COLLISION_DETECTION_SEGMENT_DEFINITION 24
532 static int hf_cigi2_collision_detection_segment_definition = -1;
533 static int hf_cigi2_collision_detection_segment_definition_entity_id = -1;
534 static int hf_cigi2_collision_detection_segment_definition_segment_enable = -1;
535 static int hf_cigi2_collision_detection_segment_definition_segment_id = -1;
536 static int hf_cigi2_collision_detection_segment_definition_collision_mask = -1;
537 static int hf_cigi2_collision_detection_segment_definition_x_start = -1;
538 static int hf_cigi2_collision_detection_segment_definition_y_start = -1;
539 static int hf_cigi2_collision_detection_segment_definition_z_start = -1;
540 static int hf_cigi2_collision_detection_segment_definition_x_end = -1;
541 static int hf_cigi2_collision_detection_segment_definition_y_end = -1;
542 static int hf_cigi2_collision_detection_segment_definition_z_end = -1;
543
544 /* CIGI2 Collision Detection Volume Definition */
545 #define CIGI2_PACKET_SIZE_COLLISION_DETECTION_VOLUME_DEFINITION 20
546 static int hf_cigi2_collision_detection_volume_definition = -1;
547 static int hf_cigi2_collision_detection_volume_definition_entity_id = -1;
548 static int hf_cigi2_collision_detection_volume_definition_volume_enable = -1;
549 static int hf_cigi2_collision_detection_volume_definition_volume_id = -1;
550 static int hf_cigi2_collision_detection_volume_definition_x_offset = -1;
551 static int hf_cigi2_collision_detection_volume_definition_y_offset = -1;
552 static int hf_cigi2_collision_detection_volume_definition_z_offset = -1;
553 static int hf_cigi2_collision_detection_volume_definition_height = -1;
554 static int hf_cigi2_collision_detection_volume_definition_width = -1;
555 static int hf_cigi2_collision_detection_volume_definition_depth = -1;
556
557 /* CIGI2 Height Above Terrain Request */
558 #define CIGI2_PACKET_SIZE_HEIGHT_ABOVE_TERRAIN_REQUEST 32
559 static int hf_cigi2_height_above_terrain_request = -1;
560 static int hf_cigi2_height_above_terrain_request_hat_id = -1;
561 static int hf_cigi2_height_above_terrain_request_alt = -1;
562 static int hf_cigi2_height_above_terrain_request_lat = -1;
563 static int hf_cigi2_height_above_terrain_request_lon = -1;
564
565 /* CIGI2 Line of Sight Occult Request */
566 #define CIGI2_PACKET_SIZE_LINE_OF_SIGHT_OCCULT_REQUEST 56
567 static int hf_cigi2_line_of_sight_occult_request = -1;
568 static int hf_cigi2_line_of_sight_occult_request_los_id = -1;
569 static int hf_cigi2_line_of_sight_occult_request_source_alt = -1;
570 static int hf_cigi2_line_of_sight_occult_request_source_lat = -1;
571 static int hf_cigi2_line_of_sight_occult_request_source_lon = -1;
572 static int hf_cigi2_line_of_sight_occult_request_dest_alt = -1;
573 static int hf_cigi2_line_of_sight_occult_request_dest_lat = -1;
574 static int hf_cigi2_line_of_sight_occult_request_dest_lon = -1;
575
576 /* CIGI2 Line of Sight Range Request */
577 #define CIGI2_PACKET_SIZE_LINE_OF_SIGHT_RANGE_REQUEST 48
578 static int hf_cigi2_line_of_sight_range_request = -1;
579 static int hf_cigi2_line_of_sight_range_request_los_id = -1;
580 static int hf_cigi2_line_of_sight_range_request_azimuth = -1;
581 static int hf_cigi2_line_of_sight_range_request_elevation = -1;
582 static int hf_cigi2_line_of_sight_range_request_min_range = -1;
583 static int hf_cigi2_line_of_sight_range_request_max_range = -1;
584 static int hf_cigi2_line_of_sight_range_request_source_alt = -1;
585 static int hf_cigi2_line_of_sight_range_request_source_lat = -1;
586 static int hf_cigi2_line_of_sight_range_request_source_lon = -1;
587
588 /* CIGI2 Height of Terrain Request */
589 #define CIGI2_PACKET_SIZE_HEIGHT_OF_TERRAIN_REQUEST 24
590 static int hf_cigi2_height_of_terrain_request = -1;
591 static int hf_cigi2_height_of_terrain_request_hot_id = -1;
592 static int hf_cigi2_height_of_terrain_request_lat = -1;
593 static int hf_cigi2_height_of_terrain_request_lon = -1;
594
595 /* CIGI2 Start of Frame */
596 #define CIGI2_PACKET_SIZE_START_OF_FRAME 16
597 static int hf_cigi2_start_of_frame = -1;
598 static int hf_cigi2_start_of_frame_db_number = -1;
599 static int hf_cigi2_start_of_frame_ig_status_code = -1;
600 static int hf_cigi2_start_of_frame_ig_mode = -1;
601 static int hf_cigi2_start_of_frame_frame_ctr = -1;
602 static int hf_cigi2_start_of_frame_time_tag = -1;
603
604 static const value_string cigi2_start_of_frame_ig_mode_vals[] = {
605     {0, "Standby/Reset"},
606     {1, "Operate"},
607     {2, "Debug"},
608     {3, "Off-Line Maintenance"},
609         {0, NULL},
610 };
611
612 /* CIGI2 Height Above Terrain Response */
613 #define CIGI2_PACKET_SIZE_HEIGHT_ABOVE_TERRAIN_RESPONSE 24
614 static int hf_cigi2_height_above_terrain_response = -1;
615 static int hf_cigi2_height_above_terrain_response_hat_id = -1;
616 static int hf_cigi2_height_above_terrain_response_valid = -1;
617 static int hf_cigi2_height_above_terrain_response_material_type = -1;
618 static int hf_cigi2_height_above_terrain_response_alt = -1;
619
620 /* CIGI2 Line of Sight Response */
621 #define CIGI2_PACKET_SIZE_LINE_OF_SIGHT_RESPONSE 40
622 static int hf_cigi2_line_of_sight_response = -1;
623 static int hf_cigi2_line_of_sight_response_los_id = -1;
624 static int hf_cigi2_line_of_sight_response_valid = -1;
625 static int hf_cigi2_line_of_sight_response_occult_response = -1;
626 static int hf_cigi2_line_of_sight_response_material_type = -1;
627 static int hf_cigi2_line_of_sight_response_range = -1;
628 static int hf_cigi2_line_of_sight_response_alt = -1;
629 static int hf_cigi2_line_of_sight_response_lat = -1;
630 static int hf_cigi2_line_of_sight_response_lon = -1;
631
632 static const true_false_string cigi2_line_of_sight_occult_response_tfs = {
633     "Visible",
634     "Occulted"
635 };
636
637 /* CIGI2 Collision Detection Segment Response */
638 #define CIGI2_PACKET_SIZE_COLLISION_DETECTION_SEGMENT_RESPONSE 24
639 static int hf_cigi2_collision_detection_segment_response = -1;
640 static int hf_cigi2_collision_detection_segment_response_entity_id = -1;
641 static int hf_cigi2_collision_detection_segment_response_segment_id = -1;
642 static int hf_cigi2_collision_detection_segment_response_contact = -1;
643 static int hf_cigi2_collision_detection_segment_response_contacted_entity = -1;
644 static int hf_cigi2_collision_detection_segment_response_material_type = -1;
645 static int hf_cigi2_collision_detection_segment_response_collision_x = -1;
646 static int hf_cigi2_collision_detection_segment_response_collision_y = -1;
647 static int hf_cigi2_collision_detection_segment_response_collision_z = -1;
648
649 static const true_false_string cigi2_collision_detection_segment_response_contact_tfs = {
650     "Contact with a defined entity",
651     "Contact with a non-entity surface"
652 };
653
654 /* CIGI2 Sensor Response */
655 #define CIGI2_PACKET_SIZE_SENSOR_RESPONSE 12
656 static int hf_cigi2_sensor_response = -1;
657 static int hf_cigi2_sensor_response_view_id = -1;
658 static int hf_cigi2_sensor_response_status = -1;
659 static int hf_cigi2_sensor_response_sensor_id = -1;
660 static int hf_cigi2_sensor_response_x_offset = -1;
661 static int hf_cigi2_sensor_response_y_offset = -1;
662 static int hf_cigi2_sensor_response_x_size = -1;
663 static int hf_cigi2_sensor_response_y_size = -1;
664
665 static const value_string cigi2_sensor_response_status_vals[] = {
666     {0, "Searching for Target"},
667     {1, "Tracking"},
668     {2, "Impending Breaklock"},
669     {3, "Breaklock"},
670     {0, NULL},
671 };
672
673 /* CIGI2 Height of Terrain Response */
674 #define CIGI2_PACKET_SIZE_HEIGHT_OF_TERRAIN_RESPONSE 24
675 static int hf_cigi2_height_of_terrain_response = -1;
676 static int hf_cigi2_height_of_terrain_response_hot_id = -1;
677 static int hf_cigi2_height_of_terrain_response_valid = -1;
678 static int hf_cigi2_height_of_terrain_response_material_type = -1;
679 static int hf_cigi2_height_of_terrain_response_alt = -1;
680
681 /* CIGI2 Collision Detection Volume Response */
682 #define CIGI2_PACKET_SIZE_COLLISION_DETECTION_VOLUME_RESPONSE 8
683 static int hf_cigi2_collision_detection_volume_response = -1;
684 static int hf_cigi2_collision_detection_volume_response_entity_id = -1;
685 static int hf_cigi2_collision_detection_volume_response_volume_id = -1;
686 static int hf_cigi2_collision_detection_volume_response_contact = -1;
687 static int hf_cigi2_collision_detection_volume_response_contact_entity = -1;
688
689 static const true_false_string cigi2_collision_detection_volume_response_contact_tfs = {
690     "Contact with a defined entity",
691     "Contact with a non-entity surface"
692 };
693
694 /* CIGI2 Image Generator Message */
695 static int hf_cigi2_image_generator_message = -1;
696 static int hf_cigi2_image_generator_message_id = -1;
697 static int hf_cigi2_image_generator_message_message = -1;
698
699 /* CIGI2 User Definable */
700 static int hf_cigi2_user_definable = -1;
701
702
703 /*** Fields for CIGI3 ***/
704
705 static int hf_cigi3_byte_swap = -1;
706
707 #define CIGI3_BYTE_SWAP_BIG_ENDIAN    0x8000
708 #define CIGI3_BYTE_SWAP_LITTLE_ENDIAN 0x0080
709 static const value_string cigi3_byte_swap_vals[] = {
710     {CIGI3_BYTE_SWAP_BIG_ENDIAN, "Big-Endian"},
711     {CIGI3_BYTE_SWAP_LITTLE_ENDIAN, "Little-Endian"},
712     {0, NULL},
713 };
714
715 /* CIGI3 Packet ID */
716 static int hf_cigi3_packet_id = -1;
717 #define CIGI3_PACKET_ID_IG_CONTROL                                 1
718 #define CIGI3_PACKET_ID_ENTITY_CONTROL                             2
719 #define CIGI3_PACKET_ID_CONFORMAL_CLAMPED_ENTITY_CONTROL           3
720 #define CIGI3_PACKET_ID_COMPONENT_CONTROL                          4
721 #define CIGI3_PACKET_ID_SHORT_COMPONENT_CONTROL                    5
722 #define CIGI3_PACKET_ID_ARTICULATED_PART_CONTROL                   6
723 #define CIGI3_PACKET_ID_SHORT_ARTICULATED_PART_CONTROL             7
724 #define CIGI3_PACKET_ID_RATE_CONTROL                               8
725 #define CIGI3_PACKET_ID_CELESTIAL_SPHERE_CONTROL                   9
726 #define CIGI3_PACKET_ID_ATMOSPHERE_CONTROL                        10
727 #define CIGI3_PACKET_ID_ENVIRONMENTAL_REGION_CONTROL              11
728 #define CIGI3_PACKET_ID_WEATHER_CONTROL                           12
729 #define CIGI3_PACKET_ID_MARITIME_SURFACE_CONDITIONS_CONTROL       13
730 #define CIGI3_PACKET_ID_WAVE_CONTROL                              14
731 #define CIGI3_PACKET_ID_TERRESTRIAL_SURFACE_CONDITIONS_CONTROL    15
732 #define CIGI3_PACKET_ID_VIEW_CONTROL                              16
733 #define CIGI3_PACKET_ID_SENSOR_CONTROL                            17
734 #define CIGI3_PACKET_ID_MOTION_TRACKER_CONTROL                    18
735 #define CIGI3_PACKET_ID_EARTH_REFERENCE_MODEL_DEFINITION          19
736 #define CIGI3_PACKET_ID_TRAJECTORY_DEFINITION                     20
737 #define CIGI3_PACKET_ID_VIEW_DEFINITION                           21
738 #define CIGI3_PACKET_ID_COLLISION_DETECTION_SEGMENT_DEFINITION    22
739 #define CIGI3_PACKET_ID_COLLISION_DETECTION_VOLUME_DEFINITION     23
740 #define CIGI3_PACKET_ID_HAT_HOT_REQUEST                           24
741 #define CIGI3_PACKET_ID_LINE_OF_SIGHT_SEGMENT_REQUEST             25
742 #define CIGI3_PACKET_ID_LINE_OF_SIGHT_VECTOR_REQUEST              26
743 #define CIGI3_PACKET_ID_POSITION_REQUEST                          27
744 #define CIGI3_PACKET_ID_ENVIRONMENTAL_CONDITIONS_REQUEST          28
745 #define CIGI3_PACKET_ID_START_OF_FRAME                           101
746 #define CIGI3_PACKET_ID_HAT_HOT_RESPONSE                         102
747 #define CIGI3_PACKET_ID_HAT_HOT_EXTENDED_RESPONSE                103
748 #define CIGI3_PACKET_ID_LINE_OF_SIGHT_RESPONSE                   104
749 #define CIGI3_PACKET_ID_LINE_OF_SIGHT_EXTENDED_RESPONSE          105
750 #define CIGI3_PACKET_ID_SENSOR_RESPONSE                          106
751 #define CIGI3_PACKET_ID_SENSOR_EXTENDED_RESPONSE                 107
752 #define CIGI3_PACKET_ID_POSITION_RESPONSE                        108
753 #define CIGI3_PACKET_ID_WEATHER_CONDITIONS_RESPONSE              109
754 #define CIGI3_PACKET_ID_AEROSOL_CONCENTRATION_RESPONSE           110
755 #define CIGI3_PACKET_ID_MARITIME_SURFACE_CONDITIONS_RESPONSE     111
756 #define CIGI3_PACKET_ID_TERRESTRIAL_SURFACE_CONDITIONS_RESPONSE  112
757 #define CIGI3_PACKET_ID_COLLISION_DETECTION_SEGMENT_NOTIFICATION 113
758 #define CIGI3_PACKET_ID_COLLISION_DETECTION_VOLUME_NOTIFICATION  114
759 #define CIGI3_PACKET_ID_ANIMATION_STOP_NOTIFICATION              115
760 #define CIGI3_PACKET_ID_EVENT_NOTIFICATION                       116
761 #define CIGI3_PACKET_ID_IMAGE_GENERATOR_MESSAGE                  117
762 #define CIGI3_PACKET_ID_USER_DEFINED_MIN                         201
763 #define CIGI3_PACKET_ID_USER_DEFINED_MAX                         255
764 static const value_string cigi3_packet_id_vals[] = {
765     {CIGI3_PACKET_ID_IG_CONTROL, "IG Control"},
766     {CIGI3_PACKET_ID_ENTITY_CONTROL, "Entity Control"},
767     {CIGI3_PACKET_ID_CONFORMAL_CLAMPED_ENTITY_CONTROL, "Conformal Clamped Entity Control"},
768     {CIGI3_PACKET_ID_COMPONENT_CONTROL, "Component Control"},
769     {CIGI3_PACKET_ID_SHORT_COMPONENT_CONTROL, "Short Component Control"},
770     {CIGI3_PACKET_ID_ARTICULATED_PART_CONTROL, "Articulated Part Control"},
771     {CIGI3_PACKET_ID_SHORT_ARTICULATED_PART_CONTROL, "Short Articulated Part Control"},
772     {CIGI3_PACKET_ID_RATE_CONTROL, "Rate Control"},
773     {CIGI3_PACKET_ID_CELESTIAL_SPHERE_CONTROL, "Celestial Sphere Control"},
774     {CIGI3_PACKET_ID_ATMOSPHERE_CONTROL, "Atmosphere Control"},
775     {CIGI3_PACKET_ID_ENVIRONMENTAL_REGION_CONTROL, "Environmental Region Control"},
776     {CIGI3_PACKET_ID_WEATHER_CONTROL, "Weather Control"},
777     {CIGI3_PACKET_ID_MARITIME_SURFACE_CONDITIONS_CONTROL, "Maritime Surface Conditions Control"},
778     {CIGI3_PACKET_ID_WAVE_CONTROL, "Wave Control"},
779     {CIGI3_PACKET_ID_TERRESTRIAL_SURFACE_CONDITIONS_CONTROL, "Terrestrial Surface Conditions Control"},
780     {CIGI3_PACKET_ID_VIEW_CONTROL, "View Control"},
781     {CIGI3_PACKET_ID_SENSOR_CONTROL, "Sensor Control"},
782     {CIGI3_PACKET_ID_MOTION_TRACKER_CONTROL, "Motion Tracker Control"},
783     {CIGI3_PACKET_ID_EARTH_REFERENCE_MODEL_DEFINITION, "Earth Reference Model Definition"},
784     {CIGI3_PACKET_ID_TRAJECTORY_DEFINITION, "Trajectory Definition"},
785     {CIGI3_PACKET_ID_VIEW_DEFINITION, "View Definition"},
786     {CIGI3_PACKET_ID_COLLISION_DETECTION_SEGMENT_DEFINITION, "Collision Detection Segment Definition"},
787     {CIGI3_PACKET_ID_COLLISION_DETECTION_VOLUME_DEFINITION, "Collision Detection Volume Definition"},
788     {CIGI3_PACKET_ID_HAT_HOT_REQUEST, "HAT/HOT Request"},
789     {CIGI3_PACKET_ID_LINE_OF_SIGHT_SEGMENT_REQUEST, "Line of Sight Segment Request"},
790     {CIGI3_PACKET_ID_LINE_OF_SIGHT_VECTOR_REQUEST, "Line of Sight Vector Request"},
791     {CIGI3_PACKET_ID_POSITION_REQUEST, "Position Request"},
792     {CIGI3_PACKET_ID_ENVIRONMENTAL_CONDITIONS_REQUEST, "Environmental Conditions Request"},
793     {CIGI3_PACKET_ID_START_OF_FRAME, "Start of Frame"},
794     {CIGI3_PACKET_ID_HAT_HOT_RESPONSE, "HAT/HOT Response"},
795     {CIGI3_PACKET_ID_HAT_HOT_EXTENDED_RESPONSE, "HAT/HOT Extended Response"},
796     {CIGI3_PACKET_ID_LINE_OF_SIGHT_RESPONSE, "Line of Sight Response"},
797     {CIGI3_PACKET_ID_LINE_OF_SIGHT_EXTENDED_RESPONSE, "Line of Sight Extended Response"},
798     {CIGI3_PACKET_ID_SENSOR_RESPONSE, "Sensor Response"},
799     {CIGI3_PACKET_ID_SENSOR_EXTENDED_RESPONSE, "Sensor Extended Response"},
800     {CIGI3_PACKET_ID_POSITION_RESPONSE, "Position Response"},
801     {CIGI3_PACKET_ID_WEATHER_CONDITIONS_RESPONSE, "Weather Conditions Response"},
802     {CIGI3_PACKET_ID_AEROSOL_CONCENTRATION_RESPONSE, "Aerosol Concentration Response"},
803     {CIGI3_PACKET_ID_MARITIME_SURFACE_CONDITIONS_RESPONSE, "Maritime Surface Conditions Response"},
804     {CIGI3_PACKET_ID_TERRESTRIAL_SURFACE_CONDITIONS_RESPONSE, "Terrestrial Surface Conditions Response"},
805     {CIGI3_PACKET_ID_COLLISION_DETECTION_SEGMENT_NOTIFICATION, "Collision Detection Segment Notification"},
806     {CIGI3_PACKET_ID_COLLISION_DETECTION_VOLUME_NOTIFICATION, "Collision Detection Volume Notification"},
807     {CIGI3_PACKET_ID_ANIMATION_STOP_NOTIFICATION, "Animation Stop Notification"},
808     {CIGI3_PACKET_ID_EVENT_NOTIFICATION, "Event Notification"},
809     {CIGI3_PACKET_ID_IMAGE_GENERATOR_MESSAGE, "Image Generator Message"},
810     {CIGI3_PACKET_ID_USER_DEFINED_MIN, "User-Defined Data"},
811     {CIGI3_PACKET_ID_USER_DEFINED_MIN+1, "User-Defined Data"},
812     {CIGI3_PACKET_ID_USER_DEFINED_MIN+2, "User-Defined Data"},
813     {CIGI3_PACKET_ID_USER_DEFINED_MIN+3, "User-Defined Data"},
814     {CIGI3_PACKET_ID_USER_DEFINED_MIN+4, "User-Defined Data"},
815     {CIGI3_PACKET_ID_USER_DEFINED_MIN+5, "User-Defined Data"},
816     {CIGI3_PACKET_ID_USER_DEFINED_MIN+6, "User-Defined Data"},
817     {CIGI3_PACKET_ID_USER_DEFINED_MIN+7, "User-Defined Data"},
818     {CIGI3_PACKET_ID_USER_DEFINED_MIN+8, "User-Defined Data"},
819     {CIGI3_PACKET_ID_USER_DEFINED_MIN+9, "User-Defined Data"},
820     {CIGI3_PACKET_ID_USER_DEFINED_MIN+10, "User-Defined Data"},
821     {CIGI3_PACKET_ID_USER_DEFINED_MIN+11, "User-Defined Data"},
822     {CIGI3_PACKET_ID_USER_DEFINED_MIN+12, "User-Defined Data"},
823     {CIGI3_PACKET_ID_USER_DEFINED_MIN+13, "User-Defined Data"},
824     {CIGI3_PACKET_ID_USER_DEFINED_MIN+14, "User-Defined Data"},
825     {CIGI3_PACKET_ID_USER_DEFINED_MIN+15, "User-Defined Data"},
826     {CIGI3_PACKET_ID_USER_DEFINED_MIN+16, "User-Defined Data"},
827     {CIGI3_PACKET_ID_USER_DEFINED_MIN+17, "User-Defined Data"},
828     {CIGI3_PACKET_ID_USER_DEFINED_MIN+18, "User-Defined Data"},
829     {CIGI3_PACKET_ID_USER_DEFINED_MIN+19, "User-Defined Data"},
830     {CIGI3_PACKET_ID_USER_DEFINED_MIN+20, "User-Defined Data"},
831     {CIGI3_PACKET_ID_USER_DEFINED_MIN+21, "User-Defined Data"},
832     {CIGI3_PACKET_ID_USER_DEFINED_MIN+22, "User-Defined Data"},
833     {CIGI3_PACKET_ID_USER_DEFINED_MIN+23, "User-Defined Data"},
834     {CIGI3_PACKET_ID_USER_DEFINED_MIN+24, "User-Defined Data"},
835     {CIGI3_PACKET_ID_USER_DEFINED_MIN+25, "User-Defined Data"},
836     {CIGI3_PACKET_ID_USER_DEFINED_MIN+26, "User-Defined Data"},
837     {CIGI3_PACKET_ID_USER_DEFINED_MIN+27, "User-Defined Data"},
838     {CIGI3_PACKET_ID_USER_DEFINED_MIN+28, "User-Defined Data"},
839     {CIGI3_PACKET_ID_USER_DEFINED_MIN+29, "User-Defined Data"},
840     {CIGI3_PACKET_ID_USER_DEFINED_MIN+30, "User-Defined Data"},
841     {CIGI3_PACKET_ID_USER_DEFINED_MIN+31, "User-Defined Data"},
842     {CIGI3_PACKET_ID_USER_DEFINED_MIN+32, "User-Defined Data"},
843     {CIGI3_PACKET_ID_USER_DEFINED_MIN+33, "User-Defined Data"},
844     {CIGI3_PACKET_ID_USER_DEFINED_MIN+34, "User-Defined Data"},
845     {CIGI3_PACKET_ID_USER_DEFINED_MIN+35, "User-Defined Data"},
846     {CIGI3_PACKET_ID_USER_DEFINED_MIN+36, "User-Defined Data"},
847     {CIGI3_PACKET_ID_USER_DEFINED_MIN+37, "User-Defined Data"},
848     {CIGI3_PACKET_ID_USER_DEFINED_MIN+38, "User-Defined Data"},
849     {CIGI3_PACKET_ID_USER_DEFINED_MIN+39, "User-Defined Data"},
850     {CIGI3_PACKET_ID_USER_DEFINED_MIN+40, "User-Defined Data"},
851     {CIGI3_PACKET_ID_USER_DEFINED_MIN+41, "User-Defined Data"},
852     {CIGI3_PACKET_ID_USER_DEFINED_MIN+42, "User-Defined Data"},
853     {CIGI3_PACKET_ID_USER_DEFINED_MIN+43, "User-Defined Data"},
854     {CIGI3_PACKET_ID_USER_DEFINED_MIN+44, "User-Defined Data"},
855     {CIGI3_PACKET_ID_USER_DEFINED_MIN+45, "User-Defined Data"},
856     {CIGI3_PACKET_ID_USER_DEFINED_MIN+46, "User-Defined Data"},
857     {CIGI3_PACKET_ID_USER_DEFINED_MIN+47, "User-Defined Data"},
858     {CIGI3_PACKET_ID_USER_DEFINED_MIN+48, "User-Defined Data"},
859     {CIGI3_PACKET_ID_USER_DEFINED_MIN+49, "User-Defined Data"},
860     {CIGI3_PACKET_ID_USER_DEFINED_MIN+50, "User-Defined Data"},
861     {CIGI3_PACKET_ID_USER_DEFINED_MIN+51, "User-Defined Data"},
862     {CIGI3_PACKET_ID_USER_DEFINED_MIN+52, "User-Defined Data"},
863     {CIGI3_PACKET_ID_USER_DEFINED_MIN+53, "User-Defined Data"},
864     {CIGI3_PACKET_ID_USER_DEFINED_MAX, "User-Defined Data"},
865     {0, NULL},
866 };
867
868 /* CIGI3 IG Control */
869 #define CIGI3_PACKET_SIZE_IG_CONTROL 16
870 static int hf_cigi3_ig_control = -1;
871 static int hf_cigi3_ig_control_db_number = -1;
872 static int hf_cigi3_ig_control_ig_mode = -1;
873 static int hf_cigi3_ig_control_timestamp_valid = -1;
874 static int hf_cigi3_ig_control_frame_ctr = -1;
875 static int hf_cigi3_ig_control_timestamp = -1;
876
877 static const value_string cigi3_ig_control_ig_mode_vals[] = {
878     {0, "Reset/Standby"},
879     {1, "Operate"},
880     {2, "Debug"},
881         {0, NULL},
882 };
883
884 /* CIGI3 Entity Control */
885 #define CIGI3_PACKET_SIZE_ENTITY_CONTROL 48
886 static int hf_cigi3_entity_control = -1;
887 static int hf_cigi3_entity_control_entity_id = -1;
888 static int hf_cigi3_entity_control_entity_state = -1;
889 static int hf_cigi3_entity_control_attach_state = -1;
890 static int hf_cigi3_entity_control_collision_detection_request = -1;
891 static int hf_cigi3_entity_control_inherit_alpha = -1;
892 static int hf_cigi3_entity_control_ground_ocean_clamp = -1;
893 static int hf_cigi3_entity_control_animation_direction = -1;
894 static int hf_cigi3_entity_control_animation_loop_mode = -1;
895 static int hf_cigi3_entity_control_animation_state = -1;
896 static int hf_cigi3_entity_control_alpha = -1;
897 static int hf_cigi3_entity_control_entity_type = -1;
898 static int hf_cigi3_entity_control_parent_id = -1;
899 static int hf_cigi3_entity_control_roll = -1;
900 static int hf_cigi3_entity_control_pitch = -1;
901 static int hf_cigi3_entity_control_yaw = -1;
902 static int hf_cigi3_entity_control_lat_xoff = -1;
903 static int hf_cigi3_entity_control_lon_yoff = -1;
904 static int hf_cigi3_entity_control_alt_zoff = -1;
905
906 static const value_string cigi3_entity_control_entity_state_vals[] = {
907     {0, "Inactive/Standby"},
908     {1, "Active"},
909     {2, "Destroyed"},
910         {0, NULL},
911 };
912
913 static const true_false_string cigi3_entity_control_attach_state_tfs = {
914     "Attach",
915     "Detach"
916 };
917
918 static const true_false_string cigi3_entity_control_collision_detection_request_tfs = {
919     "Request",
920     "No Request"
921 };
922
923 static const true_false_string cigi3_entity_control_inherit_alpha_tfs = {
924     "Inherited",
925     "Not Inherited"
926 };
927
928 static const value_string cigi3_entity_control_ground_ocean_clamp_vals[] = {
929     {0, "No Clamp"},
930     {1, "Non-Conformal"},
931     {2, "Conformal"},
932         {0, NULL},
933 };
934
935 static const true_false_string cigi3_entity_control_animation_direction_tfs = {
936     "Backward",
937     "Forward"
938 };
939
940 static const true_false_string cigi3_entity_control_animation_loop_mode_tfs = {
941     "Continuous",
942     "One-Shot"
943 };
944
945 static const value_string cigi3_entity_control_animation_state_vals[] = {
946     {0, "Stop"},
947     {1, "Pause"},
948     {2, "Play"},
949     {3, "Continue"},
950         {0, NULL},
951 };
952
953 /* CIGI3 Conformal Clamped Entity Control */
954 #define CIGI3_PACKET_SIZE_CONFORMAL_CLAMPED_ENTITY_CONTROL 24
955 static int hf_cigi3_conformal_clamped_entity_control = -1;
956 static int hf_cigi3_conformal_clamped_entity_control_entity_id = -1;
957 static int hf_cigi3_conformal_clamped_entity_control_yaw = -1;
958 static int hf_cigi3_conformal_clamped_entity_control_lat = -1;
959 static int hf_cigi3_conformal_clamped_entity_control_lon = -1;
960
961 /* CIGI3 Component Control */
962 #define CIGI3_PACKET_SIZE_COMPONENT_CONTROL 32
963 static int hf_cigi3_component_control = -1;
964 static int hf_cigi3_component_control_component_id = -1;
965 static int hf_cigi3_component_control_instance_id = -1;
966 static int hf_cigi3_component_control_component_class = -1;
967 static int hf_cigi3_component_control_component_state = -1;
968 static int hf_cigi3_component_control_data_1 = -1;
969 static int hf_cigi3_component_control_data_2 = -1;
970 static int hf_cigi3_component_control_data_3 = -1;
971 static int hf_cigi3_component_control_data_4 = -1;
972 static int hf_cigi3_component_control_data_5 = -1;
973 static int hf_cigi3_component_control_data_6 = -1;
974
975 static const value_string cigi3_component_control_component_class_vals[] = {
976     {0, "Entity"},
977     {1, "View"},
978     {2, "View Group"},
979     {3, "Sensor"},
980     {4, "Regional Sea Surface"},
981     {5, "Regional Terrain Surface"},
982     {6, "Regional Layered Weather"},
983     {7, "Global Sea Surface"},
984     {8, "Global Terrain Surface"},
985     {9, "Global Layered Weather"},
986     {10, "Atmosphere"},
987     {11, "Celestial Sphere"},
988     {12, "Event"},
989     {13, "System"},
990         {0, NULL},
991 };
992
993 /* CIGI3 Short Component Control */
994 #define CIGI3_PACKET_SIZE_SHORT_COMPONENT_CONTROL 16
995 static int hf_cigi3_short_component_control = -1;
996 static int hf_cigi3_short_component_control_component_id = -1;
997 static int hf_cigi3_short_component_control_instance_id = -1;
998 static int hf_cigi3_short_component_control_component_class = -1;
999 static int hf_cigi3_short_component_control_component_state = -1;
1000 static int hf_cigi3_short_component_control_data_1 = -1;
1001 static int hf_cigi3_short_component_control_data_2 = -1;
1002
1003 static const value_string cigi3_short_component_control_component_class_vals[] = {
1004     {0, "Entity"},
1005     {1, "View"},
1006     {2, "View Group"},
1007     {3, "Sensor"},
1008     {4, "Regional Sea Surface"},
1009     {5, "Regional Terrain Surface"},
1010     {6, "Regional Layered Weather"},
1011     {7, "Global Sea Surface"},
1012     {8, "Global Terrain Surface"},
1013     {9, "Global Layered Weather"},
1014     {10, "Atmosphere"},
1015     {11, "Celestial Sphere"},
1016     {12, "Event"},
1017     {13, "System"},
1018         {0, NULL},
1019 };
1020
1021 /* CIGI3 Articulated Part Control */
1022 #define CIGI3_PACKET_SIZE_ARTICULATED_PART_CONTROL 32
1023 static int hf_cigi3_articulated_part_control = -1;
1024 static int hf_cigi3_articulated_part_control_entity_id = -1;
1025 static int hf_cigi3_articulated_part_control_part_id = -1;
1026 static int hf_cigi3_articulated_part_control_part_enable = -1;
1027 static int hf_cigi3_articulated_part_control_xoff_enable = -1;
1028 static int hf_cigi3_articulated_part_control_yoff_enable = -1;
1029 static int hf_cigi3_articulated_part_control_zoff_enable = -1;
1030 static int hf_cigi3_articulated_part_control_roll_enable = -1;
1031 static int hf_cigi3_articulated_part_control_pitch_enable = -1;
1032 static int hf_cigi3_articulated_part_control_yaw_enable = -1;
1033 static int hf_cigi3_articulated_part_control_xoff = -1;
1034 static int hf_cigi3_articulated_part_control_yoff = -1;
1035 static int hf_cigi3_articulated_part_control_zoff = -1;
1036 static int hf_cigi3_articulated_part_control_roll = -1;
1037 static int hf_cigi3_articulated_part_control_pitch = -1;
1038 static int hf_cigi3_articulated_part_control_yaw = -1;
1039
1040 /* CIGI3 Short Articulated Part Control */
1041 #define CIGI3_PACKET_SIZE_SHORT_ARTICULATED_PART_CONTROL 16
1042 static int hf_cigi3_short_articulated_part_control = -1;
1043 static int hf_cigi3_short_articulated_part_control_entity_id = -1;
1044 static int hf_cigi3_short_articulated_part_control_part_id_1 = -1;
1045 static int hf_cigi3_short_articulated_part_control_part_id_2 = -1;
1046 static int hf_cigi3_short_articulated_part_control_dof_select_1 = -1;
1047 static int hf_cigi3_short_articulated_part_control_dof_select_2 = -1;
1048 static int hf_cigi3_short_articulated_part_control_part_enable_1 = -1;
1049 static int hf_cigi3_short_articulated_part_control_part_enable_2 = -1;
1050 static int hf_cigi3_short_articulated_part_control_dof_1 = -1;
1051 static int hf_cigi3_short_articulated_part_control_dof_2 = -1;
1052
1053 static const value_string cigi3_short_articulated_part_control_dof_select_vals[] = {
1054     {0, "Not Used"},
1055     {1, "X Offset"},
1056     {2, "Y Offset"},
1057     {3, "Z Offset"},
1058     {4, "Yaw"},
1059     {5, "Pitch"},
1060     {6, "Roll"},
1061         {0, NULL},
1062 };
1063
1064 /* CIGI3 Rate Control */
1065 #define CIGI3_PACKET_SIZE_RATE_CONTROL 32
1066 static int hf_cigi3_rate_control = -1;
1067 static int hf_cigi3_rate_control_entity_id = -1;
1068 static int hf_cigi3_rate_control_part_id = -1;
1069 static int hf_cigi3_rate_control_apply_to_part = -1;
1070 static int hf_cigi3_rate_control_x_rate = -1;
1071 static int hf_cigi3_rate_control_y_rate = -1;
1072 static int hf_cigi3_rate_control_z_rate = -1;
1073 static int hf_cigi3_rate_control_roll_rate = -1;
1074 static int hf_cigi3_rate_control_pitch_rate = -1;
1075 static int hf_cigi3_rate_control_yaw_rate = -1;
1076
1077 /* CIGI3 Celestial Sphere Control */
1078 #define CIGI3_PACKET_SIZE_CELESTIAL_SPHERE_CONTROL 16
1079 static int hf_cigi3_celestial_sphere_control = -1;
1080 static int hf_cigi3_celestial_sphere_control_hour = -1;
1081 static int hf_cigi3_celestial_sphere_control_minute = -1;
1082 static int hf_cigi3_celestial_sphere_control_ephemeris_enable = -1;
1083 static int hf_cigi3_celestial_sphere_control_sun_enable = -1;
1084 static int hf_cigi3_celestial_sphere_control_moon_enable = -1;
1085 static int hf_cigi3_celestial_sphere_control_star_enable = -1;
1086 static int hf_cigi3_celestial_sphere_control_date_time_valid = -1;
1087 static int hf_cigi3_celestial_sphere_control_date = -1;
1088 static int hf_cigi3_celestial_sphere_control_star_intensity = -1;
1089
1090 /* CIGI3 Atmosphere Control */
1091 #define CIGI3_PACKET_SIZE_ATMOSPHERE_CONTROL 32
1092 static int hf_cigi3_atmosphere_control = -1;
1093 static int hf_cigi3_atmosphere_control_atmospheric_model_enable = -1;
1094 static int hf_cigi3_atmosphere_control_humidity = -1;
1095 static int hf_cigi3_atmosphere_control_air_temp = -1;
1096 static int hf_cigi3_atmosphere_control_visibility_range = -1;
1097 static int hf_cigi3_atmosphere_control_horiz_wind = -1;
1098 static int hf_cigi3_atmosphere_control_vert_wind = -1;
1099 static int hf_cigi3_atmosphere_control_wind_direction = -1;
1100 static int hf_cigi3_atmosphere_control_barometric_pressure = -1;
1101
1102 /* CIGI3 Environmental Region Control */
1103 #define CIGI3_PACKET_SIZE_ENVIRONMENTAL_REGION_CONTROL 48
1104 static int hf_cigi3_environmental_region_control = -1;
1105 static int hf_cigi3_environmental_region_control_region_id = -1;
1106 static int hf_cigi3_environmental_region_control_region_state = -1;
1107 static int hf_cigi3_environmental_region_control_merge_weather = -1;
1108 static int hf_cigi3_environmental_region_control_merge_aerosol = -1;
1109 static int hf_cigi3_environmental_region_control_merge_maritime = -1;
1110 static int hf_cigi3_environmental_region_control_merge_terrestrial = -1;
1111 static int hf_cigi3_environmental_region_control_lat = -1;
1112 static int hf_cigi3_environmental_region_control_lon = -1;
1113 static int hf_cigi3_environmental_region_control_size_x = -1;
1114 static int hf_cigi3_environmental_region_control_size_y = -1;
1115 static int hf_cigi3_environmental_region_control_corner_radius = -1;
1116 static int hf_cigi3_environmental_region_control_rotation = -1;
1117 static int hf_cigi3_environmental_region_control_transition_perimeter = -1;
1118
1119 static const value_string cigi3_environmental_region_control_region_state_vals[] = {
1120     {0, "Inactive"},
1121     {1, "Active"},
1122     {2, "Destroyed"},
1123     {0, NULL},
1124 };
1125
1126 static const true_false_string cigi3_environmental_region_control_merge_properties_tfs = {
1127     "Merge",
1128     "Use Last"
1129 };
1130
1131 /* CIGI3 Weather Control */
1132 #define CIGI3_PACKET_SIZE_WEATHER_CONTROL 56 
1133 static int hf_cigi3_weather_control = -1;
1134 static int hf_cigi3_weather_control_entity_region_id = -1;
1135 static int hf_cigi3_weather_control_layer_id = -1;
1136 static int hf_cigi3_weather_control_humidity = -1;
1137 static int hf_cigi3_weather_control_weather_enable = -1;
1138 static int hf_cigi3_weather_control_scud_enable = -1;
1139 static int hf_cigi3_weather_control_random_winds_enable = -1;
1140 static int hf_cigi3_weather_control_random_lightning_enable = -1;
1141 static int hf_cigi3_weather_control_cloud_type = -1;
1142 static int hf_cigi3_weather_control_scope = -1;
1143 static int hf_cigi3_weather_control_severity = -1;
1144 static int hf_cigi3_weather_control_air_temp = -1;
1145 static int hf_cigi3_weather_control_visibility_range = -1;
1146 static int hf_cigi3_weather_control_scud_frequency = -1;
1147 static int hf_cigi3_weather_control_coverage = -1;
1148 static int hf_cigi3_weather_control_base_elevation = -1;
1149 static int hf_cigi3_weather_control_thickness = -1;
1150 static int hf_cigi3_weather_control_transition_band = -1;
1151 static int hf_cigi3_weather_control_horiz_wind = -1;
1152 static int hf_cigi3_weather_control_vert_wind = -1;
1153 static int hf_cigi3_weather_control_wind_direction = -1;
1154 static int hf_cigi3_weather_control_barometric_pressure = -1;
1155 static int hf_cigi3_weather_control_aerosol_concentration = -1;
1156
1157 static const value_string cigi3_weather_control_layer_id_vals[] = {
1158     {0, "Ground Fog"},
1159     {1, "Cloud Layer 1"},
1160     {2, "Cloud Layer 2"},
1161     {3, "Cloud Layer 3"},
1162     {4, "Rain"},
1163     {5, "Snow"},
1164     {6, "Sleet"},
1165     {7, "Hail"},
1166     {8, "Sand"},
1167     {9, "Dust"},
1168     {0, NULL},
1169 };
1170
1171 static const value_string cigi3_weather_control_cloud_type_vals[] = {
1172     {0, "None"},
1173     {1, "Altocumulus"},
1174     {2, "Altostratus"},
1175     {3, "Cirrocumulus"},
1176     {4, "Cirrostratus"},
1177     {5, "Cirrus"},
1178     {6, "Cumulonimbus"},
1179     {7, "Cumulus"},
1180     {8, "Nimbostratus"},
1181     {9, "Stratocumulus"},
1182     {10, "Stratus"},
1183     {11, "Other"},
1184     {12, "Other"},
1185     {13, "Other"},
1186     {14, "Other"},
1187     {15, "Other"},
1188     {0, NULL},
1189 };
1190
1191 static const value_string cigi3_weather_control_scope_vals[] = {
1192     {0, "Global"},
1193     {1, "Regional"},
1194     {2, "Entity"},
1195     {0, NULL},
1196 };
1197
1198 /* CIGI3 Maritime Surface Conditions Control */
1199 #define CIGI3_PACKET_SIZE_MARITIME_SURFACE_CONDITIONS_CONTROL 24
1200 static int hf_cigi3_maritime_surface_conditions_control = -1;
1201 static int hf_cigi3_maritime_surface_conditions_control_entity_region_id = -1;
1202 static int hf_cigi3_maritime_surface_conditions_control_surface_conditions_enable = -1;
1203 static int hf_cigi3_maritime_surface_conditions_control_whitecap_enable = -1;
1204 static int hf_cigi3_maritime_surface_conditions_control_scope = -1;
1205 static int hf_cigi3_maritime_surface_conditions_control_sea_surface_height = -1;
1206 static int hf_cigi3_maritime_surface_conditions_control_surface_water_temp = -1;
1207 static int hf_cigi3_maritime_surface_conditions_control_surface_clarity = -1;
1208
1209 static const value_string cigi3_maritime_surface_conditions_control_scope_vals[] = {
1210     {0, "Global"},
1211     {1, "Regional"},
1212     {2, "Entity"},
1213     {0, NULL},
1214 };
1215
1216 /* CIGI3 Wave Control */
1217 #define CIGI3_PACKET_SIZE_WAVE_CONTROL 32
1218 static int hf_cigi3_wave_control = -1;
1219 static int hf_cigi3_wave_control_entity_region_id = -1;
1220 static int hf_cigi3_wave_control_wave_id = -1;
1221 static int hf_cigi3_wave_control_wave_enable = -1;
1222 static int hf_cigi3_wave_control_scope = -1;
1223 static int hf_cigi3_wave_control_breaker_type = -1;
1224 static int hf_cigi3_wave_control_height = -1;
1225 static int hf_cigi3_wave_control_wavelength = -1;
1226 static int hf_cigi3_wave_control_period = -1;
1227 static int hf_cigi3_wave_control_direction = -1;
1228 static int hf_cigi3_wave_control_phase_offset = -1;
1229 static int hf_cigi3_wave_control_leading = -1;
1230
1231 static const value_string cigi3_wave_control_scope_vals[] = {
1232     {0, "Global"},
1233     {1, "Regional"},
1234     {2, "Entity"},
1235     {0, NULL},
1236 };
1237
1238 static const value_string cigi3_wave_control_breaker_type_vals[] = {
1239     {0, "Plunging"},
1240     {1, "Spilling"},
1241     {2, "Surging"},
1242     {0, NULL},
1243 };
1244
1245 /* CIGI3 Terrestrial Surface Conditions Control */
1246 #define CIGI3_PACKET_SIZE_TERRESTRIAL_SURFACE_CONDITIONS_CONTROL 8
1247 static int hf_cigi3_terrestrial_surface_conditions_control = -1;
1248 static int hf_cigi3_terrestrial_surface_conditions_control_entity_region_id = -1;
1249 static int hf_cigi3_terrestrial_surface_conditions_control_surface_condition_id = -1;
1250 static int hf_cigi3_terrestrial_surface_conditions_control_surface_condition_enable = -1;
1251 static int hf_cigi3_terrestrial_surface_conditions_control_scope = -1;
1252 static int hf_cigi3_terrestrial_surface_conditions_control_severity = -1;
1253 static int hf_cigi3_terrestrial_surface_conditions_control_coverage = -1;
1254
1255 static const value_string cigi3_terrestrial_surface_conditions_control_scope_vals[] = {
1256     {0, "Global"},
1257     {1, "Regional"},
1258     {2, "Entity"},
1259     {0, NULL},
1260 };
1261
1262 /* CIGI3 View Control */
1263 #define CIGI3_PACKET_SIZE_VIEW_CONTROL 32
1264 static int hf_cigi3_view_control = -1;
1265 static int hf_cigi3_view_control_view_id = -1;
1266 static int hf_cigi3_view_control_group_id = -1;
1267 static int hf_cigi3_view_control_xoff_enable = -1;
1268 static int hf_cigi3_view_control_yoff_enable = -1;
1269 static int hf_cigi3_view_control_zoff_enable = -1;
1270 static int hf_cigi3_view_control_roll_enable = -1;
1271 static int hf_cigi3_view_control_pitch_enable = -1;
1272 static int hf_cigi3_view_control_yaw_enable = -1;
1273 static int hf_cigi3_view_control_entity_id = -1;
1274 static int hf_cigi3_view_control_xoff = -1;
1275 static int hf_cigi3_view_control_yoff = -1;
1276 static int hf_cigi3_view_control_zoff = -1;
1277 static int hf_cigi3_view_control_roll = -1;
1278 static int hf_cigi3_view_control_pitch = -1;
1279 static int hf_cigi3_view_control_yaw = -1;
1280
1281 /* CIGI3 Sensor Control */
1282 #define CIGI3_PACKET_SIZE_SENSOR_CONTROL 24
1283 static int hf_cigi3_sensor_control = -1;
1284 static int hf_cigi3_sensor_control_view_id = -1;
1285 static int hf_cigi3_sensor_control_sensor_id = -1;
1286 static int hf_cigi3_sensor_control_track_mode = -1;
1287 static int hf_cigi3_sensor_control_sensor_on_off = -1;
1288 static int hf_cigi3_sensor_control_polarity = -1;
1289 static int hf_cigi3_sensor_control_line_dropout_enable = -1;
1290 static int hf_cigi3_sensor_control_auto_gain = -1;
1291 static int hf_cigi3_sensor_control_track_white_black = -1;
1292 static int hf_cigi3_sensor_control_response_type = -1;
1293 static int hf_cigi3_sensor_control_gain = -1;
1294 static int hf_cigi3_sensor_control_level = -1;
1295 static int hf_cigi3_sensor_control_ac_coupling = -1;
1296 static int hf_cigi3_sensor_control_noise = -1;
1297
1298 static const value_string cigi3_sensor_control_track_mode_vals[] = {
1299     {0, "Off"},
1300     {1, "Force Correlate"},
1301     {2, "Scene"},
1302     {3, "Target"},
1303     {4, "Ship"},
1304     {5, "Defined by IG"},
1305     {6, "Defined by IG"},
1306     {7, "Defined by IG"},
1307     {0, NULL},
1308 };
1309
1310 static const true_false_string cigi3_sensor_control_polarity_tfs = {
1311     "Black hot",
1312     "White hot"
1313 };
1314
1315 static const true_false_string cigi3_sensor_control_track_white_black_tfs = {
1316     "Black",
1317     "White"
1318 };
1319
1320 static const true_false_string cigi3_sensor_control_response_type_tfs = {
1321     "Extended",
1322     "Normal"
1323 };
1324
1325 /* CIGI3 Motion Tracker Control */
1326 #define CIGI3_PACKET_SIZE_MOTION_TRACKER_CONTROL 8
1327 static int hf_cigi3_motion_tracker_control = -1;
1328 static int hf_cigi3_motion_tracker_control_view_group_id = -1;
1329 static int hf_cigi3_motion_tracker_control_tracker_id = -1;
1330 static int hf_cigi3_motion_tracker_control_tracker_enable = -1;
1331 static int hf_cigi3_motion_tracker_control_boresight_enable = -1;
1332 static int hf_cigi3_motion_tracker_control_x_enable = -1;
1333 static int hf_cigi3_motion_tracker_control_y_enable = -1;
1334 static int hf_cigi3_motion_tracker_control_z_enable = -1;
1335 static int hf_cigi3_motion_tracker_control_roll_enable = -1;
1336 static int hf_cigi3_motion_tracker_control_pitch_enable = -1;
1337 static int hf_cigi3_motion_tracker_control_yaw_enable = -1;
1338 static int hf_cigi3_motion_tracker_control_view_group_select = -1;
1339
1340 static const true_false_string cigi3_motion_tracker_control_view_group_select_tfs = {
1341     "View Group",
1342     "View"
1343 };
1344
1345 /* CIGI3 Earth Reference Model Definition */
1346 #define CIGI3_PACKET_SIZE_EARTH_REFERENCE_MODEL_DEFINITION 24
1347 static int hf_cigi3_earth_reference_model_definition = -1;
1348 static int hf_cigi3_earth_reference_model_definition_erm_enable = -1;
1349 static int hf_cigi3_earth_reference_model_definition_equatorial_radius = -1;
1350 static int hf_cigi3_earth_reference_model_definition_flattening = -1;
1351
1352 /* CIGI3 Trajectory Definition */
1353 #define CIGI3_PACKET_SIZE_TRAJECTORY_DEFINITION 24
1354 static int hf_cigi3_trajectory_definition = -1;
1355 static int hf_cigi3_trajectory_definition_entity_id = -1;
1356 static int hf_cigi3_trajectory_definition_acceleration_x = -1;
1357 static int hf_cigi3_trajectory_definition_acceleration_y = -1;
1358 static int hf_cigi3_trajectory_definition_acceleration_z = -1;
1359 static int hf_cigi3_trajectory_definition_retardation_rate = -1;
1360 static int hf_cigi3_trajectory_definition_terminal_velocity = -1;
1361
1362 /* CIGI3 View Definition */
1363 #define CIGI3_PACKET_SIZE_VIEW_DEFINITION 32
1364 static int hf_cigi3_view_definition = -1;
1365 static int hf_cigi3_view_definition_view_id = -1;
1366 static int hf_cigi3_view_definition_group_id = -1;
1367 static int hf_cigi3_view_definition_near_enable = -1;
1368 static int hf_cigi3_view_definition_far_enable = -1;
1369 static int hf_cigi3_view_definition_left_enable = -1;
1370 static int hf_cigi3_view_definition_right_enable = -1;
1371 static int hf_cigi3_view_definition_top_enable = -1;
1372 static int hf_cigi3_view_definition_bottom_enable = -1;
1373 static int hf_cigi3_view_definition_mirror_mode = -1;
1374 static int hf_cigi3_view_definition_pixel_replication = -1;
1375 static int hf_cigi3_view_definition_projection_type = -1;
1376 static int hf_cigi3_view_definition_reorder = -1;
1377 static int hf_cigi3_view_definition_view_type = -1;
1378 static int hf_cigi3_view_definition_near = -1;
1379 static int hf_cigi3_view_definition_far = -1;
1380 static int hf_cigi3_view_definition_left = -1;
1381 static int hf_cigi3_view_definition_right = -1;
1382 static int hf_cigi3_view_definition_top = -1;
1383 static int hf_cigi3_view_definition_bottom = -1;
1384
1385 static const value_string cigi3_view_definition_mirror_mode_vals[] = {
1386     {0, "None"},
1387     {1, "Horizontal"},
1388     {2, "Vertical"},
1389     {3, "Horizontal and Vertical"},
1390     {0, NULL},
1391 };
1392
1393 static const value_string cigi3_view_definition_pixel_replication_vals[] = {
1394     {0, "None"},
1395     {1, "1×2"},
1396     {2, "2×1"},
1397     {3, "2×2"},
1398     {4, "Defined by IG"},
1399     {5, "Defined by IG"},
1400     {6, "Defined by IG"},
1401     {7, "Defined by IG"},
1402     {0, NULL},
1403 };
1404
1405 static const true_false_string cigi3_view_definition_projection_type_tfs = {
1406     "Orthographic Parallel",
1407     "Perspective"
1408 };
1409
1410 static const true_false_string cigi3_view_definition_reorder_tfs = {
1411     "Bring to Top",
1412     "No Reorder"
1413 };
1414
1415 /* CIGI3 Collision Detection Segment Definition */
1416 #define CIGI3_PACKET_SIZE_COLLISION_DETECTION_SEGMENT_DEFINITION 40
1417 static int hf_cigi3_collision_detection_segment_definition = -1;
1418 static int hf_cigi3_collision_detection_segment_definition_entity_id = -1;
1419 static int hf_cigi3_collision_detection_segment_definition_segment_id = -1;
1420 static int hf_cigi3_collision_detection_segment_definition_segment_enable = -1;
1421 static int hf_cigi3_collision_detection_segment_definition_x1 = -1;
1422 static int hf_cigi3_collision_detection_segment_definition_y1 = -1;
1423 static int hf_cigi3_collision_detection_segment_definition_z1 = -1;
1424 static int hf_cigi3_collision_detection_segment_definition_x2 = -1;
1425 static int hf_cigi3_collision_detection_segment_definition_y2 = -1;
1426 static int hf_cigi3_collision_detection_segment_definition_z2 = -1;
1427 static int hf_cigi3_collision_detection_segment_definition_material_mask = -1;
1428
1429 /* CIGI3 Collision Detection Volume Definition */
1430 #define CIGI3_PACKET_SIZE_COLLISION_DETECTION_VOLUME_DEFINITION 48
1431 static int hf_cigi3_collision_detection_volume_definition = -1;
1432 static int hf_cigi3_collision_detection_volume_definition_entity_id = -1;
1433 static int hf_cigi3_collision_detection_volume_definition_volume_id = -1;
1434 static int hf_cigi3_collision_detection_volume_definition_volume_enable = -1;
1435 static int hf_cigi3_collision_detection_volume_definition_volume_type = -1;
1436 static int hf_cigi3_collision_detection_volume_definition_x = -1;
1437 static int hf_cigi3_collision_detection_volume_definition_y = -1;
1438 static int hf_cigi3_collision_detection_volume_definition_z = -1;
1439 static int hf_cigi3_collision_detection_volume_definition_radius_height = -1;
1440 static int hf_cigi3_collision_detection_volume_definition_width = -1;
1441 static int hf_cigi3_collision_detection_volume_definition_depth = -1;
1442 static int hf_cigi3_collision_detection_volume_definition_roll = -1;
1443 static int hf_cigi3_collision_detection_volume_definition_pitch = -1;
1444 static int hf_cigi3_collision_detection_volume_definition_yaw = -1;
1445
1446 static const true_false_string cigi3_collision_detection_volume_definition_volume_type_tfs = {
1447     "Cuboid",
1448     "Sphere"
1449 };
1450
1451 /* CIGI3 HAT/HOT Request */
1452 #define CIGI3_PACKET_SIZE_HAT_HOT_REQUEST 32
1453 static int hf_cigi3_hat_hot_request = -1;
1454 static int hf_cigi3_hat_hot_request_hat_hot_id = -1;
1455 static int hf_cigi3_hat_hot_request_type = -1;
1456 static int hf_cigi3_hat_hot_request_coordinate_system = -1;
1457 static int hf_cigi3_hat_hot_request_entity_id = -1;
1458 static int hf_cigi3_hat_hot_request_lat_xoff = -1;
1459 static int hf_cigi3_hat_hot_request_lon_yoff = -1;
1460 static int hf_cigi3_hat_hot_request_alt_zoff = -1;
1461
1462 static const value_string cigi3_hat_hot_request_type_vals[] = {
1463     {0, "HAT"},
1464     {1, "HOT"},
1465     {2, "Extended"},
1466     {0, NULL},
1467 };
1468
1469 static const true_false_string cigi3_hat_hot_request_coordinate_system_tfs = {
1470     "Entity",
1471     "Geodetic"
1472 };
1473
1474 /* CIGI3 Line of Sight Segment Request */
1475 #define CIGI3_PACKET_SIZE_LINE_OF_SIGHT_SEGMENT_REQUEST 64
1476 static int hf_cigi3_line_of_sight_segment_request = -1;
1477 static int hf_cigi3_line_of_sight_segment_request_los_id = -1;
1478 static int hf_cigi3_line_of_sight_segment_request_type = -1;
1479 static int hf_cigi3_line_of_sight_segment_request_source_coord = -1;
1480 static int hf_cigi3_line_of_sight_segment_request_destination_coord = -1;
1481 static int hf_cigi3_line_of_sight_segment_request_response_coord = -1;
1482 static int hf_cigi3_line_of_sight_segment_request_alpha_threshold = -1;
1483 static int hf_cigi3_line_of_sight_segment_request_entity_id = -1;
1484 static int hf_cigi3_line_of_sight_segment_request_source_lat_xoff = -1;
1485 static int hf_cigi3_line_of_sight_segment_request_source_lon_yoff = -1;
1486 static int hf_cigi3_line_of_sight_segment_request_source_alt_zoff = -1;
1487 static int hf_cigi3_line_of_sight_segment_request_destination_lat_xoff = -1;
1488 static int hf_cigi3_line_of_sight_segment_request_destination_lon_yoff = -1;
1489 static int hf_cigi3_line_of_sight_segment_request_destination_alt_zoff = -1;
1490 static int hf_cigi3_line_of_sight_segment_request_material_mask = -1;
1491
1492 static const true_false_string cigi3_line_of_sight_segment_request_type_tfs = {
1493     "Extended",
1494     "Basic"
1495 };
1496
1497 static const true_false_string cigi3_line_of_sight_segment_request_coord_tfs = {
1498     "Entity",
1499     "Geodetic"
1500 };
1501
1502 /* CIGI3 Line of Sight Vector Request */
1503 #define CIGI3_PACKET_SIZE_LINE_OF_SIGHT_VECTOR_REQUEST 56
1504 static int hf_cigi3_line_of_sight_vector_request = -1;
1505 static int hf_cigi3_line_of_sight_vector_request_los_id = -1;
1506 static int hf_cigi3_line_of_sight_vector_request_type = -1;
1507 static int hf_cigi3_line_of_sight_vector_request_source_coord = -1;
1508 static int hf_cigi3_line_of_sight_vector_request_response_coord = -1;
1509 static int hf_cigi3_line_of_sight_vector_request_alpha = -1;
1510 static int hf_cigi3_line_of_sight_vector_request_entity_id = -1;
1511 static int hf_cigi3_line_of_sight_vector_request_azimuth = -1;
1512 static int hf_cigi3_line_of_sight_vector_request_elevation = -1;
1513 static int hf_cigi3_line_of_sight_vector_request_min_range = -1;
1514 static int hf_cigi3_line_of_sight_vector_request_max_range = -1;
1515 static int hf_cigi3_line_of_sight_vector_request_source_lat_xoff = -1;
1516 static int hf_cigi3_line_of_sight_vector_request_source_lon_yoff = -1;
1517 static int hf_cigi3_line_of_sight_vector_request_source_alt_zoff = -1;
1518 static int hf_cigi3_line_of_sight_vector_request_material_mask = -1;
1519
1520 static const true_false_string cigi3_line_of_sight_vector_request_type_tfs = {
1521     "Extended",
1522     "Basic"
1523 };
1524
1525 static const true_false_string cigi3_line_of_sight_vector_request_coord_tfs = {
1526     "Entity",
1527     "Geodetic"
1528 };
1529
1530 /* CIGI3 Position Request */
1531 #define CIGI3_PACKET_SIZE_POSITION_REQUEST 8
1532 static int hf_cigi3_position_request = -1;
1533 static int hf_cigi3_position_request_object_id = -1;
1534 static int hf_cigi3_position_request_part_id = -1;
1535 static int hf_cigi3_position_request_update_mode = -1;
1536 static int hf_cigi3_position_request_object_class = -1;
1537 static int hf_cigi3_position_request_coord_system = -1;
1538
1539 static const true_false_string cigi3_position_request_update_mode_tfs = {
1540     "Continuous",
1541     "One-Shot"
1542 };
1543
1544 static const value_string cigi3_position_request_object_class_vals[] = {
1545     {0, "Entity"},
1546     {1, "Articulated Part"},
1547     {2, "View"},
1548     {3, "View Group"},
1549     {4, "Motion Tracker"},
1550     {0, NULL},
1551 };
1552
1553 static const value_string cigi3_position_request_coord_system_vals[] = {
1554     {0, "Geodetic"},
1555     {1, "Parent Entity"},
1556     {2, "Submodel"},
1557     {0, NULL},
1558 };
1559
1560 /* CIGI3 Environmental Conditions Request */
1561 #define CIGI3_PACKET_SIZE_ENVIRONMENTAL_CONDITIONS_REQUEST 32
1562 static int hf_cigi3_environmental_conditions_request = -1;
1563 static int hf_cigi3_environmental_conditions_request_type = -1;
1564 static int hf_cigi3_environmental_conditions_request_id = -1;
1565 static int hf_cigi3_environmental_conditions_request_lat = -1;
1566 static int hf_cigi3_environmental_conditions_request_lon = -1;
1567 static int hf_cigi3_environmental_conditions_request_alt = -1;
1568
1569 static const value_string cigi3_environmental_conditions_request_type_vals[] = {
1570     {1, "Maritime Surface Conditions"},
1571     {2, "Terrestrial Surface Conditions"},
1572     {4, "Weather Conditions"},
1573     {8, "Aerosol Concentrations"},
1574     {0, NULL},
1575 };
1576
1577 /* CIGI3 Start of Frame */
1578 #define CIGI3_PACKET_SIZE_START_OF_FRAME 16
1579 static int hf_cigi3_start_of_frame = -1;
1580 static int hf_cigi3_start_of_frame_db_number = -1;
1581 static int hf_cigi3_start_of_frame_ig_status = -1;
1582 static int hf_cigi3_start_of_frame_ig_mode = -1;
1583 static int hf_cigi3_start_of_frame_timestamp_valid = -1;
1584 static int hf_cigi3_start_of_frame_earth_reference_model = -1;
1585 static int hf_cigi3_start_of_frame_frame_ctr = -1;
1586 static int hf_cigi3_start_of_frame_timestamp = -1;
1587
1588 static const value_string cigi3_start_of_frame_ig_mode_vals[] = {
1589     {0, "Reset/Standby"},
1590     {1, "Operate"},
1591     {2, "Debug"},
1592     {3, "Offline Maintenance"},
1593     {0, NULL},
1594 };
1595
1596 static const true_false_string cigi3_start_of_frame_earth_reference_model_tfs = {
1597     "Host-Defined",
1598     "WGS 84"
1599 };
1600
1601 /* CIGI3 HAT/HOT Response */
1602 #define CIGI3_PACKET_SIZE_HAT_HOT_RESPONSE 16
1603 static int hf_cigi3_hat_hot_response = -1;
1604 static int hf_cigi3_hat_hot_response_hat_hot_id = -1;
1605 static int hf_cigi3_hat_hot_response_valid = -1;
1606 static int hf_cigi3_hat_hot_response_type = -1;
1607 static int hf_cigi3_hat_hot_response_height = -1;
1608
1609 static const true_false_string cigi3_hat_hot_response_type_tfs = {
1610     "HOT",
1611     "HAT"
1612 };
1613
1614 /* CIGI3 HAT/HOT Extended Response */
1615 #define CIGI3_PACKET_SIZE_HAT_HOT_EXTENDED_RESPONSE 40
1616 static int hf_cigi3_hat_hot_extended_response = -1;
1617 static int hf_cigi3_hat_hot_extended_response_hat_hot_id = -1;
1618 static int hf_cigi3_hat_hot_extended_response_valid = -1;
1619 static int hf_cigi3_hat_hot_extended_response_hat = -1;
1620 static int hf_cigi3_hat_hot_extended_response_hot = -1;
1621 static int hf_cigi3_hat_hot_extended_response_material_code = -1;
1622 static int hf_cigi3_hat_hot_extended_response_normal_vector_azimuth = -1;
1623 static int hf_cigi3_hat_hot_extended_response_normal_vector_elevation = -1;
1624
1625 /* CIGI3 Line of Sight Response */
1626 #define CIGI3_PACKET_SIZE_LINE_OF_SIGHT_RESPONSE 16
1627 static int hf_cigi3_line_of_sight_response = -1;
1628 static int hf_cigi3_line_of_sight_response_los_id = -1;
1629 static int hf_cigi3_line_of_sight_response_valid = -1;
1630 static int hf_cigi3_line_of_sight_response_entity_id_valid = -1;
1631 static int hf_cigi3_line_of_sight_response_visible = -1;
1632 static int hf_cigi3_line_of_sight_response_count = -1;
1633 static int hf_cigi3_line_of_sight_response_entity_id = -1;
1634 static int hf_cigi3_line_of_sight_response_range = -1;
1635
1636 static const true_false_string cigi3_line_of_sight_response_visible_tfs = {
1637     "Visible",
1638     "Occluded"
1639 };
1640
1641 /* CIGI3 Line of Sight Extended Response */
1642 #define CIGI3_PACKET_SIZE_LINE_OF_SIGHT_EXTENDED_RESPONSE 56
1643 static int hf_cigi3_line_of_sight_extended_response = -1;
1644 static int hf_cigi3_line_of_sight_extended_response_los_id = -1;
1645 static int hf_cigi3_line_of_sight_extended_response_valid = -1;
1646 static int hf_cigi3_line_of_sight_extended_response_entity_id_valid = -1;
1647 static int hf_cigi3_line_of_sight_extended_response_range_valid = -1;
1648 static int hf_cigi3_line_of_sight_extended_response_visible = -1;
1649 static int hf_cigi3_line_of_sight_extended_response_intersection_coord = -1;
1650 static int hf_cigi3_line_of_sight_extended_response_response_count = -1;
1651 static int hf_cigi3_line_of_sight_extended_response_entity_id = -1;
1652 static int hf_cigi3_line_of_sight_extended_response_range = -1;
1653 static int hf_cigi3_line_of_sight_extended_response_lat_xoff = -1;
1654 static int hf_cigi3_line_of_sight_extended_response_lon_yoff = -1;
1655 static int hf_cigi3_line_of_sight_extended_response_alt_zoff = -1;
1656 static int hf_cigi3_line_of_sight_extended_response_red = -1;
1657 static int hf_cigi3_line_of_sight_extended_response_green = -1;
1658 static int hf_cigi3_line_of_sight_extended_response_blue = -1;
1659 static int hf_cigi3_line_of_sight_extended_response_alpha = -1;
1660 static int hf_cigi3_line_of_sight_extended_response_material_code = -1;
1661 static int hf_cigi3_line_of_sight_extended_response_normal_vector_azimuth = -1;
1662 static int hf_cigi3_line_of_sight_extended_response_normal_vector_elevation = -1;
1663
1664 static const true_false_string cigi3_line_of_sight_extended_response_visible_tfs = {
1665     "Visible",
1666     "Occluded"
1667 };
1668
1669 static const true_false_string cigi3_line_of_sight_extended_response_intersection_coord_tfs = {
1670     "Entity",
1671     "Geodetic"
1672 };
1673
1674 /* CIGI3 Sensor Response */
1675 #define CIGI3_PACKET_SIZE_SENSOR_RESPONSE 24
1676 static int hf_cigi3_sensor_response = -1;
1677 static int hf_cigi3_sensor_response_view_id = -1;
1678 static int hf_cigi3_sensor_response_sensor_id = -1;
1679 static int hf_cigi3_sensor_response_sensor_status = -1;
1680 static int hf_cigi3_sensor_response_gate_x_size = -1;
1681 static int hf_cigi3_sensor_response_gate_y_size = -1;
1682 static int hf_cigi3_sensor_response_gate_x_pos = -1;
1683 static int hf_cigi3_sensor_response_gate_y_pos = -1;
1684 static int hf_cigi3_sensor_response_frame_ctr = -1;
1685
1686 static const value_string cigi3_sensor_response_sensor_status_vals[] = {
1687     {0, "Searching for target"},
1688     {1, "Tracking target"},
1689     {2, "Impending breaklock"},
1690     {3, "Breaklock"},
1691     {0, NULL},
1692 };
1693
1694 /* CIGI3 Sensor Extended Response */
1695 #define CIGI3_PACKET_SIZE_SENSOR_EXTENDED_RESPONSE 48
1696 static int hf_cigi3_sensor_extended_response = -1;
1697 static int hf_cigi3_sensor_extended_response_view_id = -1;
1698 static int hf_cigi3_sensor_extended_response_sensor_id = -1;
1699 static int hf_cigi3_sensor_extended_response_sensor_status = -1;
1700 static int hf_cigi3_sensor_extended_response_entity_id_valid = -1;
1701 static int hf_cigi3_sensor_extended_response_entity_id = -1;
1702 static int hf_cigi3_sensor_extended_response_gate_x_size = -1;
1703 static int hf_cigi3_sensor_extended_response_gate_y_size = -1;
1704 static int hf_cigi3_sensor_extended_response_gate_x_pos = -1;
1705 static int hf_cigi3_sensor_extended_response_gate_y_pos = -1;
1706 static int hf_cigi3_sensor_extended_response_frame_ctr = -1;
1707 static int hf_cigi3_sensor_extended_response_track_lat = -1;
1708 static int hf_cigi3_sensor_extended_response_track_lon = -1;
1709 static int hf_cigi3_sensor_extended_response_track_alt = -1;
1710
1711 static const value_string cigi3_sensor_extended_response_sensor_status_vals[] = {
1712     {0, "Searching for target"},
1713     {1, "Tracking target"},
1714     {2, "Impending breaklock"},
1715     {3, "Breaklock"},
1716     {0, NULL},
1717 };
1718
1719 /* CIGI3 Position Response */
1720 #define CIGI3_PACKET_SIZE_POSITION_RESPONSE 48
1721 static int hf_cigi3_position_response = -1;
1722 static int hf_cigi3_position_response_object_id = -1;
1723 static int hf_cigi3_position_response_part_id = -1;
1724 static int hf_cigi3_position_response_object_class = -1;
1725 static int hf_cigi3_position_response_coord_system = -1;
1726 static int hf_cigi3_position_response_lat_xoff = -1;
1727 static int hf_cigi3_position_response_lon_yoff = -1;
1728 static int hf_cigi3_position_response_alt_zoff = -1;
1729 static int hf_cigi3_position_response_roll = -1;
1730 static int hf_cigi3_position_response_pitch = -1;
1731 static int hf_cigi3_position_response_yaw = -1;
1732
1733 static const value_string cigi3_position_response_object_class_vals[] = {
1734     {0, "Entity"},
1735     {1, "Articulated Part"},
1736     {2, "View"},
1737     {3, "View Group"},
1738     {4, "Motion Tracker"},
1739     {0, NULL},
1740 };
1741
1742 static const value_string cigi3_position_response_coord_system_vals[] = {
1743     {0, "Geodetic"},
1744     {1, "Parent Entity"},
1745     {2, "Submodel"},
1746     {0, NULL},
1747 };
1748
1749 /* CIGI3 Weather Conditions Response */
1750 #define CIGI3_PACKET_SIZE_WEATHER_CONDITIONS_RESPONSE 32
1751 static int hf_cigi3_weather_conditions_response = -1;
1752 static int hf_cigi3_weather_conditions_response_request_id = -1;
1753 static int hf_cigi3_weather_conditions_response_humidity = -1;
1754 static int hf_cigi3_weather_conditions_response_air_temp = -1;
1755 static int hf_cigi3_weather_conditions_response_visibility_range = -1;
1756 static int hf_cigi3_weather_conditions_response_horiz_speed = -1;
1757 static int hf_cigi3_weather_conditions_response_vert_speed = -1;
1758 static int hf_cigi3_weather_conditions_response_wind_direction = -1;
1759 static int hf_cigi3_weather_conditions_response_barometric_pressure = -1;
1760
1761 /* CIGI3 Aerosol Concentration Response */
1762 #define CIGI3_PACKET_SIZE_AEROSOL_CONCENTRATION_RESPONSE 8
1763 static int hf_cigi3_aerosol_concentration_response = -1;
1764 static int hf_cigi3_aerosol_concentration_response_request_id = -1;
1765 static int hf_cigi3_aerosol_concentration_response_layer_id = -1;
1766 static int hf_cigi3_aerosol_concentration_response_aerosol_concentration = -1;
1767
1768 /* CIGI3 Maritime Surface Conditions Response */
1769 #define CIGI3_PACKET_SIZE_MARITIME_SURFACE_CONDITIONS_RESPONSE 16
1770 static int hf_cigi3_maritime_surface_conditions_response = -1;
1771 static int hf_cigi3_maritime_surface_conditions_response_request_id = -1;
1772 static int hf_cigi3_maritime_surface_conditions_response_sea_surface_height = -1;
1773 static int hf_cigi3_maritime_surface_conditions_response_surface_water_temp = -1;
1774 static int hf_cigi3_maritime_surface_conditions_response_surface_clarity = -1;
1775
1776 /* CIGI3 Terrestrial Surface Conditions Response */
1777 #define CIGI3_PACKET_SIZE_TERRESTRIAL_SURFACE_CONDITIONS_RESPONSE 8
1778 static int hf_cigi3_terrestrial_surface_conditions_response = -1;
1779 static int hf_cigi3_terrestrial_surface_conditions_response_request_id = -1;
1780 static int hf_cigi3_terrestrial_surface_conditions_response_surface_id = -1;
1781
1782 /* CIGI3 Collision Detection Segment Notification */
1783 #define CIGI3_PACKET_SIZE_COLLISION_DETECTION_SEGMENT_NOTIFICATION 16
1784 static int hf_cigi3_collision_detection_segment_notification = -1;
1785 static int hf_cigi3_collision_detection_segment_notification_entity_id = -1;
1786 static int hf_cigi3_collision_detection_segment_notification_segment_id = -1;
1787 static int hf_cigi3_collision_detection_segment_notification_type = -1;
1788 static int hf_cigi3_collision_detection_segment_notification_contacted_entity_id = -1;
1789 static int hf_cigi3_collision_detection_segment_notification_material_code = -1;
1790 static int hf_cigi3_collision_detection_segment_notification_intersection_distance = -1;
1791
1792 static const true_false_string cigi3_collision_detection_segment_notification_type_tfs = {
1793     "Entity",
1794     "Non-entity"
1795 };
1796
1797 /* CIGI3 Collision Detection Volume Notification */
1798 #define CIGI3_PACKET_SIZE_COLLISION_DETECTION_VOLUME_NOTIFICATION 16
1799 static int hf_cigi3_collision_detection_volume_notification = -1;
1800 static int hf_cigi3_collision_detection_volume_notification_entity_id = -1;
1801 static int hf_cigi3_collision_detection_volume_notification_volume_id = -1;
1802 static int hf_cigi3_collision_detection_volume_notification_type = -1;
1803 static int hf_cigi3_collision_detection_volume_notification_contacted_entity_id = -1;
1804 static int hf_cigi3_collision_detection_volume_notification_contacted_volume_id = -1;
1805
1806 static const true_false_string cigi3_collision_detection_volume_notification_type_tfs = {
1807     "Entity",
1808     "Non-entity"
1809 };
1810
1811 /* CIGI3 Animation Stop Notification */
1812 #define CIGI3_PACKET_SIZE_ANIMATION_STOP_NOTIFICATION 8
1813 static int hf_cigi3_animation_stop_notification = -1;
1814 static int hf_cigi3_animation_stop_notification_entity_id = -1;
1815
1816 /* CIGI3 Event Notification */
1817 #define CIGI3_PACKET_SIZE_EVENT_NOTIFICATION 16
1818 static int hf_cigi3_event_notification = -1;
1819 static int hf_cigi3_event_notification_event_id = -1;
1820 static int hf_cigi3_event_notification_data_1 = -1;
1821 static int hf_cigi3_event_notification_data_2 = -1;
1822 static int hf_cigi3_event_notification_data_3 = -1;
1823
1824 /* CIGI3 Image Generator Message */
1825 static int hf_cigi3_image_generator_message = -1;
1826 static int hf_cigi3_image_generator_message_id = -1;
1827 static int hf_cigi3_image_generator_message_message = -1;
1828
1829 /* CIGI3 User-Defined Packets */
1830 static int hf_cigi3_user_defined = -1;
1831
1832
1833 /* Global preferences */
1834 #define CIGI_VERSION_FROM_PACKET 0
1835 #define CIGI_VERSION_2 2
1836 #define CIGI_VERSION_3 3
1837
1838 static gint global_cigi_version = CIGI_VERSION_FROM_PACKET;
1839
1840 #define CIGI_BYTE_ORDER_FROM_PACKET   -1
1841 #define CIGI_BYTE_ORDER_BIG_ENDIAN    FALSE
1842 #define CIGI_BYTE_ORDER_LITTLE_ENDIAN TRUE
1843
1844 static gint global_cigi_byte_order = CIGI_BYTE_ORDER_FROM_PACKET;
1845
1846 #define CIGI_MAX_PORT 65536
1847
1848 static range_t *global_cigi_udp_ports;
1849 static range_t *cigi_udp_ports;
1850
1851 static const char *global_host_ip;
1852 static const char *global_ig_ip;
1853
1854
1855 /* Initialize the subtree pointers */
1856 static gint ett_cigi = -1;
1857
1858 /* The version of cigi to use */
1859 static gint cigi_version = 0;
1860
1861 /* The byte order of cigi to use; our default is big-endian */
1862 static gint cigi_byte_order = CIGI_BYTE_ORDER_BIG_ENDIAN;
1863
1864
1865 /* Code to actually dissect the CIGI packets */
1866 static int 
1867 dissect_cigi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1868 {
1869     /* Set up structures needed to add the protocol subtree and manage it */
1870     guint8 packet_id = 0;
1871     gint length = 0;
1872
1873     proto_item *ti;
1874     proto_tree *cigi_tree;
1875
1876     const char* src_str;
1877     const char* dest_str;
1878     const char* info_str;
1879
1880     guint8 size;
1881     guint8 version;
1882     guint16 byte_swap;
1883
1884     length = tvb_length(tvb);
1885     packet_id = tvb_get_guint8(tvb, 0);
1886
1887
1888     /* Make sure this looks like CIGI */
1889
1890     /* CIGI 2 & 3 SOF and IG Control packets are 16 bytes */
1891     if ( length < 16 ) {
1892         return 0;
1893     }
1894     size = tvb_get_guint8(tvb, 1);
1895     if (( size > tvb_reported_length(tvb) ) || ( size != 16 )) {
1896         return 0;
1897     }
1898
1899     /* CIGI 2 & 3 requires that the first packet is always the SOF or IG Control */
1900     switch ( packet_id ) {
1901         case 1:
1902         case 101:
1903             break;
1904         default:
1905             return 0;
1906     }
1907
1908     /* Currently there are only 3 versions of CIGI */
1909     version = tvb_get_guint8(tvb, 2);
1910     switch ( version ) {
1911         case 1:
1912         case 2:
1913             break;
1914         case 3:
1915             /* CIGI 3 has the byte swap field which only allows two values. */
1916             byte_swap = tvb_get_ntohs(tvb, 6);
1917
1918             if ( byte_swap != CIGI3_BYTE_SWAP_BIG_ENDIAN && byte_swap != CIGI3_BYTE_SWAP_LITTLE_ENDIAN ) {
1919                 return 0;
1920             }
1921             break;
1922         default:
1923             return 0;
1924     }
1925
1926
1927     /* Make entries in Protocol column and Info column on summary display */
1928     if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
1929         col_set_str(pinfo->cinfo, COL_PROTOCOL, "CIGI");
1930     }
1931
1932     /* If we have the start of frame or IG Control packet set the version
1933      * XXX - If another version of cigi is added to this dissector be sure to
1934      * place the IG Control and SOF packet id's in this comparison. */
1935     if ( ( packet_id == CIGI2_PACKET_ID_IG_CONTROL || packet_id == CIGI2_PACKET_ID_START_OF_FRAME || packet_id == CIGI3_PACKET_ID_IG_CONTROL || packet_id == CIGI3_PACKET_ID_START_OF_FRAME ) && global_cigi_version == CIGI_VERSION_FROM_PACKET ) {
1936         cigi_version = tvb_get_guint8(tvb, 2);
1937     }
1938
1939     /* Format the Info String */
1940     src_str = ip_to_str(pinfo->src.data);
1941     if ( !g_strcasecmp(global_host_ip, src_str) ) {
1942         src_str = "Host";
1943     } else if ( !g_strcasecmp(global_ig_ip, src_str) ) {
1944         src_str = "IG";
1945     }
1946
1947     dest_str = ip_to_str(pinfo->dst.data);
1948     if ( !g_strcasecmp(global_host_ip, dest_str) ) {
1949         dest_str = "Host";
1950     } else if ( !g_strcasecmp(global_ig_ip, dest_str) ) {
1951         dest_str = "IG";
1952     }
1953
1954     /*
1955      * XXX - Use â‡’ (U+21D2) in place of , *IF* we can ensure that,
1956      * for any form of output/display, we arrange that we map U+21D2 to
1957      * "=>" if that form of output/display can't handle Unicode.
1958      * XXX - how do we know whether, even if the form of output/display
1959      * nominally handles Unicode, it has a Unicode font or font set that
1960      * includes that character?
1961      */
1962     info_str = g_strdup_printf("%s => %s (%i bytes)", src_str, dest_str, length);
1963
1964     if (check_col(pinfo->cinfo, COL_INFO)) {
1965         col_clear(pinfo->cinfo, COL_INFO);
1966         col_add_fstr(pinfo->cinfo, COL_INFO, info_str);
1967     }
1968
1969     if (tree) {
1970
1971         ti = proto_tree_add_protocol_format(tree, proto_cigi, tvb, 0, length, "Common Image Generator Interface (%i), %s", cigi_version, info_str);
1972
1973         cigi_tree = proto_item_add_subtree(ti, ett_cigi);
1974
1975         /* Ports */
1976         proto_tree_add_uint_hidden(cigi_tree, hf_cigi_src_port, tvb, 0, 0, pinfo->srcport);
1977         proto_tree_add_uint_hidden(cigi_tree, hf_cigi_dest_port, tvb, 0, 0, pinfo->destport);
1978         proto_tree_add_uint_hidden(cigi_tree, hf_cigi_port, tvb, 0, 0, pinfo->srcport);
1979         proto_tree_add_uint_hidden(cigi_tree, hf_cigi_port, tvb, 0, 0, pinfo->destport);
1980
1981         /* Frame Size */
1982         proto_tree_add_uint_hidden(cigi_tree, hf_cigi_frame_size, tvb, 0, 0, length);
1983
1984         /* Since the versions of CIGI are not backwards compatible, 
1985          * dissection is different for each version. 
1986          * XXX - If another version of cigi is added to this dissector be 
1987          * sure to place the version in this statement.*/
1988         if ( cigi_version == CIGI_VERSION_2 ) {
1989             cigi2_add_tree(tvb, cigi_tree);
1990         } else if ( cigi_version == CIGI_VERSION_3 ) {
1991             cigi3_add_tree(tvb, cigi_tree);
1992         } else {
1993             /* Since there exists no dissector to dissect this version
1994              * just put the data into a tree using an unknown version */
1995             cigi_add_tree(tvb, cigi_tree);
1996         }
1997     }
1998
1999     /* If we got this far it is probably CIGI and we probably ate the
2000      * entire packet. */
2001     return tvb_length(tvb);
2002 }
2003
2004 /* Create the tree for CIGI (Unknown Version)
2005  * Note: If we have no version then we assume network order bytes (big endian). */
2006 void
2007 cigi_add_tree(tvbuff_t *tvb, proto_tree *cigi_tree)
2008 {    
2009     gint offset = 0;
2010     gint length = 0;
2011     gint packet_id = 0;
2012     gint packet_size = 0;
2013     gint data_size = 0;
2014
2015     proto_tree* cigi_packet_tree = NULL;
2016     proto_item* tipacket;
2017
2018     length = tvb_length(tvb);
2019
2020     /* Each iteration through this loop is meant to be a separate cigi packet
2021      * therefore it is okay to assume that at the top of this look we are given
2022      * a new packet to dissect. */
2023     while ( offset < length ) {
2024
2025         packet_id = tvb_get_guint8(tvb, offset);
2026         packet_size = tvb_get_guint8(tvb, offset + 1);
2027         data_size = packet_size;
2028
2029         /* if the second byte of the packet carries a value that is less than
2030          * then we know we have a malformed packet because every cigi packet
2031          * at minimal must be a least 2 bytes ( 1 - packet_id; 2 - packet_size ). */
2032         if ( packet_size < 2 ) {
2033             THROW(ReportedBoundsError);
2034         }
2035
2036         /* If we have the start of frame or IG Control packet set the version.
2037          * Since we have no cigi version we assume that packet id 1 is the
2038          * IG Control and packet id 101 is the Start of Frame. */
2039         if ( ( packet_id == 1 || packet_id == 101 ) && global_cigi_version == CIGI_VERSION_FROM_PACKET ) {
2040             cigi_version = tvb_get_guint8(tvb, 2);
2041         }
2042
2043         /* Add the subtree for the packet */
2044         tipacket = proto_tree_add_string_format(cigi_tree, hf_cigi_unknown, tvb, offset, packet_size, NULL, "Unknown (%i bytes)", packet_size);
2045
2046         cigi_packet_tree = proto_item_add_subtree(tipacket, ett_cigi);
2047
2048         /* In all CIGI versions the first byte of a packet is the packet ID.
2049          * The second byte is the size of the packet (in bytes). */
2050         proto_tree_add_item(cigi_packet_tree, hf_cigi_packet_id, tvb, offset, 1, cigi_byte_order);
2051         offset++;
2052         data_size--;
2053
2054         proto_tree_add_item(cigi_packet_tree, hf_cigi_packet_size, tvb, offset, 1, cigi_byte_order);
2055         offset++;
2056         data_size--;
2057
2058         /* If the packet ID is for the SOF or IG Control, which are usually 101
2059          * and 1 respectively then also print the version that we are using. */
2060         if ( packet_id == 1 || packet_id == 101 ) {
2061             proto_tree_add_item(cigi_packet_tree, hf_cigi_version, tvb, offset, 1, cigi_byte_order);
2062             offset++;
2063             data_size--;
2064         }
2065
2066         proto_tree_add_text(cigi_packet_tree, tvb, offset, data_size, "Data (%i bytes)", data_size );
2067         offset += data_size;
2068     }
2069 }
2070
2071 /* CIGI Add Data */
2072 /* offset is the position past the packet_id and packet_size */
2073 gint
2074 cigi_add_data(tvbuff_t *tvb, proto_tree *tree, gint offset)
2075 {
2076     gint8 packet_size = 0;
2077
2078     packet_size = tvb_get_guint8(tvb, offset-1);
2079
2080     /* A cigi packet cannot be less than 2 bytes ( because every cigi packet
2081      * has a packet id (1 byte) and a packet size (1 byte) ). */
2082     if ( packet_size < 2 ) {
2083         THROW(ReportedBoundsError);
2084     }
2085
2086     proto_tree_add_text(tree, tvb, offset, packet_size-2, "Data (%i bytes)", packet_size-2 );
2087     offset += packet_size-2;
2088
2089     return offset;
2090 }
2091
2092 /* Create the tree for CIGI 2
2093  * Note: CIGI 2 guarantee's that the byte order will be big endian. */
2094 void
2095 cigi2_add_tree(tvbuff_t *tvb, proto_tree *cigi_tree)
2096 {    
2097     gint offset = 0;
2098     gint length = 0;
2099     gint init_offset = 0;
2100
2101     gint packet_id = 0;
2102     gint packet_size = 0;
2103     gint packet_length = 0;
2104
2105     proto_tree* cigi_packet_tree = NULL;
2106     proto_item* tipacket;
2107     int hf_cigi2_packet = -1;
2108
2109     length = tvb_length(tvb);
2110
2111     /* Each iteration through this loop is meant to be a separate cigi packet
2112      * therefore it is okay to assume that at the top of this look we are given
2113      * a new packet to dissect. */
2114     while ( offset < length ) {
2115
2116         packet_id = tvb_get_guint8(tvb, offset);
2117         packet_size = tvb_get_guint8(tvb, offset + 1);
2118
2119         /* If we have the start of frame or IG Control packet set the version */
2120         if ( ( packet_id == CIGI2_PACKET_ID_IG_CONTROL || packet_id == CIGI2_PACKET_ID_START_OF_FRAME ) && global_cigi_version == CIGI_VERSION_FROM_PACKET ) {
2121             cigi_version = tvb_get_guint8(tvb, 2);
2122         }
2123
2124         /* Add the subtree for the packet */
2125         if ( packet_id == CIGI2_PACKET_ID_IG_CONTROL ) {
2126             hf_cigi2_packet = hf_cigi2_ig_control;
2127             packet_length = CIGI2_PACKET_SIZE_IG_CONTROL;
2128         } else if ( packet_id == CIGI2_PACKET_ID_ENTITY_CONTROL ) {
2129             hf_cigi2_packet = hf_cigi2_entity_control;
2130             packet_length = CIGI2_PACKET_SIZE_ENTITY_CONTROL;
2131         } else if ( packet_id == CIGI2_PACKET_ID_COMPONENT_CONTROL ) {
2132             hf_cigi2_packet = hf_cigi2_component_control;
2133             packet_length = CIGI2_PACKET_SIZE_COMPONENT_CONTROL;
2134         } else if ( packet_id == CIGI2_PACKET_ID_ARTICULATED_PARTS_CONTROL ) {
2135             hf_cigi2_packet = hf_cigi2_articulated_parts_control;
2136             packet_length = CIGI2_PACKET_SIZE_ARTICULATED_PARTS_CONTROL;
2137         } else if ( packet_id == CIGI2_PACKET_ID_RATE_CONTROL ) {
2138             hf_cigi2_packet = hf_cigi2_rate_control;
2139             packet_length = CIGI2_PACKET_SIZE_RATE_CONTROL;
2140         } else if ( packet_id == CIGI2_PACKET_ID_ENVIRONMENT_CONTROL ) {
2141             hf_cigi2_packet = hf_cigi2_environment_control;
2142             packet_length = CIGI2_PACKET_SIZE_ENVIRONMENT_CONTROL;
2143         } else if ( packet_id == CIGI2_PACKET_ID_WEATHER_CONTROL ) {
2144             hf_cigi2_packet = hf_cigi2_weather_control;
2145             packet_length = CIGI2_PACKET_SIZE_WEATHER_CONTROL;
2146         } else if ( packet_id == CIGI2_PACKET_ID_VIEW_CONTROL ) {
2147             hf_cigi2_packet = hf_cigi2_view_control;
2148             packet_length = CIGI2_PACKET_SIZE_VIEW_CONTROL;
2149         } else if ( packet_id == CIGI2_PACKET_ID_SENSOR_CONTROL ) {
2150             hf_cigi2_packet = hf_cigi2_sensor_control;
2151             packet_length = CIGI2_PACKET_SIZE_SENSOR_CONTROL;
2152         } else if ( packet_id == CIGI2_PACKET_ID_TRAJECTORY_DEFINITION ) {
2153             hf_cigi2_packet = hf_cigi2_trajectory_definition;
2154             packet_length = CIGI2_PACKET_SIZE_TRAJECTORY_DEFINITION;
2155         } else if ( packet_id == CIGI2_PACKET_ID_SPECIAL_EFFECT_DEFINITION ) {
2156             hf_cigi2_packet = hf_cigi2_special_effect_definition;
2157             packet_length = CIGI2_PACKET_SIZE_SPECIAL_EFFECT_DEFINITION;
2158         } else if ( packet_id == CIGI2_PACKET_ID_VIEW_DEFINITION ) {
2159             hf_cigi2_packet = hf_cigi2_view_definition;
2160             packet_length = CIGI2_PACKET_SIZE_VIEW_DEFINITION;
2161         } else if ( packet_id == CIGI2_PACKET_ID_COLLISION_DETECTION_SEGMENT_DEFINITION ) {
2162             hf_cigi2_packet = hf_cigi2_collision_detection_segment_definition;
2163             packet_length = CIGI2_PACKET_SIZE_COLLISION_DETECTION_SEGMENT_DEFINITION;
2164         } else if ( packet_id == CIGI2_PACKET_ID_COLLISION_DETECTION_VOLUME_DEFINITION ) {
2165             hf_cigi2_packet = hf_cigi2_collision_detection_volume_definition;
2166             packet_length = CIGI2_PACKET_SIZE_COLLISION_DETECTION_VOLUME_DEFINITION;
2167         } else if ( packet_id == CIGI2_PACKET_ID_HEIGHT_ABOVE_TERRAIN_REQUEST ) {
2168             hf_cigi2_packet = hf_cigi2_height_above_terrain_request;
2169             packet_length = CIGI2_PACKET_SIZE_HEIGHT_ABOVE_TERRAIN_REQUEST;
2170         } else if ( packet_id == CIGI2_PACKET_ID_LINE_OF_SIGHT_OCCULT_REQUEST ) {
2171             hf_cigi2_packet = hf_cigi2_line_of_sight_occult_request;
2172             packet_length = CIGI2_PACKET_SIZE_LINE_OF_SIGHT_OCCULT_REQUEST;
2173         } else if ( packet_id == CIGI2_PACKET_ID_LINE_OF_SIGHT_RANGE_REQUEST ) {
2174             hf_cigi2_packet = hf_cigi2_line_of_sight_range_request;
2175             packet_length = CIGI2_PACKET_SIZE_LINE_OF_SIGHT_RANGE_REQUEST;
2176         } else if ( packet_id == CIGI2_PACKET_ID_HEIGHT_OF_TERRAIN_REQUEST ) {
2177             hf_cigi2_packet = hf_cigi2_height_of_terrain_request;
2178             packet_length = CIGI2_PACKET_SIZE_HEIGHT_OF_TERRAIN_REQUEST;
2179         } else if ( packet_id == CIGI2_PACKET_ID_START_OF_FRAME ) {
2180             hf_cigi2_packet = hf_cigi2_start_of_frame;
2181             packet_length = CIGI2_PACKET_SIZE_START_OF_FRAME;
2182         } else if ( packet_id == CIGI2_PACKET_ID_HEIGHT_ABOVE_TERRAIN_RESPONSE ) {
2183             hf_cigi2_packet = hf_cigi2_height_above_terrain_response;
2184             packet_length = CIGI2_PACKET_SIZE_HEIGHT_ABOVE_TERRAIN_RESPONSE;
2185         } else if ( packet_id == CIGI2_PACKET_ID_LINE_OF_SIGHT_RESPONSE ) {
2186             hf_cigi2_packet = hf_cigi2_line_of_sight_response;
2187             packet_length = CIGI2_PACKET_SIZE_LINE_OF_SIGHT_RESPONSE;
2188         } else if ( packet_id == CIGI2_PACKET_ID_COLLISION_DETECTION_SEGMENT_RESPONSE ) {
2189             hf_cigi2_packet = hf_cigi2_collision_detection_segment_response;
2190             packet_length = CIGI2_PACKET_SIZE_COLLISION_DETECTION_SEGMENT_RESPONSE;
2191         } else if ( packet_id == CIGI2_PACKET_ID_SENSOR_RESPONSE ) {
2192             hf_cigi2_packet = hf_cigi2_sensor_response;
2193             packet_length = CIGI2_PACKET_SIZE_SENSOR_RESPONSE;
2194         } else if ( packet_id == CIGI2_PACKET_ID_HEIGHT_OF_TERRAIN_RESPONSE ) {
2195             hf_cigi2_packet = hf_cigi2_height_of_terrain_response;
2196             packet_length = CIGI2_PACKET_SIZE_HEIGHT_OF_TERRAIN_RESPONSE;
2197         } else if ( packet_id == CIGI2_PACKET_ID_COLLISION_DETECTION_VOLUME_RESPONSE ) {
2198             hf_cigi2_packet = hf_cigi2_collision_detection_volume_response;
2199             packet_length = CIGI2_PACKET_SIZE_COLLISION_DETECTION_VOLUME_RESPONSE;
2200         } else if ( packet_id == CIGI2_PACKET_ID_IMAGE_GENERATOR_MESSAGE ) {
2201             hf_cigi2_packet = hf_cigi2_image_generator_message;
2202             packet_length = packet_size;
2203         } else if ( packet_id >= CIGI2_PACKET_ID_USER_DEFINABLE_MIN && packet_id <= CIGI2_PACKET_ID_USER_DEFINABLE_MAX ) {
2204             hf_cigi2_packet = hf_cigi2_user_definable;
2205             packet_length = packet_size;
2206         } else {
2207             hf_cigi2_packet = hf_cigi_unknown;
2208             packet_length = packet_size;
2209         }
2210         tipacket = proto_tree_add_string_format(cigi_tree, hf_cigi2_packet, tvb, offset, packet_length, NULL, "%s (%i bytes)", val_to_str(packet_id, cigi2_packet_id_vals, "Unknown"), packet_length);
2211
2212         cigi_packet_tree = proto_item_add_subtree(tipacket, ett_cigi);
2213
2214         /* In all CIGI versions the first byte of a packet is the packet ID.
2215          * The second byte is the size of the packet (in bytes). */
2216         init_offset = offset;
2217         proto_tree_add_item(cigi_packet_tree, hf_cigi2_packet_id, tvb, offset, 1, FALSE);
2218         offset++;
2219
2220         proto_tree_add_item(cigi_packet_tree, hf_cigi_packet_size, tvb, offset, 1, FALSE);
2221         offset++;
2222
2223         if ( packet_id == CIGI2_PACKET_ID_IG_CONTROL ) {
2224             offset = cigi2_add_ig_control(tvb, cigi_packet_tree, offset);
2225         } else if ( packet_id == CIGI2_PACKET_ID_ENTITY_CONTROL ) {
2226             offset = cigi2_add_entity_control(tvb, cigi_packet_tree, offset);
2227         } else if ( packet_id == CIGI2_PACKET_ID_COMPONENT_CONTROL ) {
2228             offset = cigi2_add_component_control(tvb, cigi_packet_tree, offset);
2229         } else if ( packet_id == CIGI2_PACKET_ID_ARTICULATED_PARTS_CONTROL ) {
2230             offset = cigi2_add_articulated_parts_control(tvb, cigi_packet_tree, offset);
2231         } else if ( packet_id == CIGI2_PACKET_ID_RATE_CONTROL ) {
2232             offset = cigi2_add_rate_control(tvb, cigi_packet_tree, offset);
2233         } else if ( packet_id == CIGI2_PACKET_ID_ENVIRONMENT_CONTROL ) {
2234             offset = cigi2_add_environment_control(tvb, cigi_packet_tree, offset);
2235         } else if ( packet_id == CIGI2_PACKET_ID_WEATHER_CONTROL ) {
2236             offset = cigi2_add_weather_control(tvb, cigi_packet_tree, offset);
2237         } else if ( packet_id == CIGI2_PACKET_ID_VIEW_CONTROL ) {
2238             offset = cigi2_add_view_control(tvb, cigi_packet_tree, offset);
2239         } else if ( packet_id == CIGI2_PACKET_ID_SENSOR_CONTROL ) {
2240             offset = cigi2_add_sensor_control(tvb, cigi_packet_tree, offset);
2241         } else if ( packet_id == CIGI2_PACKET_ID_TRAJECTORY_DEFINITION ) {
2242             offset = cigi2_add_trajectory_definition(tvb, cigi_packet_tree, offset);
2243         } else if ( packet_id == CIGI2_PACKET_ID_SPECIAL_EFFECT_DEFINITION ) {
2244             offset = cigi2_add_special_effect_definition(tvb, cigi_packet_tree, offset);
2245         } else if ( packet_id == CIGI2_PACKET_ID_VIEW_DEFINITION ) {
2246             offset = cigi2_add_view_definition(tvb, cigi_packet_tree, offset);
2247         } else if ( packet_id == CIGI2_PACKET_ID_COLLISION_DETECTION_SEGMENT_DEFINITION ) {
2248             offset = cigi2_add_collision_detection_segment_definition(tvb, cigi_packet_tree, offset);
2249         } else if ( packet_id == CIGI2_PACKET_ID_COLLISION_DETECTION_VOLUME_DEFINITION ) {
2250             offset = cigi2_add_collision_detection_volume_definition(tvb, cigi_packet_tree, offset);
2251         } else if ( packet_id == CIGI2_PACKET_ID_HEIGHT_ABOVE_TERRAIN_REQUEST ) {
2252             offset = cigi2_add_height_above_terrain_request(tvb, cigi_packet_tree, offset);
2253         } else if ( packet_id == CIGI2_PACKET_ID_LINE_OF_SIGHT_OCCULT_REQUEST ) {
2254             offset = cigi2_add_line_of_sight_occult_request(tvb, cigi_packet_tree, offset);
2255         } else if ( packet_id == CIGI2_PACKET_ID_LINE_OF_SIGHT_RANGE_REQUEST ) {
2256             offset = cigi2_add_line_of_sight_range_request(tvb, cigi_packet_tree, offset);
2257         } else if ( packet_id == CIGI2_PACKET_ID_HEIGHT_OF_TERRAIN_REQUEST ) {
2258             offset = cigi2_add_height_of_terrain_request(tvb, cigi_packet_tree, offset);
2259         } else if ( packet_id == CIGI2_PACKET_ID_START_OF_FRAME ) {
2260             offset = cigi2_add_start_of_frame(tvb, cigi_packet_tree, offset);
2261         } else if ( packet_id == CIGI2_PACKET_ID_HEIGHT_ABOVE_TERRAIN_RESPONSE ) {
2262             offset = cigi2_add_height_above_terrain_response(tvb, cigi_packet_tree, offset);
2263         } else if ( packet_id == CIGI2_PACKET_ID_LINE_OF_SIGHT_RESPONSE ) {
2264             offset = cigi2_add_line_of_sight_response(tvb, cigi_packet_tree, offset);
2265         } else if ( packet_id == CIGI2_PACKET_ID_COLLISION_DETECTION_SEGMENT_RESPONSE ) {
2266             offset = cigi2_add_collision_detection_segment_response(tvb, cigi_packet_tree, offset);
2267         } else if ( packet_id == CIGI2_PACKET_ID_SENSOR_RESPONSE ) {
2268             offset = cigi2_add_sensor_response(tvb, cigi_packet_tree, offset);
2269         } else if ( packet_id == CIGI2_PACKET_ID_HEIGHT_OF_TERRAIN_RESPONSE ) {
2270             offset = cigi2_add_height_of_terrain_response(tvb, cigi_packet_tree, offset);
2271         } else if ( packet_id == CIGI2_PACKET_ID_COLLISION_DETECTION_VOLUME_RESPONSE ) {
2272             offset = cigi2_add_collision_detection_volume_response(tvb, cigi_packet_tree, offset);
2273         } else if ( packet_id == CIGI2_PACKET_ID_IMAGE_GENERATOR_MESSAGE ) {
2274             offset = cigi2_add_image_generator_message(tvb, cigi_packet_tree, offset);
2275         } else if ( packet_id >= CIGI2_PACKET_ID_USER_DEFINABLE_MIN && packet_id <= CIGI2_PACKET_ID_USER_DEFINABLE_MAX ) {
2276             offset = cigi_add_data(tvb, cigi_packet_tree, offset);
2277         } else {
2278             offset = cigi_add_data(tvb, cigi_packet_tree, offset);
2279         }
2280
2281         /* Does the packet offset match the supposed length of the packet? */
2282         DISSECTOR_ASSERT((offset - init_offset == packet_length) && "Packet offset does not match packet length");
2283     }
2284 }
2285
2286 /* Create the tree for CIGI 3 */
2287 void
2288 cigi3_add_tree(tvbuff_t *tvb, proto_tree *cigi_tree)
2289 {    
2290     gint offset = 0;
2291     gint length = 0;
2292     gint init_offset = 0;
2293
2294     gint packet_id = 0;
2295     gint packet_size = 0;
2296     gint packet_length = 0;
2297     guint16 byte_swap = 0;
2298
2299     proto_tree* cigi_packet_tree = NULL;
2300     proto_item* tipacket;
2301     int hf_cigi3_packet = -1;
2302
2303     length = tvb_length(tvb);
2304
2305     /* Each iteration through this loop is meant to be a separate cigi packet
2306      * therefore it is okay to assume that at the top of this look we are given
2307      * a new packet to dissect. */
2308     while ( offset < length ) {
2309
2310         packet_id = tvb_get_guint8(tvb, offset);
2311         packet_size = tvb_get_guint8(tvb, offset + 1);
2312         byte_swap = tvb_get_ntohs(tvb, offset + 6);
2313
2314         /* If we have the start of frame or IG Control packet set the version */
2315         if ( ( packet_id == CIGI3_PACKET_ID_IG_CONTROL || packet_id == CIGI3_PACKET_ID_START_OF_FRAME ) && global_cigi_version == CIGI_VERSION_FROM_PACKET ) {
2316             cigi_version = tvb_get_guint8(tvb, 2);
2317         }
2318
2319         /* If we have the SOF or IG Control packet set the byte order */
2320         if ( ( packet_id == CIGI3_PACKET_ID_IG_CONTROL || packet_id == CIGI3_PACKET_ID_START_OF_FRAME ) && global_cigi_byte_order == CIGI_BYTE_ORDER_FROM_PACKET ) {
2321             if ( byte_swap == CIGI3_BYTE_SWAP_BIG_ENDIAN ) {
2322                 cigi_byte_order = CIGI_BYTE_ORDER_BIG_ENDIAN;
2323             } else if ( byte_swap == CIGI3_BYTE_SWAP_LITTLE_ENDIAN ) {
2324                 cigi_byte_order = CIGI_BYTE_ORDER_LITTLE_ENDIAN;
2325             } else {
2326                 /* Assume we want Big-Endian byte order */
2327                 cigi_byte_order = CIGI_BYTE_ORDER_BIG_ENDIAN;
2328             }
2329         }
2330
2331         /* Add the subtree for the packet */
2332         if ( packet_id == CIGI3_PACKET_ID_IG_CONTROL ) {
2333             hf_cigi3_packet = hf_cigi3_ig_control;
2334             packet_length = CIGI3_PACKET_SIZE_IG_CONTROL;
2335         } else if ( packet_id == CIGI3_PACKET_ID_ENTITY_CONTROL ) {
2336             hf_cigi3_packet = hf_cigi3_entity_control;
2337             packet_length = CIGI3_PACKET_SIZE_ENTITY_CONTROL;
2338         } else if ( packet_id == CIGI3_PACKET_ID_CONFORMAL_CLAMPED_ENTITY_CONTROL ) {
2339             hf_cigi3_packet = hf_cigi3_conformal_clamped_entity_control;
2340             packet_length = CIGI3_PACKET_SIZE_CONFORMAL_CLAMPED_ENTITY_CONTROL;
2341         } else if ( packet_id == CIGI3_PACKET_ID_COMPONENT_CONTROL ) {
2342             hf_cigi3_packet = hf_cigi3_component_control;
2343             packet_length = CIGI3_PACKET_SIZE_COMPONENT_CONTROL;
2344         } else if ( packet_id == CIGI3_PACKET_ID_SHORT_COMPONENT_CONTROL ) {
2345             hf_cigi3_packet = hf_cigi3_short_component_control;
2346             packet_length = CIGI3_PACKET_SIZE_SHORT_COMPONENT_CONTROL;
2347         } else if ( packet_id == CIGI3_PACKET_ID_ARTICULATED_PART_CONTROL ) {
2348             hf_cigi3_packet = hf_cigi3_articulated_part_control;
2349             packet_length = CIGI3_PACKET_SIZE_ARTICULATED_PART_CONTROL;
2350         } else if ( packet_id == CIGI3_PACKET_ID_SHORT_ARTICULATED_PART_CONTROL ) {
2351             hf_cigi3_packet = hf_cigi3_short_articulated_part_control;
2352             packet_length = CIGI3_PACKET_SIZE_SHORT_ARTICULATED_PART_CONTROL;
2353         } else if ( packet_id == CIGI3_PACKET_ID_RATE_CONTROL ) {
2354             hf_cigi3_packet = hf_cigi3_rate_control;
2355             packet_length = CIGI3_PACKET_SIZE_RATE_CONTROL;
2356         } else if ( packet_id == CIGI3_PACKET_ID_CELESTIAL_SPHERE_CONTROL ) {
2357             hf_cigi3_packet = hf_cigi3_celestial_sphere_control;
2358             packet_length = CIGI3_PACKET_SIZE_CELESTIAL_SPHERE_CONTROL;
2359         } else if ( packet_id == CIGI3_PACKET_ID_ATMOSPHERE_CONTROL ) {
2360             hf_cigi3_packet = hf_cigi3_atmosphere_control;
2361             packet_length = CIGI3_PACKET_SIZE_ATMOSPHERE_CONTROL;
2362         } else if ( packet_id == CIGI3_PACKET_ID_ENVIRONMENTAL_REGION_CONTROL ) {
2363             hf_cigi3_packet = hf_cigi3_environmental_region_control;
2364             packet_length = CIGI3_PACKET_SIZE_ENVIRONMENTAL_REGION_CONTROL;
2365         } else if ( packet_id == CIGI3_PACKET_ID_WEATHER_CONTROL ) {
2366             hf_cigi3_packet = hf_cigi3_weather_control;
2367             packet_length = CIGI3_PACKET_SIZE_WEATHER_CONTROL;
2368         } else if ( packet_id == CIGI3_PACKET_ID_MARITIME_SURFACE_CONDITIONS_CONTROL ) {
2369             hf_cigi3_packet = hf_cigi3_maritime_surface_conditions_control;
2370             packet_length = CIGI3_PACKET_SIZE_MARITIME_SURFACE_CONDITIONS_CONTROL;
2371         } else if ( packet_id == CIGI3_PACKET_ID_WAVE_CONTROL ) {
2372             hf_cigi3_packet = hf_cigi3_wave_control;
2373             packet_length = CIGI3_PACKET_SIZE_WAVE_CONTROL;
2374         } else if ( packet_id == CIGI3_PACKET_ID_TERRESTRIAL_SURFACE_CONDITIONS_CONTROL ) {
2375             hf_cigi3_packet = hf_cigi3_terrestrial_surface_conditions_control;
2376             packet_length = CIGI3_PACKET_SIZE_TERRESTRIAL_SURFACE_CONDITIONS_CONTROL;
2377         } else if ( packet_id == CIGI3_PACKET_ID_VIEW_CONTROL ) {
2378             hf_cigi3_packet = hf_cigi3_view_control;
2379             packet_length = CIGI3_PACKET_SIZE_VIEW_CONTROL;
2380         } else if ( packet_id == CIGI3_PACKET_ID_SENSOR_CONTROL ) {
2381             hf_cigi3_packet = hf_cigi3_sensor_control;
2382             packet_length = CIGI3_PACKET_SIZE_SENSOR_CONTROL;
2383         } else if ( packet_id == CIGI3_PACKET_ID_MOTION_TRACKER_CONTROL ) {
2384             hf_cigi3_packet = hf_cigi3_motion_tracker_control;
2385             packet_length = CIGI3_PACKET_SIZE_MOTION_TRACKER_CONTROL;
2386         } else if ( packet_id == CIGI3_PACKET_ID_EARTH_REFERENCE_MODEL_DEFINITION ) {
2387             hf_cigi3_packet = hf_cigi3_earth_reference_model_definition;
2388             packet_length = CIGI3_PACKET_SIZE_EARTH_REFERENCE_MODEL_DEFINITION;
2389         } else if ( packet_id == CIGI3_PACKET_ID_TRAJECTORY_DEFINITION ) {
2390             hf_cigi3_packet = hf_cigi3_trajectory_definition;
2391             packet_length = CIGI3_PACKET_SIZE_TRAJECTORY_DEFINITION;
2392         } else if ( packet_id == CIGI3_PACKET_ID_VIEW_DEFINITION ) {
2393             hf_cigi3_packet = hf_cigi3_view_definition;
2394             packet_length = CIGI3_PACKET_SIZE_VIEW_DEFINITION;
2395         } else if ( packet_id == CIGI3_PACKET_ID_COLLISION_DETECTION_SEGMENT_DEFINITION ) {
2396             hf_cigi3_packet = hf_cigi3_collision_detection_segment_definition;
2397             packet_length = CIGI3_PACKET_SIZE_COLLISION_DETECTION_SEGMENT_DEFINITION;
2398         } else if ( packet_id == CIGI3_PACKET_ID_COLLISION_DETECTION_VOLUME_DEFINITION ) {
2399             hf_cigi3_packet = hf_cigi3_collision_detection_volume_definition;
2400             packet_length = CIGI3_PACKET_SIZE_COLLISION_DETECTION_VOLUME_DEFINITION;
2401         } else if ( packet_id == CIGI3_PACKET_ID_HAT_HOT_REQUEST ) {
2402             hf_cigi3_packet = hf_cigi3_hat_hot_request;
2403             packet_length = CIGI3_PACKET_SIZE_HAT_HOT_REQUEST;
2404         } else if ( packet_id == CIGI3_PACKET_ID_LINE_OF_SIGHT_SEGMENT_REQUEST ) {
2405             hf_cigi3_packet = hf_cigi3_line_of_sight_segment_request;
2406             packet_length = CIGI3_PACKET_SIZE_LINE_OF_SIGHT_SEGMENT_REQUEST;
2407         } else if ( packet_id == CIGI3_PACKET_ID_LINE_OF_SIGHT_VECTOR_REQUEST ) {
2408             hf_cigi3_packet = hf_cigi3_line_of_sight_vector_request;
2409             packet_length = CIGI3_PACKET_SIZE_LINE_OF_SIGHT_VECTOR_REQUEST;
2410         } else if ( packet_id == CIGI3_PACKET_ID_POSITION_REQUEST ) {
2411             hf_cigi3_packet = hf_cigi3_position_request;
2412             packet_length = CIGI3_PACKET_SIZE_POSITION_REQUEST;
2413         } else if ( packet_id == CIGI3_PACKET_ID_ENVIRONMENTAL_CONDITIONS_REQUEST ) {
2414             hf_cigi3_packet = hf_cigi3_environmental_conditions_request;
2415             packet_length = CIGI3_PACKET_SIZE_ENVIRONMENTAL_CONDITIONS_REQUEST;
2416         } else if ( packet_id == CIGI3_PACKET_ID_START_OF_FRAME ) {
2417             hf_cigi3_packet = hf_cigi3_start_of_frame;
2418             packet_length = CIGI3_PACKET_SIZE_START_OF_FRAME;
2419         } else if ( packet_id == CIGI3_PACKET_ID_HAT_HOT_RESPONSE ) {
2420             hf_cigi3_packet = hf_cigi3_hat_hot_response;
2421             packet_length = CIGI3_PACKET_SIZE_HAT_HOT_RESPONSE;
2422         } else if ( packet_id == CIGI3_PACKET_ID_HAT_HOT_EXTENDED_RESPONSE ) {
2423             hf_cigi3_packet = hf_cigi3_hat_hot_extended_response;
2424             packet_length = CIGI3_PACKET_SIZE_HAT_HOT_EXTENDED_RESPONSE;
2425         } else if ( packet_id == CIGI3_PACKET_ID_LINE_OF_SIGHT_RESPONSE ) {
2426             hf_cigi3_packet = hf_cigi3_line_of_sight_response;
2427             packet_length = CIGI3_PACKET_SIZE_LINE_OF_SIGHT_RESPONSE;
2428         } else if ( packet_id == CIGI3_PACKET_ID_LINE_OF_SIGHT_EXTENDED_RESPONSE ) {
2429             hf_cigi3_packet = hf_cigi3_line_of_sight_extended_response;
2430             packet_length = CIGI3_PACKET_SIZE_LINE_OF_SIGHT_EXTENDED_RESPONSE;
2431         } else if ( packet_id == CIGI3_PACKET_ID_SENSOR_RESPONSE ) {
2432             hf_cigi3_packet = hf_cigi3_sensor_response;
2433             packet_length = CIGI3_PACKET_SIZE_SENSOR_RESPONSE;
2434         } else if ( packet_id == CIGI3_PACKET_ID_SENSOR_EXTENDED_RESPONSE ) {
2435             hf_cigi3_packet = hf_cigi3_sensor_extended_response;
2436             packet_length = CIGI3_PACKET_SIZE_SENSOR_EXTENDED_RESPONSE;
2437         } else if ( packet_id == CIGI3_PACKET_ID_POSITION_RESPONSE ) {
2438             hf_cigi3_packet = hf_cigi3_position_response;
2439             packet_length = CIGI3_PACKET_SIZE_POSITION_RESPONSE;
2440         } else if ( packet_id == CIGI3_PACKET_ID_WEATHER_CONDITIONS_RESPONSE ) {
2441             hf_cigi3_packet = hf_cigi3_weather_conditions_response;
2442             packet_length = CIGI3_PACKET_SIZE_WEATHER_CONDITIONS_RESPONSE;
2443         } else if ( packet_id == CIGI3_PACKET_ID_AEROSOL_CONCENTRATION_RESPONSE ) {
2444             hf_cigi3_packet = hf_cigi3_aerosol_concentration_response;
2445             packet_length = CIGI3_PACKET_SIZE_AEROSOL_CONCENTRATION_RESPONSE;
2446         } else if ( packet_id == CIGI3_PACKET_ID_MARITIME_SURFACE_CONDITIONS_RESPONSE ) {
2447             hf_cigi3_packet = hf_cigi3_maritime_surface_conditions_response;
2448             packet_length = CIGI3_PACKET_SIZE_MARITIME_SURFACE_CONDITIONS_RESPONSE;
2449         } else if ( packet_id == CIGI3_PACKET_ID_TERRESTRIAL_SURFACE_CONDITIONS_RESPONSE ) {
2450             hf_cigi3_packet = hf_cigi3_terrestrial_surface_conditions_response;
2451             packet_length = CIGI3_PACKET_SIZE_TERRESTRIAL_SURFACE_CONDITIONS_RESPONSE;
2452         } else if ( packet_id == CIGI3_PACKET_ID_COLLISION_DETECTION_SEGMENT_NOTIFICATION ) {
2453             hf_cigi3_packet = hf_cigi3_collision_detection_segment_notification;
2454             packet_length = CIGI3_PACKET_SIZE_COLLISION_DETECTION_SEGMENT_NOTIFICATION;
2455         } else if ( packet_id == CIGI3_PACKET_ID_COLLISION_DETECTION_VOLUME_NOTIFICATION ) {
2456             hf_cigi3_packet = hf_cigi3_collision_detection_volume_notification;
2457             packet_length = CIGI3_PACKET_SIZE_COLLISION_DETECTION_VOLUME_NOTIFICATION;
2458         } else if ( packet_id == CIGI3_PACKET_ID_ANIMATION_STOP_NOTIFICATION ) {
2459             hf_cigi3_packet = hf_cigi3_animation_stop_notification;
2460             packet_length = CIGI3_PACKET_SIZE_ANIMATION_STOP_NOTIFICATION;
2461         } else if ( packet_id == CIGI3_PACKET_ID_EVENT_NOTIFICATION ) {
2462             hf_cigi3_packet = hf_cigi3_event_notification;
2463             packet_length = CIGI3_PACKET_SIZE_EVENT_NOTIFICATION;
2464         } else if ( packet_id == CIGI3_PACKET_ID_IMAGE_GENERATOR_MESSAGE ) {
2465             hf_cigi3_packet = hf_cigi3_image_generator_message;
2466             packet_length = packet_size;
2467         } else if ( packet_id >= CIGI3_PACKET_ID_USER_DEFINED_MIN && packet_id <= CIGI3_PACKET_ID_USER_DEFINED_MAX ) {
2468             hf_cigi3_packet = hf_cigi3_user_defined;
2469             packet_length = packet_size;
2470         } else {
2471             hf_cigi3_packet = hf_cigi_unknown;
2472             packet_length = packet_size;
2473         }
2474         tipacket = proto_tree_add_string_format(cigi_tree, hf_cigi3_packet, tvb, offset, packet_length, NULL, "%s (%i bytes)", val_to_str(packet_id, cigi3_packet_id_vals, "Unknown"), packet_length);
2475
2476         cigi_packet_tree = proto_item_add_subtree(tipacket, ett_cigi);
2477
2478         /* In all CIGI versions the first byte of a packet is the packet ID.
2479          * The second byte is the size of the packet (in bytes). */
2480         init_offset = offset;
2481         proto_tree_add_item(cigi_packet_tree, hf_cigi3_packet_id, tvb, offset, 1, cigi_byte_order);
2482         offset++;
2483
2484         proto_tree_add_item(cigi_packet_tree, hf_cigi_packet_size, tvb, offset, 1, cigi_byte_order);
2485         offset++;
2486
2487         if ( packet_id == CIGI3_PACKET_ID_IG_CONTROL ) {
2488             offset = cigi3_add_ig_control(tvb, cigi_packet_tree, offset);
2489         } else if ( packet_id == CIGI3_PACKET_ID_ENTITY_CONTROL ) {
2490             offset = cigi3_add_entity_control(tvb, cigi_packet_tree, offset);
2491         } else if ( packet_id == CIGI3_PACKET_ID_CONFORMAL_CLAMPED_ENTITY_CONTROL ) {
2492             offset = cigi3_add_conformal_clamped_entity_control(tvb, cigi_packet_tree, offset);
2493         } else if ( packet_id == CIGI3_PACKET_ID_COMPONENT_CONTROL ) {
2494             offset = cigi3_add_component_control(tvb, cigi_packet_tree, offset);
2495         } else if ( packet_id == CIGI3_PACKET_ID_SHORT_COMPONENT_CONTROL ) {
2496             offset = cigi3_add_short_component_control(tvb, cigi_packet_tree, offset);
2497         } else if ( packet_id == CIGI3_PACKET_ID_ARTICULATED_PART_CONTROL ) {
2498             offset = cigi3_add_articulated_part_control(tvb, cigi_packet_tree, offset);
2499         } else if ( packet_id == CIGI3_PACKET_ID_SHORT_ARTICULATED_PART_CONTROL ) {
2500             offset = cigi3_add_short_articulated_part_control(tvb, cigi_packet_tree, offset);
2501         } else if ( packet_id == CIGI3_PACKET_ID_RATE_CONTROL ) {
2502             offset = cigi3_add_rate_control(tvb, cigi_packet_tree, offset);
2503         } else if ( packet_id == CIGI3_PACKET_ID_CELESTIAL_SPHERE_CONTROL ) {
2504             offset = cigi3_add_celestial_sphere_control(tvb, cigi_packet_tree, offset);
2505         } else if ( packet_id == CIGI3_PACKET_ID_ATMOSPHERE_CONTROL ) {
2506             offset = cigi3_add_atmosphere_control(tvb, cigi_packet_tree, offset);
2507         } else if ( packet_id == CIGI3_PACKET_ID_ENVIRONMENTAL_REGION_CONTROL ) {
2508             offset = cigi3_add_environmental_region_control(tvb, cigi_packet_tree, offset);
2509         } else if ( packet_id == CIGI3_PACKET_ID_WEATHER_CONTROL ) {
2510             offset = cigi3_add_weather_control(tvb, cigi_packet_tree, offset);
2511         } else if ( packet_id == CIGI3_PACKET_ID_MARITIME_SURFACE_CONDITIONS_CONTROL ) {
2512             offset = cigi3_add_maritime_surface_conditions_control(tvb, cigi_packet_tree, offset);
2513         } else if ( packet_id == CIGI3_PACKET_ID_WAVE_CONTROL ) {
2514             offset = cigi3_add_wave_control(tvb, cigi_packet_tree, offset);
2515         } else if ( packet_id == CIGI3_PACKET_ID_TERRESTRIAL_SURFACE_CONDITIONS_CONTROL ) {
2516             offset = cigi3_add_terrestrial_surface_conditions_control(tvb, cigi_packet_tree, offset);
2517         } else if ( packet_id == CIGI3_PACKET_ID_VIEW_CONTROL ) {
2518             offset = cigi3_add_view_control(tvb, cigi_packet_tree, offset);
2519         } else if ( packet_id == CIGI3_PACKET_ID_SENSOR_CONTROL ) {
2520             offset = cigi3_add_sensor_control(tvb, cigi_packet_tree, offset);
2521         } else if ( packet_id == CIGI3_PACKET_ID_MOTION_TRACKER_CONTROL ) {
2522             offset = cigi3_add_motion_tracker_control(tvb, cigi_packet_tree, offset);
2523         } else if ( packet_id == CIGI3_PACKET_ID_EARTH_REFERENCE_MODEL_DEFINITION ) {
2524             offset = cigi3_add_earth_reference_model_definition(tvb, cigi_packet_tree, offset);
2525         } else if ( packet_id == CIGI3_PACKET_ID_TRAJECTORY_DEFINITION ) {
2526             offset = cigi3_add_trajectory_definition(tvb, cigi_packet_tree, offset);
2527         } else if ( packet_id == CIGI3_PACKET_ID_VIEW_DEFINITION ) {
2528             offset = cigi3_add_view_definition(tvb, cigi_packet_tree, offset);
2529         } else if ( packet_id == CIGI3_PACKET_ID_COLLISION_DETECTION_SEGMENT_DEFINITION ) {
2530             offset = cigi3_add_collision_detection_segment_definition(tvb, cigi_packet_tree, offset);
2531         } else if ( packet_id == CIGI3_PACKET_ID_COLLISION_DETECTION_VOLUME_DEFINITION ) {
2532             offset = cigi3_add_collision_detection_volume_definition(tvb, cigi_packet_tree, offset);
2533         } else if ( packet_id == CIGI3_PACKET_ID_HAT_HOT_REQUEST ) {
2534             offset = cigi3_add_hat_hot_request(tvb, cigi_packet_tree, offset);
2535         } else if ( packet_id == CIGI3_PACKET_ID_LINE_OF_SIGHT_SEGMENT_REQUEST ) {
2536             offset = cigi3_add_line_of_sight_segment_request(tvb, cigi_packet_tree, offset);
2537         } else if ( packet_id == CIGI3_PACKET_ID_LINE_OF_SIGHT_VECTOR_REQUEST ) {
2538             offset = cigi3_add_line_of_sight_vector_request(tvb, cigi_packet_tree, offset);
2539         } else if ( packet_id == CIGI3_PACKET_ID_POSITION_REQUEST ) {
2540             offset = cigi3_add_position_request(tvb, cigi_packet_tree, offset);
2541         } else if ( packet_id == CIGI3_PACKET_ID_ENVIRONMENTAL_CONDITIONS_REQUEST ) {
2542             offset = cigi3_add_environmental_conditions_request(tvb, cigi_packet_tree, offset);
2543         } else if ( packet_id == CIGI3_PACKET_ID_START_OF_FRAME ) {
2544             offset = cigi3_add_start_of_frame(tvb, cigi_packet_tree, offset);
2545         } else if ( packet_id == CIGI3_PACKET_ID_HAT_HOT_RESPONSE ) {
2546             offset = cigi3_add_hat_hot_response(tvb, cigi_packet_tree, offset);
2547         } else if ( packet_id == CIGI3_PACKET_ID_HAT_HOT_EXTENDED_RESPONSE ) {
2548             offset = cigi3_add_hat_hot_extended_response(tvb, cigi_packet_tree, offset);
2549         } else if ( packet_id == CIGI3_PACKET_ID_LINE_OF_SIGHT_RESPONSE ) {
2550             offset = cigi3_add_line_of_sight_response(tvb, cigi_packet_tree, offset);
2551         } else if ( packet_id == CIGI3_PACKET_ID_LINE_OF_SIGHT_EXTENDED_RESPONSE ) {
2552             offset = cigi3_add_line_of_sight_extended_response(tvb, cigi_packet_tree, offset);
2553         } else if ( packet_id == CIGI3_PACKET_ID_SENSOR_RESPONSE ) {
2554             offset = cigi3_add_sensor_response(tvb, cigi_packet_tree, offset);
2555         } else if ( packet_id == CIGI3_PACKET_ID_SENSOR_EXTENDED_RESPONSE ) {
2556             offset = cigi3_add_sensor_extended_response(tvb, cigi_packet_tree, offset);
2557         } else if ( packet_id == CIGI3_PACKET_ID_POSITION_RESPONSE ) {
2558             offset = cigi3_add_position_response(tvb, cigi_packet_tree, offset);
2559         } else if ( packet_id == CIGI3_PACKET_ID_WEATHER_CONDITIONS_RESPONSE ) {
2560             offset = cigi3_add_weather_conditions_response(tvb, cigi_packet_tree, offset);
2561         } else if ( packet_id == CIGI3_PACKET_ID_AEROSOL_CONCENTRATION_RESPONSE ) {
2562             offset = cigi3_add_aerosol_concentration_response(tvb, cigi_packet_tree, offset);
2563         } else if ( packet_id == CIGI3_PACKET_ID_MARITIME_SURFACE_CONDITIONS_RESPONSE ) {
2564             offset = cigi3_add_maritime_surface_conditions_response(tvb, cigi_packet_tree, offset);
2565         } else if ( packet_id == CIGI3_PACKET_ID_TERRESTRIAL_SURFACE_CONDITIONS_RESPONSE ) {
2566             offset = cigi3_add_terrestrial_surface_conditions_response(tvb, cigi_packet_tree, offset);
2567         } else if ( packet_id == CIGI3_PACKET_ID_COLLISION_DETECTION_SEGMENT_NOTIFICATION ) {
2568             offset = cigi3_add_collision_detection_segment_notification(tvb, cigi_packet_tree, offset);
2569         } else if ( packet_id == CIGI3_PACKET_ID_COLLISION_DETECTION_VOLUME_NOTIFICATION ) {
2570             offset = cigi3_add_collision_detection_volume_notification(tvb, cigi_packet_tree, offset);
2571         } else if ( packet_id == CIGI3_PACKET_ID_ANIMATION_STOP_NOTIFICATION ) {
2572             offset = cigi3_add_animation_stop_notification(tvb, cigi_packet_tree, offset);
2573         } else if ( packet_id == CIGI3_PACKET_ID_EVENT_NOTIFICATION ) {
2574             offset = cigi3_add_event_notification(tvb, cigi_packet_tree, offset);
2575         } else if ( packet_id == CIGI3_PACKET_ID_IMAGE_GENERATOR_MESSAGE ) {
2576             offset = cigi3_add_image_generator_message(tvb, cigi_packet_tree, offset);
2577         } else if ( packet_id >= CIGI3_PACKET_ID_USER_DEFINED_MIN && packet_id <= CIGI3_PACKET_ID_USER_DEFINED_MAX ) {
2578             offset = cigi_add_data(tvb, cigi_packet_tree, offset);
2579         } else {
2580             offset = cigi_add_data(tvb, cigi_packet_tree, offset);
2581         }
2582
2583         /* Does the packet offset match the supposed length of the packet? */
2584         DISSECTOR_ASSERT((offset - init_offset == packet_length) && "Packet offset does not match packet length");
2585     }
2586 }
2587
2588 /* CIGI2 IG Control */
2589 gint
2590 cigi2_add_ig_control(tvbuff_t *tvb, proto_tree *tree, gint offset)
2591 {
2592     proto_tree_add_item(tree, hf_cigi_version, tvb, offset, 1, FALSE);
2593     offset++;
2594     
2595     proto_tree_add_item(tree, hf_cigi2_ig_control_db_number, tvb, offset, 1, FALSE);
2596     offset++;
2597     
2598     proto_tree_add_item(tree, hf_cigi2_ig_control_ig_mode, tvb, offset, 1, FALSE);
2599     proto_tree_add_item(tree, hf_cigi2_ig_control_tracking_enable, tvb, offset, 1, FALSE);
2600     proto_tree_add_item(tree, hf_cigi2_ig_control_boresight, tvb, offset, 1, FALSE);
2601     offset += 4;
2602     
2603     proto_tree_add_item(tree, hf_cigi2_ig_control_frame_ctr, tvb, offset, 4, FALSE);
2604     offset += 4;
2605     
2606     proto_tree_add_item(tree, hf_cigi2_ig_control_time_tag, tvb, offset, 4, FALSE);
2607     offset += 4;
2608
2609     return offset;
2610 }
2611
2612 /* CIGI2 Entity Control */
2613 gint
2614 cigi2_add_entity_control(tvbuff_t *tvb, proto_tree *tree, gint offset)
2615 {
2616     proto_tree_add_item(tree, hf_cigi2_entity_control_entity_id, tvb, offset, 2, FALSE);
2617     offset += 2;
2618     
2619     proto_tree_add_item(tree, hf_cigi2_entity_control_entity_state, tvb, offset, 1, FALSE);
2620     proto_tree_add_item(tree, hf_cigi2_entity_control_attach_state, tvb, offset, 1, FALSE);
2621     proto_tree_add_item(tree, hf_cigi2_entity_control_collision_detect, tvb, offset, 1, FALSE);
2622     proto_tree_add_item(tree, hf_cigi2_entity_control_effect_state, tvb, offset, 1, FALSE);
2623     offset += 4;
2624     
2625     proto_tree_add_item(tree, hf_cigi2_entity_control_type, tvb, offset, 2, FALSE);
2626     offset += 2;
2627     
2628     proto_tree_add_item(tree, hf_cigi2_entity_control_parent_id, tvb, offset, 2, FALSE);
2629     offset += 2;
2630     
2631     proto_tree_add_item(tree, hf_cigi2_entity_control_opacity, tvb, offset, 4, FALSE);
2632     offset += 4;
2633     
2634     proto_tree_add_item(tree, hf_cigi2_entity_control_internal_temp, tvb, offset, 4, FALSE);
2635     offset += 4;
2636     
2637     proto_tree_add_item(tree, hf_cigi2_entity_control_roll, tvb, offset, 4, FALSE);
2638     offset += 4;
2639     
2640     proto_tree_add_item(tree, hf_cigi2_entity_control_pitch, tvb, offset, 4, FALSE);
2641     offset += 4;
2642     
2643     proto_tree_add_item(tree, hf_cigi2_entity_control_heading, tvb, offset, 4, FALSE);
2644     offset += 4;
2645
2646     proto_tree_add_item(tree, hf_cigi2_entity_control_alt, tvb, offset, 8, FALSE);
2647     offset += 8;
2648     
2649     proto_tree_add_item(tree, hf_cigi2_entity_control_lat, tvb, offset, 8, FALSE);
2650     offset += 8;
2651     
2652     proto_tree_add_item(tree, hf_cigi2_entity_control_lon, tvb, offset, 8, FALSE);
2653     offset += 8;
2654
2655     return offset;
2656 }
2657
2658 /* CIGI2 Component Control */
2659 gint
2660 cigi2_add_component_control(tvbuff_t *tvb, proto_tree *tree, gint offset)
2661 {
2662     proto_tree_add_item(tree, hf_cigi2_component_control_instance_id, tvb, offset, 2, FALSE);
2663     offset += 2;
2664     
2665     proto_tree_add_item(tree, hf_cigi2_component_control_component_class, tvb, offset, 1, FALSE);
2666     offset += 4;
2667     
2668     proto_tree_add_item(tree, hf_cigi2_component_control_component_id, tvb, offset, 2, FALSE);
2669     offset += 2;
2670     
2671     proto_tree_add_item(tree, hf_cigi2_component_control_component_state, tvb, offset, 2, FALSE);
2672     offset += 2;
2673     
2674     proto_tree_add_item(tree, hf_cigi2_component_control_component_val1, tvb, offset, 4, FALSE);
2675     offset += 4;
2676     
2677     proto_tree_add_item(tree, hf_cigi2_component_control_component_val2, tvb, offset, 4, FALSE);
2678     offset += 4;
2679
2680     return offset;
2681 }
2682
2683 /* CIGI2 Articulated Part Control */
2684 gint
2685 cigi2_add_articulated_parts_control(tvbuff_t *tvb, proto_tree *tree, gint offset)
2686 {
2687     proto_tree_add_item(tree, hf_cigi2_articulated_parts_control_entity_id, tvb, offset, 2, FALSE);
2688     offset += 2;
2689
2690     proto_tree_add_item(tree, hf_cigi2_articulated_parts_control_part_id, tvb, offset, 1, FALSE);
2691     offset++;
2692
2693     proto_tree_add_item(tree, hf_cigi2_articulated_parts_control_part_state, tvb, offset, 1, FALSE);
2694     proto_tree_add_item(tree, hf_cigi2_articulated_parts_control_xoff_enable, tvb, offset, 1, FALSE);
2695     proto_tree_add_item(tree, hf_cigi2_articulated_parts_control_yoff_enable, tvb, offset, 1, FALSE);
2696     proto_tree_add_item(tree, hf_cigi2_articulated_parts_control_zoff_enable, tvb, offset, 1, FALSE);
2697     proto_tree_add_item(tree, hf_cigi2_articulated_parts_control_roll_enable, tvb, offset, 1, FALSE);
2698     proto_tree_add_item(tree, hf_cigi2_articulated_parts_control_pitch_enable, tvb, offset, 1, FALSE);
2699     proto_tree_add_item(tree, hf_cigi2_articulated_parts_control_yaw_enable, tvb, offset, 1, FALSE);
2700     offset += 3;
2701
2702     proto_tree_add_item(tree, hf_cigi2_articulated_parts_control_x_offset, tvb, offset, 4, FALSE);
2703     offset += 4;
2704
2705     proto_tree_add_item(tree, hf_cigi2_articulated_parts_control_y_offset, tvb, offset, 4, FALSE);
2706     offset += 4;
2707
2708     proto_tree_add_item(tree, hf_cigi2_articulated_parts_control_z_offset, tvb, offset, 4, FALSE);
2709     offset += 4;
2710     
2711     proto_tree_add_item(tree, hf_cigi2_articulated_parts_control_roll, tvb, offset, 4, FALSE);
2712     offset += 4;
2713
2714     proto_tree_add_item(tree, hf_cigi2_articulated_parts_control_pitch, tvb, offset, 4, FALSE);
2715     offset += 4;
2716
2717     proto_tree_add_item(tree, hf_cigi2_articulated_parts_control_yaw, tvb, offset, 4, FALSE);
2718     offset += 4;
2719
2720     return offset;
2721 }
2722
2723 /* CIGI2 Rate Control */
2724 gint
2725 cigi2_add_rate_control(tvbuff_t *tvb, proto_tree *tree, gint offset)
2726 {
2727     proto_tree_add_item(tree, hf_cigi2_rate_control_entity_id, tvb, offset, 2, FALSE);
2728     offset += 2;
2729
2730     proto_tree_add_item(tree, hf_cigi2_rate_control_part_id, tvb, offset, 1, FALSE);
2731     offset += 4;
2732
2733     proto_tree_add_item(tree, hf_cigi2_rate_control_x_rate, tvb, offset, 4, FALSE);
2734     offset += 4;
2735     
2736     proto_tree_add_item(tree, hf_cigi2_rate_control_y_rate, tvb, offset, 4, FALSE);
2737     offset += 4;
2738     
2739     proto_tree_add_item(tree, hf_cigi2_rate_control_z_rate, tvb, offset, 4, FALSE);
2740     offset += 4;
2741     
2742     proto_tree_add_item(tree, hf_cigi2_rate_control_roll_rate, tvb, offset, 4, FALSE);
2743     offset += 4;
2744     
2745     proto_tree_add_item(tree, hf_cigi2_rate_control_pitch_rate, tvb, offset, 4, FALSE);
2746     offset += 4;
2747     
2748     proto_tree_add_item(tree, hf_cigi2_rate_control_yaw_rate, tvb, offset, 4, FALSE);
2749     offset += 4;
2750
2751     return offset;
2752 }
2753
2754 /* CIGI2 Environment Control */
2755 gint
2756 cigi2_add_environment_control(tvbuff_t *tvb, proto_tree *tree, gint offset)
2757 {
2758     proto_tree_add_item(tree, hf_cigi2_environment_control_hour, tvb, offset, 1, FALSE);
2759     offset++;
2760     
2761     proto_tree_add_item(tree, hf_cigi2_environment_control_minute, tvb, offset, 1, FALSE);
2762     offset++;
2763     
2764     proto_tree_add_item(tree, hf_cigi2_environment_control_ephemeris_enable, tvb, offset, 1, FALSE);
2765     proto_tree_add_item(tree, hf_cigi2_environment_control_humidity, tvb, offset, 1, FALSE);
2766     offset++;
2767
2768     proto_tree_add_item(tree, hf_cigi2_environment_control_modtran_enable, tvb, offset, 1, FALSE);
2769     offset += 3;
2770     
2771     proto_tree_add_item(tree, hf_cigi2_environment_control_date, tvb, offset, 4, FALSE);
2772     offset += 4;
2773     
2774     proto_tree_add_item(tree, hf_cigi2_environment_control_air_temp, tvb, offset, 4, FALSE);
2775     offset += 4;
2776     
2777     proto_tree_add_item(tree, hf_cigi2_environment_control_global_visibility, tvb, offset, 4, FALSE);
2778     offset += 4;
2779     
2780     proto_tree_add_item(tree, hf_cigi2_environment_control_wind_speed, tvb, offset, 4, FALSE);
2781     offset += 4;
2782     
2783     proto_tree_add_item(tree, hf_cigi2_environment_control_wind_direction, tvb, offset, 4, FALSE);
2784     offset += 4;
2785     
2786     proto_tree_add_item(tree, hf_cigi2_environment_control_pressure, tvb, offset, 4, FALSE);
2787     offset += 4;
2788     
2789     proto_tree_add_item(tree, hf_cigi2_environment_control_aerosol, tvb, offset, 4, FALSE);
2790     offset += 4;
2791
2792     return offset;
2793 }
2794
2795 /* CIGI2 Weather Control */
2796 gint
2797 cigi2_add_weather_control(tvbuff_t *tvb, proto_tree *tree, gint offset)
2798 {
2799     proto_tree_add_item(tree, hf_cigi2_weather_control_entity_id, tvb, offset, 2, FALSE);
2800     offset += 2;
2801
2802     proto_tree_add_item(tree, hf_cigi2_weather_control_weather_enable, tvb, offset, 1, FALSE);
2803     proto_tree_add_item(tree, hf_cigi2_weather_control_scud_enable, tvb, offset, 1, FALSE);
2804     proto_tree_add_item(tree, hf_cigi2_weather_control_random_winds, tvb, offset, 1, FALSE);
2805     proto_tree_add_item(tree, hf_cigi2_weather_control_severity, tvb, offset, 1, FALSE);
2806     offset += 2;
2807
2808     proto_tree_add_item(tree, hf_cigi2_weather_control_phenomenon_type, tvb, offset, 2, FALSE);
2809     offset += 2;
2810
2811     proto_tree_add_item(tree, hf_cigi2_weather_control_air_temp, tvb, offset, 4, FALSE);
2812     offset += 4;
2813
2814     proto_tree_add_item(tree, hf_cigi2_weather_control_opacity, tvb, offset, 4, FALSE);
2815     offset += 4;
2816
2817     proto_tree_add_item(tree, hf_cigi2_weather_control_scud_frequency, tvb, offset, 4, FALSE);
2818     offset += 4;
2819
2820     proto_tree_add_item(tree, hf_cigi2_weather_control_coverage, tvb, offset, 4, FALSE);
2821     offset += 4;
2822
2823     proto_tree_add_item(tree, hf_cigi2_weather_control_elevation, tvb, offset, 4, FALSE);
2824     offset += 4;
2825
2826     proto_tree_add_item(tree, hf_cigi2_weather_control_thickness, tvb, offset, 4, FALSE);
2827     offset += 4;
2828
2829     proto_tree_add_item(tree, hf_cigi2_weather_control_transition_band, tvb, offset, 4, FALSE);
2830     offset += 4;
2831
2832     proto_tree_add_item(tree, hf_cigi2_weather_control_wind_speed, tvb, offset, 4, FALSE);
2833     offset += 4;
2834
2835     proto_tree_add_item(tree, hf_cigi2_weather_control_wind_direction, tvb, offset, 4, FALSE);
2836     offset += 4;
2837
2838     return offset;
2839 }
2840
2841 /* CIGI2 View Control */
2842 gint
2843 cigi2_add_view_control(tvbuff_t *tvb, proto_tree *tree, gint offset)
2844 {
2845     proto_tree_add_item(tree, hf_cigi2_view_control_entity_id, tvb, offset, 2, FALSE);
2846     offset += 2;
2847
2848     proto_tree_add_item(tree, hf_cigi2_view_control_view_id, tvb, offset, 1, FALSE);
2849     proto_tree_add_item(tree, hf_cigi2_view_control_view_group, tvb, offset, 1, FALSE);
2850     offset++;
2851
2852     proto_tree_add_item(tree, hf_cigi2_view_control_xoff_enable, tvb, offset, 1, FALSE);
2853     proto_tree_add_item(tree, hf_cigi2_view_control_yoff_enable, tvb, offset, 1, FALSE);
2854     proto_tree_add_item(tree, hf_cigi2_view_control_zoff_enable, tvb, offset, 1, FALSE);
2855     proto_tree_add_item(tree, hf_cigi2_view_control_roll_enable, tvb, offset, 1, FALSE);
2856     proto_tree_add_item(tree, hf_cigi2_view_control_pitch_enable, tvb, offset, 1, FALSE);
2857     proto_tree_add_item(tree, hf_cigi2_view_control_yaw_enable, tvb, offset, 1, FALSE);
2858     offset += 3;
2859
2860     proto_tree_add_item(tree, hf_cigi2_view_control_x_offset, tvb, offset, 4, FALSE);
2861     offset += 4;
2862
2863     proto_tree_add_item(tree, hf_cigi2_view_control_y_offset, tvb, offset, 4, FALSE);
2864     offset += 4;
2865
2866     proto_tree_add_item(tree, hf_cigi2_view_control_z_offset, tvb, offset, 4, FALSE);
2867     offset += 4;
2868
2869     proto_tree_add_item(tree, hf_cigi2_view_control_roll, tvb, offset, 4, FALSE);
2870     offset += 4;
2871
2872     proto_tree_add_item(tree, hf_cigi2_view_control_pitch, tvb, offset, 4, FALSE);
2873     offset += 4;
2874
2875     proto_tree_add_item(tree, hf_cigi2_view_control_yaw, tvb, offset, 4, FALSE);
2876     offset += 4;
2877
2878     return offset;
2879 }
2880
2881 /* CIGI2 Sensor Control */
2882 gint
2883 cigi2_add_sensor_control(tvbuff_t *tvb, proto_tree *tree, gint offset)
2884 {
2885     proto_tree_add_item(tree, hf_cigi2_sensor_control_view_id, tvb, offset, 1, FALSE);
2886     proto_tree_add_item(tree, hf_cigi2_sensor_control_sensor_enable, tvb, offset, 1, FALSE);
2887     proto_tree_add_item(tree, hf_cigi2_sensor_control_polarity, tvb, offset, 1, FALSE);
2888     proto_tree_add_item(tree, hf_cigi2_sensor_control_line_dropout, tvb, offset, 1, FALSE);
2889     offset++;
2890
2891     proto_tree_add_item(tree, hf_cigi2_sensor_control_sensor_id, tvb, offset, 1, FALSE);
2892     offset++;
2893     
2894     proto_tree_add_item(tree, hf_cigi2_sensor_control_track_mode, tvb, offset, 1, FALSE);
2895     proto_tree_add_item(tree, hf_cigi2_sensor_control_auto_gain, tvb, offset, 1, FALSE);
2896     proto_tree_add_item(tree, hf_cigi2_sensor_control_track_polarity, tvb, offset, 1, FALSE);
2897     offset += 4;
2898
2899     proto_tree_add_item(tree, hf_cigi2_sensor_control_gain, tvb, offset, 4, FALSE);
2900     offset += 4;
2901
2902     proto_tree_add_item(tree, hf_cigi2_sensor_control_level, tvb, offset, 4, FALSE);
2903     offset += 4;
2904
2905     proto_tree_add_item(tree, hf_cigi2_sensor_control_ac_coupling, tvb, offset, 4, FALSE);
2906     offset += 4;
2907
2908     proto_tree_add_item(tree, hf_cigi2_sensor_control_noise, tvb, offset, 4, FALSE);
2909     offset += 4;
2910
2911     return offset;
2912 }
2913
2914 /* CIGI2 Trajectory Definition */
2915 gint
2916 cigi2_add_trajectory_definition(tvbuff_t *tvb, proto_tree *tree, gint offset)
2917 {
2918     proto_tree_add_item(tree, hf_cigi2_trajectory_definition_entity_id, tvb, offset, 2, FALSE);
2919     offset += 2;
2920     
2921     proto_tree_add_item(tree, hf_cigi2_trajectory_definition_acceleration, tvb, offset, 4, FALSE);
2922     offset += 4;
2923     
2924     proto_tree_add_item(tree, hf_cigi2_trajectory_definition_retardation, tvb, offset, 4, FALSE);
2925     offset += 4;
2926     
2927     proto_tree_add_item(tree, hf_cigi2_trajectory_definition_terminal_velocity, tvb, offset, 4, FALSE);
2928     offset += 4;
2929
2930     return offset;
2931 }
2932
2933 /* CIGI2 Special Effect Definition */
2934 gint
2935 cigi2_add_special_effect_definition(tvbuff_t *tvb, proto_tree *tree, gint offset)
2936 {
2937     proto_tree_add_item(tree, hf_cigi2_special_effect_definition_entity_id, tvb, offset, 2, FALSE);
2938     offset += 2;
2939
2940     proto_tree_add_item(tree, hf_cigi2_special_effect_definition_seq_direction, tvb, offset, 1, FALSE);
2941     proto_tree_add_item(tree, hf_cigi2_special_effect_definition_color_enable, tvb, offset, 1, FALSE);
2942     offset++;
2943     
2944     proto_tree_add_item(tree, hf_cigi2_special_effect_definition_red, tvb, offset, 1, FALSE);
2945     offset++;
2946     
2947     proto_tree_add_item(tree, hf_cigi2_special_effect_definition_green, tvb, offset, 1, FALSE);
2948     offset++;
2949     
2950     proto_tree_add_item(tree, hf_cigi2_special_effect_definition_blue, tvb, offset, 1, FALSE);
2951     offset++;
2952
2953     proto_tree_add_item(tree, hf_cigi2_special_effect_definition_x_scale, tvb, offset, 2, FALSE);
2954     offset += 2;
2955
2956     proto_tree_add_item(tree, hf_cigi2_special_effect_definition_y_scale, tvb, offset, 2, FALSE);
2957     offset += 2;
2958
2959     proto_tree_add_item(tree, hf_cigi2_special_effect_definition_z_scale, tvb, offset, 2, FALSE);
2960     offset += 2;
2961
2962     proto_tree_add_item(tree, hf_cigi2_special_effect_definition_time_scale, tvb, offset, 2, FALSE);
2963     offset += 2;
2964
2965     proto_tree_add_item(tree, hf_cigi2_special_effect_definition_effect_count, tvb, offset, 2, FALSE);
2966     offset += 2;
2967
2968     proto_tree_add_item(tree, hf_cigi2_special_effect_definition_separation, tvb, offset, 2, FALSE);
2969     offset += 2;
2970
2971     proto_tree_add_item(tree, hf_cigi2_special_effect_definition_separation, tvb, offset, 4, FALSE);
2972     offset += 4;
2973
2974     proto_tree_add_item(tree, hf_cigi2_special_effect_definition_burst_interval, tvb, offset, 4, FALSE);
2975     offset += 4;
2976
2977     proto_tree_add_item(tree, hf_cigi2_special_effect_definition_duration, tvb, offset, 4, FALSE);
2978     offset += 4;
2979
2980     return offset;
2981 }
2982
2983 /* CIGI2 View Definition */
2984 gint
2985 cigi2_add_view_definition(tvbuff_t *tvb, proto_tree *tree, gint offset)
2986 {
2987     proto_tree_add_item(tree, hf_cigi2_view_definition_view_id, tvb, offset, 1, FALSE);
2988     proto_tree_add_item(tree, hf_cigi2_view_definition_view_group, tvb, offset, 1, FALSE);
2989     offset++;
2990
2991     proto_tree_add_item(tree, hf_cigi2_view_definition_view_type, tvb, offset, 1, FALSE);
2992     proto_tree_add_item(tree, hf_cigi2_view_definition_pixel_rep, tvb, offset, 1, FALSE);
2993     proto_tree_add_item(tree, hf_cigi2_view_definition_mirror, tvb, offset, 1, FALSE);
2994     offset++;
2995     
2996     proto_tree_add_item(tree, hf_cigi2_view_definition_tracker_assign, tvb, offset, 1, FALSE);
2997     proto_tree_add_item(tree, hf_cigi2_view_definition_near_enable, tvb, offset, 1, FALSE);
2998     proto_tree_add_item(tree, hf_cigi2_view_definition_far_enable, tvb, offset, 1, FALSE);
2999     proto_tree_add_item(tree, hf_cigi2_view_definition_left_enable, tvb, offset, 1, FALSE);
3000     proto_tree_add_item(tree, hf_cigi2_view_definition_right_enable, tvb, offset, 1, FALSE);
3001     proto_tree_add_item(tree, hf_cigi2_view_definition_top_enable, tvb, offset, 1, FALSE);
3002     proto_tree_add_item(tree, hf_cigi2_view_definition_bottom_enable, tvb, offset, 1, FALSE);
3003     offset += 4;
3004
3005     proto_tree_add_item(tree, hf_cigi2_view_definition_fov_near, tvb, offset, 4, FALSE);
3006     offset += 4;
3007     
3008     proto_tree_add_item(tree, hf_cigi2_view_definition_fov_far, tvb, offset, 4, FALSE);
3009     offset += 4;
3010     
3011     proto_tree_add_item(tree, hf_cigi2_view_definition_fov_left, tvb, offset, 4, FALSE);
3012     offset += 4;
3013     
3014     proto_tree_add_item(tree, hf_cigi2_view_definition_fov_right, tvb, offset, 4, FALSE);
3015     offset += 4;
3016     
3017     proto_tree_add_item(tree, hf_cigi2_view_definition_fov_top, tvb, offset, 4, FALSE);
3018     offset += 4;
3019     
3020     proto_tree_add_item(tree, hf_cigi2_view_definition_fov_bottom, tvb, offset, 4, FALSE);
3021     offset += 4;
3022
3023     return offset;
3024 }
3025
3026 /* CIGI2 Collision Detection Segment Definition */
3027 gint
3028 cigi2_add_collision_detection_segment_definition(tvbuff_t *tvb, proto_tree *tree, gint offset)
3029 {
3030     proto_tree_add_item(tree, hf_cigi2_collision_detection_segment_definition_entity_id, tvb, offset, 2, FALSE);
3031     offset += 2;
3032
3033     proto_tree_add_item(tree, hf_cigi2_collision_detection_segment_definition_segment_enable, tvb, offset, 1, FALSE);
3034     proto_tree_add_item(tree, hf_cigi2_collision_detection_segment_definition_segment_id, tvb, offset, 1, FALSE);
3035     offset += 4;
3036
3037     proto_tree_add_item(tree, hf_cigi2_collision_detection_segment_definition_collision_mask, tvb, offset, 4, FALSE);
3038     offset += 4;
3039
3040     proto_tree_add_item(tree, hf_cigi2_collision_detection_segment_definition_x_start, tvb, offset, 2, FALSE);
3041     offset += 2;
3042
3043     proto_tree_add_item(tree, hf_cigi2_collision_detection_segment_definition_y_start, tvb, offset, 2, FALSE);
3044     offset += 2;
3045
3046     proto_tree_add_item(tree, hf_cigi2_collision_detection_segment_definition_z_start, tvb, offset, 2, FALSE);
3047     offset += 2;
3048
3049     proto_tree_add_item(tree, hf_cigi2_collision_detection_segment_definition_x_end, tvb, offset, 2, FALSE);
3050     offset += 2;
3051
3052     proto_tree_add_item(tree, hf_cigi2_collision_detection_segment_definition_y_end, tvb, offset, 2, FALSE);
3053     offset += 2;
3054
3055     proto_tree_add_item(tree, hf_cigi2_collision_detection_segment_definition_z_end, tvb, offset, 2, FALSE);
3056     offset += 2;
3057
3058     return offset;
3059 }
3060
3061 /* CIGI2 Collision Detection Volume Definition*/
3062 gint
3063 cigi2_add_collision_detection_volume_definition(tvbuff_t *tvb, proto_tree *tree, gint offset)
3064 {
3065     proto_tree_add_item(tree, hf_cigi2_collision_detection_volume_definition_entity_id, tvb, offset, 2, FALSE);
3066     offset += 2;
3067
3068     proto_tree_add_item(tree, hf_cigi2_collision_detection_volume_definition_volume_enable, tvb, offset, 1, FALSE);
3069     proto_tree_add_item(tree, hf_cigi2_collision_detection_volume_definition_volume_id, tvb, offset, 1, FALSE);
3070     offset += 4;
3071     
3072     proto_tree_add_item(tree, hf_cigi2_collision_detection_volume_definition_x_offset, tvb, offset, 2, FALSE);
3073     offset += 2;
3074     
3075     proto_tree_add_item(tree, hf_cigi2_collision_detection_volume_definition_y_offset, tvb, offset, 2, FALSE);
3076     offset += 2;
3077     
3078     proto_tree_add_item(tree, hf_cigi2_collision_detection_volume_definition_z_offset, tvb, offset, 2, FALSE);
3079     offset += 2;
3080     
3081     proto_tree_add_item(tree, hf_cigi2_collision_detection_volume_definition_height, tvb, offset, 2, FALSE);
3082     offset += 2;
3083     
3084     proto_tree_add_item(tree, hf_cigi2_collision_detection_volume_definition_width, tvb, offset, 2, FALSE);
3085     offset += 2;
3086     
3087     proto_tree_add_item(tree, hf_cigi2_collision_detection_volume_definition_depth, tvb, offset, 2, FALSE);
3088     offset += 2;
3089
3090     return offset;
3091 }
3092
3093 /* CIGI2 Height Above Terrain Request*/
3094 gint
3095 cigi2_add_height_above_terrain_request(tvbuff_t *tvb, proto_tree *tree, gint offset)
3096 {
3097     proto_tree_add_item(tree, hf_cigi2_height_above_terrain_request_hat_id, tvb, offset, 2, FALSE);
3098     offset += 6;
3099
3100     proto_tree_add_item(tree, hf_cigi2_height_above_terrain_request_alt, tvb, offset, 8, FALSE);
3101     offset += 8;
3102
3103     proto_tree_add_item(tree, hf_cigi2_height_above_terrain_request_lat, tvb, offset, 8, FALSE);
3104     offset += 8;
3105
3106     proto_tree_add_item(tree, hf_cigi2_height_above_terrain_request_lon, tvb, offset, 8, FALSE);
3107     offset += 8;
3108
3109     return offset;
3110 }
3111
3112 /* CIGI2 Line of Sight Occult Request */
3113 gint
3114 cigi2_add_line_of_sight_occult_request(tvbuff_t *tvb, proto_tree *tree, gint offset)
3115 {
3116     proto_tree_add_item(tree, hf_cigi2_line_of_sight_occult_request_los_id, tvb, offset, 2, FALSE);
3117     offset += 6;
3118     
3119     proto_tree_add_item(tree, hf_cigi2_line_of_sight_occult_request_source_alt, tvb, offset, 8, FALSE);
3120     offset += 8;
3121     
3122     proto_tree_add_item(tree, hf_cigi2_line_of_sight_occult_request_source_lat, tvb, offset, 8, FALSE);
3123     offset += 8;
3124     
3125     proto_tree_add_item(tree, hf_cigi2_line_of_sight_occult_request_source_lon, tvb, offset, 8, FALSE);
3126     offset += 8;
3127     
3128     proto_tree_add_item(tree, hf_cigi2_line_of_sight_occult_request_dest_alt, tvb, offset, 8, FALSE);
3129     offset += 8;
3130     
3131     proto_tree_add_item(tree, hf_cigi2_line_of_sight_occult_request_dest_lat, tvb, offset, 8, FALSE);
3132     offset += 8;
3133     
3134     proto_tree_add_item(tree, hf_cigi2_line_of_sight_occult_request_dest_lon, tvb, offset, 8, FALSE);
3135     offset += 8;
3136
3137     return offset;
3138 }
3139
3140 /* CIGI2 Line of Sight Range Request */
3141 gint
3142 cigi2_add_line_of_sight_range_request(tvbuff_t *tvb, proto_tree *tree, gint offset)
3143 {
3144     proto_tree_add_item(tree, hf_cigi2_line_of_sight_range_request_los_id, tvb, offset, 2, FALSE);
3145     offset += 2;
3146     
3147     proto_tree_add_item(tree, hf_cigi2_line_of_sight_range_request_azimuth, tvb, offset, 4, FALSE);
3148     offset += 4;
3149     
3150     proto_tree_add_item(tree, hf_cigi2_line_of_sight_range_request_elevation, tvb, offset, 4, FALSE);
3151     offset += 8;
3152     
3153     proto_tree_add_item(tree, hf_cigi2_line_of_sight_range_request_min_range, tvb, offset, 4, FALSE);
3154     offset += 4;
3155     
3156     proto_tree_add_item(tree, hf_cigi2_line_of_sight_range_request_max_range, tvb, offset, 4, FALSE);
3157     offset += 4;
3158     
3159     proto_tree_add_item(tree, hf_cigi2_line_of_sight_range_request_source_alt, tvb, offset, 8, FALSE);
3160     offset += 8;
3161     
3162     proto_tree_add_item(tree, hf_cigi2_line_of_sight_range_request_source_lat, tvb, offset, 8, FALSE);
3163     offset += 8;
3164     
3165     proto_tree_add_item(tree, hf_cigi2_line_of_sight_range_request_source_lon, tvb, offset, 8, FALSE);
3166     offset += 8;
3167
3168     return offset;
3169 }
3170
3171 /* CIGI2 Height of Terrain Request */
3172 gint
3173 cigi2_add_height_of_terrain_request(tvbuff_t *tvb, proto_tree *tree, gint offset)
3174 {
3175     proto_tree_add_item(tree, hf_cigi2_height_of_terrain_request_hot_id, tvb, offset, 2, FALSE);
3176     offset += 6;
3177     
3178     proto_tree_add_item(tree, hf_cigi2_height_of_terrain_request_lat, tvb, offset, 8, FALSE);
3179     offset += 8;
3180     
3181     proto_tree_add_item(tree, hf_cigi2_height_of_terrain_request_lon, tvb, offset, 8, FALSE);
3182     offset += 8;
3183
3184     return offset;
3185 }
3186
3187 /* CIGI2 Start of Frame */
3188 gint
3189 cigi2_add_start_of_frame(tvbuff_t *tvb, proto_tree *tree, gint offset)
3190 {
3191     proto_tree_add_item(tree, hf_cigi_version, tvb, offset, 1, FALSE);
3192     offset++;
3193     
3194     proto_tree_add_item(tree, hf_cigi2_start_of_frame_db_number, tvb, offset, 1, FALSE);
3195     offset++;
3196
3197     proto_tree_add_item(tree, hf_cigi2_start_of_frame_ig_status_code, tvb, offset, 1, FALSE);
3198     offset++;
3199
3200     proto_tree_add_item(tree, hf_cigi2_start_of_frame_ig_mode, tvb, offset, 1, FALSE);
3201     offset += 3;
3202
3203     proto_tree_add_item(tree, hf_cigi2_start_of_frame_frame_ctr, tvb, offset, 4, FALSE);
3204     offset += 4;
3205     
3206     proto_tree_add_item(tree, hf_cigi2_start_of_frame_time_tag, tvb, offset, 4, FALSE);
3207     offset += 4;
3208
3209     return offset;
3210 }
3211
3212 /* CIGI2 Height Above Terrain Response */
3213 gint
3214 cigi2_add_height_above_terrain_response(tvbuff_t *tvb, proto_tree *tree, gint offset)
3215 {
3216     proto_tree_add_item(tree, hf_cigi2_height_above_terrain_response_hat_id, tvb, offset, 2, FALSE);
3217     offset += 2;
3218     
3219     proto_tree_add_item(tree, hf_cigi2_height_above_terrain_response_valid, tvb, offset, 1, FALSE);
3220     offset += 8;
3221
3222     proto_tree_add_item(tree, hf_cigi2_height_above_terrain_response_material_type, tvb, offset, 4, FALSE);
3223     offset += 4;
3224     
3225     proto_tree_add_item(tree, hf_cigi2_height_above_terrain_response_alt, tvb, offset, 8, FALSE);
3226     offset += 8;
3227
3228     return offset;
3229 }
3230
3231 /* CIGI2 Line of Sight Response */
3232 gint
3233 cigi2_add_line_of_sight_response(tvbuff_t *tvb, proto_tree *tree, gint offset)
3234 {
3235     proto_tree_add_item(tree, hf_cigi2_line_of_sight_response_los_id, tvb, offset, 2, FALSE);
3236     offset += 2;
3237
3238     proto_tree_add_item(tree, hf_cigi2_line_of_sight_response_valid, tvb, offset, 1, FALSE);
3239     proto_tree_add_item(tree, hf_cigi2_line_of_sight_response_occult_response, tvb, offset, 1, FALSE);
3240     offset += 4;
3241
3242     proto_tree_add_item(tree, hf_cigi2_line_of_sight_response_material_type, tvb, offset, 4, FALSE);
3243     offset += 4;
3244
3245     proto_tree_add_item(tree, hf_cigi2_line_of_sight_response_range, tvb, offset, 4, FALSE);
3246     offset += 4;
3247
3248     proto_tree_add_item(tree, hf_cigi2_line_of_sight_response_alt, tvb, offset, 8, FALSE);
3249     offset += 8;
3250
3251     proto_tree_add_item(tree, hf_cigi2_line_of_sight_response_lat, tvb, offset, 8, FALSE);
3252     offset += 8;
3253
3254     proto_tree_add_item(tree, hf_cigi2_line_of_sight_response_lon, tvb, offset, 8, FALSE);
3255     offset += 8;
3256
3257     return offset;
3258 }
3259
3260 /* CIGI2 Collision Detection Segment Response */
3261 gint
3262 cigi2_add_collision_detection_segment_response(tvbuff_t *tvb, proto_tree *tree, gint offset)
3263 {
3264     proto_tree_add_item(tree, hf_cigi2_collision_detection_segment_response_entity_id, tvb, offset, 2, FALSE);
3265     offset += 2;
3266
3267     proto_tree_add_item(tree, hf_cigi2_collision_detection_segment_response_segment_id, tvb, offset, 1, FALSE);
3268     proto_tree_add_item(tree, hf_cigi2_collision_detection_segment_response_contact, tvb, offset, 1, FALSE);
3269     offset += 2;
3270
3271     proto_tree_add_item(tree, hf_cigi2_collision_detection_segment_response_contacted_entity, tvb, offset, 2, FALSE);
3272     offset += 2;
3273
3274     proto_tree_add_item(tree, hf_cigi2_collision_detection_segment_response_material_type, tvb, offset, 4, FALSE);
3275     offset += 4;
3276
3277     proto_tree_add_item(tree, hf_cigi2_collision_detection_segment_response_collision_x, tvb, offset, 4, FALSE);
3278     offset += 4;
3279
3280     proto_tree_add_item(tree, hf_cigi2_collision_detection_segment_response_collision_y, tvb, offset, 4, FALSE);
3281     offset += 4;
3282
3283     proto_tree_add_item(tree, hf_cigi2_collision_detection_segment_response_collision_z, tvb, offset, 4, FALSE);
3284     offset += 4;
3285
3286     return offset;
3287 }
3288
3289 /* CIGI2 Sensor Response */
3290 gint
3291 cigi2_add_sensor_response(tvbuff_t *tvb, proto_tree *tree, gint offset)
3292 {
3293     proto_tree_add_item(tree, hf_cigi2_sensor_response_view_id, tvb, offset, 1, FALSE);
3294     proto_tree_add_item(tree, hf_cigi2_sensor_response_status, tvb, offset, 1, FALSE);
3295     offset++;
3296     
3297     proto_tree_add_item(tree, hf_cigi2_sensor_response_sensor_id, tvb, offset, 1, FALSE);
3298     offset++;
3299
3300     proto_tree_add_item(tree, hf_cigi2_sensor_response_x_offset, tvb, offset, 2, FALSE);
3301     offset += 2;
3302
3303     proto_tree_add_item(tree, hf_cigi2_sensor_response_y_offset, tvb, offset, 2, FALSE);
3304     offset += 2;
3305
3306     proto_tree_add_item(tree, hf_cigi2_sensor_response_x_size, tvb, offset, 2, FALSE);
3307     offset += 2;
3308
3309     proto_tree_add_item(tree, hf_cigi2_sensor_response_y_size, tvb, offset, 2, FALSE);
3310     offset += 2;
3311
3312     return offset;
3313 }
3314
3315 /* CIGI2 Height of Terrain Response */
3316 gint
3317 cigi2_add_height_of_terrain_response(tvbuff_t *tvb, proto_tree *tree, gint offset)
3318 {
3319     proto_tree_add_item(tree, hf_cigi2_height_of_terrain_response_hot_id, tvb, offset, 2, FALSE);
3320     offset += 2;
3321     
3322     proto_tree_add_item(tree, hf_cigi2_height_of_terrain_response_valid, tvb, offset, 1, FALSE);
3323     offset += 8;
3324
3325     proto_tree_add_item(tree, hf_cigi2_height_of_terrain_response_material_type, tvb, offset, 4, FALSE);
3326     offset += 4;
3327     
3328     proto_tree_add_item(tree, hf_cigi2_height_of_terrain_response_alt, tvb, offset, 8, FALSE);
3329     offset += 8;
3330
3331     return offset;
3332 }
3333
3334 /* CIGI2 Collision Detection Volume Response */
3335 gint
3336 cigi2_add_collision_detection_volume_response(tvbuff_t *tvb, proto_tree *tree, gint offset)
3337 {
3338     proto_tree_add_item(tree, hf_cigi2_collision_detection_volume_response_entity_id, tvb, offset, 2, FALSE);
3339     offset += 2;
3340     
3341     proto_tree_add_item(tree, hf_cigi2_collision_detection_volume_response_volume_id, tvb, offset, 1, FALSE);
3342     proto_tree_add_item(tree, hf_cigi2_collision_detection_volume_response_contact, tvb, offset, 1, FALSE);
3343     offset += 2;
3344     
3345     proto_tree_add_item(tree, hf_cigi2_collision_detection_volume_response_contact_entity, tvb, offset, 2, FALSE);
3346     offset += 2;
3347
3348     return offset;
3349 }
3350
3351 /* CIGI2 Image Generator Message */
3352 gint
3353 cigi2_add_image_generator_message(tvbuff_t *tvb, proto_tree *tree, gint offset)
3354 {
3355     guint8 packet_size = 0;
3356     
3357     packet_size = tvb_get_guint8(tvb, offset-1);
3358
3359     /* An image generator packet cannot be less than 4 bytes ( because every cigi packet
3360      * has a packet id (1 byte) and a packet size (1 byte) ). */
3361     if ( packet_size < 4 ) {
3362         THROW(ReportedBoundsError);
3363     }
3364     
3365     proto_tree_add_item(tree, hf_cigi2_image_generator_message_id, tvb, offset, 2, FALSE);
3366     offset += 2;
3367     
3368     proto_tree_add_item(tree, hf_cigi2_image_generator_message_message, tvb, offset, packet_size-4, FALSE);
3369     offset += packet_size-4;
3370
3371     return offset;
3372 }
3373
3374 /* CIGI3 IG Control */
3375 gint
3376 cigi3_add_ig_control(tvbuff_t *tvb, proto_tree *tree, gint offset)
3377 {
3378     proto_tree_add_item(tree, hf_cigi_version, tvb, offset, 1, cigi_byte_order);
3379     offset++;
3380     
3381     proto_tree_add_item(tree, hf_cigi3_ig_control_db_number, tvb, offset, 1, cigi_byte_order);
3382     offset++;
3383
3384     proto_tree_add_item(tree, hf_cigi3_ig_control_ig_mode, tvb, offset, 1, cigi_byte_order);
3385     proto_tree_add_item(tree, hf_cigi3_ig_control_timestamp_valid, tvb, offset, 1, cigi_byte_order);
3386     offset += 2;
3387
3388     /* Get the Byte Swap in Big-Endian so that we can display whether the value
3389      * is big-endian or little-endian to the user */
3390     proto_tree_add_item(tree, hf_cigi3_byte_swap, tvb, offset, 2, CIGI_BYTE_ORDER_BIG_ENDIAN);
3391     offset += 2;
3392
3393     proto_tree_add_item(tree, hf_cigi3_ig_control_frame_ctr, tvb, offset, 4, cigi_byte_order);
3394     offset += 4;
3395     
3396     proto_tree_add_item(tree, hf_cigi3_ig_control_timestamp, tvb, offset, 4, cigi_byte_order);
3397     offset += 4;
3398
3399     return offset;
3400 }
3401
3402 /* CIGI3 Entity Control */
3403 gint
3404 cigi3_add_entity_control(tvbuff_t *tvb, proto_tree *tree, gint offset)
3405 {
3406     proto_tree_add_item(tree, hf_cigi3_entity_control_entity_id, tvb, offset, 2, cigi_byte_order);
3407     offset += 2;
3408     
3409     proto_tree_add_item(tree, hf_cigi3_entity_control_entity_state, tvb, offset, 1, cigi_byte_order);
3410     proto_tree_add_item(tree, hf_cigi3_entity_control_attach_state, tvb, offset, 1, cigi_byte_order);
3411     proto_tree_add_item(tree, hf_cigi3_entity_control_collision_detection_request, tvb, offset, 1, cigi_byte_order);
3412     proto_tree_add_item(tree, hf_cigi3_entity_control_inherit_alpha, tvb, offset, 1, cigi_byte_order);
3413     proto_tree_add_item(tree, hf_cigi3_entity_control_ground_ocean_clamp, tvb, offset, 1, cigi_byte_order);
3414     offset++;
3415
3416     proto_tree_add_item(tree, hf_cigi3_entity_control_animation_direction, tvb, offset, 1, cigi_byte_order);
3417     proto_tree_add_item(tree, hf_cigi3_entity_control_animation_loop_mode, tvb, offset, 1, cigi_byte_order);
3418     proto_tree_add_item(tree, hf_cigi3_entity_control_animation_state, tvb, offset, 1, cigi_byte_order);
3419     offset++;
3420
3421     proto_tree_add_item(tree, hf_cigi3_entity_control_alpha, tvb, offset, 1, cigi_byte_order);
3422     offset += 2;
3423     
3424     proto_tree_add_item(tree, hf_cigi3_entity_control_entity_type, tvb, offset, 2, cigi_byte_order);
3425     offset += 2; 
3426     
3427     proto_tree_add_item(tree, hf_cigi3_entity_control_parent_id, tvb, offset, 2, cigi_byte_order);
3428     offset += 2;
3429
3430     proto_tree_add_item(tree, hf_cigi3_entity_control_roll, tvb, offset, 4, cigi_byte_order);
3431     offset += 4;
3432
3433     proto_tree_add_item(tree, hf_cigi3_entity_control_pitch, tvb, offset, 4, cigi_byte_order);
3434     offset += 4;
3435
3436     proto_tree_add_item(tree, hf_cigi3_entity_control_yaw, tvb, offset, 4, cigi_byte_order);
3437     offset += 4;
3438
3439     proto_tree_add_item(tree, hf_cigi3_entity_control_lat_xoff, tvb, offset, 8, cigi_byte_order);
3440     offset += 8;
3441
3442     proto_tree_add_item(tree, hf_cigi3_entity_control_lon_yoff, tvb, offset, 8, cigi_byte_order);
3443     offset += 8;
3444
3445     proto_tree_add_item(tree, hf_cigi3_entity_control_alt_zoff, tvb, offset, 8, cigi_byte_order);
3446     offset += 8;
3447
3448     return offset;
3449 }
3450
3451 /* CIGI3 Conformal Clamped Entity Control */
3452 gint
3453 cigi3_add_conformal_clamped_entity_control(tvbuff_t *tvb, proto_tree *tree, gint offset)
3454 {
3455     proto_tree_add_item(tree, hf_cigi3_conformal_clamped_entity_control_entity_id, tvb, offset, 2, cigi_byte_order);
3456     offset += 2;
3457     
3458     proto_tree_add_item(tree, hf_cigi3_conformal_clamped_entity_control_yaw, tvb, offset, 4, cigi_byte_order);
3459     offset += 4;
3460
3461     proto_tree_add_item(tree, hf_cigi3_conformal_clamped_entity_control_lat, tvb, offset, 8, cigi_byte_order);
3462     offset += 8;
3463     
3464     proto_tree_add_item(tree, hf_cigi3_conformal_clamped_entity_control_lon, tvb, offset, 8, cigi_byte_order);
3465     offset += 8;
3466     
3467     return offset;
3468 }
3469
3470 /* CIGI3 Component Control */
3471 gint
3472 cigi3_add_component_control(tvbuff_t *tvb, proto_tree *tree, gint offset)
3473 {
3474     proto_tree_add_item(tree, hf_cigi3_component_control_component_id, tvb, offset, 2, cigi_byte_order);
3475     offset += 2;
3476
3477     proto_tree_add_item(tree, hf_cigi3_component_control_instance_id, tvb, offset, 2, cigi_byte_order);
3478     offset += 2;
3479     
3480     proto_tree_add_item(tree, hf_cigi3_component_control_component_class, tvb, offset, 1, cigi_byte_order);
3481     offset++;
3482
3483     proto_tree_add_item(tree, hf_cigi3_component_control_component_state, tvb, offset, 1, cigi_byte_order);
3484     offset++;
3485     
3486     proto_tree_add_item(tree, hf_cigi3_component_control_data_1, tvb, offset, 4, cigi_byte_order);
3487     offset += 4;
3488     
3489     proto_tree_add_item(tree, hf_cigi3_component_control_data_2, tvb, offset, 4, cigi_byte_order);
3490     offset += 4;
3491     
3492     proto_tree_add_item(tree, hf_cigi3_component_control_data_3, tvb, offset, 4, cigi_byte_order);
3493     offset += 4;
3494     
3495     proto_tree_add_item(tree, hf_cigi3_component_control_data_4, tvb, offset, 4, cigi_byte_order);
3496     offset += 4;
3497     
3498     proto_tree_add_item(tree, hf_cigi3_component_control_data_5, tvb, offset, 4, cigi_byte_order);
3499     offset += 4;
3500     
3501     proto_tree_add_item(tree, hf_cigi3_component_control_data_6, tvb, offset, 4, cigi_byte_order);
3502     offset += 4;
3503     
3504     return offset;
3505 }
3506
3507 /* CIGI3 Short Component Control */
3508 gint
3509 cigi3_add_short_component_control(tvbuff_t *tvb, proto_tree *tree, gint offset)
3510 {
3511     proto_tree_add_item(tree, hf_cigi3_short_component_control_component_id, tvb, offset, 2, cigi_byte_order);
3512     offset += 2;
3513
3514     proto_tree_add_item(tree, hf_cigi3_short_component_control_instance_id, tvb, offset, 2, cigi_byte_order);
3515     offset += 2;
3516
3517     proto_tree_add_item(tree, hf_cigi3_short_component_control_component_class, tvb, offset, 1, cigi_byte_order);
3518     offset++;
3519     
3520     proto_tree_add_item(tree, hf_cigi3_short_component_control_component_state, tvb, offset, 1, cigi_byte_order);
3521     offset++;
3522
3523     proto_tree_add_item(tree, hf_cigi3_short_component_control_data_1, tvb, offset, 4, cigi_byte_order);
3524     offset += 4;
3525     
3526     proto_tree_add_item(tree, hf_cigi3_short_component_control_data_2, tvb, offset, 4, cigi_byte_order);
3527     offset += 4;
3528     
3529     return offset;
3530 }
3531
3532 /* CIGI3 Articulated Part Control */
3533 gint
3534 cigi3_add_articulated_part_control(tvbuff_t *tvb, proto_tree *tree, gint offset)
3535 {
3536     proto_tree_add_item(tree, hf_cigi3_articulated_part_control_entity_id, tvb, offset, 2, cigi_byte_order);
3537     offset += 2;
3538     
3539     proto_tree_add_item(tree, hf_cigi3_articulated_part_control_part_id, tvb, offset, 1, cigi_byte_order);
3540     offset++;
3541
3542     proto_tree_add_item(tree, hf_cigi3_articulated_part_control_part_enable, tvb, offset, 1, cigi_byte_order);
3543     proto_tree_add_item(tree, hf_cigi3_articulated_part_control_xoff_enable, tvb, offset, 1, cigi_byte_order);
3544     proto_tree_add_item(tree, hf_cigi3_articulated_part_control_yoff_enable, tvb, offset, 1, cigi_byte_order);
3545     proto_tree_add_item(tree, hf_cigi3_articulated_part_control_zoff_enable, tvb, offset, 1, cigi_byte_order);
3546     proto_tree_add_item(tree, hf_cigi3_articulated_part_control_roll_enable, tvb, offset, 1, cigi_byte_order);
3547     proto_tree_add_item(tree, hf_cigi3_articulated_part_control_pitch_enable, tvb, offset, 1, cigi_byte_order);
3548     proto_tree_add_item(tree, hf_cigi3_articulated_part_control_yaw_enable, tvb, offset, 1, cigi_byte_order);
3549     offset += 3;
3550    
3551     proto_tree_add_item(tree, hf_cigi3_articulated_part_control_xoff, tvb, offset, 4, cigi_byte_order);
3552     offset += 4;
3553    
3554     proto_tree_add_item(tree, hf_cigi3_articulated_part_control_yoff, tvb, offset, 4, cigi_byte_order);
3555     offset += 4;
3556    
3557     proto_tree_add_item(tree, hf_cigi3_articulated_part_control_zoff, tvb, offset, 4, cigi_byte_order);
3558     offset += 4;
3559    
3560     proto_tree_add_item(tree, hf_cigi3_articulated_part_control_roll, tvb, offset, 4, cigi_byte_order);
3561     offset += 4;
3562    
3563     proto_tree_add_item(tree, hf_cigi3_articulated_part_control_pitch, tvb, offset, 4, cigi_byte_order);
3564     offset += 4;
3565    
3566     proto_tree_add_item(tree, hf_cigi3_articulated_part_control_yaw, tvb, offset, 4, cigi_byte_order);
3567     offset += 4;
3568
3569     return offset;
3570 }
3571
3572 /* CIGI3 Short Articulated Part Control */
3573 gint
3574 cigi3_add_short_articulated_part_control(tvbuff_t *tvb, proto_tree *tree, gint offset)
3575 {
3576     proto_tree_add_item(tree, hf_cigi3_short_articulated_part_control_entity_id, tvb, offset, 2, cigi_byte_order);
3577     offset += 2;
3578
3579     proto_tree_add_item(tree, hf_cigi3_short_articulated_part_control_part_id_1, tvb, offset, 1, cigi_byte_order);
3580     offset++;
3581
3582     proto_tree_add_item(tree, hf_cigi3_short_articulated_part_control_part_id_2, tvb, offset, 1, cigi_byte_order);
3583     offset++;
3584
3585     proto_tree_add_item(tree, hf_cigi3_short_articulated_part_control_dof_select_1, tvb, offset, 1, cigi_byte_order);
3586     proto_tree_add_item(tree, hf_cigi3_short_articulated_part_control_dof_select_2, tvb, offset, 1, cigi_byte_order);
3587     proto_tree_add_item(tree, hf_cigi3_short_articulated_part_control_part_enable_1, tvb, offset, 1, cigi_byte_order);
3588     proto_tree_add_item(tree, hf_cigi3_short_articulated_part_control_part_enable_2, tvb, offset, 1, cigi_byte_order);
3589     offset += 2;
3590
3591     proto_tree_add_item(tree, hf_cigi3_short_articulated_part_control_dof_1, tvb, offset, 4, cigi_byte_order);
3592     offset += 4;
3593
3594     proto_tree_add_item(tree, hf_cigi3_short_articulated_part_control_dof_2, tvb, offset, 4, cigi_byte_order);
3595     offset += 4;
3596     
3597     return offset;
3598 }
3599
3600 /* CIGI3 Rate Control */
3601 gint
3602 cigi3_add_rate_control(tvbuff_t *tvb, proto_tree *tree, gint offset)
3603 {
3604     proto_tree_add_item(tree, hf_cigi3_rate_control_entity_id, tvb, offset, 2, cigi_byte_order);
3605     offset += 2;
3606
3607     proto_tree_add_item(tree, hf_cigi3_rate_control_part_id, tvb, offset, 1, cigi_byte_order);
3608     offset++;
3609
3610     proto_tree_add_item(tree, hf_cigi3_rate_control_apply_to_part, tvb, offset, 1, cigi_byte_order);
3611     offset += 3;
3612
3613     proto_tree_add_item(tree, hf_cigi3_rate_control_x_rate, tvb, offset, 4, cigi_byte_order);
3614     offset += 4;
3615
3616     proto_tree_add_item(tree, hf_cigi3_rate_control_y_rate, tvb, offset, 4, cigi_byte_order);
3617     offset += 4;
3618
3619     proto_tree_add_item(tree, hf_cigi3_rate_control_z_rate, tvb, offset, 4, cigi_byte_order);
3620     offset += 4;
3621
3622     proto_tree_add_item(tree, hf_cigi3_rate_control_roll_rate, tvb, offset, 4, cigi_byte_order);
3623     offset += 4;
3624
3625     proto_tree_add_item(tree, hf_cigi3_rate_control_pitch_rate, tvb, offset, 4, cigi_byte_order);
3626     offset += 4;
3627
3628     proto_tree_add_item(tree, hf_cigi3_rate_control_yaw_rate, tvb, offset, 4, cigi_byte_order);
3629     offset += 4;
3630
3631     return offset;
3632 }
3633
3634 /* CIGI3 Celestial Sphere Control */
3635 gint
3636 cigi3_add_celestial_sphere_control(tvbuff_t *tvb, proto_tree *tree, gint offset)
3637 {
3638     proto_tree_add_item(tree, hf_cigi3_celestial_sphere_control_hour, tvb, offset, 1, cigi_byte_order);
3639     offset++;
3640
3641     proto_tree_add_item(tree, hf_cigi3_celestial_sphere_control_minute, tvb, offset, 1, cigi_byte_order);
3642     offset++;
3643
3644     proto_tree_add_item(tree, hf_cigi3_celestial_sphere_control_ephemeris_enable, tvb, offset, 1, cigi_byte_order);
3645     proto_tree_add_item(tree, hf_cigi3_celestial_sphere_control_sun_enable, tvb, offset, 1, cigi_byte_order);
3646     proto_tree_add_item(tree, hf_cigi3_celestial_sphere_control_moon_enable, tvb, offset, 1, cigi_byte_order);
3647     proto_tree_add_item(tree, hf_cigi3_celestial_sphere_control_star_enable, tvb, offset, 1, cigi_byte_order);
3648     proto_tree_add_item(tree, hf_cigi3_celestial_sphere_control_date_time_valid, tvb, offset, 1, cigi_byte_order);
3649     offset += 4;
3650
3651     proto_tree_add_item(tree, hf_cigi3_celestial_sphere_control_date, tvb, offset, 4, cigi_byte_order);
3652     offset += 4;
3653
3654     proto_tree_add_item(tree, hf_cigi3_celestial_sphere_control_star_intensity, tvb, offset, 4, cigi_byte_order);
3655     offset += 4;
3656
3657     return offset;
3658 }
3659
3660 /* CIGI3 Atmosphere Control */
3661 gint
3662 cigi3_add_atmosphere_control(tvbuff_t *tvb, proto_tree *tree, gint offset)
3663 {
3664     proto_tree_add_item(tree, hf_cigi3_atmosphere_control_atmospheric_model_enable, tvb, offset, 1, cigi_byte_order);
3665     offset++;
3666
3667     proto_tree_add_item(tree, hf_cigi3_atmosphere_control_humidity, tvb, offset, 1, cigi_byte_order);
3668     offset++;
3669     
3670     proto_tree_add_item(tree, hf_cigi3_atmosphere_control_air_temp, tvb, offset, 4, cigi_byte_order);
3671     offset += 4;
3672     
3673     proto_tree_add_item(tree, hf_cigi3_atmosphere_control_visibility_range, tvb, offset, 4, cigi_byte_order);
3674     offset += 4;
3675     
3676     proto_tree_add_item(tree, hf_cigi3_atmosphere_control_horiz_wind, tvb, offset, 4, cigi_byte_order);
3677     offset += 4;
3678     
3679     proto_tree_add_item(tree, hf_cigi3_atmosphere_control_vert_wind, tvb, offset, 4, cigi_byte_order);
3680     offset += 4;
3681     
3682     proto_tree_add_item(tree, hf_cigi3_atmosphere_control_wind_direction, tvb, offset, 4, cigi_byte_order);
3683     offset += 4;
3684     
3685     proto_tree_add_item(tree, hf_cigi3_atmosphere_control_barometric_pressure, tvb, offset, 4, cigi_byte_order);
3686     offset += 8;
3687     
3688     return offset;
3689 }
3690
3691 /* CIGI3 Environmental Region Control */
3692 gint
3693 cigi3_add_environmental_region_control(tvbuff_t *tvb, proto_tree *tree, gint offset)
3694 {
3695     proto_tree_add_item(tree, hf_cigi3_environmental_region_control_region_id, tvb, offset, 2, cigi_byte_order);
3696     offset += 2;
3697
3698     proto_tree_add_item(tree, hf_cigi3_environmental_region_control_region_state, tvb, offset, 1, cigi_byte_order);
3699     proto_tree_add_item(tree, hf_cigi3_environmental_region_control_merge_weather, tvb, offset, 1, cigi_byte_order);
3700     proto_tree_add_item(tree, hf_cigi3_environmental_region_control_merge_aerosol, tvb, offset, 1, cigi_byte_order);
3701     proto_tree_add_item(tree, hf_cigi3_environmental_region_control_merge_maritime, tvb, offset, 1, cigi_byte_order);
3702     proto_tree_add_item(tree, hf_cigi3_environmental_region_control_merge_terrestrial, tvb, offset, 1, cigi_byte_order);
3703     offset += 4;
3704
3705     proto_tree_add_item(tree, hf_cigi3_environmental_region_control_lat, tvb, offset, 8, cigi_byte_order);
3706     offset += 8;
3707
3708     proto_tree_add_item(tree, hf_cigi3_environmental_region_control_lon, tvb, offset, 8, cigi_byte_order);
3709     offset += 8;
3710
3711     proto_tree_add_item(tree, hf_cigi3_environmental_region_control_size_x, tvb, offset, 4, cigi_byte_order);
3712     offset += 4;
3713
3714     proto_tree_add_item(tree, hf_cigi3_environmental_region_control_size_y, tvb, offset, 4, cigi_byte_order);
3715     offset += 4;
3716
3717     proto_tree_add_item(tree, hf_cigi3_environmental_region_control_corner_radius, tvb, offset, 4, cigi_byte_order);
3718     offset += 4;
3719
3720     proto_tree_add_item(tree, hf_cigi3_environmental_region_control_rotation, tvb, offset, 4, cigi_byte_order);
3721     offset += 4;
3722
3723     proto_tree_add_item(tree, hf_cigi3_environmental_region_control_transition_perimeter, tvb, offset, 4, cigi_byte_order);
3724     offset += 8;
3725
3726     return offset;
3727 }
3728
3729 /* CIGI3 Weather Control */
3730 gint
3731 cigi3_add_weather_control(tvbuff_t *tvb, proto_tree *tree, gint offset)
3732 {
3733     proto_tree_add_item(tree, hf_cigi3_weather_control_entity_region_id, tvb, offset, 2, cigi_byte_order);
3734     offset += 2;
3735     
3736     proto_tree_add_item(tree, hf_cigi3_weather_control_layer_id, tvb, offset, 1, cigi_byte_order);
3737     offset++;
3738     
3739     proto_tree_add_item(tree, hf_cigi3_weather_control_humidity, tvb, offset, 1, cigi_byte_order);
3740     offset++;
3741     
3742     proto_tree_add_item(tree, hf_cigi3_weather_control_weather_enable, tvb, offset, 1, cigi_byte_order);
3743     proto_tree_add_item(tree, hf_cigi3_weather_control_scud_enable, tvb, offset, 1, cigi_byte_order);
3744     proto_tree_add_item(tree, hf_cigi3_weather_control_random_winds_enable, tvb, offset, 1, cigi_byte_order);
3745     proto_tree_add_item(tree, hf_cigi3_weather_control_random_lightning_enable, tvb, offset, 1, cigi_byte_order);
3746     proto_tree_add_item(tree, hf_cigi3_weather_control_cloud_type, tvb, offset, 1, cigi_byte_order);
3747     offset++;
3748     
3749     proto_tree_add_item(tree, hf_cigi3_weather_control_scope, tvb, offset, 1, cigi_byte_order);
3750     proto_tree_add_item(tree, hf_cigi3_weather_control_severity, tvb, offset, 1, cigi_byte_order);
3751     offset++;
3752
3753     proto_tree_add_item(tree, hf_cigi3_weather_control_air_temp, tvb, offset, 4, cigi_byte_order);
3754     offset += 4;
3755
3756     proto_tree_add_item(tree, hf_cigi3_weather_control_visibility_range, tvb, offset, 4, cigi_byte_order);
3757     offset += 4;
3758
3759     proto_tree_add_item(tree, hf_cigi3_weather_control_scud_frequency, tvb, offset, 4, cigi_byte_order);
3760     offset += 4;
3761
3762     proto_tree_add_item(tree, hf_cigi3_weather_control_coverage, tvb, offset, 4, cigi_byte_order);
3763     offset += 4;
3764
3765     proto_tree_add_item(tree, hf_cigi3_weather_control_base_elevation, tvb, offset, 4, cigi_byte_order);
3766     offset += 4;
3767
3768     proto_tree_add_item(tree, hf_cigi3_weather_control_thickness, tvb, offset, 4, cigi_byte_order);
3769     offset += 4;
3770
3771     proto_tree_add_item(tree, hf_cigi3_weather_control_transition_band, tvb, offset, 4, cigi_byte_order);
3772     offset += 4;
3773
3774     proto_tree_add_item(tree, hf_cigi3_weather_control_horiz_wind, tvb, offset, 4, cigi_byte_order);
3775     offset += 4;
3776
3777     proto_tree_add_item(tree, hf_cigi3_weather_control_vert_wind, tvb, offset, 4, cigi_byte_order);
3778     offset += 4;
3779
3780     proto_tree_add_item(tree, hf_cigi3_weather_control_wind_direction, tvb, offset, 4, cigi_byte_order);
3781     offset += 4;
3782
3783     proto_tree_add_item(tree, hf_cigi3_weather_control_barometric_pressure, tvb, offset, 4, cigi_byte_order);
3784     offset += 4;
3785
3786     proto_tree_add_item(tree, hf_cigi3_weather_control_aerosol_concentration, tvb, offset, 4, cigi_byte_order);
3787     offset += 4;
3788     
3789     return offset;
3790 }
3791
3792 /* CIGI3 Maritime Surface Conditions Control */
3793 gint
3794 cigi3_add_maritime_surface_conditions_control(tvbuff_t *tvb, proto_tree *tree, gint offset)
3795 {
3796     proto_tree_add_item(tree, hf_cigi3_maritime_surface_conditions_control_entity_region_id, tvb, offset, 2, cigi_byte_order);
3797     offset += 2;
3798     
3799     proto_tree_add_item(tree, hf_cigi3_maritime_surface_conditions_control_surface_conditions_enable, tvb, offset, 1, cigi_byte_order);
3800     proto_tree_add_item(tree, hf_cigi3_maritime_surface_conditions_control_whitecap_enable, tvb, offset, 1, cigi_byte_order);
3801     proto_tree_add_item(tree, hf_cigi3_maritime_surface_conditions_control_scope, tvb, offset, 1, cigi_byte_order);
3802     offset += 4;
3803
3804     proto_tree_add_item(tree, hf_cigi3_maritime_surface_conditions_control_sea_surface_height, tvb, offset, 4, cigi_byte_order);
3805     offset += 4;
3806
3807     proto_tree_add_item(tree, hf_cigi3_maritime_surface_conditions_control_surface_water_temp, tvb, offset, 4, cigi_byte_order);
3808     offset += 4;
3809
3810     proto_tree_add_item(tree, hf_cigi3_maritime_surface_conditions_control_surface_clarity, tvb, offset, 4, cigi_byte_order);
3811     offset += 8;
3812
3813     return offset;
3814 }
3815
3816 /* CIGI3 Wave Control */
3817 gint
3818 cigi3_add_wave_control(tvbuff_t *tvb, proto_tree *tree, gint offset)
3819 {
3820     proto_tree_add_item(tree, hf_cigi3_wave_control_entity_region_id, tvb, offset, 2, cigi_byte_order);
3821     offset += 2;
3822     
3823     proto_tree_add_item(tree, hf_cigi3_wave_control_wave_id, tvb, offset, 1, cigi_byte_order);
3824     offset++;
3825     
3826     proto_tree_add_item(tree, hf_cigi3_wave_control_wave_enable, tvb, offset, 1, cigi_byte_order);
3827     proto_tree_add_item(tree, hf_cigi3_wave_control_scope, tvb, offset, 1, cigi_byte_order);
3828     proto_tree_add_item(tree, hf_cigi3_wave_control_breaker_type, tvb, offset, 1, cigi_byte_order);
3829     offset += 3;
3830
3831     proto_tree_add_item(tree, hf_cigi3_wave_control_height, tvb, offset, 4, cigi_byte_order);
3832     offset += 4;
3833
3834     proto_tree_add_item(tree, hf_cigi3_wave_control_wavelength, tvb, offset, 4, cigi_byte_order);
3835     offset += 4;
3836
3837     proto_tree_add_item(tree, hf_cigi3_wave_control_period, tvb, offset, 4, cigi_byte_order);
3838     offset += 4;
3839
3840     proto_tree_add_item(tree, hf_cigi3_wave_control_direction, tvb, offset, 4, cigi_byte_order);
3841     offset += 4;
3842
3843     proto_tree_add_item(tree, hf_cigi3_wave_control_phase_offset, tvb, offset, 4, cigi_byte_order);
3844     offset += 4;
3845
3846     proto_tree_add_item(tree, hf_cigi3_wave_control_leading, tvb, offset, 4, cigi_byte_order);
3847     offset += 4;
3848
3849     return offset;
3850 }
3851
3852 /* CIGI3 Terrestrial Surface Conditions Control */
3853 gint
3854 cigi3_add_terrestrial_surface_conditions_control(tvbuff_t *tvb, proto_tree *tree, gint offset)
3855 {
3856     proto_tree_add_item(tree, hf_cigi3_terrestrial_surface_conditions_control_entity_region_id, tvb, offset, 2, cigi_byte_order);
3857     offset += 2;
3858     
3859     proto_tree_add_item(tree, hf_cigi3_terrestrial_surface_conditions_control_surface_condition_id, tvb, offset, 2, cigi_byte_order);
3860     offset += 2;
3861     
3862     proto_tree_add_item(tree, hf_cigi3_terrestrial_surface_conditions_control_surface_condition_enable, tvb, offset, 1, cigi_byte_order);
3863     proto_tree_add_item(tree, hf_cigi3_terrestrial_surface_conditions_control_scope, tvb, offset, 1, cigi_byte_order);
3864     proto_tree_add_item(tree, hf_cigi3_terrestrial_surface_conditions_control_severity, tvb, offset, 1, cigi_byte_order);
3865     offset++;
3866     
3867     proto_tree_add_item(tree, hf_cigi3_terrestrial_surface_conditions_control_coverage, tvb, offset, 1, cigi_byte_order);
3868     offset++;
3869
3870     return offset;
3871 }
3872
3873 /* CIGI3 View Control */
3874 gint
3875 cigi3_add_view_control(tvbuff_t *tvb, proto_tree *tree, gint offset)
3876 {
3877     proto_tree_add_item(tree, hf_cigi3_view_control_view_id, tvb, offset, 2, cigi_byte_order);
3878     offset += 2;
3879     
3880     proto_tree_add_item(tree, hf_cigi3_view_control_group_id, tvb, offset, 1, cigi_byte_order);
3881     offset++;
3882     
3883     proto_tree_add_item(tree, hf_cigi3_view_control_xoff_enable, tvb, offset, 1, cigi_byte_order);
3884     proto_tree_add_item(tree, hf_cigi3_view_control_yoff_enable, tvb, offset, 1, cigi_byte_order);
3885     proto_tree_add_item(tree, hf_cigi3_view_control_zoff_enable, tvb, offset, 1, cigi_byte_order);
3886     proto_tree_add_item(tree, hf_cigi3_view_control_roll_enable, tvb, offset, 1, cigi_byte_order);
3887     proto_tree_add_item(tree, hf_cigi3_view_control_pitch_enable, tvb, offset, 1, cigi_byte_order);
3888     proto_tree_add_item(tree, hf_cigi3_view_control_yaw_enable, tvb, offset, 1, cigi_byte_order);
3889     offset++;
3890     
3891     proto_tree_add_item(tree, hf_cigi3_view_control_entity_id, tvb, offset, 2, cigi_byte_order);
3892     offset += 2;
3893
3894     proto_tree_add_item(tree, hf_cigi3_view_control_xoff, tvb, offset, 4, cigi_byte_order);
3895     offset += 4;
3896
3897     proto_tree_add_item(tree, hf_cigi3_view_control_yoff, tvb, offset, 4, cigi_byte_order);
3898     offset += 4;
3899
3900     proto_tree_add_item(tree, hf_cigi3_view_control_zoff, tvb, offset, 4, cigi_byte_order);
3901     offset += 4;
3902
3903     proto_tree_add_item(tree, hf_cigi3_view_control_roll, tvb, offset, 4, cigi_byte_order);
3904     offset += 4;
3905
3906     proto_tree_add_item(tree, hf_cigi3_view_control_pitch, tvb, offset, 4, cigi_byte_order);
3907     offset += 4;
3908
3909     proto_tree_add_item(tree, hf_cigi3_view_control_yaw, tvb, offset, 4, cigi_byte_order);
3910     offset += 4;
3911
3912     return offset;
3913 }
3914
3915 /* CIGI3 Sensor Control */
3916 gint
3917 cigi3_add_sensor_control(tvbuff_t *tvb, proto_tree *tree, gint offset)
3918 {
3919     proto_tree_add_item(tree, hf_cigi3_sensor_control_view_id, tvb, offset, 2, cigi_byte_order);
3920     offset += 2;
3921     
3922     proto_tree_add_item(tree, hf_cigi3_sensor_control_sensor_id, tvb, offset, 1, cigi_byte_order);
3923     offset++;
3924     
3925     proto_tree_add_item(tree, hf_cigi3_sensor_control_track_mode, tvb, offset, 1, cigi_byte_order);
3926     proto_tree_add_item(tree, hf_cigi3_sensor_control_sensor_on_off, tvb, offset, 1, cigi_byte_order);
3927     proto_tree_add_item(tree, hf_cigi3_sensor_control_polarity, tvb, offset, 1, cigi_byte_order);
3928     proto_tree_add_item(tree, hf_cigi3_sensor_control_line_dropout_enable, tvb, offset, 1, cigi_byte_order);
3929     proto_tree_add_item(tree, hf_cigi3_sensor_control_auto_gain, tvb, offset, 1, cigi_byte_order);
3930     proto_tree_add_item(tree, hf_cigi3_sensor_control_track_white_black, tvb, offset, 1, cigi_byte_order);
3931     offset++;
3932     
3933     proto_tree_add_item(tree, hf_cigi3_sensor_control_response_type, tvb, offset, 1, cigi_byte_order);
3934     offset += 2;
3935
3936     proto_tree_add_item(tree, hf_cigi3_sensor_control_gain, tvb, offset, 4, cigi_byte_order);
3937     offset += 4;
3938
3939     proto_tree_add_item(tree, hf_cigi3_sensor_control_level, tvb, offset, 4, cigi_byte_order);
3940     offset += 4;
3941
3942     proto_tree_add_item(tree, hf_cigi3_sensor_control_ac_coupling, tvb, offset, 4, cigi_byte_order);
3943     offset += 4;
3944
3945     proto_tree_add_item(tree, hf_cigi3_sensor_control_noise, tvb, offset, 4, cigi_byte_order);
3946     offset += 4;
3947
3948     return offset;
3949 }
3950
3951 /* CIGI3 Motion Tracker Control */
3952 gint
3953 cigi3_add_motion_tracker_control(tvbuff_t *tvb, proto_tree *tree, gint offset)
3954 {
3955     proto_tree_add_item(tree, hf_cigi3_motion_tracker_control_view_group_id, tvb, offset, 2, cigi_byte_order);
3956     offset += 2;
3957     
3958     proto_tree_add_item(tree, hf_cigi3_motion_tracker_control_tracker_id, tvb, offset, 1, cigi_byte_order);
3959     offset++;
3960     
3961     proto_tree_add_item(tree, hf_cigi3_motion_tracker_control_tracker_enable, tvb, offset, 1, cigi_byte_order);
3962     proto_tree_add_item(tree, hf_cigi3_motion_tracker_control_boresight_enable, tvb, offset, 1, cigi_byte_order);
3963     proto_tree_add_item(tree, hf_cigi3_motion_tracker_control_x_enable, tvb, offset, 1, cigi_byte_order);
3964     proto_tree_add_item(tree, hf_cigi3_motion_tracker_control_y_enable, tvb, offset, 1, cigi_byte_order);
3965     proto_tree_add_item(tree, hf_cigi3_motion_tracker_control_z_enable, tvb, offset, 1, cigi_byte_order);
3966     proto_tree_add_item(tree, hf_cigi3_motion_tracker_control_roll_enable, tvb, offset, 1, cigi_byte_order);
3967     proto_tree_add_item(tree, hf_cigi3_motion_tracker_control_pitch_enable, tvb, offset, 1, cigi_byte_order);
3968     proto_tree_add_item(tree, hf_cigi3_motion_tracker_control_yaw_enable, tvb, offset, 1, cigi_byte_order);
3969     offset++;
3970     
3971     proto_tree_add_item(tree, hf_cigi3_motion_tracker_control_view_group_select, tvb, offset, 1, cigi_byte_order);
3972     offset += 2;
3973     
3974     return offset;
3975 }
3976
3977 /* CIGI3 Earth Reference Model Definition */
3978 gint
3979 cigi3_add_earth_reference_model_definition(tvbuff_t *tvb, proto_tree *tree, gint offset)
3980 {
3981     proto_tree_add_item(tree, hf_cigi3_earth_reference_model_definition_erm_enable, tvb, offset, 1, cigi_byte_order);
3982     offset += 6;
3983
3984     proto_tree_add_item(tree, hf_cigi3_earth_reference_model_definition_equatorial_radius, tvb, offset, 8, cigi_byte_order);
3985     offset += 8;
3986
3987     proto_tree_add_item(tree, hf_cigi3_earth_reference_model_definition_flattening, tvb, offset, 8, cigi_byte_order);
3988     offset += 8;
3989     
3990     return offset;
3991 }
3992
3993 /* CIGI3 Trajectory Definition */
3994 gint
3995 cigi3_add_trajectory_definition(tvbuff_t *tvb, proto_tree *tree, gint offset)
3996 {
3997     proto_tree_add_item(tree, hf_cigi3_trajectory_definition_entity_id, tvb, offset, 2, cigi_byte_order);
3998     offset += 2;
3999     
4000     proto_tree_add_item(tree, hf_cigi3_trajectory_definition_acceleration_x, tvb, offset, 4, cigi_byte_order);
4001     offset += 4;
4002     
4003     proto_tree_add_item(tree, hf_cigi3_trajectory_definition_acceleration_y, tvb, offset, 4, cigi_byte_order);
4004     offset += 4;
4005     
4006     proto_tree_add_item(tree, hf_cigi3_trajectory_definition_acceleration_z, tvb, offset, 4, cigi_byte_order);
4007     offset += 4;
4008     
4009     proto_tree_add_item(tree, hf_cigi3_trajectory_definition_retardation_rate, tvb, offset, 4, cigi_byte_order);
4010     offset += 4;
4011     
4012     proto_tree_add_item(tree, hf_cigi3_trajectory_definition_terminal_velocity, tvb, offset, 4, cigi_byte_order);
4013     offset += 4;
4014
4015     return offset;
4016 }
4017
4018 /* CIGI3 View Definition */
4019 gint
4020 cigi3_add_view_definition(tvbuff_t *tvb, proto_tree *tree, gint offset)
4021 {
4022     proto_tree_add_item(tree, hf_cigi3_view_definition_view_id, tvb, offset, 2, cigi_byte_order);
4023     offset += 2;
4024     
4025     proto_tree_add_item(tree, hf_cigi3_view_definition_group_id, tvb, offset, 1, cigi_byte_order);
4026     offset++;
4027     
4028     proto_tree_add_item(tree, hf_cigi3_view_definition_near_enable, tvb, offset, 1, cigi_byte_order);
4029     proto_tree_add_item(tree, hf_cigi3_view_definition_far_enable, tvb, offset, 1, cigi_byte_order);
4030     proto_tree_add_item(tree, hf_cigi3_view_definition_left_enable, tvb, offset, 1, cigi_byte_order);
4031     proto_tree_add_item(tree, hf_cigi3_view_definition_right_enable, tvb, offset, 1, cigi_byte_order);
4032     proto_tree_add_item(tree, hf_cigi3_view_definition_top_enable, tvb, offset, 1, cigi_byte_order);
4033     proto_tree_add_item(tree, hf_cigi3_view_definition_bottom_enable, tvb, offset, 1, cigi_byte_order);
4034     proto_tree_add_item(tree, hf_cigi3_view_definition_mirror_mode, tvb, offset, 1, cigi_byte_order);
4035     offset++;
4036     
4037     proto_tree_add_item(tree, hf_cigi3_view_definition_pixel_replication, tvb, offset, 1, cigi_byte_order);
4038     proto_tree_add_item(tree, hf_cigi3_view_definition_projection_type, tvb, offset, 1, cigi_byte_order);
4039     proto_tree_add_item(tree, hf_cigi3_view_definition_reorder, tvb, offset, 1, cigi_byte_order);
4040     proto_tree_add_item(tree, hf_cigi3_view_definition_view_type, tvb, offset, 1, cigi_byte_order);
4041     offset += 2;
4042
4043     proto_tree_add_item(tree, hf_cigi3_view_definition_near, tvb, offset, 4, cigi_byte_order);
4044     offset += 4;
4045
4046     proto_tree_add_item(tree, hf_cigi3_view_definition_far, tvb, offset, 4, cigi_byte_order);
4047     offset += 4;
4048
4049     proto_tree_add_item(tree, hf_cigi3_view_definition_left, tvb, offset, 4, cigi_byte_order);
4050     offset += 4;
4051
4052     proto_tree_add_item(tree, hf_cigi3_view_definition_right, tvb, offset, 4, cigi_byte_order);
4053     offset += 4;
4054
4055     proto_tree_add_item(tree, hf_cigi3_view_definition_top, tvb, offset, 4, cigi_byte_order);
4056     offset += 4;
4057
4058     proto_tree_add_item(tree, hf_cigi3_view_definition_bottom, tvb, offset, 4, cigi_byte_order);
4059     offset += 4;
4060
4061     return offset;
4062 }
4063
4064 /* CIGI3 Collision Detection Segment Definition */
4065 gint
4066 cigi3_add_collision_detection_segment_definition(tvbuff_t *tvb, proto_tree *tree, gint offset)
4067 {
4068     proto_tree_add_item(tree, hf_cigi3_collision_detection_segment_definition_entity_id, tvb, offset, 2, cigi_byte_order);
4069     offset += 2;
4070     
4071     proto_tree_add_item(tree, hf_cigi3_collision_detection_segment_definition_segment_id, tvb, offset, 1, cigi_byte_order);
4072     offset++;
4073     
4074     proto_tree_add_item(tree, hf_cigi3_collision_detection_segment_definition_segment_enable, tvb, offset, 1, cigi_byte_order);
4075     offset += 3;
4076
4077     proto_tree_add_item(tree, hf_cigi3_collision_detection_segment_definition_x1, tvb, offset, 4, cigi_byte_order);
4078     offset += 4;
4079
4080     proto_tree_add_item(tree, hf_cigi3_collision_detection_segment_definition_y1, tvb, offset, 4, cigi_byte_order);
4081     offset += 4;
4082
4083     proto_tree_add_item(tree, hf_cigi3_collision_detection_segment_definition_z1, tvb, offset, 4, cigi_byte_order);
4084     offset += 4;
4085
4086     proto_tree_add_item(tree, hf_cigi3_collision_detection_segment_definition_x2, tvb, offset, 4, cigi_byte_order);
4087     offset += 4;
4088
4089     proto_tree_add_item(tree, hf_cigi3_collision_detection_segment_definition_y2, tvb, offset, 4, cigi_byte_order);
4090     offset += 4;
4091
4092     proto_tree_add_item(tree, hf_cigi3_collision_detection_segment_definition_z2, tvb, offset, 4, cigi_byte_order);
4093     offset += 4;
4094
4095     proto_tree_add_item(tree, hf_cigi3_collision_detection_segment_definition_material_mask, tvb, offset, 4, cigi_byte_order);
4096     offset += 8;
4097
4098     return offset;
4099 }
4100
4101 /* CIGI3 Collision Detection Volume Definition */
4102 gint
4103 cigi3_add_collision_detection_volume_definition(tvbuff_t *tvb, proto_tree *tree, gint offset)
4104 {
4105     proto_tree_add_item(tree, hf_cigi3_collision_detection_volume_definition_entity_id, tvb, offset, 2, cigi_byte_order);
4106     offset += 2;
4107     
4108     proto_tree_add_item(tree, hf_cigi3_collision_detection_volume_definition_volume_id, tvb, offset, 1, cigi_byte_order);
4109     offset++;
4110     
4111     proto_tree_add_item(tree, hf_cigi3_collision_detection_volume_definition_volume_enable, tvb, offset, 1, cigi_byte_order);
4112     proto_tree_add_item(tree, hf_cigi3_collision_detection_volume_definition_volume_type, tvb, offset, 1, cigi_byte_order);
4113     offset += 3;
4114
4115     proto_tree_add_item(tree, hf_cigi3_collision_detection_volume_definition_x, tvb, offset, 4, cigi_byte_order);
4116     offset += 4;
4117
4118     proto_tree_add_item(tree, hf_cigi3_collision_detection_volume_definition_y, tvb, offset, 4, cigi_byte_order);
4119     offset += 4;
4120
4121     proto_tree_add_item(tree, hf_cigi3_collision_detection_volume_definition_z, tvb, offset, 4, cigi_byte_order);
4122     offset += 4;
4123
4124     proto_tree_add_item(tree, hf_cigi3_collision_detection_volume_definition_radius_height, tvb, offset, 4, cigi_byte_order);
4125     offset += 4;
4126
4127     proto_tree_add_item(tree, hf_cigi3_collision_detection_volume_definition_width, tvb, offset, 4, cigi_byte_order);
4128     offset += 4;
4129
4130     proto_tree_add_item(tree, hf_cigi3_collision_detection_volume_definition_depth, tvb, offset, 4, cigi_byte_order);
4131     offset += 4;
4132
4133     proto_tree_add_item(tree, hf_cigi3_collision_detection_volume_definition_roll, tvb, offset, 4, cigi_byte_order);
4134     offset += 4;
4135
4136     proto_tree_add_item(tree, hf_cigi3_collision_detection_volume_definition_pitch, tvb, offset, 4, cigi_byte_order);
4137     offset += 4;
4138
4139     proto_tree_add_item(tree, hf_cigi3_collision_detection_volume_definition_yaw, tvb, offset, 4, cigi_byte_order);
4140     offset += 8;
4141
4142     return offset;
4143 }
4144
4145 /* CIGI3 HAT/HOT Request */
4146 gint
4147 cigi3_add_hat_hot_request(tvbuff_t *tvb, proto_tree *tree, gint offset)
4148 {
4149     proto_tree_add_item(tree, hf_cigi3_hat_hot_request_hat_hot_id, tvb, offset, 2, cigi_byte_order);
4150     offset += 2;
4151
4152     proto_tree_add_item(tree, hf_cigi3_hat_hot_request_type, tvb, offset, 1, cigi_byte_order);
4153     proto_tree_add_item(tree, hf_cigi3_hat_hot_request_coordinate_system, tvb, offset, 1, cigi_byte_order);
4154     offset += 2;
4155     
4156     proto_tree_add_item(tree, hf_cigi3_hat_hot_request_entity_id, tvb, offset, 2, cigi_byte_order);
4157     offset += 2;
4158
4159     proto_tree_add_item(tree, hf_cigi3_hat_hot_request_lat_xoff, tvb, offset, 8, cigi_byte_order);
4160     offset += 8;
4161
4162     proto_tree_add_item(tree, hf_cigi3_hat_hot_request_lon_yoff, tvb, offset, 8, cigi_byte_order);
4163     offset += 8;
4164
4165     proto_tree_add_item(tree, hf_cigi3_hat_hot_request_alt_zoff, tvb, offset, 8, cigi_byte_order);
4166     offset += 8;
4167
4168     return offset;
4169 }
4170
4171 /* CIGI3 Line of Sight Segment Request */
4172 gint
4173 cigi3_add_line_of_sight_segment_request(tvbuff_t *tvb, proto_tree *tree, gint offset)
4174 {
4175     proto_tree_add_item(tree, hf_cigi3_line_of_sight_segment_request_los_id, tvb, offset, 2, cigi_byte_order);
4176     offset += 2;
4177
4178     proto_tree_add_item(tree, hf_cigi3_line_of_sight_segment_request_type, tvb, offset, 1, cigi_byte_order);
4179     proto_tree_add_item(tree, hf_cigi3_line_of_sight_segment_request_source_coord, tvb, offset, 1, cigi_byte_order);
4180     proto_tree_add_item(tree, hf_cigi3_line_of_sight_segment_request_destination_coord, tvb, offset, 1, cigi_byte_order);
4181     proto_tree_add_item(tree, hf_cigi3_line_of_sight_segment_request_response_coord, tvb, offset, 1, cigi_byte_order);
4182     offset++;
4183
4184     proto_tree_add_item(tree, hf_cigi3_line_of_sight_segment_request_alpha_threshold, tvb, offset, 1, cigi_byte_order);
4185     offset++;
4186     
4187     proto_tree_add_item(tree, hf_cigi3_line_of_sight_segment_request_entity_id, tvb, offset, 2, cigi_byte_order);
4188     offset += 2;
4189
4190     proto_tree_add_item(tree, hf_cigi3_line_of_sight_segment_request_source_lat_xoff, tvb, offset, 8, cigi_byte_order);
4191     offset += 8;
4192
4193     proto_tree_add_item(tree, hf_cigi3_line_of_sight_segment_request_source_lon_yoff, tvb, offset, 8, cigi_byte_order);
4194     offset += 8;
4195
4196     proto_tree_add_item(tree, hf_cigi3_line_of_sight_segment_request_source_alt_zoff, tvb, offset, 8, cigi_byte_order);
4197     offset += 8;
4198
4199     proto_tree_add_item(tree, hf_cigi3_line_of_sight_segment_request_destination_lat_xoff, tvb, offset, 8, cigi_byte_order);
4200     offset += 8;
4201
4202     proto_tree_add_item(tree, hf_cigi3_line_of_sight_segment_request_destination_lon_yoff, tvb, offset, 8, cigi_byte_order);
4203     offset += 8;
4204
4205     proto_tree_add_item(tree, hf_cigi3_line_of_sight_segment_request_destination_alt_zoff, tvb, offset, 8, cigi_byte_order);
4206     offset += 8;
4207
4208     proto_tree_add_item(tree, hf_cigi3_line_of_sight_segment_request_material_mask, tvb, offset, 4, cigi_byte_order);
4209     offset += 8;
4210
4211     return offset;
4212 }
4213
4214 /* CIGI3 Line of Sight Vector Request */
4215 gint
4216 cigi3_add_line_of_sight_vector_request(tvbuff_t *tvb, proto_tree *tree, gint offset)
4217 {
4218     proto_tree_add_item(tree, hf_cigi3_line_of_sight_vector_request_los_id, tvb, offset, 2, cigi_byte_order);
4219     offset += 2;
4220     
4221     proto_tree_add_item(tree, hf_cigi3_line_of_sight_vector_request_type, tvb, offset, 1, cigi_byte_order);
4222     proto_tree_add_item(tree, hf_cigi3_line_of_sight_vector_request_source_coord, tvb, offset, 1, cigi_byte_order);
4223     proto_tree_add_item(tree, hf_cigi3_line_of_sight_vector_request_response_coord, tvb, offset, 1, cigi_byte_order);
4224     offset++;
4225     
4226     proto_tree_add_item(tree, hf_cigi3_line_of_sight_vector_request_alpha, tvb, offset, 1, cigi_byte_order);
4227     offset++;
4228
4229     proto_tree_add_item(tree, hf_cigi3_line_of_sight_vector_request_entity_id, tvb, offset, 2, cigi_byte_order);
4230     offset += 2;
4231    
4232     proto_tree_add_item(tree, hf_cigi3_line_of_sight_vector_request_azimuth, tvb, offset, 4, cigi_byte_order);
4233     offset += 4;
4234    
4235     proto_tree_add_item(tree, hf_cigi3_line_of_sight_vector_request_elevation, tvb, offset, 4, cigi_byte_order);
4236     offset += 4;
4237    
4238     proto_tree_add_item(tree, hf_cigi3_line_of_sight_vector_request_min_range, tvb, offset, 4, cigi_byte_order);
4239     offset += 4;
4240    
4241     proto_tree_add_item(tree, hf_cigi3_line_of_sight_vector_request_max_range, tvb, offset, 4, cigi_byte_order);
4242     offset += 4;
4243
4244     proto_tree_add_item(tree, hf_cigi3_line_of_sight_vector_request_source_lat_xoff, tvb, offset, 8, cigi_byte_order);
4245     offset += 8;
4246
4247     proto_tree_add_item(tree, hf_cigi3_line_of_sight_vector_request_source_lon_yoff, tvb, offset, 8, cigi_byte_order);
4248     offset += 8;
4249
4250     proto_tree_add_item(tree, hf_cigi3_line_of_sight_vector_request_source_alt_zoff, tvb, offset, 8, cigi_byte_order);
4251     offset += 8;
4252    
4253     proto_tree_add_item(tree, hf_cigi3_line_of_sight_vector_request_material_mask, tvb, offset, 4, cigi_byte_order);
4254     offset += 8;
4255
4256     return offset;
4257 }
4258
4259 /* CIGI3 Position Request */
4260 gint
4261 cigi3_add_position_request(tvbuff_t *tvb, proto_tree *tree, gint offset)
4262 {
4263     proto_tree_add_item(tree, hf_cigi3_position_request_object_id, tvb, offset, 2, cigi_byte_order);
4264     offset += 2;
4265     
4266     proto_tree_add_item(tree, hf_cigi3_position_request_part_id, tvb, offset, 1, cigi_byte_order);
4267     offset++;
4268
4269     proto_tree_add_item(tree, hf_cigi3_position_request_update_mode, tvb, offset, 1, cigi_byte_order);
4270     proto_tree_add_item(tree, hf_cigi3_position_request_object_class, tvb, offset, 1, cigi_byte_order);
4271     proto_tree_add_item(tree, hf_cigi3_position_request_coord_system, tvb, offset, 1, cigi_byte_order);
4272     offset += 3;
4273
4274     return offset;
4275 }
4276
4277 /* CIGI3 Environmental Conditions Request */
4278 gint
4279 cigi3_add_environmental_conditions_request(tvbuff_t *tvb, proto_tree *tree, gint offset)
4280 {
4281     proto_tree_add_item(tree, hf_cigi3_environmental_conditions_request_type, tvb, offset, 1, cigi_byte_order);
4282     offset++;
4283     
4284     proto_tree_add_item(tree, hf_cigi3_environmental_conditions_request_id, tvb, offset, 1, cigi_byte_order);
4285     offset += 5;;
4286
4287     proto_tree_add_item(tree, hf_cigi3_environmental_conditions_request_lat, tvb, offset, 8, cigi_byte_order);
4288     offset += 8;
4289
4290     proto_tree_add_item(tree, hf_cigi3_environmental_conditions_request_lon, tvb, offset, 8, cigi_byte_order);
4291     offset += 8;
4292
4293     proto_tree_add_item(tree, hf_cigi3_environmental_conditions_request_alt, tvb, offset, 8, cigi_byte_order);
4294     offset += 8;
4295
4296     return offset;
4297 }
4298
4299 /* CIGI3 Start of Frame */
4300 gint
4301 cigi3_add_start_of_frame(tvbuff_t *tvb, proto_tree *tree, gint offset)
4302 {
4303     proto_tree_add_item(tree, hf_cigi_version, tvb, offset, 1, cigi_byte_order);
4304     offset++;
4305     
4306     proto_tree_add_item(tree, hf_cigi3_start_of_frame_db_number, tvb, offset, 1, cigi_byte_order);
4307     offset++;
4308
4309     proto_tree_add_item(tree, hf_cigi3_start_of_frame_ig_status, tvb, offset, 1, cigi_byte_order);
4310     offset++;
4311
4312     proto_tree_add_item(tree, hf_cigi3_start_of_frame_ig_mode, tvb, offset, 1, cigi_byte_order);
4313     proto_tree_add_item(tree, hf_cigi3_start_of_frame_timestamp_valid, tvb, offset, 1, cigi_byte_order);
4314     proto_tree_add_item(tree, hf_cigi3_start_of_frame_earth_reference_model, tvb, offset, 1, cigi_byte_order);
4315     offset++;
4316
4317     /* Get the Byte Swap in Big-Endian so that we can display whether the value
4318      * is big-endian or little-endian to the user */
4319     proto_tree_add_item(tree, hf_cigi3_byte_swap, tvb, offset, 2, CIGI_BYTE_ORDER_BIG_ENDIAN);
4320     offset += 2;
4321     
4322     proto_tree_add_item(tree, hf_cigi3_start_of_frame_frame_ctr, tvb, offset, 4, cigi_byte_order);
4323     offset += 4;
4324     
4325     proto_tree_add_item(tree, hf_cigi3_start_of_frame_timestamp, tvb, offset, 4, cigi_byte_order);
4326     offset += 4;
4327
4328     return offset;
4329 }
4330
4331 /* CIGI3 HAT/HOT Response */
4332 gint
4333 cigi3_add_hat_hot_response(tvbuff_t *tvb, proto_tree *tree, gint offset)
4334 {
4335     proto_tree_add_item(tree, hf_cigi3_hat_hot_response_hat_hot_id, tvb, offset, 2, cigi_byte_order);
4336     offset += 2;
4337     
4338     proto_tree_add_item(tree, hf_cigi3_hat_hot_response_valid, tvb, offset, 1, cigi_byte_order);
4339     proto_tree_add_item(tree, hf_cigi3_hat_hot_response_type, tvb, offset, 1, cigi_byte_order);
4340     offset += 4;
4341     
4342     proto_tree_add_item(tree, hf_cigi3_hat_hot_response_height, tvb, offset, 8, cigi_byte_order);
4343     offset += 8;
4344
4345     return offset;
4346 }
4347
4348 /* CIGI3 HAT/HOT Extended Response */
4349 gint
4350 cigi3_add_hat_hot_extended_response(tvbuff_t *tvb, proto_tree *tree, gint offset)
4351 {
4352     proto_tree_add_item(tree, hf_cigi3_hat_hot_extended_response_hat_hot_id, tvb, offset, 2, cigi_byte_order);
4353     offset += 2;
4354     
4355     proto_tree_add_item(tree, hf_cigi3_hat_hot_extended_response_valid, tvb, offset, 1, cigi_byte_order);
4356     offset += 4;
4357
4358     proto_tree_add_item(tree, hf_cigi3_hat_hot_extended_response_hat, tvb, offset, 8, cigi_byte_order);
4359     offset += 8;
4360
4361     proto_tree_add_item(tree, hf_cigi3_hat_hot_extended_response_hot, tvb, offset, 8, cigi_byte_order);
4362     offset += 8;
4363
4364     proto_tree_add_item(tree, hf_cigi3_hat_hot_extended_response_material_code, tvb, offset, 4, cigi_byte_order);
4365     offset += 4;
4366
4367     proto_tree_add_item(tree, hf_cigi3_hat_hot_extended_response_normal_vector_azimuth, tvb, offset, 4, cigi_byte_order);
4368     offset += 4;
4369
4370     proto_tree_add_item(tree, hf_cigi3_hat_hot_extended_response_normal_vector_elevation, tvb, offset, 4, cigi_byte_order);
4371     offset += 8;
4372
4373     return offset;
4374 }
4375
4376 /* CIGI3 Line of Sight Response */
4377 gint
4378 cigi3_add_line_of_sight_response(tvbuff_t *tvb, proto_tree *tree, gint offset)
4379 {
4380     proto_tree_add_item(tree, hf_cigi3_line_of_sight_response_los_id, tvb, offset, 2, cigi_byte_order);
4381     offset += 2;
4382     
4383     proto_tree_add_item(tree, hf_cigi3_line_of_sight_response_valid, tvb, offset, 1, cigi_byte_order);
4384     proto_tree_add_item(tree, hf_cigi3_line_of_sight_response_entity_id_valid, tvb, offset, 1, cigi_byte_order);
4385     proto_tree_add_item(tree, hf_cigi3_line_of_sight_response_visible, tvb, offset, 1, cigi_byte_order);
4386     offset++;
4387
4388     proto_tree_add_item(tree, hf_cigi3_line_of_sight_response_count, tvb, offset, 1, cigi_byte_order);
4389     offset++;
4390     
4391     proto_tree_add_item(tree, hf_cigi3_line_of_sight_response_entity_id, tvb, offset, 2, cigi_byte_order);
4392     offset += 2;
4393     
4394     proto_tree_add_item(tree, hf_cigi3_line_of_sight_response_range, tvb, offset, 8, cigi_byte_order);
4395     offset += 8;
4396
4397     return offset;
4398 }
4399
4400 /* CIGI3 Line of Sight Extended Response */
4401 gint
4402 cigi3_add_line_of_sight_extended_response(tvbuff_t *tvb, proto_tree *tree, gint offset)
4403 {
4404     proto_tree_add_item(tree, hf_cigi3_line_of_sight_extended_response_los_id, tvb, offset, 2, cigi_byte_order);
4405     offset += 2;
4406     
4407     proto_tree_add_item(tree, hf_cigi3_line_of_sight_extended_response_valid, tvb, offset, 1, cigi_byte_order);
4408     proto_tree_add_item(tree, hf_cigi3_line_of_sight_extended_response_entity_id_valid, tvb, offset, 1, cigi_byte_order);
4409     proto_tree_add_item(tree, hf_cigi3_line_of_sight_extended_response_range_valid, tvb, offset, 1, cigi_byte_order);
4410     proto_tree_add_item(tree, hf_cigi3_line_of_sight_extended_response_visible, tvb, offset, 1, cigi_byte_order);
4411     proto_tree_add_item(tree, hf_cigi3_line_of_sight_extended_response_intersection_coord, tvb, offset, 1, cigi_byte_order);
4412     offset++;
4413     
4414     proto_tree_add_item(tree, hf_cigi3_line_of_sight_extended_response_response_count, tvb, offset, 1, cigi_byte_order);
4415     offset++;
4416
4417     proto_tree_add_item(tree, hf_cigi3_line_of_sight_extended_response_entity_id, tvb, offset, 2, cigi_byte_order);
4418     offset += 2;
4419    
4420     proto_tree_add_item(tree, hf_cigi3_line_of_sight_extended_response_range, tvb, offset, 8, cigi_byte_order);
4421     offset += 8;
4422    
4423     proto_tree_add_item(tree, hf_cigi3_line_of_sight_extended_response_lat_xoff, tvb, offset, 8, cigi_byte_order);
4424     offset += 8;
4425    
4426     proto_tree_add_item(tree, hf_cigi3_line_of_sight_extended_response_lon_yoff, tvb, offset, 8, cigi_byte_order);
4427     offset += 8;
4428    
4429     proto_tree_add_item(tree, hf_cigi3_line_of_sight_extended_response_alt_zoff, tvb, offset, 8, cigi_byte_order);
4430     offset += 8;
4431     
4432     proto_tree_add_item(tree, hf_cigi3_line_of_sight_extended_response_red, tvb, offset, 1, cigi_byte_order);
4433     offset++;
4434     
4435     proto_tree_add_item(tree, hf_cigi3_line_of_sight_extended_response_green, tvb, offset, 1, cigi_byte_order);
4436     offset++;
4437     
4438     proto_tree_add_item(tree, hf_cigi3_line_of_sight_extended_response_blue, tvb, offset, 1, cigi_byte_order);
4439     offset++;
4440     
4441     proto_tree_add_item(tree, hf_cigi3_line_of_sight_extended_response_alpha, tvb, offset, 1, cigi_byte_order);
4442     offset++;
4443     
4444     proto_tree_add_item(tree, hf_cigi3_line_of_sight_extended_response_material_code, tvb, offset, 4, cigi_byte_order);
4445     offset += 4;
4446     
4447     proto_tree_add_item(tree, hf_cigi3_line_of_sight_extended_response_normal_vector_azimuth, tvb, offset, 4, cigi_byte_order);
4448     offset += 4;
4449     
4450     proto_tree_add_item(tree, hf_cigi3_line_of_sight_extended_response_normal_vector_elevation, tvb, offset, 4, cigi_byte_order);
4451     offset += 4;
4452
4453     return offset;
4454 }
4455
4456 /* CIGI3 Sensor Response */
4457 gint
4458 cigi3_add_sensor_response(tvbuff_t *tvb, proto_tree *tree, gint offset)
4459 {
4460     proto_tree_add_item(tree, hf_cigi3_sensor_response_view_id, tvb, offset, 2, cigi_byte_order);
4461     offset += 2;
4462     
4463     proto_tree_add_item(tree, hf_cigi3_sensor_response_sensor_id, tvb, offset, 1, cigi_byte_order);
4464     offset++;
4465     
4466     proto_tree_add_item(tree, hf_cigi3_sensor_response_sensor_status, tvb, offset, 1, cigi_byte_order);
4467     offset += 3;
4468
4469     proto_tree_add_item(tree, hf_cigi3_sensor_response_gate_x_size, tvb, offset, 2, cigi_byte_order);
4470     offset += 2;
4471     
4472     proto_tree_add_item(tree, hf_cigi3_sensor_response_gate_y_size, tvb, offset, 2, cigi_byte_order);
4473     offset += 2;
4474     
4475     proto_tree_add_item(tree, hf_cigi3_sensor_response_gate_x_pos, tvb, offset, 4, cigi_byte_order);
4476     offset += 4;
4477     
4478     proto_tree_add_item(tree, hf_cigi3_sensor_response_gate_y_pos, tvb, offset, 4, cigi_byte_order);
4479     offset += 4;
4480     
4481     proto_tree_add_item(tree, hf_cigi3_sensor_response_frame_ctr, tvb, offset, 4, cigi_byte_order);
4482     offset += 4;
4483
4484     return offset;
4485 }
4486
4487 /* CIGI3 Sensor Extended Response */
4488 gint
4489 cigi3_add_sensor_extended_response(tvbuff_t *tvb, proto_tree *tree, gint offset)
4490 {
4491     proto_tree_add_item(tree, hf_cigi3_sensor_extended_response_view_id, tvb, offset, 2, cigi_byte_order);
4492     offset += 2;
4493     
4494     proto_tree_add_item(tree, hf_cigi3_sensor_extended_response_sensor_id, tvb, offset, 1, cigi_byte_order);
4495     offset++;
4496     
4497     proto_tree_add_item(tree, hf_cigi3_sensor_extended_response_sensor_status, tvb, offset, 1, cigi_byte_order);
4498     proto_tree_add_item(tree, hf_cigi3_sensor_extended_response_entity_id_valid, tvb, offset, 1, cigi_byte_order);
4499     offset++;
4500     
4501     proto_tree_add_item(tree, hf_cigi3_sensor_extended_response_entity_id, tvb, offset, 2, cigi_byte_order);
4502     offset += 2;
4503     
4504     proto_tree_add_item(tree, hf_cigi3_sensor_extended_response_gate_x_size, tvb, offset, 2, cigi_byte_order);
4505     offset += 2;
4506     
4507     proto_tree_add_item(tree, hf_cigi3_sensor_extended_response_gate_y_size, tvb, offset, 2, cigi_byte_order);
4508     offset += 2;
4509     
4510     proto_tree_add_item(tree, hf_cigi3_sensor_extended_response_gate_x_pos, tvb, offset, 4, cigi_byte_order);
4511     offset += 4;
4512     
4513     proto_tree_add_item(tree, hf_cigi3_sensor_extended_response_gate_y_pos, tvb, offset, 4, cigi_byte_order);
4514     offset += 4;
4515     
4516     proto_tree_add_item(tree, hf_cigi3_sensor_extended_response_frame_ctr, tvb, offset, 4, cigi_byte_order);
4517     offset += 4;
4518
4519     proto_tree_add_item(tree, hf_cigi3_sensor_extended_response_track_lat, tvb, offset, 8, cigi_byte_order);
4520     offset += 8;
4521
4522     proto_tree_add_item(tree, hf_cigi3_sensor_extended_response_track_lon, tvb, offset, 8, cigi_byte_order);
4523     offset += 8;
4524
4525     proto_tree_add_item(tree, hf_cigi3_sensor_extended_response_track_alt, tvb, offset, 8, cigi_byte_order);
4526     offset += 8;
4527
4528     return offset;
4529 }
4530
4531 /* CIGI3 Position Response */
4532 gint
4533 cigi3_add_position_response(tvbuff_t *tvb, proto_tree *tree, gint offset)
4534 {
4535     proto_tree_add_item(tree, hf_cigi3_position_response_object_id, tvb, offset, 2, cigi_byte_order);
4536     offset += 2;
4537     
4538     proto_tree_add_item(tree, hf_cigi3_position_response_part_id, tvb, offset, 1, cigi_byte_order);
4539     offset++;
4540     
4541     proto_tree_add_item(tree, hf_cigi3_position_response_object_class, tvb, offset, 1, cigi_byte_order);
4542     proto_tree_add_item(tree, hf_cigi3_position_response_coord_system, tvb, offset, 1, cigi_byte_order);
4543     offset += 3;
4544
4545     proto_tree_add_item(tree, hf_cigi3_position_response_lat_xoff, tvb, offset, 8, cigi_byte_order);
4546     offset += 8;
4547
4548     proto_tree_add_item(tree, hf_cigi3_position_response_lon_yoff, tvb, offset, 8, cigi_byte_order);
4549     offset += 8;
4550
4551     proto_tree_add_item(tree, hf_cigi3_position_response_alt_zoff, tvb, offset, 8, cigi_byte_order);
4552     offset += 8;
4553     
4554     proto_tree_add_item(tree, hf_cigi3_position_response_roll, tvb, offset, 4, cigi_byte_order);
4555     offset += 4;
4556     
4557     proto_tree_add_item(tree, hf_cigi3_position_response_pitch, tvb, offset, 4, cigi_byte_order);
4558     offset += 4;
4559     
4560     proto_tree_add_item(tree, hf_cigi3_position_response_yaw, tvb, offset, 4, cigi_byte_order);
4561     offset += 8;
4562
4563     return offset;
4564 }
4565
4566 /* CIGI3 Weather Conditions Response */
4567 gint
4568 cigi3_add_weather_conditions_response(tvbuff_t *tvb, proto_tree *tree, gint offset)
4569 {
4570     proto_tree_add_item(tree, hf_cigi3_weather_conditions_response_request_id, tvb, offset, 1, cigi_byte_order);
4571     offset++;
4572     
4573     proto_tree_add_item(tree, hf_cigi3_weather_conditions_response_humidity, tvb, offset, 1, cigi_byte_order);
4574     offset++;
4575
4576     proto_tree_add_item(tree, hf_cigi3_weather_conditions_response_air_temp, tvb, offset, 4, cigi_byte_order);
4577     offset += 4;
4578
4579     proto_tree_add_item(tree, hf_cigi3_weather_conditions_response_visibility_range, tvb, offset, 4, cigi_byte_order);
4580     offset += 4;
4581
4582     proto_tree_add_item(tree, hf_cigi3_weather_conditions_response_horiz_speed, tvb, offset, 4, cigi_byte_order);
4583     offset += 4;
4584
4585     proto_tree_add_item(tree, hf_cigi3_weather_conditions_response_vert_speed, tvb, offset, 4, cigi_byte_order);
4586     offset += 4;
4587
4588     proto_tree_add_item(tree, hf_cigi3_weather_conditions_response_wind_direction, tvb, offset, 4, cigi_byte_order);
4589     offset += 4;
4590
4591     proto_tree_add_item(tree, hf_cigi3_weather_conditions_response_barometric_pressure, tvb, offset, 4, cigi_byte_order);
4592     offset += 8;
4593
4594     return offset;
4595 }
4596
4597 /* CIGI3 Aerosol Concentration Response */
4598 gint
4599 cigi3_add_aerosol_concentration_response(tvbuff_t *tvb, proto_tree *tree, gint offset)
4600 {
4601     proto_tree_add_item(tree, hf_cigi3_aerosol_concentration_response_request_id, tvb, offset, 1, cigi_byte_order);
4602     offset++;
4603     
4604     proto_tree_add_item(tree, hf_cigi3_aerosol_concentration_response_layer_id, tvb, offset, 1, cigi_byte_order);
4605     offset++;
4606
4607     proto_tree_add_item(tree, hf_cigi3_aerosol_concentration_response_aerosol_concentration, tvb, offset, 4, cigi_byte_order);
4608     offset += 4;
4609
4610     return offset;
4611 }
4612
4613 /* CIGI3 Maritime Surface Conditions Response */
4614 gint
4615 cigi3_add_maritime_surface_conditions_response(tvbuff_t *tvb, proto_tree *tree, gint offset)
4616 {
4617     proto_tree_add_item(tree, hf_cigi3_maritime_surface_conditions_response_request_id, tvb, offset, 1, cigi_byte_order);
4618     offset += 2;
4619
4620     proto_tree_add_item(tree, hf_cigi3_maritime_surface_conditions_response_sea_surface_height, tvb, offset, 4, cigi_byte_order);
4621     offset += 4;
4622
4623     proto_tree_add_item(tree, hf_cigi3_maritime_surface_conditions_response_surface_water_temp, tvb, offset, 4, cigi_byte_order);
4624     offset += 4;
4625
4626     proto_tree_add_item(tree, hf_cigi3_maritime_surface_conditions_response_surface_clarity, tvb, offset, 4, cigi_byte_order);
4627     offset += 4;
4628
4629     return offset;
4630 }
4631
4632 /* CIGI3 Terrestrial Surface Conditions Response */
4633 gint
4634 cigi3_add_terrestrial_surface_conditions_response(tvbuff_t *tvb, proto_tree *tree, gint offset)
4635 {
4636     proto_tree_add_item(tree, hf_cigi3_terrestrial_surface_conditions_response_request_id, tvb, offset, 1, cigi_byte_order);
4637     offset += 2;
4638     
4639     proto_tree_add_item(tree, hf_cigi3_terrestrial_surface_conditions_response_surface_id, tvb, offset, 4, cigi_byte_order);
4640     offset += 4;
4641
4642     return offset;
4643 }
4644
4645 /* CIGI3 Collision Detection Segment Notification */
4646 gint
4647 cigi3_add_collision_detection_segment_notification(tvbuff_t *tvb, proto_tree *tree, gint offset)
4648 {
4649     proto_tree_add_item(tree, hf_cigi3_collision_detection_segment_notification_entity_id, tvb, offset, 2, cigi_byte_order);
4650     offset += 2;
4651     
4652     proto_tree_add_item(tree, hf_cigi3_collision_detection_segment_notification_segment_id, tvb, offset, 1, cigi_byte_order);
4653     offset++;
4654     
4655     proto_tree_add_item(tree, hf_cigi3_collision_detection_segment_notification_type, tvb, offset, 1, cigi_byte_order);
4656     offset++;
4657
4658     proto_tree_add_item(tree, hf_cigi3_collision_detection_segment_notification_contacted_entity_id, tvb, offset, 2, cigi_byte_order);
4659     offset += 2;
4660     
4661     proto_tree_add_item(tree, hf_cigi3_collision_detection_segment_notification_material_code, tvb, offset, 4, cigi_byte_order);
4662     offset += 4;
4663     
4664     proto_tree_add_item(tree, hf_cigi3_collision_detection_segment_notification_intersection_distance, tvb, offset, 4, cigi_byte_order);
4665     offset += 4;
4666
4667     return offset;
4668 }
4669
4670 /* CIGI3 Collision Detection Volume Notification */
4671 gint
4672 cigi3_add_collision_detection_volume_notification(tvbuff_t *tvb, proto_tree *tree, gint offset)
4673 {
4674     proto_tree_add_item(tree, hf_cigi3_collision_detection_volume_notification_entity_id, tvb, offset, 2, cigi_byte_order);
4675     offset += 2;
4676     
4677     proto_tree_add_item(tree, hf_cigi3_collision_detection_volume_notification_volume_id, tvb, offset, 1, cigi_byte_order);
4678     offset++;
4679     
4680     proto_tree_add_item(tree, hf_cigi3_collision_detection_volume_notification_type, tvb, offset, 1, cigi_byte_order);
4681     offset++;
4682
4683     proto_tree_add_item(tree, hf_cigi3_collision_detection_volume_notification_contacted_entity_id, tvb, offset, 2, cigi_byte_order);
4684     offset += 2;
4685     
4686     proto_tree_add_item(tree, hf_cigi3_collision_detection_volume_notification_contacted_volume_id, tvb, offset, 1, cigi_byte_order);
4687     offset += 8;
4688
4689     return offset;
4690 }
4691
4692 /* CIGI3 Animation Stop Notification */
4693 gint
4694 cigi3_add_animation_stop_notification(tvbuff_t *tvb, proto_tree *tree, gint offset)
4695 {
4696     proto_tree_add_item(tree, hf_cigi3_animation_stop_notification_entity_id, tvb, offset, 2, cigi_byte_order);
4697     offset += 6;
4698
4699     return offset;
4700 }
4701
4702 /* CIGI3 Event Notification */
4703 gint
4704 cigi3_add_event_notification(tvbuff_t *tvb, proto_tree *tree, gint offset)
4705 {
4706     proto_tree_add_item(tree, hf_cigi3_event_notification_event_id, tvb, offset, 2, cigi_byte_order);
4707     offset += 2;
4708
4709     proto_tree_add_item(tree, hf_cigi3_event_notification_data_1, tvb, offset, 4, cigi_byte_order);
4710     offset += 4;
4711
4712     proto_tree_add_item(tree, hf_cigi3_event_notification_data_2, tvb, offset, 4, cigi_byte_order);
4713     offset += 4;
4714
4715     proto_tree_add_item(tree, hf_cigi3_event_notification_data_3, tvb, offset, 4, cigi_byte_order);
4716     offset += 4;
4717
4718     return offset;
4719 }
4720
4721 /* CIGI3 Image Generator Message */
4722 gint
4723 cigi3_add_image_generator_message(tvbuff_t *tvb, proto_tree *tree, gint offset)
4724 {
4725     guint8 packet_size = 0;
4726
4727     packet_size = tvb_get_guint8(tvb, offset-1);
4728
4729     /* An image generator packet cannot be less than 4 bytes ( because every cigi packet
4730      * has a packet id (1 byte) and a packet size (1 byte) ). */
4731     if ( packet_size < 4 ) {
4732         THROW(ReportedBoundsError);
4733     }
4734     
4735     proto_tree_add_item(tree, hf_cigi3_image_generator_message_id, tvb, offset, 2, FALSE);
4736     offset += 2;
4737
4738     proto_tree_add_item(tree, hf_cigi3_image_generator_message_message, tvb, offset, packet_size-4, FALSE);
4739     offset += packet_size-4;
4740
4741     return offset;
4742 }
4743
4744
4745 /* Register the protocol with Ethereal */
4746 void
4747 proto_register_cigi(void)
4748 {                 
4749     module_t *cigi_module;
4750
4751     static hf_register_info hf[] = {
4752         /* All Versions of CIGI */
4753         { &hf_cigi_src_port,
4754             { "Source Port", "cigi.srcport",
4755                 FT_UINT16, BASE_DEC, NULL, 0x0,          
4756                 "Source Port", HFILL }
4757         },
4758         { &hf_cigi_dest_port,
4759             { "Destination Port", "cigi.destport",
4760                 FT_UINT16, BASE_DEC, NULL, 0x0,          
4761                 "Destination Port", HFILL }
4762         },
4763         { &hf_cigi_port,
4764             { "Source or Destination Port", "cigi.port",
4765                 FT_UINT16, BASE_DEC, NULL, 0x0,          
4766                 "Source or Destination Port", HFILL }
4767         },
4768
4769         { &hf_cigi_frame_size,
4770             { "Frame Size (bytes)", "cigi.frame_size",
4771                 FT_UINT8, BASE_DEC, NULL, 0x0,          
4772                 "Number of bytes sent with all cigi packets in this frame", HFILL }
4773         },
4774
4775         { &hf_cigi_packet_id,
4776             { "Packet ID", "cigi.packet_id",
4777                 FT_UINT8, BASE_DEC, NULL, 0x0,          
4778                 "Identifies the packet's id", HFILL }
4779         },
4780         { &hf_cigi_packet_size,
4781             { "Packet Size (bytes)", "cigi.packet_size",
4782                 FT_UINT8, BASE_DEC, NULL, 0x0,          
4783                 "Identifies the number of bytes in this type of packet", HFILL }
4784         },
4785         { &hf_cigi_version,
4786             { "CIGI Version", "cigi.version",
4787                 FT_UINT8, BASE_DEC, NULL, 0x0,          
4788                 "Identifies the version of CIGI interface that is currently running on the host", HFILL }
4789         },
4790
4791         { &hf_cigi_unknown,
4792             { "Unknown", "cigi.unknown",
4793                 FT_STRINGZ, BASE_NONE, NULL, 0x0,          
4794                 "Unknown Packet", HFILL }
4795         },
4796
4797         /* CIGI2 */
4798         { &hf_cigi2_packet_id,
4799             { "Packet ID", "cigi.packet_id",
4800                 FT_UINT8, BASE_DEC, VALS(cigi2_packet_id_vals), 0x0,          
4801                 "Identifies the packet's ID", HFILL }
4802         },
4803
4804         /* CIGI3 */
4805         { &hf_cigi3_packet_id,
4806             { "Packet ID", "cigi.packet_id",
4807                 FT_UINT8, BASE_DEC, VALS(cigi3_packet_id_vals), 0x0,          
4808                 "Identifies the packet's ID", HFILL }
4809         },
4810         { &hf_cigi3_byte_swap,
4811             { "Byte Swap", "cigi.byte_swap",
4812                 FT_UINT16, BASE_HEX, VALS(cigi3_byte_swap_vals), 0x0,          
4813                 "Used to determine whether the incoming data should be byte-swapped", HFILL }
4814         },
4815
4816         /* CIGI2 IG Control */
4817         { &hf_cigi2_ig_control,
4818             { "IG Control", "cigi.ig_control",
4819                 FT_STRINGZ, BASE_NONE, NULL, 0x0,          
4820                 "IG Control Packet", HFILL }
4821         },
4822         { &hf_cigi2_ig_control_db_number,
4823             { "Database Number", "cigi.ig_control.db_number",
4824                 FT_INT8, BASE_DEC, NULL, 0x0,          
4825                 "Identifies the number associated with the database requiring loading", HFILL }
4826         },
4827         { &hf_cigi2_ig_control_ig_mode,
4828             { "IG Mode Change Request", "cigi.ig_control.ig_mode",
4829                 FT_UINT8, BASE_DEC, VALS(cigi2_ig_control_ig_mode_vals), 0xc0,
4830                 "Commands the IG to enter its various modes", HFILL }
4831         },
4832         { &hf_cigi2_ig_control_tracking_enable,
4833             { "Tracking Device Enable", "cigi.ig_control.tracking_enable",
4834                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x20,          
4835                 "Identifies the state of an external tracking device", HFILL }
4836         },
4837         { &hf_cigi2_ig_control_boresight,
4838             { "Tracking Device Boresight", "cigi.ig_control.boresight",
4839                 FT_BOOLEAN, 8, TFS(&cigi_boolean_tfs), 0x10,          
4840                 "Used by the host to enable boresight mode", HFILL }
4841         },
4842         { &hf_cigi2_ig_control_frame_ctr,
4843             { "Frame Counter", "cigi.ig_control.frame_ctr",
4844                 FT_UINT32, BASE_DEC, NULL, 0x0,          
4845                 "Identifies a particular frame", HFILL }
4846         },
4847         { &hf_cigi2_ig_control_time_tag,
4848             { "Timing Value (µsec)", "cigi.ig_control.time_tag",
4849                 FT_FLOAT, BASE_DEC, NULL, 0x0,          
4850                 "Identifies synchronous operation", HFILL }
4851         },
4852
4853         /* CIGI3 IG Control */
4854         { &hf_cigi3_ig_control,
4855             { "IG Control", "cigi.ig_control",
4856                 FT_STRINGZ, BASE_NONE, NULL, 0x0,          
4857                 "IG Control Packet", HFILL }
4858         },
4859         { &hf_cigi3_ig_control_db_number,
4860             { "Database Number", "cigi.ig_control.db_number",
4861                 FT_INT8, BASE_DEC, NULL, 0x0,          
4862                 "Used to initiate a database load on the IG", HFILL }
4863         },
4864         { &hf_cigi3_ig_control_ig_mode,
4865             { "IG Mode", "cigi.ig_control.ig_mode",
4866                 FT_UINT8, BASE_DEC, VALS(cigi3_ig_control_ig_mode_vals), 0x03,
4867                 "Dictates the IG's operational mode", HFILL }
4868         },
4869         { &hf_cigi3_ig_control_timestamp_valid,
4870             { "Timestamp Valid", "cigi.ig_control.timestamp_valid",
4871                 FT_BOOLEAN, 8, TFS(&cigi_valid_tfs), 0x04,          
4872                 "Indicates whether the timestamp contains a valid value", HFILL }
4873         },
4874         { &hf_cigi3_ig_control_frame_ctr,
4875             { "Frame Counter", "cigi.ig_control.frame_ctr",
4876                 FT_UINT32, BASE_DEC, NULL, 0x0,          
4877                 "Contains a number that identifying the frame", HFILL }
4878         },
4879         { &hf_cigi3_ig_control_timestamp,
4880             { "Timestamp (µs)", "cigi.ig_control.timestamp",
4881                 FT_UINT32, BASE_DEC, NULL, 0x0,          
4882                 "Indicates the number of 10µs since some initial reference time", HFILL }
4883         },
4884
4885         /* CIGI2 Entity Control */
4886         { &hf_cigi2_entity_control,
4887             { "Entity Control", "cigi.entity_control",
4888                 FT_STRINGZ, BASE_NONE, NULL, 0x0,          
4889                 "Entity Control Packet", HFILL }
4890         },
4891         { &hf_cigi2_entity_control_entity_id,
4892             { "Entity ID", "cigi.entity_control.entity_id",
4893                 FT_UINT16, BASE_DEC, NULL, 0x0,
4894                 "Identifies the entity motion system", HFILL }
4895         },
4896         { &hf_cigi2_entity_control_entity_state,
4897             { "Entity State", "cigi.entity_control.entity_state",
4898                 FT_UINT8, BASE_DEC, VALS(cigi2_entity_control_entity_state_vals), 0xc0,
4899                 "Identifies the entity's geometry state", HFILL }
4900         },
4901         { &hf_cigi2_entity_control_attach_state,
4902             { "Attach State", "cigi.entity_control.attach_state",
4903                 FT_BOOLEAN, 8, TFS(&cigi2_entity_control_attach_state_tfs), 0x20,
4904                 "Identifies whether the entity should be attach as a child to a parent", HFILL }
4905         },
4906         { &hf_cigi2_entity_control_collision_detect,
4907             { "Collision Detection Request", "cigi.entity_control.collision_detect",
4908                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x10,
4909                 "Identifies if collision detection is enabled for the entity", HFILL }
4910         },
4911         { &hf_cigi2_entity_control_effect_state,
4912             { "Effect Animation State", "cigi.entity_control.effect_state",
4913                 FT_UINT8, BASE_DEC, VALS(cigi2_entity_control_effect_state_vals), 0x0c,
4914                 "Identifies the animation state of a special effect", HFILL }
4915         },
4916         { &hf_cigi2_entity_control_type,
4917             { "Entity Type", "cigi.entity_control.type",
4918                 FT_UINT16, BASE_DEC, NULL, 0x0,
4919                 "Identifies the type of the entity", HFILL }
4920         },
4921         { &hf_cigi2_entity_control_parent_id,
4922             { "Parent Entity ID", "cigi.entity_control.parent_id",
4923                 FT_UINT16, BASE_DEC, NULL, 0x0,
4924                 "Identifies the parent to which the entity should be attached", HFILL }
4925         },
4926         { &hf_cigi2_entity_control_opacity,
4927             { "Percent Opacity", "cigi.entity_control.opacity",
4928                 FT_FLOAT, BASE_DEC, NULL, 0x0,
4929                 "Specifies the degree of opacity of the entity", HFILL }
4930         },
4931         { &hf_cigi2_entity_control_internal_temp,
4932             { "Internal Temperature (°C)", "cigi.entity_control.internal_temp",
4933                 FT_FLOAT, BASE_DEC, NULL, 0x0,
4934                 "Specifies the internal temperature of the entity in degrees Celsius", HFILL }
4935         },
4936         { &hf_cigi2_entity_control_roll,
4937             { "Roll (°)", "cigi.entity_control.roll",
4938                 FT_FLOAT, BASE_DEC, NULL, 0x0,
4939                 "Identifies the roll angle of the entity in degrees", HFILL }
4940         },
4941         { &hf_cigi2_entity_control_pitch,
4942             { "Pitch (°)", "cigi.entity_control",
4943                 FT_FLOAT, BASE_DEC, NULL, 0x0,
4944                 "Identifies the pitch of the entity in degrees", HFILL }
4945         },
4946         { &hf_cigi2_entity_control_heading,
4947             { "Heading (°)", "cigi.entity_control",
4948                 FT_FLOAT, BASE_DEC, NULL, 0x0,
4949                 "Identifies the heading of the entity in degrees", HFILL }
4950         },
4951         { &hf_cigi2_entity_control_alt,
4952             { "Altitude (m)", "cigi.entity_control.alt",
4953                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
4954                 "Identifies the altitude position of the reference point of the entity in meters", HFILL }
4955         },
4956         { &hf_cigi2_entity_control_lat,
4957             { "Latitude (°)", "cigi.entity_control.lat",
4958                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
4959                 "Identifies the latitude position of the reference point of the entity in degrees", HFILL }
4960         },
4961         { &hf_cigi2_entity_control_lon,
4962             { "Longitude (°)", "cigi.entity_control.lon",
4963                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
4964                 "Identifies the longitude position of the reference point of the entity in degrees", HFILL }
4965         },
4966
4967         /* CIGI3 Entity Control */
4968         { &hf_cigi3_entity_control,
4969             { "Entity Control", "cigi.entity_control",
4970                 FT_STRINGZ, BASE_NONE, NULL, 0x0,          
4971                 "Entity Control Packet", HFILL }
4972         },
4973         { &hf_cigi3_entity_control_entity_id,
4974             { "Entity ID", "cigi.entity_control.entity_id",
4975                 FT_UINT16, BASE_DEC, NULL, 0x0,          
4976                 "Specifies the entity to which this packet is applied", HFILL }
4977         },
4978         { &hf_cigi3_entity_control_entity_state,
4979             { "Entity State", "cigi.entity_control.entity_state",
4980                 FT_UINT8, BASE_DEC, VALS(cigi3_entity_control_entity_state_vals), 0x03,         
4981                 "Specifies whether the entity should be active or destroyed", HFILL }
4982         },
4983         { &hf_cigi3_entity_control_attach_state,
4984             { "Attach State", "cigi.entity_control.attach_state",
4985                 FT_BOOLEAN, 8, TFS(&cigi3_entity_control_attach_state_tfs), 0x04,          
4986                 "Specifies whether the entity should be attached as a child to a parent", HFILL }
4987         },
4988         { &hf_cigi3_entity_control_collision_detection_request,
4989             { "Collision Detection Request", "cigi.entity_control.coll_det_request",
4990                 FT_BOOLEAN, 8, TFS(&cigi3_entity_control_collision_detection_request_tfs), 0x08,          
4991                 "Determines whether any collision detection segments and volumes associated with this entity are used as the source in collision testing", HFILL }
4992         },
4993         { &hf_cigi3_entity_control_inherit_alpha,
4994             { "Inherit Alpha", "cigi.entity_control.inherit_alpha",
4995                 FT_BOOLEAN, 8, TFS(&cigi3_entity_control_inherit_alpha_tfs), 0x10,          
4996                 "Specifies whether the entity's alpha is combined with the apparent alpha of its parent", HFILL }
4997         },
4998         { &hf_cigi3_entity_control_ground_ocean_clamp,
4999             { "Ground/Ocean Clamp", "cigi.entity_control.ground_ocean_clamp",
5000                 FT_UINT8, BASE_DEC, VALS(cigi3_entity_control_ground_ocean_clamp_vals), 0x60,          
5001                 "Specifies whether the entity should be clamped to the ground or water surface", HFILL }
5002         },
5003         { &hf_cigi3_entity_control_animation_direction,
5004             { "Animation Direction", "cigi.entity_control.animation_dir",
5005                 FT_BOOLEAN, 8, TFS(&cigi3_entity_control_animation_direction_tfs), 0x01,          
5006                 "Specifies the direction in which an animation plays", HFILL }
5007         },
5008         { &hf_cigi3_entity_control_animation_loop_mode,
5009             { "Animation Loop Mode", "cigi.entity_control.animation_loop_mode",
5010                 FT_BOOLEAN, 8, TFS(&cigi3_entity_control_animation_loop_mode_tfs), 0x02,          
5011                 "Specifies whether an animation should be a one-shot", HFILL }
5012         },
5013         { &hf_cigi3_entity_control_animation_state,
5014             { "Animation State", "cigi.entity_control.animation_state",
5015                 FT_UINT8, BASE_DEC, VALS(cigi3_entity_control_animation_state_vals), 0x0c,          
5016                 "Specifies the state of an animation", HFILL }
5017         },
5018         { &hf_cigi3_entity_control_alpha,
5019             { "Alpha", "cigi.entity_control.alpha",
5020                 FT_UINT8, BASE_DEC, NULL, 0x0,          
5021                 "Specifies the explicit alpha to be applied to the entity's geometry", HFILL }
5022         },
5023         { &hf_cigi3_entity_control_entity_type,
5024             { "Entity Type", "cigi.entity_control.entity_type",
5025                 FT_UINT16, BASE_DEC, NULL, 0x0,          
5026                 "Specifies the type for the entity", HFILL }
5027         },
5028         { &hf_cigi3_entity_control_parent_id,
5029             { "Parent ID", "cigi.entity_control.parent_id",
5030                 FT_UINT16, BASE_DEC, NULL, 0x0,          
5031                 "Specifies the parent for the entity", HFILL }
5032         },
5033         { &hf_cigi3_entity_control_roll,
5034             { "Roll (°)", "cigi.entity_control.roll",
5035                 FT_FLOAT, BASE_DEC, NULL, 0x0,          
5036                 "Specifies the roll angle of the entity", HFILL }
5037         },
5038         { &hf_cigi3_entity_control_pitch,
5039             { "Pitch (°)", "cigi.entity_control.pitch",
5040                 FT_FLOAT, BASE_DEC, NULL, 0x0,          
5041                 "Specifies the pitch angle of the entity", HFILL }
5042         },
5043         { &hf_cigi3_entity_control_yaw,
5044             { "Yaw (°)", "cigi.entity_control.yaw",
5045                 FT_FLOAT, BASE_DEC, NULL, 0x0,          
5046                 "Specifies the instantaneous heading of the entity", HFILL }
5047         },
5048         { &hf_cigi3_entity_control_lat_xoff,
5049             { "Latitude (°)/X Offset (m)", "cigi.entity_control.lat_xoff",
5050                 FT_DOUBLE, BASE_DEC, NULL, 0x0,          
5051                 "Specifies the entity's geodetic latitude or the distance from the parent's reference point along its parent's X axis", HFILL }
5052         },
5053         { &hf_cigi3_entity_control_lon_yoff,
5054             { "Longitude (°)/Y Offset (m)", "cigi.entity_control.lon_yoff",
5055                 FT_DOUBLE, BASE_DEC, NULL, 0x0,          
5056                 "Specifies the entity's geodetic longitude or the distance from the parent's reference point along its parent's Y axis", HFILL }
5057         },
5058         { &hf_cigi3_entity_control_alt_zoff,
5059             { "Altitude (m)/Z Offset (m)", "cigi.entity_control.alt_zoff",
5060                 FT_DOUBLE, BASE_DEC, NULL, 0x0,          
5061                 "Specifies the entity's altitude or the distance from the parent's reference point along its parent's Z axis", HFILL }
5062         },
5063
5064         /* CIGI3 Conformal Clamped Entity Control */
5065         { &hf_cigi3_conformal_clamped_entity_control,
5066             { "Conformal Clamped Entity Control", "cigi.conformal_clamped_entity_control",
5067                 FT_STRINGZ, BASE_NONE, NULL, 0x0,          
5068                 "Conformal Clamped Entity Control Packet", HFILL }
5069         },
5070         { &hf_cigi3_conformal_clamped_entity_control_entity_id,
5071             { "Entity ID", "cigi.conformal_clamped_entity_control.entity_id",
5072                 FT_UINT16, BASE_DEC, NULL, 0x0,          
5073                 "Specifies the entity to which this packet is applied", HFILL }
5074         },
5075         { &hf_cigi3_conformal_clamped_entity_control_yaw,
5076             { "Yaw (°)", "cigi.conformal_clamped_entity_control.yaw",
5077                 FT_FLOAT, BASE_DEC, NULL, 0x0,          
5078                 "Specifies the instantaneous heading of the entity", HFILL }
5079         },
5080         { &hf_cigi3_conformal_clamped_entity_control_lat,
5081             { "Latitude (°)", "cigi.conformal_clamped_entity_control.lat",
5082                 FT_DOUBLE, BASE_DEC, NULL, 0x0,          
5083                 "Specifies the entity's geodetic latitude", HFILL }
5084         },
5085         { &hf_cigi3_conformal_clamped_entity_control_lon,
5086             { "Longitude (°)", "cigi.conformal_clamped_entity_control.lon",
5087                 FT_DOUBLE, BASE_DEC, NULL, 0x0,          
5088                 "Specifies the entity's geodetic longitude", HFILL }
5089         },
5090
5091         /* CIGI2 Component Control */
5092         { &hf_cigi2_component_control,
5093             { "Component Control", "cigi.component_control",
5094                 FT_STRINGZ, BASE_NONE, NULL, 0x0,          
5095                 "Component Control Packet", HFILL }
5096         },
5097         { &hf_cigi2_component_control_instance_id,
5098             { "Instance ID", "cigi.component_control.instance_id",
5099                 FT_UINT16, BASE_DEC, NULL, 0x0,
5100                 "Identifies the instance of the a class the component being controlled belongs to", HFILL }
5101         },
5102         { &hf_cigi2_component_control_component_class,
5103             { "Component Class", "cigi.component_control.component_class",
5104                 FT_UINT8, BASE_DEC, VALS(cigi2_component_control_component_class_vals), 0x0,
5105                 "Identifies the class the component being controlled is in", HFILL }
5106         },
5107         { &hf_cigi2_component_control_component_id,
5108             { "Component ID", "cigi.component_control.component_id",
5109                 FT_UINT16, BASE_DEC, NULL, 0x0,
5110                 "Identifies the component of a component class and instance ID this packet will be applied to", HFILL }
5111         },
5112         { &hf_cigi2_component_control_component_state,
5113             { "Component State", "cigi.component_control.component_state",
5114                 FT_UINT16, BASE_DEC, NULL, 0x0,
5115                 "Identifies the commanded state of a component", HFILL }
5116         },
5117         { &hf_cigi2_component_control_component_val1,
5118             { "Component Value 1", "cigi.component_control.component_val1",
5119                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5120                 "Identifies a continuous value to be applied to a component", HFILL }
5121         },
5122         { &hf_cigi2_component_control_component_val2,
5123             { "Component Value 2", "cigi.component_control.component_val2",
5124                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5125                 "Identifies a continuous value to be applied to a component", HFILL }
5126         },
5127
5128         /* CIGI3 Component Control */
5129         { &hf_cigi3_component_control,
5130             { "Component Control", "cigi.component_control",
5131                 FT_STRINGZ, BASE_NONE, NULL, 0x0,          
5132                 "Component Control Packet", HFILL }
5133         },
5134         { &hf_cigi3_component_control_component_id,
5135             { "Component ID", "cigi.component_control.component_id",
5136                 FT_UINT16, BASE_DEC, NULL, 0x0,          
5137                 "Identifies the component to which the data in this packet should be applied", HFILL }
5138         },
5139         { &hf_cigi3_component_control_instance_id,
5140             { "Instance ID", "cigi.component_control.instance_id",
5141                 FT_UINT16, BASE_DEC, NULL, 0x0,          
5142                 "Identifies the object to which the component belongs", HFILL }
5143         },
5144         { &hf_cigi3_component_control_component_class,
5145             { "Component Class", "cigi.component_control.component_class",
5146                 FT_UINT8, BASE_DEC, VALS(cigi3_component_control_component_class_vals), 0x0f,          
5147                 "Identifies the type of object to which the Instance ID parameter refers", HFILL }
5148         },
5149         { &hf_cigi3_component_control_component_state,
5150             { "Component State", "cigi.component_control.component_state",
5151                 FT_UINT8, BASE_DEC, NULL, 0x0,          
5152                 "Specifies a discrete state for the component", HFILL }
5153         },
5154         { &hf_cigi3_component_control_data_1,
5155             { "Component Data 1", "cigi.component_control.data_1",
5156                 FT_BYTES, BASE_NONE, NULL, 0x0,          
5157                 "User-defined component data", HFILL }
5158         },
5159         { &hf_cigi3_component_control_data_2,
5160             { "Component Data 2", "cigi.component_control.data_2",
5161                 FT_BYTES, BASE_NONE, NULL, 0x0,          
5162                 "User-defined component data", HFILL }
5163         },
5164         { &hf_cigi3_component_control_data_3,
5165             { "Component Data 3", "cigi.component_control.data_3",
5166                 FT_BYTES, BASE_NONE, NULL, 0x0,          
5167                 "User-defined component data", HFILL }
5168         },
5169         { &hf_cigi3_component_control_data_4,
5170             { "Component Data 4", "cigi.component_control.data_4",
5171                 FT_BYTES, BASE_NONE, NULL, 0x0,          
5172                 "User-defined component data", HFILL }
5173         },
5174         { &hf_cigi3_component_control_data_5,
5175             { "Component Data 5", "cigi.component_control.data_5",
5176                 FT_BYTES, BASE_NONE, NULL, 0x0,          
5177                 "User-defined component data", HFILL }
5178         },
5179         { &hf_cigi3_component_control_data_6,
5180             { "Component Data 6", "cigi.component_control.data_6",
5181                 FT_BYTES, BASE_NONE, NULL, 0x0,          
5182                 "User-defined component data", HFILL }
5183         },
5184
5185         /* CIGI3 Short Component Control */
5186         { &hf_cigi3_short_component_control,
5187             { "Short Component Control", "cigi.short_component_control",
5188                 FT_STRINGZ, BASE_NONE, NULL, 0x0,          
5189                 "Short Component Control Packet", HFILL }
5190         },
5191         { &hf_cigi3_short_component_control_component_id,
5192             { "Component ID", "cigi.short_component_control.component_id",
5193                 FT_UINT16, BASE_DEC, NULL, 0x0,          
5194                 "Identifies the component to which the data in this packet should be applied", HFILL }
5195         },
5196         { &hf_cigi3_short_component_control_instance_id,
5197             { "Instance ID", "cigi.short_component_control.instance_id",
5198                 FT_UINT16, BASE_DEC, NULL, 0x0,          
5199                 "Identifies the object to which the component belongs", HFILL }
5200         },
5201         { &hf_cigi3_short_component_control_component_class,
5202             { "Component Class", "cigi.short_component_control.component_class",
5203                 FT_UINT8, BASE_DEC, VALS(cigi3_short_component_control_component_class_vals), 0x0f,          
5204                 "Identifies the type of object to which the Instance ID parameter refers", HFILL }
5205         },
5206         { &hf_cigi3_short_component_control_component_state,
5207             { "Component State", "cigi.short_component_control.component_state",
5208                 FT_UINT8, BASE_DEC, NULL, 0x0,          
5209                 "Specifies a discrete state for the component", HFILL }
5210         },
5211         { &hf_cigi3_short_component_control_data_1,
5212             { "Component Data 1", "cigi.short_component_control.data_1",
5213                 FT_BYTES, BASE_NONE, NULL, 0x0,          
5214                 "User-defined component data", HFILL }
5215         },
5216         { &hf_cigi3_short_component_control_data_2,
5217             { "Component Data 2", "cigi.short_component_control.data_2",
5218                 FT_BYTES, BASE_NONE, NULL, 0x0,          
5219                 "User-defined component data", HFILL }
5220         },
5221
5222         /* CIGI2 Articulated Parts Control */
5223         { &hf_cigi2_articulated_parts_control,
5224             { "Articulated Parts Control", "cigi.art_part_control",
5225                 FT_STRINGZ, BASE_NONE, NULL, 0x0,          
5226                 "Articulated Parts Control Packet", HFILL }
5227         },
5228         { &hf_cigi2_articulated_parts_control_entity_id,
5229             { "Entity ID", "cigi.art_part_control.entity_id",
5230                 FT_UINT16, BASE_DEC, NULL, 0x0,
5231                 "Identifies the entity to which this data packet will be applied", HFILL }
5232         },
5233         { &hf_cigi2_articulated_parts_control_part_id,
5234             { "Articulated Part ID", "cigi.art_part_control.part_id",
5235                 FT_UINT8, BASE_DEC, NULL, 0x0,
5236                 "Identifies which articulated part is controlled with this data packet", HFILL }
5237         },
5238         { &hf_cigi2_articulated_parts_control_part_state,
5239             { "Articulated Part State", "cigi.art_part_control.part_state",
5240                 FT_BOOLEAN, 8, TFS(&cigi_active_tfs), 0x80,
5241                 "Indicates whether an articulated part is to be shown in the display", HFILL }
5242         },
5243         { &hf_cigi2_articulated_parts_control_xoff_enable,
5244             { "X Offset Enable", "cigi.art_part_control.xoff_enable",
5245                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x40,
5246                 "Identifies whether the articulated part x offset in this data packet is manipulated from the host", HFILL }
5247         },
5248         { &hf_cigi2_articulated_parts_control_yoff_enable,
5249             { "Y Offset Enable", "cigi.art_part_control.yoff_enable",
5250                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x20,
5251                 "Identifies whether the articulated part y offset in this data packet is manipulated from the host", HFILL }
5252         },
5253         { &hf_cigi2_articulated_parts_control_zoff_enable,
5254             { "Z Offset Enable", "cigi.art_part_control.zoff_enable",
5255                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x10,
5256                 "Identifies whether the articulated part z offset in this data packet is manipulated from the host", HFILL }
5257         },
5258         { &hf_cigi2_articulated_parts_control_roll_enable,
5259             { "Roll Enable", "cigi.art_part_control.roll_enable",
5260                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x08,
5261                 "Identifies whether the articulated part roll enable in this data packet is manipulated from the host", HFILL }
5262         },
5263         { &hf_cigi2_articulated_parts_control_pitch_enable,
5264             { "Pitch Enable", "cigi.art_part_control.pitch_enable",
5265                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x04,
5266                 "Identifies whether the articulated part pitch enable in this data packet is manipulated from the host", HFILL }
5267         },
5268         { &hf_cigi2_articulated_parts_control_yaw_enable,
5269             { "Yaw Enable", "cigi.art_part_control.yaw_enable",
5270                 FT_UINT8, BASE_DEC, NULL, 0x02,
5271                 "Identifies whether the articulated part yaw enable in this data packet is manipulated from the host", HFILL }
5272         },
5273         { &hf_cigi2_articulated_parts_control_x_offset,
5274             { "X Offset (m)", "cigi.art_part_control.x_offset",
5275                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5276                 "Identifies the distance along the X axis by which the articulated part should be moved", HFILL }
5277         },
5278         { &hf_cigi2_articulated_parts_control_y_offset,
5279             { "Y Offset (m)", "cigi.art_part_control.y_offset",
5280                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5281                 "Identifies the distance along the Y axis by which the articulated part should be moved", HFILL }
5282         },
5283         { &hf_cigi2_articulated_parts_control_z_offset,
5284             { "Z Offset (m)", "cigi.art_part_control.z_offset",
5285                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5286                 "Identifies the distance along the Z axis by which the articulated part should be moved", HFILL }
5287         },
5288         { &hf_cigi2_articulated_parts_control_roll,
5289             { "Roll (°)", "cigi.art_part_control.roll",
5290                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5291                 "Specifies the roll of this part with respect to the submodel coordinate system", HFILL }
5292         },
5293         { &hf_cigi2_articulated_parts_control_pitch,
5294             { "Pitch (°)", "cigi.art_part_control.pitch",
5295                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5296                 "Specifies the pitch of this part with respect to the submodel coordinate system", HFILL }
5297         },
5298         { &hf_cigi2_articulated_parts_control_yaw,
5299             { "Yaw (°)", "cigi.art_part_control.yaw",
5300                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5301                 "Specifies the yaw of this part with respect to the submodel coordinate system", HFILL }
5302         },
5303
5304         /* CIGI3 Articulated Part Control */
5305         { &hf_cigi3_articulated_part_control,
5306             { "Articulated Part Control", "cigi.art_part_control",
5307                 FT_STRINGZ, BASE_NONE, NULL, 0x0,          
5308                 "Articulated Part Control Packet", HFILL }
5309         },
5310         { &hf_cigi3_articulated_part_control_entity_id,
5311             { "Entity ID", "cigi.art_part_control.entity_id",
5312                 FT_UINT16, BASE_DEC, NULL, 0x0,          
5313                 "Specifies the entity to which the articulated part belongs", HFILL }
5314         },
5315         { &hf_cigi3_articulated_part_control_part_id,
5316             { "Articulated Part ID", "cigi.art_part_control.part_id",
5317                 FT_UINT8, BASE_DEC, NULL, 0x0,          
5318                 "Specifies the articulated part to which the data in this packet should be applied", HFILL }
5319         },
5320         { &hf_cigi3_articulated_part_control_part_enable,
5321             { "Articulated Part Enable", "cigi.art_part_control.part_enable",
5322                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x01,          
5323                 "Determines whether the articulated part submodel should be enabled or disabled within the scene graph", HFILL }
5324         },
5325         { &hf_cigi3_articulated_part_control_xoff_enable,
5326             { "X Offset Enable", "cigi.art_part_control.xoff_enable",
5327                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x02,          
5328                 "Determines whether the X Offset parameter of the current packet should be applied to the articulated part", HFILL }
5329         },
5330         { &hf_cigi3_articulated_part_control_yoff_enable,
5331             { "Y Offset Enable", "cigi.art_part_control.yoff_enable",
5332                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x04,          
5333                 "Determines whether the Y Offset parameter of the current packet should be applied to the articulated part", HFILL }
5334         },
5335         { &hf_cigi3_articulated_part_control_zoff_enable,
5336             { "Z Offset Enable", "cigi.art_part_control.zoff_enable",
5337                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x08,          
5338                 "Determines whether the Z Offset parameter of the current packet should be applied to the articulated part", HFILL }
5339         },
5340         { &hf_cigi3_articulated_part_control_roll_enable,
5341             { "Roll Enable", "cigi.art_part_control.roll_enable",
5342                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x10,          
5343                 "Determines whether the Roll parameter of the current packet should be applied to the articulated part", HFILL }
5344         },
5345         { &hf_cigi3_articulated_part_control_pitch_enable,
5346             { "Pitch Enable", "cigi.art_part_control.pitch_enable",
5347                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x20,          
5348                 "Determines whether the Pitch parameter of the current packet should be applied to the articulated part", HFILL }
5349         },
5350         { &hf_cigi3_articulated_part_control_yaw_enable,
5351             { "Yaw Enable", "cigi.art_part_control.yaw_enable",
5352                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x40,          
5353                 "Determines whether the Yaw parameter of the current packet should be applied to the articulated part", HFILL }
5354         },
5355         { &hf_cigi3_articulated_part_control_xoff,
5356             { "X Offset (m)", "cigi.art_part_control.xoff",
5357                 FT_FLOAT, BASE_DEC, NULL, 0x0,          
5358                 "Specifies the distance of the articulated part along its X axis", HFILL }
5359         },
5360         { &hf_cigi3_articulated_part_control_yoff,
5361             { "Y Offset (m)", "cigi.art_part_control.yoff",
5362                 FT_FLOAT, BASE_DEC, NULL, 0x0,          
5363                 "Specifies the distance of the articulated part along its Y axis", HFILL }
5364         },
5365         { &hf_cigi3_articulated_part_control_zoff,
5366             { "Z Offset (m)", "cigi.art_part_control.zoff",
5367                 FT_FLOAT, BASE_DEC, NULL, 0x0,          
5368                 "Specifies the distance of the articulated part along its Z axis", HFILL }
5369         },
5370         { &hf_cigi3_articulated_part_control_roll,
5371             { "Roll (°)", "cigi.art_part_control.roll",
5372                 FT_FLOAT, BASE_DEC, NULL, 0x0,          
5373                 "Specifies the angle of rotation of the articulated part submodel about its X axis after yaw and pitch have been applied", HFILL }
5374         },
5375         { &hf_cigi3_articulated_part_control_pitch,
5376             { "Pitch (°)", "cigi.art_part_control.pitch",
5377                 FT_FLOAT, BASE_DEC, NULL, 0x0,          
5378                 "Specifies the angle of rotation of the articulated part submodel about its Y axis after yaw has been applied", HFILL }
5379         },
5380         { &hf_cigi3_articulated_part_control_yaw,
5381             { "Yaw (°)", "cigi.art_part_control.yaw",
5382                 FT_FLOAT, BASE_DEC, NULL, 0x0,          
5383                 "Specifies the angle of rotation of the articulated part about its Z axis", HFILL }
5384         },
5385
5386         /* CIGI3 Short Articulated Part Control */
5387         { &hf_cigi3_short_articulated_part_control,
5388             { "Short Articulated Part Control", "cigi.short_art_part_control",
5389                 FT_STRINGZ, BASE_NONE, NULL, 0x0,          
5390                 "Short Articulated Part Control Packet", HFILL }
5391         },
5392         { &hf_cigi3_short_articulated_part_control_entity_id,
5393             { "Entity ID", "cigi.short_art_part_control.entity_id",
5394                 FT_UINT16, BASE_DEC, NULL, 0x0,          
5395                 "Specifies the entity to which the articulated part(s) belongs", HFILL }
5396         },
5397         { &hf_cigi3_short_articulated_part_control_part_id_1,
5398             { "Articulated Part ID 1", "cigi.short_art_part_control.part_id_1",
5399                 FT_UINT8, BASE_DEC, NULL, 0x0,          
5400                 "Specifies an articulated part to which the data in this packet should be applied", HFILL }
5401         },
5402         { &hf_cigi3_short_articulated_part_control_part_id_2,
5403             { "Articulated Part ID 2", "cigi.short_art_part_control.part_id_2",
5404                 FT_UINT8, BASE_DEC, NULL, 0x0,          
5405                 "Specifies an articulated part to which the data in this packet should be applied", HFILL }
5406         },
5407         { &hf_cigi3_short_articulated_part_control_dof_select_1,
5408             { "DOF Select 1", "cigi.short_art_part_control.dof_select_1",
5409                 FT_UINT8, BASE_DEC, VALS(cigi3_short_articulated_part_control_dof_select_vals), 0x07,          
5410                 "Specifies the degree of freedom to which the value of DOF 1 is applied", HFILL }
5411         },
5412         { &hf_cigi3_short_articulated_part_control_dof_select_2,
5413             { "DOF Select 2", "cigi.short_art_part_control.dof_select_2",
5414                 FT_UINT8, BASE_DEC, VALS(cigi3_short_articulated_part_control_dof_select_vals), 0x38,          
5415                 "Specifies the degree of freedom to which the value of DOF 2 is applied", HFILL }
5416         },
5417         { &hf_cigi3_short_articulated_part_control_part_enable_1,
5418             { "Articulated Part Enable 1", "cigi.short_art_part_control.part_enable_1",
5419                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x40,          
5420                 "Determines whether the articulated part submodel specified by Articulated Part ID 1 should be enabled or disabled within the scene graph", HFILL }
5421         },
5422         { &hf_cigi3_short_articulated_part_control_part_enable_2,
5423             { "Articulated Part Enable 2", "cigi.short_art_part_control.part_enable_2",
5424                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x80,          
5425                 "Determines whether the articulated part submodel specified by Articulated Part ID 2 should be enabled or disabled within the scene graph", HFILL }
5426         },
5427         { &hf_cigi3_short_articulated_part_control_dof_1,
5428             { "DOF 1", "cigi.short_art_part_control.dof_1",
5429                 FT_FLOAT, BASE_DEC, NULL, 0x0,          
5430                 "Specifies either an offset or an angular position for the part identified by Articulated Part ID 1", HFILL }
5431         },
5432         { &hf_cigi3_short_articulated_part_control_dof_2,
5433             { "DOF 2", "cigi.short_art_part_control.dof_2",
5434                 FT_FLOAT, BASE_DEC, NULL, 0x0,          
5435                 "Specifies either an offset or an angular position for the part identified by Articulated Part ID 2", HFILL }
5436         },
5437
5438         /* CIGI2 Rate Control */
5439         { &hf_cigi2_rate_control,
5440             { "Rate Control", "cigi.rate_control",
5441                 FT_STRINGZ, BASE_NONE, NULL, 0x0,          
5442                 "Rate Control Packet", HFILL }
5443         },
5444         { &hf_cigi2_rate_control_entity_id,
5445             { "Entity ID", "cigi.rate_control.entity_id",
5446                 FT_UINT16, BASE_DEC, NULL, 0x0,
5447                 "Specifies the entity to which this data packet will be applied", HFILL }
5448         },
5449         { &hf_cigi2_rate_control_part_id,
5450             { "Articulated Part ID", "cigi.rate_control.part_id",
5451                 FT_INT8, BASE_DEC, NULL, 0x0,
5452                 "Identifies which articulated part is controlled with this data packet", HFILL }
5453         },
5454         { &hf_cigi2_rate_control_x_rate,
5455             { "X Linear Rate (m/s)", "cigi.rate_control.x_rate",
5456                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5457                 "Specifies the x component of the velocity vector for the entity being represented", HFILL }
5458         },
5459         { &hf_cigi2_rate_control_y_rate,
5460             { "Y Linear Rate (m/s)", "cigi.rate_control.y_rate",
5461                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5462                 "Specifies the y component of the velocity vector for the entity being represented", HFILL }
5463         },
5464         { &hf_cigi2_rate_control_z_rate,
5465             { "Z Linear Rate (m/s)", "cigi.rate_control.z_rate",
5466                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5467                 "Specifies the z component of the velocity vector for the entity being represented", HFILL }
5468         },
5469         { &hf_cigi2_rate_control_roll_rate,
5470             { "Roll Angular Rate (°/s)", "cigi.rate_control.roll_rate",
5471                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5472                 "Specifies the roll angular rate for the entity being represented", HFILL }
5473         },
5474         { &hf_cigi2_rate_control_pitch_rate,
5475             { "Pitch Angular Rate (°/s)", "cigi.rate_control.pitch_rate",
5476                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5477                 "Specifies the pitch angular rate for the entity being represented", HFILL }
5478         },
5479         { &hf_cigi2_rate_control_yaw_rate,
5480             { "Yaw Angular Rate (°/s)", "cigi.rate_control.yaw_rate",
5481                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5482                 "Specifies the yaw angular rate for the entity being represented", HFILL }
5483         },
5484
5485         /* CIGI3 Rate Control */
5486         { &hf_cigi3_rate_control,
5487             { "Rate Control", "cigi.rate_control",
5488                 FT_STRINGZ, BASE_NONE, NULL, 0x0,          
5489                 "Rate Control Packet", HFILL }
5490         },
5491         { &hf_cigi3_rate_control_entity_id,
5492             { "Entity ID", "cigi.rate_control.entity_id",
5493                 FT_UINT16, BASE_DEC, NULL, 0x0,          
5494                 "Specifies the entity to which the rate should be applied", HFILL }
5495         },
5496         { &hf_cigi3_rate_control_part_id,
5497             { "Articulated Part ID", "cigi.rate_control.part_id",
5498                 FT_UINT8, BASE_DEC, NULL, 0x0,          
5499                 "Specifies the articulated part to which the rate should be applied", HFILL }
5500         },
5501         { &hf_cigi3_rate_control_apply_to_part,
5502             { "Apply to Articulated Part", "cigi.rate_control.apply_to_part",
5503                 FT_BOOLEAN, 8, TFS(&cigi_boolean_tfs), 0x01,          
5504                 "Determines whether the rate is applied to the articulated part specified by the Articulated Part ID parameter", HFILL }
5505         },
5506         { &hf_cigi3_rate_control_x_rate,
5507             { "X Linear Rate (m/s)", "cigi.rate_control.x_rate",
5508                 FT_FLOAT, BASE_DEC, NULL, 0x0,          
5509                 "Specifies the X component of a linear velocity vector", HFILL }
5510         },
5511         { &hf_cigi3_rate_control_y_rate,
5512             { "Y Linear Rate (m/s)", "cigi.rate_control.y_rate",
5513                 FT_FLOAT, BASE_DEC, NULL, 0x0,          
5514                 "Specifies the Y component of a linear velocity vector", HFILL }
5515         },
5516         { &hf_cigi3_rate_control_z_rate,
5517             { "Z Linear Rate (m/s)", "cigi.rate_control.z_rate",
5518                 FT_FLOAT, BASE_DEC, NULL, 0x0,          
5519                 "Specifies the Z component of a linear velocity vector", HFILL }
5520         },
5521         { &hf_cigi3_rate_control_roll_rate,
5522             { "Roll Angular Rate (°/s)", "cigi.rate_control.roll_rate",
5523                 FT_FLOAT, BASE_DEC, NULL, 0x0,          
5524                 "Specifies the angle of rotation of the articulated part submodel about its X axis after yaw and pitch have been applied", HFILL }
5525         },
5526         { &hf_cigi3_rate_control_pitch_rate,
5527             { "Pitch Angular Rate (°/s)", "cigi.rate_control.pitch_rate",
5528                 FT_FLOAT, BASE_DEC, NULL, 0x0,          
5529                 "Specifies the angle of rotation of the articulated part submodel about its Y axis after yaw has been applied", HFILL }
5530         },
5531         { &hf_cigi3_rate_control_yaw_rate,
5532             { "Yaw Angular Rate (°/s)", "cigi.rate_control.yaw_rate",
5533                 FT_FLOAT, BASE_DEC, NULL, 0x0,          
5534                 "Specifies the angle of rotation of the articulated part about its Z axis when its X axis is parallel to that of the entity", HFILL }
5535         },
5536
5537         /* CIGI3 Celestial Sphere Control */
5538         { &hf_cigi3_celestial_sphere_control,
5539             { "Celestial Sphere Control", "cigi.celestial_sphere_control",
5540                 FT_STRINGZ, BASE_NONE, NULL, 0x0,          
5541                 "Celestial Sphere Control Packet", HFILL }
5542         },
5543         { &hf_cigi3_celestial_sphere_control_hour,
5544             { "Hour (h)", "cigi.celestial_sphere_control.hour",
5545                 FT_UINT8, BASE_DEC, NULL, 0x0,          
5546                 "Specifies the current hour of the day within the simulation", HFILL }
5547         },
5548         { &hf_cigi3_celestial_sphere_control_minute,
5549             { "Minute (min)", "cigi.celestial_sphere_control.minute",
5550                 FT_UINT8, BASE_DEC, NULL, 0x0,          
5551                 "Specifies the current minute of the day within the simulation", HFILL }
5552         },
5553         { &hf_cigi3_celestial_sphere_control_ephemeris_enable,
5554             { "Ephemeris Model Enable", "cigi.celestial_sphere_control.ephemeris_enable",
5555                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x01,          
5556                 "Controls whether the time of day is static or continuous", HFILL }
5557         },
5558         { &hf_cigi3_celestial_sphere_control_sun_enable,
5559             { "Sun Enable", "cigi.celestial_sphere_control.sun_enable",
5560                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x02,          
5561                 "Specifies whether the sun is enabled in the sky model", HFILL }
5562         },
5563         { &hf_cigi3_celestial_sphere_control_moon_enable,
5564             { "Moon Enable", "cigi.celestial_sphere_control.moon_enable",
5565                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x04,          
5566                 "Specifies whether the moon is enabled in the sky model", HFILL }
5567         },
5568         { &hf_cigi3_celestial_sphere_control_star_enable,
5569             { "Star Field Enable", "cigi.celestial_sphere_control.star_enable",
5570                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x08,          
5571                 "Specifies whether the start field is enabled in the sky model", HFILL }
5572         },
5573         { &hf_cigi3_celestial_sphere_control_date_time_valid,
5574             { "Date/Time Valid", "cigi.celestial_sphere_control.date_time_valid",
5575                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x10,          
5576                 "Specifies whether the Hour, Minute, and Date parameters are valid", HFILL }
5577         },
5578         { &hf_cigi3_celestial_sphere_control_date,
5579             { "Date (MMDDYYYY)", "cigi.celestial_sphere_control.date",
5580                 FT_UINT32, BASE_DEC, NULL, 0x0,          
5581                 "Specifies the current date within the simulation", HFILL }
5582         },
5583         { &hf_cigi3_celestial_sphere_control_star_intensity,
5584             { "Star Field Intensity (%)", "cigi.celestial_sphere_control.star_intensity",
5585                 FT_FLOAT, BASE_DEC, NULL, 0x0,          
5586                 "Specifies the intensity of the star field within the sky model", HFILL }
5587         },
5588
5589         /* CIGI3 Atmosphere Control */
5590         { &hf_cigi3_atmosphere_control,
5591             { "Atmosphere Control", "cigi.atmosphere_control",
5592                 FT_STRINGZ, BASE_NONE, NULL, 0x0,
5593                 "Atmosphere Control Packet", HFILL }
5594         },
5595         { &hf_cigi3_atmosphere_control_atmospheric_model_enable,
5596             { "Atmospheric Model Enable", "cigi.atmosphere_control.atmospheric_model_enable",
5597                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x01,
5598                 "Specifies whether the IG should use an atmospheric model to determine spectral radiances for sensor applications", HFILL }
5599         },
5600         { &hf_cigi3_atmosphere_control_humidity,
5601             { "Global Humidity (%)", "cigi.atmosphere_control.humidity",
5602                 FT_UINT8, BASE_DEC, NULL, 0x0,
5603                 "Specifies the global humidity of the environment", HFILL }
5604         },
5605         { &hf_cigi3_atmosphere_control_air_temp,
5606             { "Global Air Temperature (°C)", "cigi.atmosphere_control.air_temp",
5607                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5608                 "Specifies the global air temperature of the environment", HFILL }
5609         },
5610         { &hf_cigi3_atmosphere_control_visibility_range,
5611             { "Global Visibility Range (m)", "cigi.atmosphere_control.visibility_range",
5612                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5613                 "Specifies the global visibility range through the atmosphere", HFILL }
5614         },
5615         { &hf_cigi3_atmosphere_control_horiz_wind,
5616             { "Global Horizontal Wind Speed (m/s)", "cigi.atmosphere_control.horiz_wind",
5617                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5618                 "Specifies the global wind speed parallel to the ellipsoid-tangential reference plane", HFILL }
5619         },
5620         { &hf_cigi3_atmosphere_control_vert_wind,
5621             { "Global Vertical Wind Speed (m/s)", "cigi.atmosphere_control.vert_wind",
5622                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5623                 "Specifies the global vertical wind speed", HFILL }
5624         },
5625         { &hf_cigi3_atmosphere_control_wind_direction,
5626             { "Global Wind Direction (°)", "cigi.atmosphere_control.wind_direction",
5627                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5628                 "Specifies the global wind direction", HFILL }
5629         },
5630         { &hf_cigi3_atmosphere_control_barometric_pressure,
5631             { "Global Barometric Pressure (mb âˆ¨ hPa)", "cigi.atmosphere_control.barometric_pressure",
5632                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5633                 "Specifies the global atmospheric pressure", HFILL }
5634         },
5635
5636         /* CIGI2 Environmental Control */
5637         { &hf_cigi2_environment_control,
5638             { "Environment Control", "cigi.env_control",
5639                 FT_STRINGZ, BASE_NONE, NULL, 0x0,          
5640                 "Environment Control Packet", HFILL }
5641         },
5642         { &hf_cigi2_environment_control_hour,
5643             { "Hour (h)", "cigi.env_control.hour",
5644                 FT_UINT8, BASE_DEC, NULL, 0x0,
5645                 "Identifies the hour of the day for the ephemeris program within the image generator", HFILL }
5646         },
5647         { &hf_cigi2_environment_control_minute,
5648             { "Minute (min)", "cigi.env_control.minute",
5649                 FT_UINT8, BASE_DEC, NULL, 0x0,
5650                 "Identifies the minute of the hour for the ephemeris program within the image generator", HFILL }
5651         },
5652         { &hf_cigi2_environment_control_ephemeris_enable,
5653             { "Ephemeris Enable", "cigi.env_control.ephemeris_enable",
5654                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x80,
5655                 "Identifies whether a continuous time of day or static time of day is used", HFILL }
5656         },
5657         { &hf_cigi2_environment_control_humidity,
5658             { "Humidity (%)", "cigi.env_control.humidity",
5659                 FT_UINT8, BASE_DEC, NULL, 0x7f,
5660                 "Specifies the global humidity of the environment", HFILL }
5661         },
5662         { &hf_cigi2_environment_control_modtran_enable,
5663             { "MODTRAN", "cigi.env_control.modtran_enable",
5664                 FT_BOOLEAN, 8, TFS(&cigi_on_tfs), 0x80,
5665                 "Identifies whether atmospherics will be included in the calculations", HFILL }
5666         },
5667         { &hf_cigi2_environment_control_date,
5668             { "Date (MMDDYYYY)", "cigi.env_control.date",
5669                 FT_INT32, BASE_DEC, NULL, 0x0,
5670                 "Specifies the desired date for use by the ephemeris program within the image generator", HFILL }
5671         },
5672         { &hf_cigi2_environment_control_air_temp,
5673             { "Air Temperature (°C)", "cigi.env_control.air_temp",
5674                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5675                 "Identifies the global temperature of the environment", HFILL }
5676         },
5677         { &hf_cigi2_environment_control_global_visibility,
5678             { "Global Visibility (m)", "cigi.env_control.global_visibility",
5679                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5680                 "Identifies the global visibility", HFILL }
5681         },
5682         { &hf_cigi2_environment_control_wind_speed,
5683             { "Wind Speed (m/s)", "cigi.env_control.wind_speed",
5684                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5685                 "Identifies the global wind speed", HFILL }
5686         },
5687         { &hf_cigi2_environment_control_wind_direction,
5688             { "Wind Direction (°)", "cigi.env_control.wind_direction",
5689                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5690                 "Identifies the global wind direction", HFILL }
5691         },
5692         { &hf_cigi2_environment_control_pressure,
5693             { "Barometric Pressure (mb)", "cigi.env_control.pressure",
5694                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5695                 "Controls the atmospheric pressure input into MODTRAN", HFILL }
5696         },
5697         { &hf_cigi2_environment_control_aerosol,
5698             { "Aerosol (gm/m³)", "cigi.env_control.aerosol",
5699                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5700                 "Controls the liquid water content for the defined atmosphere", HFILL }
5701         },
5702
5703         /* CIGI3 Environmental Region Control */
5704         { &hf_cigi3_environmental_region_control,
5705             { "Environmental Region Control", "cigi.env_region_control",
5706                 FT_STRINGZ, BASE_NONE, NULL, 0x0,
5707                 "Environmental Region Control Packet", HFILL }
5708         },
5709         { &hf_cigi3_environmental_region_control_region_id,
5710             { "Region ID", "cigi.env_region_control.region_id",
5711                 FT_UINT16, BASE_DEC, NULL, 0x0,
5712                 "Specifies the environmental region to which the data in this packet will be applied", HFILL }
5713         },
5714         { &hf_cigi3_environmental_region_control_region_state,
5715             { "Region State", "cigi.env_region_control.region_state",
5716                 FT_UINT8, BASE_DEC, VALS(cigi3_environmental_region_control_region_state_vals), 0x03,
5717                 "Specifies whether the region should be active or destroyed", HFILL }
5718         },
5719         { &hf_cigi3_environmental_region_control_merge_weather,
5720             { "Merge Weather Properties", "cigi.env_region_control.merge_weather",
5721                 FT_BOOLEAN, 8, TFS(&cigi3_environmental_region_control_merge_properties_tfs), 0x04,
5722                 "Specifies whether atmospheric conditions within this region should be merged with those of other regions within areas of overlap", HFILL }
5723         },
5724         { &hf_cigi3_environmental_region_control_merge_aerosol,
5725             { "Merge Aerosol Concentrations", "cigi.env_region_control.merge_aerosol",
5726                 FT_BOOLEAN, 8, TFS(&cigi3_environmental_region_control_merge_properties_tfs), 0x08,
5727                 "Specifies whether the concentrations of aerosols found within this region should be merged with those of other regions within areas of overlap", HFILL }
5728         },
5729         { &hf_cigi3_environmental_region_control_merge_maritime,
5730             { "Merge Maritime Surface Conditions", "cigi.env_region_control.merge_maritime",
5731                 FT_BOOLEAN, 8, TFS(&cigi3_environmental_region_control_merge_properties_tfs), 0x10,
5732                 "Specifies whether the maritime surface conditions found within this region should be merged with those of other regions within areas of overlap", HFILL }
5733         },
5734         { &hf_cigi3_environmental_region_control_merge_terrestrial,
5735             { "Merge Terrestrial Surface Conditions", "cigi.env_region_control.merge_terrestrial",
5736                 FT_BOOLEAN, 8, TFS(&cigi3_environmental_region_control_merge_properties_tfs), 0x20,
5737                 "Specifies whether the terrestrial surface conditions found within this region should be merged with those of other regions within areas of overlap", HFILL }
5738         },
5739         { &hf_cigi3_environmental_region_control_lat,
5740             { "Latitude (°)", "cigi.env_region_control.lat",
5741                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
5742                 "Specifies the geodetic latitude of the center of the rounded rectangle", HFILL }
5743         },
5744         { &hf_cigi3_environmental_region_control_lon,
5745             { "Longitude (°)", "cigi.env_region_control.lon",
5746                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
5747                 "Specifies the geodetic longitude of the center of the rounded rectangle", HFILL }
5748         },
5749         { &hf_cigi3_environmental_region_control_size_x,
5750             { "Size X (m)", "cigi.env_region_control.size_x",
5751                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5752                 "Specifies the length of the environmental region along its X axis at the geoid surface", HFILL }
5753         },
5754         { &hf_cigi3_environmental_region_control_size_y,
5755             { "Size Y (m)", "cigi.env_region_control.size_y",
5756                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5757                 "Specifies the length of the environmental region along its Y axis at the geoid surface", HFILL }
5758         },
5759         { &hf_cigi3_environmental_region_control_corner_radius,
5760             { "Corner Radius (m)", "cigi.env_region_control.corner_radius",
5761                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5762                 "Specifies the radius of the corner of the rounded rectangle", HFILL }
5763         },
5764         { &hf_cigi3_environmental_region_control_rotation,
5765             { "Rotation (°)", "cigi.env_region_control.rotation",
5766                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5767                 "Specifies the yaw angle of the rounded rectangle", HFILL }
5768         },
5769         { &hf_cigi3_environmental_region_control_transition_perimeter,
5770             { "Transition Perimeter (m)", "cigi.env_region_control.transition_perimeter",
5771                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5772                 "Specifies the width of the transition perimeter around the environmental region", HFILL }
5773         },
5774
5775         /* CIGI2 Weather Control */
5776         { &hf_cigi2_weather_control,
5777             { "Weather Control", "cigi.weather_control",
5778                 FT_STRINGZ, BASE_NONE, NULL, 0x0,          
5779                 "Weather Control Packet", HFILL }
5780         },
5781         { &hf_cigi2_weather_control_entity_id,
5782             { "Entity ID", "cigi.weather_control.entity_id",
5783                 FT_UINT16, BASE_DEC, NULL, 0x0,
5784                 "Identifies the entity's ID", HFILL }
5785         },
5786         { &hf_cigi2_weather_control_weather_enable,
5787             { "Weather Enable", "cigi.weather_control.weather_enable",
5788                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x80,
5789                 "Indicates whether the phenomena specified by this data packet is visible", HFILL }
5790         },
5791         { &hf_cigi2_weather_control_scud_enable,
5792             { "Scud Enable", "cigi.weather_control.scud_enable",
5793                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x40,
5794                 "Indicates whether there will be scud effects applied to the phenomenon specified by this data packet", HFILL }
5795         },
5796         { &hf_cigi2_weather_control_random_winds,
5797             { "Random Winds Aloft", "cigi.weather_control.random_winds",
5798                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x20,
5799                 "Indicates whether a random frequency and duration should be applied to the winds aloft value", HFILL }
5800         },
5801         { &hf_cigi2_weather_control_severity,
5802             { "Severity", "cigi.weather_control.severity",
5803                 FT_UINT8, BASE_DEC, NULL, 0x1c,
5804                 "Indicates the severity of the weather phenomenon", HFILL }
5805         },
5806         { &hf_cigi2_weather_control_phenomenon_type,
5807             { "Phenomenon Type", "cigi.weather_control.phenomenon_type",
5808                 FT_UINT16, BASE_DEC, VALS(cigi2_weather_control_phenomenon_type_vals), 0x0,
5809                 "Identifies the type of weather described by this data packet", HFILL }
5810         },
5811         { &hf_cigi2_weather_control_air_temp,
5812             { "Air Temperature (°C)", "cigi.weather_control.air_temp",
5813                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5814                 "Identifies the local temperature inside the weather phenomenon", HFILL }
5815         },
5816         { &hf_cigi2_weather_control_opacity,
5817             { "Opacity (%)", "cigi.weather_control.opacity",
5818                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5819                 "Identifies the opacity of the weather phenomenon", HFILL }
5820         },
5821         { &hf_cigi2_weather_control_scud_frequency,
5822             { "Scud Frequency (%)", "cigi.weather_control.scud_frequency",
5823                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5824                 "Identifies the frequency for the scud effect", HFILL }
5825         },
5826         { &hf_cigi2_weather_control_coverage,
5827             { "Coverage (%)", "cigi.weather_control.coverage",
5828                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5829                 "Indicates the amount of area coverage a particular phenomenon has over the specified global visibility range given in the environment control data packet", HFILL }
5830         },
5831         { &hf_cigi2_weather_control_elevation,
5832             { "Elevation (m)", "cigi.weather_control.elevation",
5833                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5834                 "Indicates the base altitude of the weather phenomenon", HFILL }
5835         },
5836         { &hf_cigi2_weather_control_thickness,
5837             { "Thickness (m)", "cigi.weather_control.thickness",
5838                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5839                 "Indicates the vertical thickness of the weather phenomenon", HFILL }
5840         },
5841         { &hf_cigi2_weather_control_transition_band,
5842             { "Transition Band (m)", "cigi.weather_control.transition_band",
5843                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5844                 "Indicates a vertical transition band both above and below a phenomenon", HFILL }
5845         },
5846         { &hf_cigi2_weather_control_wind_speed,
5847             { "Winds Aloft Speed", "cigi.weather_control.wind_speed",
5848                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5849                 "Identifies the local wind speed applied to the phenomenon", HFILL }
5850         },
5851         { &hf_cigi2_weather_control_wind_direction,
5852             { "Winds Aloft Direction (°)", "cigi.weather_control.wind_direction",
5853                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5854                 "Indicates local direction of the wind applied to the phenomenon", HFILL }
5855         },
5856
5857         /* CIGI3 Weather Control */
5858         { &hf_cigi3_weather_control,
5859             { "Weather Control", "cigi.weather_control",
5860                 FT_STRINGZ, BASE_NONE, NULL, 0x0,
5861                 "Weather Control Packet", HFILL }
5862         },
5863         { &hf_cigi3_weather_control_entity_region_id,
5864             { "Entity ID/Region ID", "cigi.weather_control.entity_region_id",
5865                 FT_UINT16, BASE_DEC, NULL, 0x0,
5866                 "Specifies the entity to which the weather attributes in this packet are applied", HFILL }
5867         },
5868         { &hf_cigi3_weather_control_layer_id,
5869             { "Layer ID", "cigi.weather_control.layer_id",
5870                 FT_UINT8, BASE_DEC, VALS(cigi3_weather_control_layer_id_vals), 0x0,
5871                 "Specifies the weather layer to which the data in this packet are applied", HFILL }
5872         },
5873         { &hf_cigi3_weather_control_humidity,
5874             { "Humidity (%)", "cigi.weather_control.humidity",
5875                 FT_UINT8, BASE_DEC, NULL, 0x0,
5876                 "Specifies the humidity within the weather layer", HFILL }
5877         },
5878         { &hf_cigi3_weather_control_weather_enable,
5879             { "Weather Enable", "cigi.weather_control.weather_enable",
5880                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x01,
5881                 "Specifies whether a weather layer and its atmospheric effects are enabled", HFILL }
5882         },
5883         { &hf_cigi3_weather_control_scud_enable,
5884             { "Scud Enable", "cigi.weather_control.scud_enable",
5885                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x02,
5886                 "Specifies whether weather layer produces scud effects within its transition bands", HFILL }
5887         },
5888         { &hf_cigi3_weather_control_random_winds_enable,
5889             { "Random Winds Enable", "cigi.weather_control.random_winds_enable",
5890                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x04,
5891                 "Specifies whether a random frequency and duration should be applied to the local wind effects", HFILL }
5892         },
5893         { &hf_cigi3_weather_control_random_lightning_enable,
5894             { "Random Lightning Enable", "cigi.weather_control.random_lightning_enable",
5895                 FT_UINT8, BASE_DEC, NULL, 0x08,
5896                 "Specifies whether the weather layer exhibits random lightning effects", HFILL }
5897         },
5898         { &hf_cigi3_weather_control_cloud_type,
5899             { "Cloud Type", "cigi.weather_control.cloud_type",
5900                 FT_UINT8, BASE_DEC, VALS(cigi3_weather_control_cloud_type_vals), 0xf0,
5901                 "Specifies the type of clouds contained within the weather layer", HFILL }
5902         },
5903         { &hf_cigi3_weather_control_scope,
5904             { "Scope", "cigi.weather_control.scope",
5905                 FT_UINT8, BASE_DEC, VALS(cigi3_weather_control_scope_vals), 0x03,
5906                 "Specifies whether the weather is global, regional, or assigned to an entity", HFILL }
5907         },
5908         { &hf_cigi3_weather_control_severity,
5909             { "Severity", "cigi.weather_control.severity",
5910                 FT_UINT8, BASE_DEC, NULL, 0x1c,
5911                 "Specifies the severity of the weather layer", HFILL }
5912         },
5913         { &hf_cigi3_weather_control_air_temp,
5914             { "Air Temperature (°C)", "cigi.weather_control.air_temp",
5915                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5916                 "Specifies the temperature within the weather layer", HFILL }
5917         },
5918         { &hf_cigi3_weather_control_visibility_range,
5919             { "Visibility Range (m)", "cigi.weather_control.visibility_range",
5920                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5921                 "Specifies the visibility range through the weather layer", HFILL }
5922         },
5923         { &hf_cigi3_weather_control_scud_frequency,
5924             { "Scud Frequency (%)", "cigi.weather_control.scud_frequency",
5925                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5926                 "Specifies the frequency of scud within the transition bands above and/or below a cloud or fog layer", HFILL }
5927         },
5928         { &hf_cigi3_weather_control_coverage,
5929             { "Coverage (%)", "cigi.weather_control.coverage",
5930                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5931                 "Specifies the amount of area coverage for the weather layer", HFILL }
5932         },
5933         { &hf_cigi3_weather_control_base_elevation,
5934             { "Base Elevation (m)", "cigi.weather_control.base_elevation",
5935                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5936                 "Specifies the altitude of the base of the weather layer", HFILL }
5937         },
5938         { &hf_cigi3_weather_control_thickness,
5939             { "Thickness (m)", "cigi.weather_control.thickness",
5940                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5941                 "Specifies the vertical thickness of the weather layer", HFILL }
5942         },
5943         { &hf_cigi3_weather_control_transition_band,
5944             { "Transition Band (m)", "cigi.weather_control.transition_band",
5945                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5946                 "Specifies the height of a vertical transition band both above and below the weather layer", HFILL }
5947         },
5948         { &hf_cigi3_weather_control_horiz_wind,
5949             { "Horizontal Wind Speed (m/s)", "cigi.weather_control.horiz_wind",
5950                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5951                 "Specifies the local wind speed parallel to the ellipsoid-tangential reference plane", HFILL }
5952         },
5953         { &hf_cigi3_weather_control_vert_wind,
5954             { "Vertical Wind Speed (m/s)", "cigi.weather_control.vert_wind",
5955                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5956                 "Specifies the local vertical wind speed", HFILL }
5957         },
5958         { &hf_cigi3_weather_control_wind_direction,
5959             { "Wind Direction (°)", "cigi.weather_control.wind_direction",
5960                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5961                 "Specifies the local wind direction", HFILL }
5962         },
5963         { &hf_cigi3_weather_control_barometric_pressure,
5964             { "Barometric Pressure (mb âˆ¨ hPa)", "cigi.weather_control.barometric_pressure",
5965                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5966                 "Specifies the atmospheric pressure within the weather layer", HFILL }
5967         },
5968         { &hf_cigi3_weather_control_aerosol_concentration,
5969             { "Aerosol Concentration (g/m³)", "cigi.weather_control.aerosol_concentration",
5970                 FT_FLOAT, BASE_DEC, NULL, 0x0,
5971                 "Specifies the concentration of water, smoke, dust, or other particles suspended in the air", HFILL }
5972         },
5973
5974         /* CIGI3 Maritime Surface Conditions Control */
5975         { &hf_cigi3_maritime_surface_conditions_control,
5976             { "Maritime Surface Conditions Control", "cigi.maritime_surface_conditions_control",
5977                 FT_STRINGZ, BASE_NONE, NULL, 0x0,
5978                 "Maritime Surface Conditions Control Packet", HFILL }
5979         },
5980         { &hf_cigi3_maritime_surface_conditions_control_entity_region_id,
5981             { "Entity ID/Region ID", "cigi.maritime_surface_conditions_control.entity_region_id",
5982                 FT_UINT16, BASE_DEC, NULL, 0x0,
5983                 "Specifies the entity to which the surface attributes in this packet are applied or specifies the region to which the surface attributes are confined", HFILL }
5984         },
5985         { &hf_cigi3_maritime_surface_conditions_control_surface_conditions_enable,
5986             { "Surface Conditions Enable", "cigi.maritime_surface_conditions_control.surface_conditions_enable",
5987                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x01,
5988                 "Determines the state of the specified surface conditions", HFILL }
5989         },
5990         { &hf_cigi3_maritime_surface_conditions_control_whitecap_enable,
5991             { "Whitecap Enable", "cigi.maritime_surface_conditions_control.whitecap_enable",
5992                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x02,
5993                 "Determines whether whitecaps are enabled", HFILL }
5994         },
5995         { &hf_cigi3_maritime_surface_conditions_control_scope,
5996             { "Scope", "cigi.maritime_surface_conditions_control.scope",
5997                 FT_UINT8, BASE_DEC, VALS(cigi3_maritime_surface_conditions_control_scope_vals), 0x0c,
5998                 "Specifies whether this packet is applied globally, applied to region, or assigned to an entity", HFILL }
5999         },
6000         { &hf_cigi3_maritime_surface_conditions_control_sea_surface_height,
6001             { "Sea Surface Height (m)", "cigi.maritime_surface_conditions_control.sea_surface_height",
6002                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6003                 "Specifies the height of the water above MSL at equilibrium", HFILL }
6004         },
6005         { &hf_cigi3_maritime_surface_conditions_control_surface_water_temp,
6006             { "Surface Water Temperature (°C)", "cigi.maritime_surface_conditions_control.surface_water_temp",
6007                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6008                 "Specifies the water temperature at the surface", HFILL }
6009         },
6010         { &hf_cigi3_maritime_surface_conditions_control_surface_clarity,
6011             { "Surface Clarity (%)", "cigi.maritime_surface_conditions_control.surface_clarity",
6012                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6013                 "Specifies the clarity of the water at its surface", HFILL }
6014         },
6015
6016         /* CIGI3 Wave Control */
6017         { &hf_cigi3_wave_control,
6018             { "Wave Control", "cigi.wave_control",
6019                 FT_STRINGZ, BASE_NONE, NULL, 0x0,
6020                 "Wave Control Packet", HFILL }
6021         },
6022         { &hf_cigi3_wave_control_entity_region_id,
6023             { "Entity ID/Region ID", "cigi.wave_control.entity_region_id",
6024                 FT_UINT16, BASE_DEC, NULL, 0x0,
6025                 "Specifies the surface entity for which the wave is defined or specifies the environmental region for which the wave is defined", HFILL }
6026         },
6027         { &hf_cigi3_wave_control_wave_id,
6028             { "Wave ID", "cigi.wave_control.wave_id",
6029                 FT_UINT8, BASE_DEC, NULL, 0x0,
6030                 "Specifies the wave to which the attributes in this packet are applied", HFILL }
6031         },
6032         { &hf_cigi3_wave_control_wave_enable,
6033             { "Wave Enable", "cigi.wave_control.wave_enable",
6034                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x01,
6035                 "Determines whether the wave is enabled or disabled", HFILL }
6036         },
6037         { &hf_cigi3_wave_control_scope,
6038             { "Scope", "cigi.wave_control.scope",
6039                 FT_UINT8, BASE_DEC, VALS(cigi3_wave_control_scope_vals), 0x06,
6040                 "Specifies whether the wave is defined for global, regional, or entity-controlled maritime surface conditions", HFILL }
6041         },
6042         { &hf_cigi3_wave_control_breaker_type,
6043             { "Breaker Type", "cigi.wave_control.breaker_type",
6044                 FT_UINT8, BASE_DEC, VALS(cigi3_wave_control_breaker_type_vals), 0x18,
6045                 "Specifies the type of breaker within the surf zone", HFILL }
6046         },
6047         { &hf_cigi3_wave_control_height,
6048             { "Wave Height (m)", "cigi.wave_control.height",
6049                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6050                 "Specifies the average vertical distance from trough to crest produced by the wave", HFILL }
6051         },
6052         { &hf_cigi3_wave_control_wavelength,
6053             { "Wavelength (m)", "cigi.wave_control.wavelength",
6054                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6055                 "Specifies the distance from a particular phase on a wave to the same phase on an adjacent wave", HFILL }
6056         },
6057         { &hf_cigi3_wave_control_period,
6058             { "Period (s)", "cigi.wave_control.period",
6059                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6060                 "Specifies the time required fro one complete oscillation of the wave", HFILL }
6061         },
6062         { &hf_cigi3_wave_control_direction,
6063             { "Direction (°)", "cigi.wave_control.direction",
6064                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6065                 "Specifies the direction in which the wave propagates", HFILL }
6066         },
6067         { &hf_cigi3_wave_control_phase_offset,
6068             { "Phase Offset (°)", "cigi.wave_control.phase_offset",
6069                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6070                 "Specifies a phase offset for the wave", HFILL }
6071         },
6072         { &hf_cigi3_wave_control_leading,
6073             { "Leading (°)", "cigi.wave_control.leading",
6074                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6075                 "Specifies the phase angle at which the crest occurs", HFILL }
6076         },
6077
6078         /* Terrestrial Surface Conditions Control */
6079         { &hf_cigi3_terrestrial_surface_conditions_control,
6080             { "Terrestrial Surface Conditions Control", "cigi.terrestrial_surface_conditions_control",
6081                 FT_STRINGZ, BASE_NONE, NULL, 0x0,
6082                 "Terrestrial Surface Conditions Control Packet", HFILL }
6083         },
6084         { &hf_cigi3_terrestrial_surface_conditions_control_entity_region_id,
6085             { "Entity ID/Region ID", "cigi.terrestrial_surface_conditions_control.entity_region_id",
6086                 FT_UINT16, BASE_DEC, NULL, 0x0,
6087                 "Specifies the environmental entity to which the surface condition attributes in this packet are applied", HFILL }
6088         },
6089         { &hf_cigi3_terrestrial_surface_conditions_control_surface_condition_id,
6090             { "Surface Condition ID", "cigi.terrestrial_surface_conditions_control.surface_condition_id",
6091                 FT_UINT16, BASE_DEC, NULL, 0x0,
6092                 "Identifies a surface condition or contaminant", HFILL }
6093         },
6094         { &hf_cigi3_terrestrial_surface_conditions_control_surface_condition_enable,
6095             { "Surface Condition Enable", "cigi.terrestrial_surface_conditions_control.surface_condition_enable",
6096                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x01,
6097                 "Specifies whether the surface condition attribute identified by the Surface Condition ID parameter should be enabled", HFILL }
6098         },
6099         { &hf_cigi3_terrestrial_surface_conditions_control_scope,
6100             { "Scope", "cigi.terrestrial_surface_conditions_control.scope",
6101                 FT_UINT8, BASE_DEC, VALS(cigi3_terrestrial_surface_conditions_control_scope_vals), 0x06,
6102                 "Determines whether the specified surface conditions are applied globally, regionally, or to an environmental entity", HFILL }
6103         },
6104         { &hf_cigi3_terrestrial_surface_conditions_control_severity,
6105             { "Severity", "cigi.terrestrial_surface_conditions_control.severity",
6106                 FT_UINT8, BASE_DEC, NULL, 0xf8,
6107                 "Determines the degree of severity for the specified surface contaminant(s)", HFILL }
6108         },
6109         { &hf_cigi3_terrestrial_surface_conditions_control_coverage,
6110             { "Coverage (%)", "cigi.terrestrial_surface_conditions_control.coverage",
6111                 FT_UINT8, BASE_DEC, NULL, 0x0,
6112                 "Determines the degree of coverage of the specified surface contaminant", HFILL }
6113         },
6114
6115         /* CIGI2 View Control */
6116         { &hf_cigi2_view_control,
6117             { "View Control", "cigi.view_control",
6118                 FT_STRINGZ, BASE_NONE, NULL, 0x0,          
6119                 "View Control Packet", HFILL }
6120         },
6121         { &hf_cigi2_view_control_entity_id,
6122             { "Entity ID", "cigi.view_control.entity_id",
6123                 FT_UINT16, BASE_DEC, NULL, 0x0,
6124                 "Indicates the entity to which this view should be attached", HFILL }
6125         },
6126         { &hf_cigi2_view_control_view_id,
6127             { "View ID", "cigi.view_control.view_id",
6128                 FT_UINT8, BASE_DEC, NULL, 0xf8,
6129                 "Specifies which view position is associated with offsets and rotation specified by this data packet", HFILL }
6130         },
6131         { &hf_cigi2_view_control_view_group,
6132             { "View Group Select", "cigi.view_control.view_group",
6133                 FT_UINT8, BASE_DEC, NULL, 0x07,
6134                 "Specifies which view group is to be controlled by the offsets", HFILL }
6135         },
6136         { &hf_cigi2_view_control_xoff_enable,
6137             { "X Offset Enable", "cigi.view_control.xoff_enable",
6138                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x80,
6139                 "Identifies whether the x offset parameter should be applied to the specified view or view group", HFILL }
6140         },
6141         { &hf_cigi2_view_control_yoff_enable,
6142             { "Y Offset Enable", "cigi.view_control.yoff_enable",
6143                 FT_UINT8, BASE_DEC, NULL, 0x40,
6144                 "Identifies whether the y offset parameter should be applied to the specified view or view group", HFILL }
6145         },
6146         { &hf_cigi2_view_control_zoff_enable,
6147             { "Z Offset Enable", "cigi.view_control.zoff_enable",
6148                 FT_UINT8, BASE_DEC, NULL, 0x20,
6149                 "Identifies whether the z offset parameter should be applied to the specified view or view group", HFILL }
6150         },
6151         { &hf_cigi2_view_control_roll_enable,
6152             { "Roll Enable", "cigi.view_control.roll_enable",
6153                 FT_UINT8, BASE_DEC, NULL, 0x10,
6154                 "Identifies whether the roll parameter should be applied to the specified view or view group", HFILL }
6155         },
6156         { &hf_cigi2_view_control_pitch_enable,
6157             { "Pitch Enable", "cigi.view_control.pitch_enable",
6158                 FT_UINT8, BASE_DEC, NULL, 0x08,
6159                 "Identifies whether the pitch parameter should be applied to the specified view or view group", HFILL }
6160         },
6161         { &hf_cigi2_view_control_yaw_enable,
6162             { "Yaw Enable", "cigi.view_control.yaw_enable",
6163                 FT_UINT8, BASE_DEC, NULL, 0x04,
6164                 "Identifies whether the yaw parameter should be applied to the specified view or view group", HFILL }
6165         },
6166         { &hf_cigi2_view_control_x_offset,
6167             { "X Offset (m)", "cigi.view_control.x_offset",
6168                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6169                 "Defines the X component of the view offset vector along the entity's longitudinal axis", HFILL }
6170         },
6171         { &hf_cigi2_view_control_y_offset,
6172             { "Y Offset", "cigi.view_control.y_offset",
6173                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6174                 "Defines the Y component of the view offset vector along the entity's lateral axis", HFILL }
6175         },
6176         { &hf_cigi2_view_control_z_offset,
6177             { "Z Offset", "cigi.view_control.z_offset",
6178                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6179                 "Defines the Z component of the view offset vector along the entity's vertical axis", HFILL }
6180         },
6181         { &hf_cigi2_view_control_roll,
6182             { "Roll (°)", "cigi.view_control.roll",
6183                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6184                 "The rotation about the view's X axis", HFILL }
6185         },
6186         { &hf_cigi2_view_control_pitch,
6187             { "Pitch (°)", "cigi.view_control.pitch",
6188                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6189                 "The rotation about the view's Y axis", HFILL }
6190         },
6191         { &hf_cigi2_view_control_yaw,
6192             { "Yaw (°)", "cigi.view_control.yaw",
6193                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6194                 "The rotation about the view's Z axis", HFILL }
6195         },
6196
6197         /* CIGI3 View Control */
6198         { &hf_cigi3_view_control,
6199             { "View Control", "cigi.view_control",
6200                 FT_STRINGZ, BASE_NONE, NULL, 0x0,
6201                 "View Control Packet", HFILL }
6202         },
6203         { &hf_cigi3_view_control_view_id,
6204             { "View ID", "cigi.view_control.view_id",
6205                 FT_UINT16, BASE_DEC, NULL, 0x0,
6206                 "Specifies the view to which the contents of this packet should be applied", HFILL }
6207         },
6208         { &hf_cigi3_view_control_group_id,
6209             { "Group ID", "cigi.view_control.group_id",
6210                 FT_UINT8, BASE_DEC, NULL, 0x0,
6211                 "Specifies the view group to which the contents of this packet are applied", HFILL }
6212         },
6213         { &hf_cigi3_view_control_xoff_enable,
6214             { "X Offset Enable", "cigi.view_control.xoff_enable",
6215                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x01,
6216                 "Determines whether the X Offset parameter should be applied to the specified view or view group", HFILL }
6217         },
6218         { &hf_cigi3_view_control_yoff_enable,
6219             { "Y Offset Enable", "cigi.view_control.yoff_enable",
6220                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x02,
6221                 "Determines whether the Y Offset parameter should be applied to the specified view or view group", HFILL }
6222         },
6223         { &hf_cigi3_view_control_zoff_enable,
6224             { "Z Offset Enable", "cigi.view_control.zoff_enable",
6225                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x04,
6226                 "Determines whether the Z Offset parameter should be applied to the specified view or view group", HFILL }
6227         },
6228         { &hf_cigi3_view_control_roll_enable,
6229             { "Roll Enable", "cigi.view_control.roll_enable",
6230                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x08,
6231                 "Determines whether the Roll parameter should be applied to the specified view or view group", HFILL }
6232         },
6233         { &hf_cigi3_view_control_pitch_enable,
6234             { "Pitch Enable", "cigi.view_control.pitch_enable",
6235                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x10,
6236                 "Determines whether the Pitch parameter should be applied to the specified view or view group", HFILL }
6237         },
6238         { &hf_cigi3_view_control_yaw_enable,
6239             { "Yaw Enable", "cigi.view_control.yaw_enable",
6240                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x20,
6241                 "Determines whether the Yaw parameter should be applied to the specified view or view group", HFILL }
6242         },
6243         { &hf_cigi3_view_control_entity_id,
6244             { "Entity ID", "cigi.view_control.entity_id",
6245                 FT_UINT16, BASE_DEC, NULL, 0x0,
6246                 "Specifies the entity to which the view or view group should be attached", HFILL }
6247         },
6248         { &hf_cigi3_view_control_xoff,
6249             { "X Offset (m)", "cigi.view_control.xoff",
6250                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6251                 "Specifies the position of the view eyepoint along the X axis of the entity specified by the Entity ID parameter", HFILL }
6252         },
6253         { &hf_cigi3_view_control_yoff,
6254             { "Y Offset (m)", "cigi.view_control.yoff",
6255                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6256                 "Specifies the position of the view eyepoint along the Y axis of the entity specified by the Entity ID parameter", HFILL }
6257         },
6258         { &hf_cigi3_view_control_zoff,
6259             { "Z Offset (m)", "cigi.view_control.zoff",
6260                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6261                 "Specifies the position of the view eyepoint along the Z axis of the entity specified by the Entity ID parameter", HFILL }
6262         },
6263         { &hf_cigi3_view_control_roll,
6264             { "Roll (°)", "cigi.view_control.roll",
6265                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6266                 "Specifies the angle of rotation of the view or view group about its X axis after yaw and pitch have been applied", HFILL }
6267         },
6268         { &hf_cigi3_view_control_pitch,
6269             { "Pitch (°)", "cigi.view_control.pitch",
6270                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6271                 "Specifies the angle of rotation of the view or view group about its Y axis after yaw has been applied", HFILL }
6272         },
6273         { &hf_cigi3_view_control_yaw,
6274             { "Yaw (°)", "cigi.view_control.yaw",
6275                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6276                 "Specifies the angle of rotation of the view or view group about its Z axis", HFILL }
6277         },
6278
6279         /* CIGI2 Sensor Control */
6280         { &hf_cigi2_sensor_control,
6281             { "Sensor Control", "cigi.sensor_control",
6282                 FT_STRINGZ, BASE_NONE, NULL, 0x0,          
6283                 "Sensor Control Packet", HFILL }
6284         },
6285         { &hf_cigi2_sensor_control_view_id,
6286             { "View ID", "cigi.sensor_control.view_id",
6287                 FT_UINT8, BASE_DEC, NULL, 0xf8,
6288                 "Dictates to which view the corresponding sensor is assigned, regardless of the view group", HFILL }
6289         },
6290         { &hf_cigi2_sensor_control_sensor_enable,
6291             { "Sensor On/Off", "cigi.sensor_control.sensor_enable",
6292                 FT_BOOLEAN, 8, TFS(&cigi_on_tfs), 0x04,
6293                 "Indicates whether the sensor is turned on or off", HFILL }
6294         },
6295         { &hf_cigi2_sensor_control_polarity,
6296             { "Polarity", "cigi.sensor_control.polarity",
6297                 FT_BOOLEAN, 8, TFS(&cigi2_sensor_control_polarity_tfs), 0x02,
6298                 "Indicates whether this sensor is showing white hot or black hot", HFILL }
6299         },
6300         { &hf_cigi2_sensor_control_line_dropout,
6301             { "Line-by-Line Dropout", "cigi.sensor_control.line_dropout",
6302                 FT_BOOLEAN, 8, TFS(&cigi_on_tfs), 0x01,
6303                 "Indicates whether the line-by-line dropout feature is enabled", HFILL }
6304         },
6305         { &hf_cigi2_sensor_control_sensor_id,
6306             { "Sensor ID", "cigi.sensor_control.sensor_id",
6307                 FT_UINT8, BASE_DEC, NULL, 0x0,
6308                 "Identifies the sensor to which this packet should be applied", HFILL }
6309         },
6310         { &hf_cigi2_sensor_control_track_mode,
6311             { "Track Mode", "cigi.sensor_control.track_mode",
6312                 FT_UINT8, BASE_DEC, VALS(cigi2_sensor_control_track_mode_vals), 0xf0,
6313                 "Indicates which track mode the sensor should be", HFILL }
6314         },
6315         { &hf_cigi2_sensor_control_auto_gain,
6316             { "Automatic Gain", "cigi.sensor_control.auto_gain",
6317                 FT_BOOLEAN, 8, TFS(&cigi_on_tfs), 0x08,
6318                 "When set to \"on,\" cause the weapons sensor to automatically adjust the gain value to optimize the brightness and contrast of the sensor display", HFILL }
6319         },
6320         { &hf_cigi2_sensor_control_track_polarity,
6321             { "Track White/Black", "cigi.sensor_control.track_polarity",
6322                 FT_BOOLEAN, 8, TFS(&cigi2_sensor_control_polarity_tfs), 0x04,
6323                 "Identifies whether the weapons sensor will track wither white or black", HFILL }
6324         },
6325         { &hf_cigi2_sensor_control_gain,
6326             { "Gain", "cigi.sensor_control.gain",
6327                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6328                 "Indicates the gain value for the weapon sensor option", HFILL }
6329         },
6330         { &hf_cigi2_sensor_control_level,
6331             { "Level", "cigi.sensor_control.level",
6332                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6333                 "Indicates the level value for the weapon sensor option", HFILL }
6334         },
6335         { &hf_cigi2_sensor_control_ac_coupling,
6336             { "AC Coupling", "cigi.sensor_control.ac_coupling",
6337                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6338                 "Indicates the AC Coupling decay rate for the weapon sensor option", HFILL }
6339         },
6340         { &hf_cigi2_sensor_control_noise,
6341             { "Noise", "cigi.sensor_control.noise",
6342                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6343                 "Indicates the detector-noise gain for the weapon sensor option", HFILL }
6344         },
6345
6346         /* CIGI3 Sensor Control */
6347         { &hf_cigi3_sensor_control,
6348             { "Sensor Control", "cigi.sensor_control",
6349                 FT_STRINGZ, BASE_NONE, NULL, 0x0,
6350                 "Sensor Control Packet", HFILL }
6351         },
6352         { &hf_cigi3_sensor_control_view_id,
6353             { "View ID", "cigi.sensor_control.view_id",
6354                 FT_UINT16, BASE_DEC, NULL, 0x0,
6355                 "Identifies the view to which the specified sensor is assigned", HFILL }
6356         },
6357         { &hf_cigi3_sensor_control_sensor_id,
6358             { "Sensor ID", "cigi.sensor_control.sensor_id",
6359                 FT_UINT8, BASE_DEC, NULL, 0x0,
6360                 "Specifies the sensor to which the data in this packet are applied", HFILL }
6361         },
6362         { &hf_cigi3_sensor_control_track_mode,
6363             { "Track Mode", "cigi.sensor_control.track_mode",
6364                 FT_UINT8, BASE_DEC, VALS(cigi3_sensor_control_track_mode_vals), 0xe0,
6365                 "Specifies which track mode the sensor should use", HFILL }
6366         },
6367         { &hf_cigi3_sensor_control_sensor_on_off,
6368             { "Sensor On/Off", "cigi.sensor_control.sensor_on_off",
6369                 FT_BOOLEAN, 8, TFS(&cigi_on_tfs), 0x01,
6370                 "Specifies whether the sensor is turned on or off", HFILL }
6371         },
6372         { &hf_cigi3_sensor_control_polarity,
6373             { "Polarity", "cigi.sensor_control.polarity",
6374                 FT_BOOLEAN, 8, TFS(&cigi3_sensor_control_polarity_tfs), 0x02,
6375                 "Specifies whether the sensor shows white hot or black hot", HFILL }
6376         },
6377         { &hf_cigi3_sensor_control_line_dropout_enable,
6378             { "Line-by-Line Dropout Enable", "cigi.sensor_control.line_dropout_enable",
6379                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x04,
6380                 "Specifies whether line-by-line dropout is enabled", HFILL }
6381         },
6382         { &hf_cigi3_sensor_control_auto_gain,
6383             { "Automatic Gain", "cigi.sensor_control.auto_gain",
6384                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x08,
6385                 "Specifies whether the sensor automatically adjusts the gain value to optimize the brightness and contrast of the sensor display", HFILL }
6386         },
6387         { &hf_cigi3_sensor_control_track_white_black,
6388             { "Track White/Black", "cigi.sensor_control.track_white_black",
6389                 FT_BOOLEAN, 8, TFS(&cigi3_sensor_control_track_white_black_tfs), 0x10,
6390                 "Specifies whether the sensor tracks white or black", HFILL }
6391         },
6392         { &hf_cigi3_sensor_control_response_type,
6393             { "Response Type", "cigi.sensor_control.response_type",
6394                 FT_BOOLEAN, 8, TFS(&cigi3_sensor_control_response_type_tfs), 0x01,
6395                 "Specifies whether the IG should return a Sensor Response packet or a Sensor Extended Response packet", HFILL }
6396         },
6397         { &hf_cigi3_sensor_control_gain,
6398             { "Gain", "cigi.sensor_control.gain",
6399                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6400                 "Specifies the contrast for the sensor display", HFILL }
6401         },
6402         { &hf_cigi3_sensor_control_level,
6403             { "Level", "cigi.sensor_control.level",
6404                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6405                 "Specifies the brightness for the sensor display", HFILL }
6406         },
6407         { &hf_cigi3_sensor_control_ac_coupling,
6408             { "AC Coupling (µs)", "cigi.sensor_control.ac_coupling",
6409                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6410                 "Specifies the AC coupling decay constant for the sensor display", HFILL }
6411         },
6412         { &hf_cigi3_sensor_control_noise,
6413             { "Noise", "cigi.sensor_control.noise",
6414                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6415                 "Specifies the amount of detector noise for the sensor", HFILL }
6416         },
6417
6418         /* Motion Tracker Control */
6419         { &hf_cigi3_motion_tracker_control,
6420             { "Motion Tracker Control", "cigi.motion_tracker_control",
6421                 FT_STRINGZ, BASE_NONE, NULL, 0x0,
6422                 "Motion Tracker Control Packet", HFILL }
6423         },
6424         { &hf_cigi3_motion_tracker_control_view_group_id,
6425             { "View/View Group ID", "cigi.motion_tracker_control.view_group_id",
6426                 FT_UINT16, BASE_DEC, NULL, 0x0,
6427                 "Specifies the view or view group to which the tracking device is attached", HFILL }
6428         },
6429         { &hf_cigi3_motion_tracker_control_tracker_id,
6430             { "Tracker ID", "cigi.motion_tracker_control.tracker_id",
6431                 FT_UINT8, BASE_DEC, NULL, 0x0,
6432                 "Specifies the tracker whose state the data in this packet represents", HFILL }
6433         },
6434         { &hf_cigi3_motion_tracker_control_tracker_enable,
6435             { "Tracker Enable", "cigi.motion_tracker_control.tracker_enable",
6436                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x01,
6437                 "Specifies whether the tracking device is enabled", HFILL }
6438         },
6439         { &hf_cigi3_motion_tracker_control_boresight_enable,
6440             { "Boresight Enable", "cigi.motion_tracker_control.boresight_enable",
6441                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x02,
6442                 "Sets the boresight state of the external tracking device", HFILL }
6443         },
6444         { &hf_cigi3_motion_tracker_control_x_enable,
6445             { "X Enable", "cigi.motion_tracker_control.x_enable",
6446                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x04,
6447                 "Used to enable or disable the X-axis position of the motion tracker", HFILL }
6448         },
6449         { &hf_cigi3_motion_tracker_control_y_enable,
6450             { "Y Enable", "cigi.motion_tracker_control.y_enable",
6451                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x08,
6452                 "Used to enable or disable the Y-axis position of the motion tracker", HFILL }
6453         },
6454         { &hf_cigi3_motion_tracker_control_z_enable,
6455             { "Z Enable", "cigi.motion_tracker_control.z_enable",
6456                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x10,
6457                 "Used to enable or disable the Z-axis position of the motion tracker", HFILL }
6458         },
6459         { &hf_cigi3_motion_tracker_control_roll_enable,
6460             { "Roll Enable", "cigi.motion_tracker_control.roll_enable",
6461                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x20,
6462                 "Used to enable or disable the roll of the motion tracker", HFILL }
6463         },
6464         { &hf_cigi3_motion_tracker_control_pitch_enable,
6465             { "Pitch Enable", "cigi.motion_tracker_control.pitch_enable",
6466                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x40,
6467                 "Used to enable or disable the pitch of the motion tracker", HFILL }
6468         },
6469         { &hf_cigi3_motion_tracker_control_yaw_enable,
6470             { "Yaw Enable", "cigi.motion_tracker_control.yaw_enable",
6471                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x80,
6472                 "Used to enable or disable the yaw of the motion tracker", HFILL }
6473         },
6474         { &hf_cigi3_motion_tracker_control_view_group_select,
6475             { "View/View Group Select", "cigi.motion_tracker_control.view_group_select",
6476                 FT_BOOLEAN, 8, TFS(&cigi3_motion_tracker_control_view_group_select_tfs), 0x01,
6477                 "Specifies whether the tracking device is attached to a single view or a view group", HFILL }
6478         },
6479
6480         /* CIGI3 Earth Reference Model Definition */
6481         { &hf_cigi3_earth_reference_model_definition,
6482             { "Earth Reference Model Definition", "cigi.earth_ref_model_def",
6483                 FT_STRINGZ, BASE_NONE, NULL, 0x0,
6484                 "Earth Reference Model Definition Packet", HFILL }
6485         },
6486         { &hf_cigi3_earth_reference_model_definition_erm_enable,
6487             { "Custom ERM Enable", "cigi.earth_ref_model_def.erm_enable",
6488                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x01,
6489                 "Specifies whether the IG should use the Earth Reference Model defined by this packet", HFILL }
6490         },
6491         { &hf_cigi3_earth_reference_model_definition_equatorial_radius,
6492             { "Equatorial Radius (m)", "cigi.earth_ref_model_def.equatorial_radius",
6493                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
6494                 "Specifies the semi-major axis of the ellipsoid", HFILL }
6495         },
6496         { &hf_cigi3_earth_reference_model_definition_flattening,
6497             { "Flattening (m)", "cigi.earth_ref_model_def.flattening",
6498                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
6499                 "Specifies the flattening of the ellipsoid", HFILL }
6500         },
6501
6502         /* CIGI2 Trajectory Definition */
6503         { &hf_cigi2_trajectory_definition,
6504             { "Trajectory Definition", "cigi.trajectory_def",
6505                 FT_STRINGZ, BASE_NONE, NULL, 0x0,          
6506                 "Trajectory Definition Packet", HFILL }
6507         },
6508         { &hf_cigi2_trajectory_definition_entity_id,
6509             { "Entity ID", "cigi.trajectory_def.entity_id",
6510                 FT_UINT16, BASE_DEC, NULL, 0x0,
6511                 "Indicates which entity is being influenced by this trajectory behavior", HFILL }
6512         },
6513         { &hf_cigi2_trajectory_definition_acceleration,
6514             { "Acceleration Factor (m/s²)", "cigi.trajectory_def.acceleration",
6515                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6516                 "Indicates the acceleration factor that will be applied to the Vz component of the velocity vector over time to simulate the effects of gravity on the object", HFILL }
6517         },
6518         { &hf_cigi2_trajectory_definition_retardation,
6519             { "Retardation Rate (m/s)", "cigi.trajectory_def.retardation",
6520                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6521                 "Indicates what retardation factor will be applied to the object's motion", HFILL }
6522         },
6523         { &hf_cigi2_trajectory_definition_terminal_velocity,
6524             { "Terminal Velocity (m/s)", "cigi.trajectory_def.terminal_velocity",
6525                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6526                 "Indicates what final velocity the object will be allowed to obtain", HFILL }
6527         },
6528
6529         /* CIGI3 Trajectory Definition */
6530         { &hf_cigi3_trajectory_definition,
6531             { "Trajectory Definition", "cigi.trajectory_def",
6532                 FT_STRINGZ, BASE_NONE, NULL, 0x0,
6533                 "Trajectory Definition Packet", HFILL }
6534         },
6535         { &hf_cigi3_trajectory_definition_entity_id,
6536             { "Entity ID", "cigi.trajectory_def.entity_id",
6537                 FT_UINT16, BASE_DEC, NULL, 0x0,
6538                 "Identifies the entity for which the trajectory is defined", HFILL }
6539         },
6540         { &hf_cigi3_trajectory_definition_acceleration_x,
6541             { "Acceleration X (m/s²)", "cigi.trajectory_def.acceleration_x",
6542                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6543                 "Specifies the X component of the acceleration vector", HFILL }
6544         },
6545         { &hf_cigi3_trajectory_definition_acceleration_y,
6546             { "Acceleration Y (m/s²)", "cigi.trajectory_def.acceleration_y",
6547                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6548                 "Specifies the Y component of the acceleration vector", HFILL }
6549         },
6550         { &hf_cigi3_trajectory_definition_acceleration_z,
6551             { "Acceleration Z (m/s²)", "cigi.trajectory_def.acceleration_z",
6552                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6553                 "Specifies the Z component of the acceleration vector", HFILL }
6554         },
6555         { &hf_cigi3_trajectory_definition_retardation_rate,
6556             { "Retardation Rate (m/s²)", "cigi.trajectory_def.retardation_rate",
6557                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6558                 "Specifies the magnitude of an acceleration applied against the entity's instantaneous linear velocity vector", HFILL }
6559         },
6560         { &hf_cigi3_trajectory_definition_terminal_velocity,
6561             { "Terminal Velocity (m/s0", "cigi.trajectory_def.terminal_velocity",
6562                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6563                 "Specifies the maximum velocity the entity can sustain", HFILL }
6564         },
6565
6566         /* CIGI2 Special Effect Definition */
6567         { &hf_cigi2_special_effect_definition,
6568             { "Special Effect Definition", "cigi.special_effect_def",
6569                 FT_STRINGZ, BASE_NONE, NULL, 0x0,          
6570                 "Special Effect Definition Packet", HFILL }
6571         },
6572         { &hf_cigi2_special_effect_definition_entity_id,
6573             { "Entity ID", "cigi.special_effect_def.entity_id",
6574                 FT_UINT16, BASE_DEC, NULL, 0x0,
6575                 "Indicates which effect is being modified", HFILL }
6576         },
6577         { &hf_cigi2_special_effect_definition_seq_direction,
6578             { "Sequence Direction", "cigi.special_effect_def.seq_direction",
6579                 FT_BOOLEAN, 8, TFS(&cigi2_special_effect_definition_seq_direction_tfs), 0x80,
6580                 "Indicates whether the effect animation sequence should be sequence from beginning to end or vice versa", HFILL }
6581         },
6582         { &hf_cigi2_special_effect_definition_color_enable,
6583             { "Color Enable", "cigi.special_effect_def.color_enable",
6584                 FT_BOOLEAN, 8, TFS(&cigi_on_tfs), 0x40,
6585                 "Indicates whether the red, green, and blue color values will be applied to the special effect", HFILL }
6586         },
6587         { &hf_cigi2_special_effect_definition_red,
6588             { "Red Color Value", "cigi.special_effect_def.red",
6589                 FT_UINT8, BASE_DEC, NULL, 0x0,
6590                 "Specifies the red component of a color to be applied to the effect", HFILL }
6591         },
6592         { &hf_cigi2_special_effect_definition_green,
6593             { "Green Color Value", "cigi.special_effect_def.green",
6594                 FT_UINT8, BASE_DEC, NULL, 0x0,
6595                 "Specifies the green component of a color to be applied to the effect", HFILL }
6596         },
6597         { &hf_cigi2_special_effect_definition_blue,
6598             { "Blue Color Value", "cigi.special_effect_def.blue",
6599                 FT_UINT8, BASE_DEC, NULL, 0x0,
6600                 "Specifies the blue component of a color to be applied to the effect", HFILL }
6601         },
6602         { &hf_cigi2_special_effect_definition_x_scale,
6603             { "X Scale", "cigi.special_effect_def.x_scale",
6604                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6605                 "Specifies a scale factor to apply along the effect's X axis", HFILL }
6606         },
6607         { &hf_cigi2_special_effect_definition_y_scale,
6608             { "Y Scale", "cigi.special_effect_def.y_scale",
6609                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6610                 "Specifies a scale factor to apply along the effect's Y axis", HFILL }
6611         },
6612         { &hf_cigi2_special_effect_definition_z_scale,
6613             { "Z Scale", "cigi.special_effect_def.z_scale",
6614                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6615                 "Specifies a scale factor to apply along the effect's Z axis", HFILL }
6616         },
6617         { &hf_cigi2_special_effect_definition_time_scale,
6618             { "Time Scale", "cigi.special_effect_def.time_scale",
6619                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6620                 "Specifies a scale factor to apply to the time period for the effect's animation sequence", HFILL }
6621         },
6622         { &hf_cigi2_special_effect_definition_effect_count,
6623             { "Effect Count", "cigi.special_effect_def.effect_count",
6624                 FT_UINT16, BASE_DEC, NULL, 0x0,
6625                 "Indicates how many effects are contained within a single burst", HFILL }
6626         },
6627         { &hf_cigi2_special_effect_definition_separation,
6628             { "Separation (m)", "cigi.special_effect_def.separation",
6629                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6630                 "Indicates the distance between particles within a burst", HFILL }
6631         },
6632         { &hf_cigi2_special_effect_definition_burst_interval,
6633             { "Burst Interval (s)", "cigi.special_effect_def.burst_interval",
6634                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6635                 "Indicates the time between successive bursts", HFILL }
6636         },
6637         { &hf_cigi2_special_effect_definition_duration,
6638             { "Duration (s)", "cigi.special_effect_def.duration",
6639                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6640                 "Indicates how long an effect or sequence of burst will be active", HFILL }
6641         },
6642
6643         /* CIGI2 View Definition */
6644         { &hf_cigi2_view_definition,
6645             { "View Definition", "cigi.view_def",
6646                 FT_STRINGZ, BASE_NONE, NULL, 0x0,          
6647                 "View Definition Packet", HFILL }
6648         },
6649         { &hf_cigi2_view_definition_view_id,
6650             { "View ID", "cigi.view_def.view_id",
6651                 FT_UINT8, BASE_DEC, NULL, 0xf8,
6652                 "Specifies the view to which this packet should be applied", HFILL }
6653         },
6654         { &hf_cigi2_view_definition_view_group,
6655             { "View Group", "cigi.view_def.view_group",
6656                 FT_UINT8, BASE_DEC, NULL, 0x07,
6657                 "Specifies the view group to which the view is to be assigned", HFILL }
6658         },
6659         { &hf_cigi2_view_definition_view_type,
6660             { "View Type", "cigi.view_def.view_type",
6661                 FT_UINT8, BASE_DEC, NULL, 0xe0,
6662                 "Specifies the view type", HFILL }
6663         },
6664         { &hf_cigi2_view_definition_pixel_rep,
6665             { "Pixel Replication", "cigi.view_def.pixel_rep",
6666                 FT_UINT8, BASE_DEC, VALS(cigi2_view_definition_pixel_rep_vals), 0x1c,
6667                 "Specifies what pixel replication function should be applied to the view", HFILL }
6668         },
6669         { &hf_cigi2_view_definition_mirror,
6670             { "View Mirror", "cigi.view_def.mirror",
6671                 FT_UINT8, BASE_DEC, VALS(cigi2_view_definition_mirror_vals), 0x03,
6672                 "Specifies what mirroring function should be applied to the view", HFILL }
6673         },
6674         { &hf_cigi2_view_definition_tracker_assign,
6675             { "Tracker Assign", "cigi.view_def.tracker_assign",
6676                 FT_BOOLEAN, 8, TFS(&cigi_boolean_tfs), 0x80,
6677                 "Specifies whether the view should be controlled by an external tracking device", HFILL }
6678         },
6679         { &hf_cigi2_view_definition_near_enable,
6680             { "Field of View Near Enable", "cigi.view_def.near_enable",
6681                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x40,
6682                 "Identifies whether the field of view near value is manipulated from the Host", HFILL }
6683         },
6684         { &hf_cigi2_view_definition_far_enable,
6685             { "Field of View Far Enable", "cigi.view_def.far_enable",
6686                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x20,
6687                 "Identifies whether the field of view far value is manipulated from the Host", HFILL }
6688         },
6689         { &hf_cigi2_view_definition_left_enable,
6690             { "Field of View Left Enable", "cigi.view_def.left_enable",
6691                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x10,
6692                 "Identifies whether the field of view left value is manipulated from the Host", HFILL }
6693         },
6694         { &hf_cigi2_view_definition_right_enable,
6695             { "Field of View Right Enable", "cigi.view_def.right_enable",
6696                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x08,
6697                 "Identifies whether the field of view right value is manipulated from the Host", HFILL }
6698         },
6699         { &hf_cigi2_view_definition_top_enable,
6700             { "Field of View Top Enable", "cigi.view_def.top_enable",
6701                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x04,
6702                 "Identifies whether the field of view top value is manipulated from the Host", HFILL }
6703         },
6704         { &hf_cigi2_view_definition_bottom_enable,
6705             { "Field of View Bottom Enable", "cigi.view_def.bottom_enable",
6706                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x02,
6707                 "Identifies whether the field of view bottom value is manipulated from the Host", HFILL }
6708         },
6709         { &hf_cigi2_view_definition_fov_near,
6710             { "Field of View Near (m)", "cigi.view_def.fov_near",
6711                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6712                 "Defines the near clipping plane for the view", HFILL }
6713         },
6714         { &hf_cigi2_view_definition_fov_far,
6715             { "Field of View Far (m)", "cigi.view_def.fov_far",
6716                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6717                 "Defines the far clipping plane for the view", HFILL }
6718         },
6719         { &hf_cigi2_view_definition_fov_left,
6720             { "Field of View Left (°)", "cigi.view_def.fov_left",
6721                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6722                 "Defines the left clipping plane for the view", HFILL }
6723         },
6724         { &hf_cigi2_view_definition_fov_right,
6725             { "Field of View Right (°)", "cigi.view_def.fov_right",
6726                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6727                 "Defines the right clipping plane for the view", HFILL }
6728         },
6729         { &hf_cigi2_view_definition_fov_top,
6730             { "Field of View Top (°)", "cigi.view_def.fov_top",
6731                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6732                 "Defines the top clipping plane for the view", HFILL }
6733         },
6734         { &hf_cigi2_view_definition_fov_bottom,
6735             { "Field of View Bottom (°)", "cigi.view_def.fov_bottom",
6736                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6737                 "Defines the bottom clipping plane for the view", HFILL }
6738         },
6739
6740         /* CIGI3 View Definition */
6741         { &hf_cigi3_view_definition,
6742             { "View Definition", "cigi.view_def",
6743                 FT_STRINGZ, BASE_NONE, NULL, 0x0,
6744                 "View Definition Packet", HFILL }
6745         },
6746         { &hf_cigi3_view_definition_view_id,
6747             { "View ID", "cigi.view_def.view_id",
6748                 FT_UINT16, BASE_DEC, NULL, 0x0,
6749                 "Specifies the view to which the data in this packet will be applied", HFILL }
6750         },
6751         { &hf_cigi3_view_definition_group_id,
6752             { "Group ID", "cigi.view_def.group_id",
6753                 FT_UINT8, BASE_DEC, NULL, 0x0,
6754                 "Specifies the group to which the view is to be assigned", HFILL }
6755         },
6756         { &hf_cigi3_view_definition_near_enable,
6757             { "Near Enable", "cigi.view_def.near_enable",
6758                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x01,
6759                 "Specifies whether the near clipping plane will be set to the value of the Near parameter within this packet", HFILL }
6760         },
6761         { &hf_cigi3_view_definition_far_enable,
6762             { "Far Enable", "cigi.view_def.far_enable",
6763                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x02,
6764                 "Specifies whether the far clipping plane will be set to the value of the Far parameter within this packet", HFILL }
6765         },
6766         { &hf_cigi3_view_definition_left_enable,
6767             { "Left Enable", "cigi.view_def.left_enable",
6768                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x04,
6769                 "Specifies whether the left half-angle of the view frustum will be set according to the value of the Left parameter within this packet", HFILL }
6770         },
6771         { &hf_cigi3_view_definition_right_enable,
6772             { "Right Enable", "cigi.view_def.right_enable",
6773                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x08,
6774                 "Specifies whether the right half-angle of the view frustum will be set according to the value of the Right parameter within this packet", HFILL }
6775         },
6776         { &hf_cigi3_view_definition_top_enable,
6777             { "Top Enable", "cigi.view_def.top_enable",
6778                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x10,
6779                 "Specifies whether the top half-angle of the view frustum will be set according to the value of the Top parameter within this packet", HFILL }
6780         },
6781         { &hf_cigi3_view_definition_bottom_enable,
6782             { "Bottom Enable", "cigi.view_def.bottom_enable",
6783                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x20,
6784                 "Specifies whether the bottom half-angle of the view frustum will be set according to the value of the Bottom parameter within this packet", HFILL }
6785         },
6786         { &hf_cigi3_view_definition_mirror_mode,
6787             { "Mirror Mode", "cigi.view_def.mirror_mode",
6788                 FT_UINT8, BASE_DEC, VALS(cigi3_view_definition_mirror_mode_vals), 0xc0,
6789                 "Specifies the mirroring function to be performed on the view", HFILL }
6790         },
6791         { &hf_cigi3_view_definition_pixel_replication,
6792             { "Pixel Replication Mode", "cigi.view_def.pixel_replication",
6793                 FT_UINT8, BASE_DEC, VALS(cigi3_view_definition_pixel_replication_vals), 0x07,
6794                 "Specifies the pixel replication function to be performed on the view", HFILL }
6795         },
6796         { &hf_cigi3_view_definition_projection_type,
6797             { "Projection Type", "cigi.view_def.projection_type",
6798                 FT_BOOLEAN, 8, TFS(&cigi3_view_definition_projection_type_tfs), 0x08,
6799                 "Specifies whether the view projection should be perspective or orthographic parallel", HFILL }
6800         },
6801         { &hf_cigi3_view_definition_reorder,
6802             { "Reorder", "cigi.view_def.reorder",
6803                 FT_BOOLEAN, 8, TFS(&cigi3_view_definition_reorder_tfs), 0x01,
6804                 "Specifies whether the view should be moved to the top of any overlapping views", HFILL }
6805         },
6806         { &hf_cigi3_view_definition_view_type,
6807             { "View Type", "cigi.view_def.view_type",
6808                 FT_UINT8, BASE_DEC, NULL, 0xe0,
6809                 "Specifies an IG-defined type for the indicated view", HFILL }
6810         },
6811         { &hf_cigi3_view_definition_near,
6812             { "Near (m)", "cigi.view_def.near",
6813                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6814                 "Specifies the position of the view's near clipping plane", HFILL }
6815         },
6816         { &hf_cigi3_view_definition_far,
6817             { "Far (m)", "cigi.view_def.far",
6818                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6819                 "Specifies the position of the view's far clipping plane", HFILL }
6820         },
6821         { &hf_cigi3_view_definition_left,
6822             { "Left (°)", "cigi.view_def.left",
6823                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6824                 "Specifies the left half-angle of the view frustum", HFILL }
6825         },
6826         { &hf_cigi3_view_definition_right,
6827             { "Right (°)", "cigi.view_def.right",
6828                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6829                 "Specifies the right half-angle of the view frustum", HFILL }
6830         },
6831         { &hf_cigi3_view_definition_top,
6832             { "Top (°)", "cigi.view_def.top",
6833                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6834                 "Specifies the top half-angle of the view frustum", HFILL }
6835         },
6836         { &hf_cigi3_view_definition_bottom,
6837             { "Bottom (°)", "cigi.view_def.bottom",
6838                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6839                 "Specifies the bottom half-angle of the view frustum", HFILL }
6840         },
6841
6842         /* CIGI2 Collision Detection Segment Definition */
6843         { &hf_cigi2_collision_detection_segment_definition,
6844             { "Collision Detection Segment Definition", "cigi.coll_det_seg_def",
6845                 FT_STRINGZ, BASE_NONE, NULL, 0x0,          
6846                 "Collision Detection Segment Definition Packet", HFILL }
6847         },
6848         { &hf_cigi2_collision_detection_segment_definition_entity_id,
6849             { "Entity ID", "cigi.coll_det_seg_def.entity_id",
6850                 FT_UINT16, BASE_DEC, NULL, 0x0,
6851                 "Indicates the entity to which this collision detection definition is assigned", HFILL }
6852         },
6853         { &hf_cigi2_collision_detection_segment_definition_segment_enable,
6854             { "Segment Enable", "cigi.coll_det_seg_def.segment_enable",
6855                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x80,
6856                 "Indicates whether the defined segment is enabled for collision testing", HFILL }
6857         },
6858         { &hf_cigi2_collision_detection_segment_definition_segment_id,
6859             { "Segment ID", "cigi.coll_det_seg_def.segment_id",
6860                 FT_UINT8, BASE_DEC, NULL, 0x7f,
6861                 "Indicates which segment is being uniquely defined for the given entity", HFILL }
6862         },
6863         { &hf_cigi2_collision_detection_segment_definition_collision_mask,
6864             { "Collision Mask", "cigi.coll_det_seg_def.collision_mask",
6865                 FT_BYTES, BASE_NONE, NULL, 0x0,
6866                 "Indicates which environment features will be included in or excluded from consideration for collision detection testing", HFILL }
6867         },
6868         { &hf_cigi2_collision_detection_segment_definition_x_start,
6869             { "Segment X Start (m)", "cigi.coll_det_seg_def.x_start",
6870                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6871                 "Specifies the starting point of the collision segment in the X-axis with respect to the entity's reference point", HFILL }
6872         },
6873         { &hf_cigi2_collision_detection_segment_definition_y_start,
6874             { "Segment Y Start (m)", "cigi.coll_det_seg_def.y_start",
6875                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6876                 "Specifies the starting point of the collision segment in the Y-axis with respect to the entity's reference point", HFILL }
6877         },
6878         { &hf_cigi2_collision_detection_segment_definition_z_start,
6879             { "Segment Z Start (m)", "cigi.coll_det_seg_def.z_start",
6880                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6881                 "Specifies the starting point of the collision segment in the Z-axis with respect to the entity's reference point", HFILL }
6882         },
6883         { &hf_cigi2_collision_detection_segment_definition_x_end,
6884             { "Segment X End (m)", "cigi.coll_det_seg_def.x_end",
6885                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6886                 "Specifies the ending point of the collision segment in the X-axis with respect to the entity's reference point", HFILL }
6887         },
6888         { &hf_cigi2_collision_detection_segment_definition_y_end,
6889             { "Segment Y End (m)", "cigi.coll_det_seg_def.y_end",
6890                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6891                 "Specifies the ending point of the collision segment in the Y-axis with respect to the entity's reference point", HFILL }
6892         },
6893         { &hf_cigi2_collision_detection_segment_definition_z_end,
6894             { "Segment Z End (m)", "cigi.coll_det_seg_def.z_end",
6895                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6896                 "Specifies the ending point of the collision segment in the Z-axis with respect to the entity's reference point", HFILL }
6897         },
6898
6899         /* CIGI3 Collision Detection Segment Definition */
6900         { &hf_cigi3_collision_detection_segment_definition,
6901             { "Collision Detection Segment Definition", "cigi.coll_det_seg_def",
6902                 FT_STRINGZ, BASE_NONE, NULL, 0x0,
6903                 "Collision Detection Segment Definition Packet", HFILL }
6904         },
6905         { &hf_cigi3_collision_detection_segment_definition_entity_id,
6906             { "Entity ID", "cigi.coll_det_seg_def.entity_id",
6907                 FT_UINT16, BASE_DEC, NULL, 0x0,
6908                 "Specifies the entity for which the segment is defined", HFILL }
6909         },
6910         { &hf_cigi3_collision_detection_segment_definition_segment_id,
6911             { "Segment ID", "cigi.coll_det_seg_def.segment_id",
6912                 FT_UINT8, BASE_DEC, NULL, 0x0,
6913                 "Specifies the ID of the segment", HFILL }
6914         },
6915         { &hf_cigi3_collision_detection_segment_definition_segment_enable,
6916             { "Segment Enable", "cigi.coll_det_seg_def.segment_enable",
6917                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x01,
6918                 "Specifies whether the segment is enabled or disabled", HFILL }
6919         },
6920         { &hf_cigi3_collision_detection_segment_definition_x1,
6921             { "X1 (m)", "cigi.coll_det_seg_def.x1",
6922                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6923                 "Specifies the X offset of one endpoint of the collision segment", HFILL }
6924         },
6925         { &hf_cigi3_collision_detection_segment_definition_y1,
6926             { "Y1 (m)", "cigi.coll_det_seg_def.y1",
6927                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6928                 "Specifies the Y offset of one endpoint of the collision segment", HFILL }
6929         },
6930         { &hf_cigi3_collision_detection_segment_definition_z1,
6931             { "Z1 (m)", "cigi.coll_det_seg_def.z1",
6932                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6933                 "Specifies the Z offset of one endpoint of the collision segment", HFILL }
6934         },
6935         { &hf_cigi3_collision_detection_segment_definition_x2,
6936             { "X2 (m)", "cigi.coll_det_seg_def.x2",
6937                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6938                 "Specifies the X offset of one endpoint of the collision segment", HFILL }
6939         },
6940         { &hf_cigi3_collision_detection_segment_definition_y2,
6941             { "Y2 (m)", "cigi.coll_det_seg_def.y2",
6942                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6943                 "Specifies the Y offset of one endpoint of the collision segment", HFILL }
6944         },
6945         { &hf_cigi3_collision_detection_segment_definition_z2,
6946             { "Z2 (m)", "cigi.coll_det_seg_def.z2",
6947                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6948                 "Specifies the Z offset of one endpoint of the collision segment", HFILL }
6949         },
6950         { &hf_cigi3_collision_detection_segment_definition_material_mask,
6951             { "Material Mask", "cigi.coll_det_seg_def.material_mask",
6952                 FT_UINT32, BASE_DEC, NULL, 0x0,
6953                 "Specifies the environmental and cultural features to be included in or excluded from consideration for collision testing", HFILL }
6954         },
6955
6956         /* CIGI2 Collision Detection Volume Definition */
6957         { &hf_cigi2_collision_detection_volume_definition,
6958             { "Collision Detection Volume Definition", "cigi.coll_det_vol_def",
6959                 FT_STRINGZ, BASE_NONE, NULL, 0x0,          
6960                 "Collision Detection Volume Definition Packet", HFILL }
6961         },
6962         { &hf_cigi2_collision_detection_volume_definition_entity_id,
6963             { "Entity ID", "cigi.coll_det_vol_def.entity_id",
6964                 FT_UINT16, BASE_DEC, NULL, 0x0,
6965                 "Indicates the entity to which this collision detection definition is assigned", HFILL }
6966         },
6967         { &hf_cigi2_collision_detection_volume_definition_volume_enable,
6968             { "Volume Enable", "cigi.coll_det_vol_def.volume_enable",
6969                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x80,
6970                 "Indicates whether the defined volume is enabled for collision testing", HFILL }
6971         },
6972         { &hf_cigi2_collision_detection_volume_definition_volume_id,
6973             { "Volume ID", "cigi.coll_det_vol_def.volume_id",
6974                 FT_UINT8, BASE_DEC, NULL, 0x7f,
6975                 "Indicates which volume is being uniquely defined for a given entity", HFILL }
6976         },
6977         { &hf_cigi2_collision_detection_volume_definition_x_offset,
6978             { "Centroid X Offset (m)", "cigi.coll_det_vol_def.x_offset",
6979                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6980                 "Specifies the offset of the volume's centroid along the X axis with respect to the entity's reference point", HFILL }
6981         },
6982         { &hf_cigi2_collision_detection_volume_definition_y_offset,
6983             { "Centroid Y Offset (m)", "cigi.coll_det_vol_def.y_offset",
6984                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6985                 "Specifies the offset of the volume's centroid along the Y axis with respect to the entity's reference point", HFILL }
6986         },
6987         { &hf_cigi2_collision_detection_volume_definition_z_offset,
6988             { "Centroid Z Offset (m)", "cigi.coll_det_vol_def.z_offset",
6989                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6990                 "Specifies the offset of the volume's centroid along the Z axis with respect to the entity's reference point", HFILL }
6991         },
6992         { &hf_cigi2_collision_detection_volume_definition_height,
6993             { "Height (m)", "cigi.coll_det_vol_def.height",
6994                 FT_FLOAT, BASE_DEC, NULL, 0x0,
6995                 "Specifies the height of the volume", HFILL }
6996         },
6997         { &hf_cigi2_collision_detection_volume_definition_width,
6998             { "Width (m)", "cigi.coll_det_vol_def.width",
6999                 FT_FLOAT, BASE_DEC, NULL, 0x0,
7000                 "Specifies the width of the volume", HFILL }
7001         },
7002         { &hf_cigi2_collision_detection_volume_definition_depth,
7003             { "Depth (m)", "cigi.coll_det_vol_def.depth",
7004                 FT_FLOAT, BASE_DEC, NULL, 0x0,
7005                 "Specifies the depth of the volume", HFILL }
7006         },
7007
7008         /* CIGI3 Collision Detection Volume Definition */
7009         { &hf_cigi3_collision_detection_volume_definition,
7010             { "Collision Detection Volume Definition", "cigi.coll_det_vol_def",
7011                 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7012                 "Collision Detection Volume Definition Packet", HFILL }
7013         },
7014         { &hf_cigi3_collision_detection_volume_definition_entity_id,
7015             { "Entity ID", "cigi.coll_det_vol_def.entity_id",
7016                 FT_UINT16, BASE_DEC, NULL, 0x0,
7017                 "Specifies the entity for which the volume is defined", HFILL }
7018         },
7019         { &hf_cigi3_collision_detection_volume_definition_volume_id,
7020             { "Volume ID", "cigi.coll_det_vol_def.volume_id",
7021                 FT_UINT8, BASE_DEC, NULL, 0x0,
7022                 "Specifies the ID of the volume", HFILL }
7023         },
7024         { &hf_cigi3_collision_detection_volume_definition_volume_enable,
7025             { "Volume Enable", "cigi.coll_det_vol_def.volume_enable",
7026                 FT_BOOLEAN, 8, TFS(&cigi_enable_tfs), 0x01,
7027                 "Specifies whether the volume is enabled or disabled", HFILL }
7028         },
7029         { &hf_cigi3_collision_detection_volume_definition_volume_type,
7030             { "Volume Type", "cigi.coll_det_vol_def.volume_type",
7031                 FT_BOOLEAN, 8, TFS(&cigi3_collision_detection_volume_definition_volume_type_tfs), 0x02,
7032                 "Specified whether the volume is spherical or cuboid", HFILL }
7033         },
7034         { &hf_cigi3_collision_detection_volume_definition_x,
7035             { "X (m)", "cigi.coll_det_vol_def.x",
7036                 FT_FLOAT, BASE_DEC, NULL, 0x0,
7037                 "Specifies the X offset of the center of the volume", HFILL }
7038         },
7039         { &hf_cigi3_collision_detection_volume_definition_y,
7040             { "Y (m)", "cigi.coll_det_vol_def.y",
7041                 FT_FLOAT, BASE_DEC, NULL, 0x0,
7042                 "Specifies the Y offset of the center of the volume", HFILL }
7043         },
7044         { &hf_cigi3_collision_detection_volume_definition_z,
7045             { "Z (m)", "cigi.coll_det_vol_def.z",
7046                 FT_FLOAT, BASE_DEC, NULL, 0x0,
7047                 "Specifies the Z offset of the center of the volume", HFILL }
7048         },
7049         { &hf_cigi3_collision_detection_volume_definition_radius_height,
7050             { "Radius (m)/Height (m)", "cigi.coll_det_vol_def.radius_height",
7051                 FT_FLOAT, BASE_DEC, NULL, 0x0,
7052                 "Specifies the radius of the sphere or specifies the length of the cuboid along its Z axis", HFILL }
7053         },
7054         { &hf_cigi3_collision_detection_volume_definition_width,
7055             { "Width (m)", "cigi.coll_det_vol_def.width",
7056                 FT_FLOAT, BASE_DEC, NULL, 0x0,
7057                 "Specifies the length of the cuboid along its Y axis", HFILL }
7058         },
7059         { &hf_cigi3_collision_detection_volume_definition_depth,
7060             { "Depth (m)", "cigi.coll_det_vol_def.depth",
7061                 FT_FLOAT, BASE_DEC, NULL, 0x0,
7062                 "Specifies the length of the cuboid along its X axis", HFILL }
7063         },
7064         { &hf_cigi3_collision_detection_volume_definition_roll,
7065             { "Roll (°)", "cigi.coll_det_vol_def.roll",
7066                 FT_FLOAT, BASE_DEC, NULL, 0x0,
7067                 "Specifies the roll of the cuboid with respect to the entity's coordinate system", HFILL }
7068         },
7069         { &hf_cigi3_collision_detection_volume_definition_pitch,
7070             { "Pitch (°)", "cigi.coll_det_vol_def.pitch",
7071                 FT_FLOAT, BASE_DEC, NULL, 0x0,
7072                 "Specifies the pitch of the cuboid with respect to the entity's coordinate system", HFILL }
7073         },
7074         { &hf_cigi3_collision_detection_volume_definition_yaw,
7075             { "Yaw (°)", "cigi.coll_det_vol_def.yaw",
7076                 FT_FLOAT, BASE_DEC, NULL, 0x0,
7077                 "Specifies the yaw of the cuboid with respect to the entity's coordinate system", HFILL }
7078         },
7079
7080         /* CIGI2 Height Above Terrain Request */
7081         { &hf_cigi2_height_above_terrain_request,
7082             { "Height Above Terrain Request", "cigi.hat_request",
7083                 FT_STRINGZ, BASE_NONE, NULL, 0x0,          
7084                 "Height Above Terrain Request Packet", HFILL }
7085         },
7086         { &hf_cigi2_height_above_terrain_request_hat_id,
7087             { "HAT ID", "cigi.hat_request.hat_id",
7088                 FT_UINT16, BASE_DEC, NULL, 0x0,
7089                 "Identifies the HAT request", HFILL }
7090         },
7091         { &hf_cigi2_height_above_terrain_request_alt,
7092             { "Altitude (m)", "cigi.hat_request.alt",
7093                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7094                 "Specifies the altitude from which the HAT request is being made", HFILL }
7095         },
7096         { &hf_cigi2_height_above_terrain_request_lat,
7097             { "Latitude (°)", "cigi.hat_request.lat",
7098                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7099                 "Specifies the latitudinal position from which the HAT request is being made", HFILL }
7100         },
7101         { &hf_cigi2_height_above_terrain_request_lon,
7102             { "Longitude (°)", "cigi.hat_request.lon",
7103                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7104                 "Specifies the longitudinal position from which the HAT request is being made", HFILL }
7105         },
7106
7107         /* CIGI2 Line of Sight Occult Request */
7108         { &hf_cigi2_line_of_sight_occult_request,
7109             { "Line of Sight Occult Request", "cigi.los_occult_request",
7110                 FT_STRINGZ, BASE_NONE, NULL, 0x0,          
7111                 "Line of Sight Occult Request Packet", HFILL }
7112         },
7113         { &hf_cigi2_line_of_sight_occult_request_los_id,
7114             { "LOS ID", "cigi.los_occult_request.los_id",
7115                 FT_UINT16, BASE_DEC, NULL, 0x0,
7116                 "Identifies the LOS request", HFILL }
7117         },
7118         { &hf_cigi2_line_of_sight_occult_request_source_alt,
7119             { "Source Altitude (m)", "cigi.los_occult_request.source_alt",
7120                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7121                 "Specifies the altitude of the source point for the LOS request segment", HFILL }
7122         },
7123         { &hf_cigi2_line_of_sight_occult_request_source_lat,
7124             { "Source Latitude (°)", "cigi.los_occult_request.source_lat",
7125                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7126                 "Specifies the latitudinal position of the source point for the LOS request segment", HFILL }
7127         },
7128         { &hf_cigi2_line_of_sight_occult_request_source_lon,
7129             { "Source Longitude (°)", "cigi.los_occult_request.source_lon",
7130                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7131                 "Specifies the longitudinal position of the source point for the LOS request segment", HFILL }
7132         },
7133         { &hf_cigi2_line_of_sight_occult_request_dest_alt,
7134             { "Destination Altitude (m)", "cigi.los_occult_request.dest_alt",
7135                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7136                 "Specifies the altitude of the destination point for the LOS request segment", HFILL }
7137         },
7138         { &hf_cigi2_line_of_sight_occult_request_dest_lat,
7139             { "Destination Latitude (°)", "cigi.los_occult_request.dest_lat",
7140                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7141                 "Specifies the latitudinal position for the destination point for the LOS request segment", HFILL }
7142         },
7143         { &hf_cigi2_line_of_sight_occult_request_dest_lon,
7144             { "Destination Longitude (°)", "cigi.los_occult_request.dest_lon",
7145                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7146                 "Specifies the longitudinal position of the destination point for the LOS request segment", HFILL }
7147         },
7148
7149         /* CIGI2 Line of Sight Range Request */
7150         { &hf_cigi2_line_of_sight_range_request,
7151             { "Line of Sight Range Request", "cigi.los_range_request",
7152                 FT_STRINGZ, BASE_NONE, NULL, 0x0,          
7153                 "Line of Sight Range Request Packet", HFILL }
7154         },
7155         { &hf_cigi2_line_of_sight_range_request_los_id,
7156             { "LOS ID", "cigi.los_range_request.los_id",
7157                 FT_UINT16, BASE_DEC, NULL, 0x0,
7158                 "Identifies the LOS request", HFILL }
7159         },
7160         { &hf_cigi2_line_of_sight_range_request_azimuth,
7161             { "Azimuth (°)", "cigi.los_range_request.azimuth",
7162                 FT_FLOAT, BASE_DEC, NULL, 0x0,
7163                 "Specifies the azimuth of the LOS vector", HFILL }
7164         },
7165         { &hf_cigi2_line_of_sight_range_request_elevation,
7166             { "Elevation (°)", "cigi.los_range_request.elevation",
7167                 FT_FLOAT, BASE_DEC, NULL, 0x0,
7168                 "Specifies the elevation for the LOS vector", HFILL }
7169         },
7170         { &hf_cigi2_line_of_sight_range_request_min_range,
7171             { "Minimum Range (m)", "cigi.los_range_request.min_range",
7172                 FT_FLOAT, BASE_DEC, NULL, 0x0,
7173                 "Specifies the distance from the source position specified in this data packet to a point along the LOS vector where intersection testing will begin", HFILL }
7174         },
7175         { &hf_cigi2_line_of_sight_range_request_max_range,
7176             { "Maximum Range (m)", "cigi.los_range_request.max_range",
7177                 FT_FLOAT, BASE_DEC, NULL, 0x0,
7178                 "Specifies the maximum extent from the source position specified in this data packet to a point along the LOS vector where intersection testing will end", HFILL }
7179         },
7180         { &hf_cigi2_line_of_sight_range_request_source_alt,
7181             { "Source Altitude (m)", "cigi.los_range_request.source_alt",
7182                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7183                 "Specifies the altitude of the source point of the LOS request vector", HFILL }
7184         },
7185         { &hf_cigi2_line_of_sight_range_request_source_lat,
7186             { "Source Latitude (°)", "cigi.los_range_request.source_lat",
7187                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7188                 "Specifies the latitudinal position of the source point of the LOS request vector", HFILL }
7189         },
7190         { &hf_cigi2_line_of_sight_range_request_source_lon,
7191             { "Source Longitude (°)", "cigi.los_range_request.source_lon",
7192                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7193                 "Specifies the longitudinal position of the source point of the LOS request vector", HFILL }
7194         },
7195
7196         /* CIGI2 Height of Terrain Request */
7197         { &hf_cigi2_height_of_terrain_request,
7198             { "Height of Terrain Request", "cigi.hot_request",
7199                 FT_STRINGZ, BASE_NONE, NULL, 0x0,          
7200                 "Height of Terrain Request Packet", HFILL }
7201         },
7202         { &hf_cigi2_height_of_terrain_request_hot_id,
7203             { "HOT ID", "cigi.hot_request.hot_id",
7204                 FT_UINT16, BASE_DEC, NULL, 0x0,
7205                 "Identifies the HOT request", HFILL }
7206         },
7207         { &hf_cigi2_height_of_terrain_request_lat,
7208             { "Latitude (°)", "cigi.hot_request.lat",
7209                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7210                 "Specifies the latitudinal position from which the HOT request is made", HFILL }
7211         },
7212         { &hf_cigi2_height_of_terrain_request_lon,
7213             { "Longitude (°)", "cigi.hot_request.lon",
7214                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7215                 "Specifies the longitudinal position from which the HOT request is made", HFILL }
7216         },
7217
7218         /* CIGI3 HAT/HOT Request */
7219         { &hf_cigi3_hat_hot_request,
7220             { "HAT/HOT Request", "cigi.hat_hot_request",
7221                 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7222                 "HAT/HOT Request Packet", HFILL }
7223         },
7224         { &hf_cigi3_hat_hot_request_hat_hot_id,
7225             { "HAT/HOT ID", "cigi.hat_hot_request.hat_hot_id",
7226                 FT_UINT16, BASE_DEC, NULL, 0x0,
7227                 "Identifies the HAT/HOT request", HFILL }
7228         },
7229         { &hf_cigi3_hat_hot_request_type,
7230             { "Request Type", "cigi.hat_hot_request.type",
7231                 FT_UINT8, BASE_DEC, VALS(cigi3_hat_hot_request_type_vals), 0x03,
7232                 "Determines the type of response packet the IG should return for this packet", HFILL }
7233         },
7234         { &hf_cigi3_hat_hot_request_coordinate_system,
7235             { "Coordinate System", "cigi.hat_hot_request.coordinate_system",
7236                 FT_BOOLEAN, 8, TFS(&cigi3_hat_hot_request_coordinate_system_tfs), 0x04,
7237                 "Specifies the coordinate system within which the test point is defined", HFILL }
7238         },
7239         { &hf_cigi3_hat_hot_request_entity_id,
7240             { "Entity ID", "cigi.hat_hot_request.entity_id",
7241                 FT_UINT16, BASE_DEC, NULL, 0x0,
7242                 "Specifies the entity relative to which the test point is defined", HFILL }
7243         },
7244         { &hf_cigi3_hat_hot_request_lat_xoff,
7245             { "Latitude (°)/X Offset (m)", "cigi.hat_hot_request.lat_xoff",
7246                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7247                 "Specifies the latitude from which the HAT/HOT request is being made or specifies the X offset of the point from which the HAT/HOT request is being made", HFILL }
7248         },
7249         { &hf_cigi3_hat_hot_request_lon_yoff,
7250             { "Longitude (°)/Y Offset (m)", "cigi.hat_hot_request.lon_yoff",
7251                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7252                 "Specifies the longitude from which the HAT/HOT request is being made or specifies the Y offset of the point from which the HAT/HOT request is being made", HFILL }
7253         },
7254         { &hf_cigi3_hat_hot_request_alt_zoff,
7255             { "Altitude (m)/Z Offset (m)", "cigi.hat_hot_request.alt_zoff",
7256                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7257                 "Specifies the altitude from which the HAT/HOT request is being made or specifies the Z offset of the point from which the HAT/HOT request is being made", HFILL }
7258         },
7259
7260         /* CIGI3 Line of Sight Segment Request */
7261         { &hf_cigi3_line_of_sight_segment_request,
7262             { "Line of Sight Segment Request", "cigi.los_segment_request",
7263                 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7264                 "Line of Sight Segment Request Packet", HFILL }
7265         },
7266         { &hf_cigi3_line_of_sight_segment_request_los_id,
7267             { "LOS ID", "cigi.los_segment_request.los_id",
7268                 FT_UINT16, BASE_DEC, NULL, 0x0,
7269                 "Identifies the LOS request", HFILL }
7270         },
7271         { &hf_cigi3_line_of_sight_segment_request_type,
7272             { "Request Type", "cigi.los_segment_request.type",
7273                 FT_BOOLEAN, 8, TFS(&cigi3_line_of_sight_segment_request_type_tfs), 0x01,
7274                 "Determines what type of response the IG should return for this request", HFILL }
7275         },
7276         { &hf_cigi3_line_of_sight_segment_request_source_coord,
7277             { "Source Point Coordinate System", "cigi.los_segment_request.source_coord",
7278                 FT_BOOLEAN, 8, TFS(&cigi3_line_of_sight_segment_request_coord_tfs), 0x02,
7279                 "Indicates the coordinate system relative to which the test segment source endpoint is specified", HFILL }
7280         },
7281         { &hf_cigi3_line_of_sight_segment_request_destination_coord,
7282             { "Destination Point Coordinate System", "cigi.los_segment_request.destination_coord",
7283                 FT_BOOLEAN, 8, TFS(&cigi3_line_of_sight_segment_request_coord_tfs), 0x04,
7284                 "Indicates the coordinate system relative to which the test segment destination endpoint is specified", HFILL }
7285         },
7286         { &hf_cigi3_line_of_sight_segment_request_response_coord,
7287             { "Response Coordinate System", "cigi.los_segment_request.response_coord",
7288                 FT_BOOLEAN, 8, TFS(&cigi3_line_of_sight_segment_request_coord_tfs), 0x08,
7289                 "Specifies the coordinate system to be used in the response", HFILL }
7290         },
7291         { &hf_cigi3_line_of_sight_segment_request_alpha_threshold,
7292             { "Alpha Threshold", "cigi.los_segment_request.alpha_threshold",
7293                 FT_UINT8, BASE_DEC, NULL, 0x0,
7294                 "Specifies the minimum alpha value a surface may have for an LOS response to be generated", HFILL }
7295         },
7296         { &hf_cigi3_line_of_sight_segment_request_entity_id,
7297             { "Entity ID", "cigi.los_segment_request.entity_id",
7298                 FT_UINT16, BASE_DEC, NULL, 0x0,
7299                 "Specifies the entity relative to which the test segment endpoints are defined", HFILL }
7300         },
7301         { &hf_cigi3_line_of_sight_segment_request_source_lat_xoff,
7302             { "Source Latitude (°)/Source X Offset (m)", "cigi.los_segment_request.source_lat_xoff",
7303                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7304                 "Specifies the latitude of the source endpoint of the LOS test segment or specifies the X offset of the source endpoint of the LOS test segment", HFILL }
7305         },
7306         { &hf_cigi3_line_of_sight_segment_request_source_lon_yoff,
7307             { "Source Longitude (°)/Source Y Offset (m)", "cigi.los_segment_request.source_lon_yoff",
7308                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7309                 "Specifies the longitude of the source endpoint of the LOS test segment or specifies the Y offset of the source endpoint of the LOS test segment", HFILL }
7310         },
7311         { &hf_cigi3_line_of_sight_segment_request_source_alt_zoff,
7312             { "Source Altitude (m)/Source Z Offset (m)", "cigi.los_segment_request.source_alt_zoff",
7313                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7314                 "Specifies the altitude of the source endpoint of the LOS test segment or specifies the Z offset of the source endpoint of the LOS test segment", HFILL }
7315         },
7316         { &hf_cigi3_line_of_sight_segment_request_destination_lat_xoff,
7317             { "Destination Latitude (°)/ Destination X Offset (m)", "cigi.los_segment_request.destination_lat_xoff",
7318                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7319                 "Specifies the latitude of the destination endpoint of the LOS test segment or specifies the X offset of the destination endpoint of the LOS test segment", HFILL }
7320         },
7321         { &hf_cigi3_line_of_sight_segment_request_destination_lon_yoff,
7322             { "Destination Longitude (°)/Destination Y Offset (m)", "cigi.los_segment_request.destination_lon_yoff",
7323                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7324                 "Specifies the longitude of the destination endpoint of the LOS test segment or specifies the Y offset of the destination endpoint of the LOS test segment", HFILL }
7325         },
7326         { &hf_cigi3_line_of_sight_segment_request_destination_alt_zoff,
7327             { "Destination Altitude (m)/ Destination Z Offset (m)", "cigi.los_segment_request.destination_alt_zoff",
7328                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7329                 "Specifies the altitude of the destination endpoint of the LOS test segment or specifies the Z offset of the destination endpoint of the LOS test segment", HFILL }
7330         },
7331         { &hf_cigi3_line_of_sight_segment_request_material_mask,
7332             { "Material Mask", "cigi.los_segment_request.material_mask",
7333                 FT_UINT32, BASE_DEC, NULL, 0x0,
7334                 "Specifies the environmental and cultural features to be included in or excluded from consideration for the LOS segment testing", HFILL }
7335         },
7336
7337         /* CIGI3 Line of Sight Vector Request */
7338         { &hf_cigi3_line_of_sight_vector_request,
7339             { "Line of Sight Vector Request", "cigi.los_vector_request",
7340                 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7341                 "Line of Sight Vector Request Packet", HFILL }
7342         },
7343         { &hf_cigi3_line_of_sight_vector_request_los_id,
7344             { "LOS ID", "cigi.los_vector_request.los_id",
7345                 FT_UINT16, BASE_DEC, NULL, 0x0,
7346                 "Identifies the LOS request", HFILL }
7347         },
7348         { &hf_cigi3_line_of_sight_vector_request_type,
7349             { "Request Type", "cigi.los_vector_request.type",
7350                 FT_BOOLEAN, 8, TFS(&cigi3_line_of_sight_vector_request_type_tfs), 0x01,
7351                 "Determines what type of response the IG should return for this request", HFILL }
7352         },
7353         { &hf_cigi3_line_of_sight_vector_request_source_coord,
7354             { "Source Point Coordinate System", "cigi.los_vector_request.source_coord",
7355                 FT_BOOLEAN, 8, TFS(&cigi3_line_of_sight_vector_request_coord_tfs), 0x02,
7356                 "Indicates the coordinate system relative to which the test vector source point is specified", HFILL }
7357         },
7358         { &hf_cigi3_line_of_sight_vector_request_response_coord,
7359             { "Response Coordinate System", "cigi.los_vector_request.response_coord",
7360                 FT_BOOLEAN, 8, TFS(&cigi3_line_of_sight_vector_request_coord_tfs), 0x04,
7361                 "Specifies the coordinate system to be used in the response", HFILL }
7362         },
7363         { &hf_cigi3_line_of_sight_vector_request_alpha,
7364             { "Alpha Threshold", "cigi.los_vector_request.alpha",
7365                 FT_UINT8, BASE_DEC, NULL, 0x0,
7366                 "Specifies the minimum alpha value a surface may have for an LOS response to be generated", HFILL }
7367         },
7368         { &hf_cigi3_line_of_sight_vector_request_entity_id,
7369             { "Entity ID", "cigi.los_vector_request.entity_id",
7370                 FT_UINT16, BASE_DEC, NULL, 0x0,
7371                 "Specifies the entity relative to which the test segment endpoints are defined", HFILL }
7372         },
7373         { &hf_cigi3_line_of_sight_vector_request_azimuth,
7374             { "Azimuth (°)", "cigi.los_vector_request.azimuth",
7375                 FT_FLOAT, BASE_DEC, NULL, 0x0,
7376                 "Specifies the horizontal angle of the LOS test vector", HFILL }
7377         },
7378         { &hf_cigi3_line_of_sight_vector_request_elevation,
7379             { "Elevation (°)", "cigi.los_vector_request.elevation",
7380                 FT_FLOAT, BASE_DEC, NULL, 0x0,
7381                 "Specifies the vertical angle of the LOS test vector", HFILL }
7382         },
7383         { &hf_cigi3_line_of_sight_vector_request_min_range,
7384             { "Minimum Range (m)", "cigi.los_vector_request.min_range",
7385                 FT_FLOAT, BASE_DEC, NULL, 0x0,
7386                 "Specifies the minimum range along the LOS test vector at which intersection testing should occur", HFILL }
7387         },
7388         { &hf_cigi3_line_of_sight_vector_request_max_range,
7389             { "Maximum Range (m)", "cigi.los_vector_request.max_range",
7390                 FT_FLOAT, BASE_DEC, NULL, 0x0,
7391                 "Specifies the maximum range along the LOS test vector at which intersection testing should occur", HFILL }
7392         },
7393         { &hf_cigi3_line_of_sight_vector_request_source_lat_xoff,
7394             { "Source Latitude (°)/Source X Offset (m)", "cigi.los_vector_request.source_lat_xoff",
7395                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7396                 "Specifies the latitude of the source point of the LOS test vector", HFILL }
7397         },
7398         { &hf_cigi3_line_of_sight_vector_request_source_lon_yoff,
7399             { "Source Longitude (°)/Source Y Offset (m)", "cigi.los_vector_request.source_lon_yoff",
7400                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7401                 "Specifies the longitude of the source point of the LOS test vector", HFILL }
7402         },
7403         { &hf_cigi3_line_of_sight_vector_request_source_alt_zoff,
7404             { "Source Altitude (m)/Source Z Offset (m)", "cigi.los_vector_request.source_alt_zoff",
7405                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7406                 "Specifies the altitude of the source point of the LOS test vector or specifies the Z offset of the source point of the LOS test vector", HFILL }
7407         },
7408         { &hf_cigi3_line_of_sight_vector_request_material_mask,
7409             { "Material Mask", "cigi.los_vector_request.material_mask",
7410                 FT_UINT32, BASE_DEC, NULL, 0x0,
7411                 "Specifies the environmental and cultural features to be included in LOS segment testing", HFILL }
7412         },
7413
7414         /* CIGI3 Position Request */
7415         { &hf_cigi3_position_request,
7416             { "Position Request", "cigi.pos_request",
7417                 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7418                 "Position Request Packet", HFILL }
7419         },
7420         { &hf_cigi3_position_request_object_id,
7421             { "Object ID", "cigi.pos_request.object_id",
7422                 FT_UINT16, BASE_DEC, NULL, 0x0,
7423                 "Identifies the entity, view, view group, or motion tracking device whose position is being requested", HFILL }
7424         },
7425         { &hf_cigi3_position_request_part_id,
7426             { "Articulated Part ID", "cigi.pos_request.part_id",
7427                 FT_UINT8, BASE_DEC, NULL, 0x0,
7428                 "Identifies the articulated part whose position is being requested", HFILL }
7429         },
7430         { &hf_cigi3_position_request_update_mode,
7431             { "Update Mode", "cigi.pos_request.update_mode",
7432                 FT_BOOLEAN, 8, TFS(&cigi3_position_request_update_mode_tfs), 0x01,
7433                 "Specifies whether the IG should report the position of the requested object each frame", HFILL }
7434         },
7435         { &hf_cigi3_position_request_object_class,
7436             { "Object Class", "cigi.pos_request.object_class",
7437                 FT_UINT8, BASE_DEC, VALS(cigi3_position_request_object_class_vals), 0x0e,
7438                 "Specifies the type of object whose position is being requested", HFILL }
7439         },
7440         { &hf_cigi3_position_request_coord_system,
7441             { "Coordinate System", "cigi.pos_request.coord_system",
7442                 FT_UINT8, BASE_DEC, VALS(cigi3_position_request_coord_system_vals), 0x30,
7443                 "Specifies the desired coordinate system relative to which the position and orientation should be given", HFILL }
7444         },
7445
7446         /* CIGI3 Environmental Conditions Request */
7447         { &hf_cigi3_environmental_conditions_request,
7448             { "Environmental Conditions Request", "cigi.env_cond_request",
7449                 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7450                 "Environmental Conditions Request Packet", HFILL }
7451         },
7452         { &hf_cigi3_environmental_conditions_request_type,
7453             { "Request Type", "cigi.env_cond_request.type",
7454                 FT_UINT8, BASE_DEC, VALS(cigi3_environmental_conditions_request_type_vals), 0x0f,
7455                 "Specifies the desired response type for the request", HFILL }
7456         },
7457         { &hf_cigi3_environmental_conditions_request_id,
7458             { "Request ID", "cigi.env_cond_request.id",
7459                 FT_UINT8, BASE_DEC, NULL, 0x0,
7460                 "Identifies the environmental conditions request", HFILL }
7461         },
7462         { &hf_cigi3_environmental_conditions_request_lat,
7463             { "Latitude (°)", "cigi.env_cond_request.lat",
7464                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7465                 "Specifies the geodetic latitude at which the environmental state is requested", HFILL }
7466         },
7467         { &hf_cigi3_environmental_conditions_request_lon,
7468             { "Longitude (°)", "cigi.env_cond_request.lon",
7469                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7470                 "Specifies the geodetic longitude at which the environmental state is requested", HFILL }
7471         },
7472         { &hf_cigi3_environmental_conditions_request_alt,
7473             { "Altitude (m)", "cigi.env_cond_request.alt",
7474                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7475                 "Specifies the geodetic altitude at which the environmental state is requested", HFILL }
7476         },
7477
7478         /* CIGI2 Start of Frame */
7479         { &hf_cigi2_start_of_frame,
7480             { "Start of Frame", "cigi.sof",
7481                 FT_STRINGZ, BASE_NONE, NULL, 0x0,          
7482                 "Start of Frame Packet", HFILL }
7483         },
7484         { &hf_cigi2_start_of_frame_db_number,
7485             { "Database Number", "cigi.sof.db_number",
7486                 FT_INT8, BASE_DEC, NULL, 0x0,
7487                 "Indicates load status of the requested database", HFILL }
7488         },
7489         { &hf_cigi2_start_of_frame_ig_status_code,
7490             { "IG Status Code", "cigi.sof.ig_status_code",
7491                 FT_UINT8, BASE_DEC, NULL, 0x0,
7492                 "Indicates the operational status of the IG", HFILL }
7493         },
7494         { &hf_cigi2_start_of_frame_ig_mode,
7495             { "IG Mode", "cigi.sof.ig_mode",
7496                 FT_UINT8, BASE_DEC, VALS(cigi2_start_of_frame_ig_mode_vals), 0xc0,
7497                 "Identifies to the host the current operating mode of the IG", HFILL }
7498         },
7499         { &hf_cigi2_start_of_frame_frame_ctr,
7500             { "IG to Host Frame Counter", "cigi.sof.frame_ctr",
7501                 FT_UINT32, BASE_DEC, NULL, 0x0,
7502                 "Contains a number representing a particular frame", HFILL }
7503         },
7504         { &hf_cigi2_start_of_frame_time_tag,
7505             { "Timing Value (µsec)", "cigi.sof.time_tag",
7506                 FT_FLOAT, BASE_DEC, NULL, 0x0,
7507                 "Contains a timing value that is used to time-tag the ethernet message during asynchronous operation", HFILL }
7508         },
7509
7510         /* CIGI3 Start of Frame */
7511         { &hf_cigi3_start_of_frame,
7512             { "Start of Frame", "cigi.sof",
7513                 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7514                 "Start of Frame Packet", HFILL }
7515         },
7516         { &hf_cigi3_start_of_frame_db_number,
7517             { "Database Number", "cigi.sof.db_number",
7518                 FT_INT8, BASE_DEC, NULL, 0x0,
7519                 "Indicates to the Host which database is currently in use and if that database is being loaded into primary memory", HFILL }
7520         },
7521         { &hf_cigi3_start_of_frame_ig_status,
7522             { "IG Status Code", "cigi.sof.ig_status",
7523                 FT_UINT8, BASE_DEC, NULL, 0x0,
7524                 "Indicates the error status of the IG", HFILL }
7525         },
7526         { &hf_cigi3_start_of_frame_ig_mode,
7527             { "IG Mode", "cigi.sof.ig_mode",
7528                 FT_UINT8, BASE_DEC, VALS(cigi3_start_of_frame_ig_mode_vals), 0x03,
7529                 "Indicates the current IG mode", HFILL }
7530         },
7531         { &hf_cigi3_start_of_frame_timestamp_valid,
7532             { "Timestamp Valid", "cigi.sof.timestamp_valid",
7533                 FT_BOOLEAN, 8, TFS(&cigi_valid_tfs), 0x04,
7534                 "Indicates whether the Timestamp parameter contains a valid value", HFILL }
7535         },
7536         { &hf_cigi3_start_of_frame_earth_reference_model,
7537             { "Earth Reference Model", "cigi.sof.earth_reference_model",
7538                 FT_BOOLEAN, 8, TFS(&cigi3_start_of_frame_earth_reference_model_tfs), 0x08,
7539                 "Indicates whether the IG is using a custom Earth Reference Model or the default WGS 84 reference ellipsoid for coordinate conversion calculations", HFILL }
7540         },
7541         { &hf_cigi3_start_of_frame_frame_ctr,
7542             { "Frame Counter", "cigi.sof.frame_ctr",
7543                 FT_UINT32, BASE_DEC, NULL, 0x0,
7544                 "Contains a number that identifies the frame", HFILL }
7545         },
7546         { &hf_cigi3_start_of_frame_timestamp,
7547             { "Timestamp (µs)", "cigi.sof.timestamp",
7548                 FT_UINT32, BASE_DEC, NULL, 0x0,
7549                 "Indicates the number of 10µs \"ticks\" since some initial reference time", HFILL }
7550         },
7551
7552         /* CIGI2 Height Above Terrain Response */
7553         { &hf_cigi2_height_above_terrain_response,
7554             { "Height Above Terrain Response", "cigi.hat_response",
7555                 FT_STRINGZ, BASE_NONE, NULL, 0x0,          
7556                 "Height Above Terrain Response Packet", HFILL }
7557         },
7558         { &hf_cigi2_height_above_terrain_response_hat_id,
7559             { "HAT ID", "cigi.hat_response.hat_id",
7560                 FT_UINT16, BASE_DEC, NULL, 0x0,
7561                 "Identifies the HAT response", HFILL }
7562         },
7563         { &hf_cigi2_height_above_terrain_response_valid,
7564             { "Valid", "cigi.hat_response.valid",
7565                 FT_BOOLEAN, 8, TFS(&cigi_valid_tfs), 0x80,
7566                 "Indicates whether the response is valid or invalid", HFILL }
7567         },
7568         { &hf_cigi2_height_above_terrain_response_material_type,
7569             { "Material Type", "cigi.hat_response.material_type",
7570                 FT_INT32, BASE_DEC, NULL, 0x0,
7571                 "Specifies the material type of the object intersected by the HAT test vector", HFILL }
7572         },
7573         { &hf_cigi2_height_above_terrain_response_alt,
7574             { "Altitude (m)", "cigi.hat_response.alt",
7575                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7576                 "Represents the altitude above or below the terrain for the position requested", HFILL }
7577         },
7578
7579         /* CIGI3 HAT/HOT Response */
7580         { &hf_cigi3_hat_hot_response,
7581             { "HAT/HOT Response", "cigi.hat_hot_response",
7582                 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7583                 "HAT/HOT Response Packet", HFILL }
7584         },
7585         { &hf_cigi3_hat_hot_response_hat_hot_id,
7586             { "HAT/HOT ID", "cigi.hat_hot_response.hat_hot_id",
7587                 FT_UINT16, BASE_DEC, NULL, 0x0,
7588                 "Identifies the HAT or HOT response", HFILL }
7589         },
7590         { &hf_cigi3_hat_hot_response_valid,
7591             { "Valid", "cigi.hat_hot_response.valid",
7592                 FT_BOOLEAN, 8, TFS(&cigi_valid_tfs), 0x01,
7593                 "Indicates whether the Height parameter contains a valid number", HFILL }
7594         },
7595         { &hf_cigi3_hat_hot_response_type,
7596             { "Response Type", "cigi.hat_hot_response.type",
7597                 FT_BOOLEAN, 8, TFS(&cigi3_hat_hot_response_type_tfs), 0x02,
7598                 "Indicates whether the Height parameter represent Height Above Terrain or Height Of Terrain", HFILL }
7599         },
7600         { &hf_cigi3_hat_hot_response_height,
7601             { "Height", "cigi.hat_hot_response.height",
7602                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7603                 "Contains the requested height", HFILL }
7604         },
7605
7606         /* CIGI3 HAT/HOT Extended Response */
7607         { &hf_cigi3_hat_hot_extended_response,
7608             { "HAT/HOT Extended Response", "cigi.hat_hot_ext_response",
7609                 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7610                 "HAT/HOT Extended Response Packet", HFILL }
7611         },
7612         { &hf_cigi3_hat_hot_extended_response_hat_hot_id,
7613             { "HAT/HOT ID", "cigi.hat_hot_ext_response.hat_hot_id",
7614                 FT_UINT16, BASE_DEC, NULL, 0x0,
7615                 "Identifies the HAT/HOT response", HFILL }
7616         },
7617         { &hf_cigi3_hat_hot_extended_response_valid,
7618             { "Valid", "cigi.hat_hot_ext_response.valid",
7619                 FT_BOOLEAN, 8, TFS(&cigi_valid_tfs), 0x01,
7620                 "Indicates whether the remaining parameters in this packet contain valid numbers", HFILL }
7621         },
7622         { &hf_cigi3_hat_hot_extended_response_hat,
7623             { "HAT", "cigi.hat_hot_ext_response.hat",
7624                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7625                 "Indicates the height of the test point above the terrain", HFILL }
7626         },
7627         { &hf_cigi3_hat_hot_extended_response_hot,
7628             { "HOT", "cigi.hat_hot_ext_response.hot",
7629                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7630                 "Indicates the height of terrain above or below the test point", HFILL }
7631         },
7632         { &hf_cigi3_hat_hot_extended_response_material_code,
7633             { "Material Code", "cigi.hat_hot_ext_response.material_code",
7634                 FT_UINT32, BASE_DEC, NULL, 0x0,
7635                 "Indicates the material code of the terrain surface at the point of intersection with the HAT/HOT test vector", HFILL }
7636         },
7637         { &hf_cigi3_hat_hot_extended_response_normal_vector_azimuth,
7638             { "Normal Vector Azimuth (°)", "cigi.hat_hot_ext_response.normal_vector_azimuth",
7639                 FT_FLOAT, BASE_DEC, NULL, 0x0,
7640                 "Indicates the azimuth of the normal unit vector of the surface intersected by the HAT/HOT test vector", HFILL }
7641         },
7642         { &hf_cigi3_hat_hot_extended_response_normal_vector_elevation,
7643             { "Normal Vector Elevation (°)", "cigi.hat_hot_ext_response.normal_vector_elevation",
7644                 FT_FLOAT, BASE_DEC, NULL, 0x0,
7645                 "Indicates the elevation of the normal unit vector of the surface intersected by the HAT/HOT test vector", HFILL }
7646         },
7647
7648         /* CIGI2 Line of Sight Response */
7649         { &hf_cigi2_line_of_sight_response,
7650             { "Line of Sight Response", "cigi.los_response",
7651                 FT_STRINGZ, BASE_NONE, NULL, 0x0,          
7652                 "Line of Sight Response Packet", HFILL }
7653         },
7654         { &hf_cigi2_line_of_sight_response_los_id,
7655             { "LOS ID", "cigi.los_response.los_id",
7656                 FT_UINT16, BASE_DEC, NULL, 0x0,
7657                 "Identifies the LOS response corresponding tot he associated LOS request", HFILL }
7658         },
7659         { &hf_cigi2_line_of_sight_response_valid,
7660             { "Valid", "cigi.los_response.valid",
7661                 FT_BOOLEAN, 8, TFS(&cigi_valid_tfs), 0x80,
7662                 "Indicates whether the response is valid or invalid", HFILL }
7663         },
7664         { &hf_cigi2_line_of_sight_response_occult_response,
7665             { "Occult Response", "cigi.los_response.occult_response",
7666                 FT_BOOLEAN, 8, TFS(&cigi2_line_of_sight_occult_response_tfs), 0x40,
7667                 "Used to respond to the LOS occult request data packet", HFILL }
7668         },
7669         { &hf_cigi2_line_of_sight_response_material_type,
7670             { "Material Type", "cigi.los_response.material_type",
7671                 FT_INT32, BASE_DEC, NULL, 0x0,
7672                 "Specifies the material type of the object intersected by the LOS test segment", HFILL }
7673         },
7674         { &hf_cigi2_line_of_sight_response_range,
7675             { "Range (m)", "cigi.los_response.range",
7676                 FT_FLOAT, BASE_DEC, NULL, 0x0,
7677                 "Used to respond to the Line of Sight Range Request data packet", HFILL }
7678         },
7679         { &hf_cigi2_line_of_sight_response_alt,
7680             { "Intersection Altitude (m)", "cigi.los_response.alt",
7681                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7682                 "Specifies the altitude of the point of intersection of the LOS request vector with an object", HFILL }
7683         },
7684         { &hf_cigi2_line_of_sight_response_lat,
7685             { "Intersection Latitude (°)", "cigi.los_response.lat",
7686                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7687                 "Specifies the latitudinal position of the intersection point of the LOS request vector with an object", HFILL }
7688         },
7689         { &hf_cigi2_line_of_sight_response_lon,
7690             { "Intersection Longitude (°)", "cigi.los_response.lon",
7691                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7692                 "Specifies the longitudinal position of the intersection point of the LOS request vector with an object", HFILL }
7693         },
7694
7695         /* CIGI3 Line of Sight Response */
7696         { &hf_cigi3_line_of_sight_response,
7697             { "Line of Sight Response", "cigi.los_response",
7698                 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7699                 "Line of Sight Response Packet", HFILL }
7700         },
7701         { &hf_cigi3_line_of_sight_response_los_id,
7702             { "LOS ID", "cigi.los_response.los_id",
7703                 FT_UINT16, BASE_DEC, NULL, 0x0,
7704                 "Identifies the LOS response", HFILL }
7705         },
7706         { &hf_cigi3_line_of_sight_response_valid,
7707             { "Valid", "cigi.los_response.valid",
7708                 FT_BOOLEAN, 8, TFS(&cigi_valid_tfs), 0x01,
7709                 "Indicates whether the Range parameter is valid", HFILL }
7710         },
7711         { &hf_cigi3_line_of_sight_response_entity_id_valid,
7712             { "Entity ID Valid", "cigi.los_response.entity_id_valid",
7713                 FT_BOOLEAN, 8, TFS(&cigi_valid_tfs), 0x02,
7714                 "Indicates whether the LOS test vector or segment intersects with an entity or a non-entity", HFILL }
7715         },
7716         { &hf_cigi3_line_of_sight_response_visible,
7717             { "Visible", "cigi.los_response.visible",
7718                 FT_BOOLEAN, 8, TFS(&cigi3_line_of_sight_response_visible_tfs), 0x04,
7719                 "Indicates whether the destination point is visible from the source point", HFILL }
7720         },
7721         { &hf_cigi3_line_of_sight_response_count,
7722             { "Response Count", "cigi.los_response.count",
7723                 FT_UINT8, BASE_DEC, NULL, 0x0,
7724                 "Indicates the total number of Line of Sight Response packets the IG will return for the corresponding request", HFILL }
7725         },
7726         { &hf_cigi3_line_of_sight_response_entity_id,
7727             { "Entity ID", "cigi.los_response.entity_id",
7728                 FT_UINT16, BASE_DEC, NULL, 0x0,
7729                 "Indicates the entity with which an LOS test vector or segment intersects", HFILL }
7730         },
7731         { &hf_cigi3_line_of_sight_response_range,
7732             { "Range (m)", "cigi.los_response.range",
7733                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7734                 "Indicates the distance along the LOS test segment or vector from the source point to the point of intersection with a polygon surface", HFILL }
7735         },
7736
7737         /* CIGI3 Line of Sight Extended Response */
7738         { &hf_cigi3_line_of_sight_extended_response,
7739             { "Line of Sight Extended Response", "cigi.los_ext_response",
7740                 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7741                 "Line of Sight Extended Response Packet", HFILL }
7742         },
7743         { &hf_cigi3_line_of_sight_extended_response_los_id,
7744             { "LOS ID", "cigi.los_ext_response.los_id",
7745                 FT_UINT16, BASE_DEC, NULL, 0x0,
7746                 "Identifies the LOS response", HFILL }
7747         },
7748         { &hf_cigi3_line_of_sight_extended_response_valid,
7749             { "Valid", "cigi.los_ext_response.valid",
7750                 FT_BOOLEAN, 8, TFS(&cigi_valid_tfs), 0x01,
7751                 "Indicates whether this packet contains valid data", HFILL }
7752         },
7753         { &hf_cigi3_line_of_sight_extended_response_entity_id_valid,
7754             { "Entity ID Valid", "cigi.los_ext_response.entity_id_valid",
7755                 FT_BOOLEAN, 8, TFS(&cigi_valid_tfs), 0x02,
7756                 "Indicates whether the LOS test vector or segment intersects with an entity", HFILL }
7757         },
7758         { &hf_cigi3_line_of_sight_extended_response_range_valid,
7759             { "Range Valid", "cigi.los_ext_response.range_valid",
7760                 FT_BOOLEAN, 8, TFS(&cigi_valid_tfs), 0x04,
7761                 "Indicates whether the Range parameter is valid", HFILL }
7762         },
7763         { &hf_cigi3_line_of_sight_extended_response_visible,
7764             { "Visible", "cigi.los_ext_response.visible",
7765                 FT_BOOLEAN, 8, TFS(&cigi3_line_of_sight_extended_response_visible_tfs), 0x08,
7766                 "Indicates whether the destination point is visible from the source point", HFILL }
7767         },
7768         { &hf_cigi3_line_of_sight_extended_response_intersection_coord,
7769             { "Intersection Point Coordinate System", "cigi.los_ext_response.intersection_coord",
7770                 FT_BOOLEAN, 8, TFS(&cigi3_line_of_sight_extended_response_intersection_coord_tfs), 0x10,
7771                 "Indicates the coordinate system relative to which the intersection point is specified", HFILL }
7772         },
7773         { &hf_cigi3_line_of_sight_extended_response_response_count,
7774             { "Response Count", "cigi.los_ext_response.response_count",
7775                 FT_UINT8, BASE_DEC, NULL, 0x0,
7776                 "Indicates the total number of Line of Sight Extended Response packets the IG will return for the corresponding request", HFILL }
7777         },
7778         { &hf_cigi3_line_of_sight_extended_response_entity_id,
7779             { "Entity ID", "cigi.los_ext_response.entity_id",
7780                 FT_UINT16, BASE_DEC, NULL, 0x0,
7781                 "Indicates the entity with which a LOS test vector or segment intersects", HFILL }
7782         },
7783         { &hf_cigi3_line_of_sight_extended_response_range,
7784             { "Range (m)", "cigi.los_ext_response.range",
7785                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7786                 "Indicates the distance along the LOS test segment or vector from the source point to the point of intersection with an object", HFILL }
7787         },
7788         { &hf_cigi3_line_of_sight_extended_response_lat_xoff,
7789             { "Latitude (°)/X Offset (m)", "cigi.los_ext_response.lat_xoff",
7790                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7791                 "Indicates the geodetic latitude of the point of intersection along the LOS test segment or vector or specifies the offset of the point of intersection of the LOS test segment or vector along the intersected entity's X axis", HFILL }
7792         },
7793         { &hf_cigi3_line_of_sight_extended_response_lon_yoff,
7794             { "Longitude (°)/Y Offset (m)", "cigi.los_ext_response.lon_yoff",
7795                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7796                 "Indicates the geodetic longitude of the point of intersection along the LOS test segment or vector or specifies the offset of the point of intersection of the LOS test segment or vector along the intersected entity's Y axis", HFILL }
7797         },
7798         { &hf_cigi3_line_of_sight_extended_response_alt_zoff,
7799             { "Altitude (m)/Z Offset(m)", "cigi.los_ext_response.alt_zoff",
7800                 FT_DOUBLE, BASE_DEC, NULL, 0x0,
7801                 "Indicates the geodetic altitude of the point of intersection along the LOS test segment or vector or specifies the offset of the point of intersection of the LOS test segment or vector along the intersected entity's Z axis", HFILL }
7802         },
7803         { &hf_cigi3_line_of_sight_extended_response_red,
7804             { "Red", "cigi.los_ext_response.red",
7805                 FT_UINT8, BASE_DEC, NULL, 0x0,
7806                 "Indicates the red color component of the surface at the point of intersection", HFILL }
7807         },
7808         { &hf_cigi3_line_of_sight_extended_response_green,
7809             { "Green", "cigi.los_ext_response.green",
7810                 FT_UINT8, BASE_DEC, NULL, 0x0,
7811                 "Indicates the green color component of the surface at the point of intersection", HFILL }
7812         },
7813         { &hf_cigi3_line_of_sight_extended_response_blue,
7814             { "Blue", "cigi.los_ext_response.blue",
7815                 FT_UINT8, BASE_DEC, NULL, 0x0,
7816                 "Indicates the blue color component of the surface at the point of intersection", HFILL }
7817         },
7818         { &hf_cigi3_line_of_sight_extended_response_alpha,
7819             { "Alpha", "cigi.los_ext_response.alpha",
7820                 FT_UINT8, BASE_DEC, NULL, 0x0,
7821                 "Indicates the alpha component of the surface at the point of intersection", HFILL }
7822         },
7823         { &hf_cigi3_line_of_sight_extended_response_material_code,
7824             { "Material Code", "cigi.los_ext_response.material_code",
7825                 FT_UINT32, BASE_DEC, NULL, 0x0,
7826                 "Indicates the material code of the surface intersected by the LOS test segment of vector", HFILL }
7827         },
7828         { &hf_cigi3_line_of_sight_extended_response_normal_vector_azimuth,
7829             { "Normal Vector Azimuth (°)", "cigi.los_ext_response.normal_vector_azimuth",
7830                 FT_FLOAT, BASE_DEC, NULL, 0x0,
7831                 "Indicates the azimuth of a unit vector normal to the surface intersected by the LOS test segment or vector", HFILL }
7832         },
7833         { &hf_cigi3_line_of_sight_extended_response_normal_vector_elevation,
7834             { "Normal Vector Elevation (°)", "cigi.los_ext_response.normal_vector_elevation",
7835                 FT_FLOAT, BASE_DEC, NULL, 0x0,
7836                 "Indicates the elevation of a unit vector normal to the surface intersected by the LOS test segment or vector", HFILL }
7837         },
7838
7839         /* CIGI2 Collision Detection Segment Response */
7840         { &hf_cigi2_collision_detection_segment_response,
7841             { "Collision Detection Segment Response", "cigi.coll_det_seg_response",
7842                 FT_STRINGZ, BASE_NONE, NULL, 0x0,          
7843                 "Collision Detection Segment Response Packet", HFILL }
7844         },
7845         { &hf_cigi2_collision_detection_segment_response_entity_id,
7846             { "Entity ID", "cigi.coll_det_seg_response.entity_id",
7847                 FT_UINT16, BASE_DEC, NULL, 0x0,
7848                 "Indicates which entity experienced a collision", HFILL }
7849         },
7850         { &hf_cigi2_collision_detection_segment_response_segment_id,
7851             { "Segment ID", "cigi.coll_det_seg_response.segment_id",
7852                 FT_UINT8, BASE_DEC, NULL, 0xfe,
7853                 "Identifies the collision segment", HFILL }
7854         },
7855         { &hf_cigi2_collision_detection_segment_response_contact,
7856             { "Entity/Non-Entity Contact", "cigi.coll_det_seg_response.contact",
7857                 FT_BOOLEAN, 8, TFS(&cigi2_collision_detection_segment_response_contact_tfs), 0x01,
7858                 "Indicates whether another entity was contacted during this collision", HFILL }
7859         },
7860         { &hf_cigi2_collision_detection_segment_response_contacted_entity,
7861             { "Contacted Entity ID", "cigi.coll_det_seg_response.contacted_entity",
7862                 FT_UINT16, BASE_DEC, NULL, 0x0,
7863                 "Indicates which entity was contacted during the collision", HFILL }
7864         },
7865         { &hf_cigi2_collision_detection_segment_response_material_type,
7866             { "Material Type", "cigi.coll_det_seg_response.material_type",
7867                 FT_INT32, BASE_DEC, NULL, 0x0,
7868                 "Specifies the material type of the surface that this collision test segment contacted", HFILL }
7869         },
7870         { &hf_cigi2_collision_detection_segment_response_collision_x,
7871             { "Collision Point X (m)", "cigi.coll_det_seg_response.collision_x",
7872                 FT_FLOAT, BASE_DEC, NULL, 0x0,
7873                 "Specifies the X component of a vector, which lies along the defined segment where the segment intersected a surface", HFILL }
7874         },
7875         { &hf_cigi2_collision_detection_segment_response_collision_y,
7876             { "Collision Point Y (m)", "cigi.coll_det_seg_response.collision_y",
7877                 FT_FLOAT, BASE_DEC, NULL, 0x0,
7878                 "Specifies the Y component of a vector, which lies along the defined segment where the segment intersected a surface", HFILL }
7879         },
7880         { &hf_cigi2_collision_detection_segment_response_collision_z,
7881             { "Collision Point Z (m)", "cigi.coll_det_seg_response.collision_z",
7882                 FT_FLOAT, BASE_DEC, NULL, 0x0,
7883                 "Specifies the Z component of a vector, which lies along the defined segment where the segment intersected a surface", HFILL }
7884         },
7885
7886         /* CIGI2 Sensor Response */
7887         { &hf_cigi2_sensor_response,
7888             { "Sensor Response", "cigi.sensor_response",
7889                 FT_STRINGZ, BASE_NONE, NULL, 0x0,          
7890                 "Sensor Response Packet", HFILL }
7891         },
7892         { &hf_cigi2_sensor_response_view_id,
7893             { "View ID", "cigi.sensor_response.view_id",
7894                 FT_UINT8, BASE_DEC, NULL, 0xf8,
7895                 "Indicates the sensor view", HFILL }
7896         },
7897         { &hf_cigi2_sensor_response_status,
7898             { "Sensor Status", "cigi.sensor_response.status",
7899                 FT_UINT8, BASE_DEC, VALS(cigi2_sensor_response_status_vals), 0x06,
7900                 "Indicates the current sensor mode", HFILL }
7901         },
7902         { &hf_cigi2_sensor_response_sensor_id,
7903             { "Sensor ID", "cigi.sensor_response.sensor_id",
7904                 FT_UINT8, BASE_DEC, NULL, 0x0,
7905                 "Identifies the sensor response corresponding to the associated sensor control data packet", HFILL }
7906         },
7907         { &hf_cigi2_sensor_response_x_offset,
7908             { "Gate X Offset (°)", "cigi.sensor_response.x_offset",
7909                 FT_FLOAT, BASE_DEC, NULL, 0x0,
7910                 "Specifies the target's horizontal offset from the view plane normal", HFILL }
7911         },
7912         { &hf_cigi2_sensor_response_y_offset,
7913             { "Gate Y Offset (°)", "cigi.sensor_response.y_offset",
7914                 FT_FLOAT, BASE_DEC, NULL, 0x0,
7915                 "Specifies the target's vertical offset from the view plane normal", HFILL }
7916         },
7917         { &hf_cigi2_sensor_response_x_size,
7918             { "Gate X Size", "cigi.sensor_response.x_size",
7919                 FT_UINT16, BASE_DEC, NULL, 0x0,
7920                 "Specifies the target size in the X direction (horizontal) in pixels", HFILL }
7921         },
7922         { &hf_cigi2_sensor_response_y_size,
7923             { "Gate Y Size", "cigi.sensor_response.y_size",
7924                 FT_UINT16, BASE_DEC, NULL, 0x0,
7925                 "Specifies the target size in the Y direction (vertical) in pixels", HFILL }
7926         },
7927
7928         /* CIGI3 Sensor Response */
7929         { &hf_cigi3_sensor_response,
7930             { "Sensor Response", "cigi.sensor_response",
7931                 FT_STRINGZ, BASE_NONE, NULL, 0x0,
7932                 "Sensor Response Packet", HFILL }
7933         },
7934         { &hf_cigi3_sensor_response_view_id,
7935             { "View ID", "cigi.sensor_response.view_id",
7936                 FT_UINT16, BASE_DEC, NULL, 0x0,
7937                 "Specifies the view that represents the sensor display", HFILL }
7938         },
7939         { &hf_cigi3_sensor_response_sensor_id,
7940             { "Sensor ID", "cigi.sensor_response.sensor_id",
7941                 FT_UINT8, BASE_DEC, NULL, 0x0,
7942                 "Specifies the sensor to which the data in this packet apply", HFILL }
7943         }
7944         ,
7945             { &hf_cigi3_sensor_response_sensor_status,
7946                 { "Sensor Status", "cigi.sensor_response.sensor_status",
7947                     FT_UINT8, BASE_DEC, VALS(cigi3_sensor_response_sensor_status_vals), 0x03,
7948                     "Indicates the current tracking state of the sensor", HFILL }
7949             }
7950         ,
7951             { &hf_cigi3_sensor_response_gate_x_size,
7952                 { "Gate X Size (pixels âˆ¨ raster lines)", "cigi.sensor_response.gate_x_size",
7953                     FT_UINT16, BASE_DEC, NULL, 0x0,
7954                     "Specifies the gate symbol size along the view's X axis", HFILL }
7955             }
7956         ,
7957             { &hf_cigi3_sensor_response_gate_y_size,
7958                 { "Gate Y Size (pixels âˆ¨ raster lines)", "cigi.sensor_response.gate_y_size",
7959                     FT_UINT16, BASE_DEC, NULL, 0x0,
7960                     "Specifies the gate symbol size along the view's Y axis", HFILL }
7961             }
7962         ,
7963             { &hf_cigi3_sensor_response_gate_x_pos,
7964                 { "Gate X Position (°)", "cigi.sensor_response.gate_x_pos",
7965                     FT_FLOAT, BASE_DEC, NULL, 0x0,
7966                     "Specifies the gate symbol's position along the view's X axis", HFILL }
7967             }
7968         ,
7969             { &hf_cigi3_sensor_response_gate_y_pos,
7970                 { "Gate Y Position (°)", "cigi.sensor_response.gate_y_pos",
7971                     FT_FLOAT, BASE_DEC, NULL, 0x0,
7972                     "Specifies the gate symbol's position along the view's Y axis", HFILL }
7973             }
7974         ,
7975             { &hf_cigi3_sensor_response_frame_ctr,
7976                 { "Frame Counter", "cigi.sensor_response.frame_ctr",
7977                     FT_UINT32, BASE_DEC, NULL, 0x0,
7978                     "Indicates the IG's frame counter at the time that the IG calculates the gate and line-of-sight intersection data", HFILL }
7979             },
7980
7981             /* CIGI3 Sensor Extended Response */
7982             { &hf_cigi3_sensor_extended_response,
7983                 { "Sensor Extended Response", "cigi.sensor_ext_response",
7984                     FT_STRINGZ, BASE_NONE, NULL, 0x0,
7985                     "Sensor Extended Response Packet", HFILL }
7986             },
7987             { &hf_cigi3_sensor_extended_response_view_id,
7988                 { "View ID", "cigi.sensor_ext_response.view_id",
7989                     FT_UINT16, BASE_DEC, NULL, 0x0,
7990                     "Specifies the view that represents the sensor display", HFILL }
7991             },
7992             { &hf_cigi3_sensor_extended_response_sensor_id,
7993                 { "Sensor ID", "cigi.sensor_ext_response.sensor_id",
7994                     FT_UINT8, BASE_DEC, NULL, 0x0,
7995                     "Specifies the sensor to which the data in this packet apply", HFILL }
7996             },
7997             { &hf_cigi3_sensor_extended_response_sensor_status,
7998                 { "Sensor Status", "cigi.sensor_ext_response.sensor_status",
7999                     FT_UINT8, BASE_DEC, VALS(cigi3_sensor_extended_response_sensor_status_vals), 0x03,
8000                     "Indicates the current tracking state of the sensor", HFILL }
8001             },
8002             { &hf_cigi3_sensor_extended_response_entity_id_valid,
8003                 { "Entity ID Valid", "cigi.sensor_ext_response.entity_id_valid",
8004                     FT_BOOLEAN, 8, TFS(&cigi_valid_tfs), 0x04,
8005                     "Indicates whether the target is an entity or a non-entity object", HFILL }
8006             },
8007             { &hf_cigi3_sensor_extended_response_entity_id,
8008                 { "Entity ID", "cigi.sensor_ext_response.entity_id",
8009                     FT_UINT16, BASE_DEC, NULL, 0x0,
8010                     "Indicates the entity ID of the target", HFILL }
8011             },
8012             { &hf_cigi3_sensor_extended_response_gate_x_size,
8013                 { "Gate X Size (pixels âˆ¨ raster lines)", "cigi.sensor_ext_response.gate_x_size",
8014                     FT_UINT16, BASE_DEC, NULL, 0x0,
8015                     "Specifies the gate symbol size along the view's X axis", HFILL }
8016             },
8017             { &hf_cigi3_sensor_extended_response_gate_y_size,
8018                 { "Gate Y Size (pixels âˆ¨ raster lines)", "cigi.sensor_ext_response.gate_y_size",
8019                     FT_UINT16, BASE_DEC, NULL, 0x0,
8020                     "Specifies the gate symbol size along the view's Y axis", HFILL }
8021             },
8022             { &hf_cigi3_sensor_extended_response_gate_x_pos,
8023                 { "Gate X Position (°)", "cigi.sensor_ext_response.gate_x_pos",
8024                     FT_FLOAT, BASE_DEC, NULL, 0x0,
8025                     "Specifies the gate symbol's position along the view's X axis", HFILL }
8026             },
8027             { &hf_cigi3_sensor_extended_response_gate_y_pos,
8028                 { "Gate Y Position (°)", "cigi.sensor_ext_response.gate_y_pos",
8029                     FT_FLOAT, BASE_DEC, NULL, 0x0,
8030                     "Specifies the gate symbol's position along the view's Y axis", HFILL }
8031             },
8032             { &hf_cigi3_sensor_extended_response_frame_ctr,
8033                 { "Frame Counter", "cigi.sensor_ext_response.frame_ctr",
8034                     FT_UINT32, BASE_DEC, NULL, 0x0,
8035                     "Indicates the IG's frame counter at the time that the IG calculates the gate and line-of-sight intersection data", HFILL }
8036             },
8037             { &hf_cigi3_sensor_extended_response_track_lat,
8038                 { "Track Point Latitude (°)", "cigi.sensor_ext_response.track_lat",
8039                     FT_DOUBLE, BASE_DEC, NULL, 0x0,
8040                     "Indicates the geodetic latitude of the point being tracked by the sensor", HFILL }
8041             },
8042             { &hf_cigi3_sensor_extended_response_track_lon,
8043                 { "Track Point Longitude (°)", "cigi.sensor_ext_response.track_lon",
8044                     FT_DOUBLE, BASE_DEC, NULL, 0x0,
8045                     "Indicates the geodetic longitude of the point being tracked by the sensor", HFILL }
8046             },
8047             { &hf_cigi3_sensor_extended_response_track_alt,
8048                 { "Track Point Altitude (m)", "cigi.sensor_ext_response.track_alt",
8049                     FT_DOUBLE, BASE_DEC, NULL, 0x0,
8050                     "Indicates the geodetic altitude of the point being tracked by the sensor", HFILL }
8051             },
8052
8053             /* CIGI2 Height of Terrain Response */
8054             { &hf_cigi2_height_of_terrain_response,
8055                 { "Height of Terrain Response", "cigi.hot_response",
8056                     FT_STRINGZ, BASE_NONE, NULL, 0x0,          
8057                     "Height of Terrain Response Packet", HFILL }
8058             },
8059             { &hf_cigi2_height_of_terrain_response_hot_id,
8060                 { "HOT ID", "cigi.hot_response.hot_id",
8061                     FT_UINT16, BASE_DEC, NULL, 0x0,
8062                     "Identifies the HOT response corresponding to the associated HOT request", HFILL }
8063             },
8064             { &hf_cigi2_height_of_terrain_response_valid,
8065                 { "Valid", "cigi.hot_response.valid",
8066                     FT_BOOLEAN, 8, TFS(&cigi_valid_tfs), 0x80,
8067                     "Indicates whether the response is valid or invalid", HFILL }
8068             },
8069             { &hf_cigi2_height_of_terrain_response_material_type,
8070                 { "Material Type", "cigi.hot_response.material_type",
8071                     FT_INT32, BASE_DEC, NULL, 0x0,
8072                     "Specifies the material type of the object intersected by the HOT test segment", HFILL }
8073             },
8074             { &hf_cigi2_height_of_terrain_response_alt,
8075                 { "Altitude (m)", "cigi.hot_response.alt",
8076                     FT_DOUBLE, BASE_DEC, NULL, 0x0,
8077                     "Represents the altitude of the terrain for the position requested in the HOT request data packet", HFILL }
8078             },
8079
8080             /* CIGI2 Collision Detection Volume Response */
8081             { &hf_cigi2_collision_detection_volume_response,
8082                 { "Collision Detection Volume Response", "cigi.coll_det_vol_response",
8083                     FT_STRINGZ, BASE_NONE, NULL, 0x0,          
8084                     "Collision Detection Volume Response Packet", HFILL }
8085             },
8086             { &hf_cigi2_collision_detection_volume_response_entity_id,
8087                 { "Entity ID", "cigi.coll_det_vol_response.entity_id",
8088                     FT_UINT16, BASE_DEC, NULL, 0x0,
8089                     "Indicates which entity experienced a collision", HFILL }
8090             },
8091             { &hf_cigi2_collision_detection_volume_response_volume_id,
8092                 { "Volume ID", "cigi.coll_det_vol_response.volume_id",
8093                     FT_UINT8, BASE_DEC, NULL, 0xfe,
8094                     "Identifies the collision volume corresponding to the associated Collision Detection Volume Request", HFILL }
8095             },
8096             { &hf_cigi2_collision_detection_volume_response_contact,
8097                 { "Entity/Non-Entity Contact", "cigi.coll_det_vol_response.contact",
8098                     FT_BOOLEAN, 8, TFS(&cigi2_collision_detection_volume_response_contact_tfs), 0x01,
8099                     "Indicates whether another entity was contacted during this collision", HFILL }
8100             },
8101             { &hf_cigi2_collision_detection_volume_response_contact_entity,
8102                 { "Contacted Entity ID", "cigi.coll_det_vol_response.contact_entity",
8103                     FT_UINT16, BASE_DEC, NULL, 0x0,
8104                     "Indicates which entity was contacted with during the collision", HFILL }
8105             },
8106
8107             /* CIGI3 Position Response */
8108             { &hf_cigi3_position_response,
8109                 { "Position Response", "cigi.pos_response",
8110                     FT_STRINGZ, BASE_NONE, NULL, 0x0,
8111                     "Position Response Packet", HFILL }
8112             },
8113             { &hf_cigi3_position_response_object_id,
8114                 { "Object ID", "cigi.pos_response.object_id",
8115                     FT_UINT16, BASE_DEC, NULL, 0x0,
8116                     "Identifies the entity, view, view group, or motion tracking device whose position is being reported", HFILL }
8117             },
8118             { &hf_cigi3_position_response_part_id,
8119                 { "Articulated Part ID", "cigi.pos_response.part_id",
8120                     FT_UINT8, BASE_DEC, NULL, 0x0,
8121                     "Identifies the articulated part whose position is being reported", HFILL }
8122             },
8123             { &hf_cigi3_position_response_object_class,
8124                 { "Object Class", "cigi.pos_response.object_class",
8125                     FT_UINT8, BASE_DEC, VALS(cigi3_position_response_object_class_vals), 0x07,
8126                     "Indicates the type of object whose position is being reported", HFILL }
8127             },
8128             { &hf_cigi3_position_response_coord_system,
8129                 { "Coordinate System", "cigi.pos_response.coord_system",
8130                     FT_UINT8, BASE_DEC, VALS(cigi3_position_response_coord_system_vals), 0x18,
8131                     "Indicates the coordinate system in which the position and orientation are specified", HFILL }
8132             },
8133             { &hf_cigi3_position_response_lat_xoff,
8134                 { "Latitude (°)/X Offset (m)", "cigi.pos_response.lat_xoff",
8135                     FT_DOUBLE, BASE_DEC, NULL, 0x0,
8136                     "Indicates the geodetic latitude of the entity, articulated part, view, or view group or indicates the X offset from the parent entity's origin to the child entity, articulated part, view or view group", HFILL }
8137             },
8138             { &hf_cigi3_position_response_lon_yoff,
8139                 { "Longitude (°)/Y Offset (m)", "cigi.pos_response.lon_yoff",
8140                     FT_DOUBLE, BASE_DEC, NULL, 0x0,
8141                     "Indicates the geodetic longitude of the entity, articulated part, view, or view group or indicates the Y offset from the parent entity's origin to the child entity, articulated part, view, or view group", HFILL }
8142             },
8143             { &hf_cigi3_position_response_alt_zoff,
8144                 { "Altitude (m)/Z Offset (m)", "cigi.pos_response.alt_zoff",
8145                     FT_DOUBLE, BASE_DEC, NULL, 0x0,
8146                     "Indicates the geodetic altitude of the entity, articulated part, view, or view group or indicates the Z offset from the parent entity's origin to the child entity, articulated part, view, or view group", HFILL }
8147             },
8148             { &hf_cigi3_position_response_roll,
8149                 { "Roll (°)", "cigi.pos_response.roll",
8150                     FT_FLOAT, BASE_DEC, NULL, 0x0,
8151                     "Indicates the roll angle of the specified entity, articulated part, view, or view group", HFILL }
8152             },
8153             { &hf_cigi3_position_response_pitch,
8154                 { "Pitch (°)", "cigi.pos_response.pitch",
8155                     FT_FLOAT, BASE_DEC, NULL, 0x0,
8156                     "Indicates the pitch angle of the specified entity, articulated part, view, or view group", HFILL }
8157             },
8158             { &hf_cigi3_position_response_yaw,
8159                 { "Yaw (°)", "cigi.pos_response.yaw",
8160                     FT_FLOAT, BASE_DEC, NULL, 0x0,
8161                     "Indicates the yaw angle of the specified entity, articulated part, view, or view group", HFILL }
8162             },
8163
8164             /* CIGI3 Weather Conditions Response */
8165             { &hf_cigi3_weather_conditions_response,
8166                 { "Weather Conditions Response", "cigi.wea_cond_response",
8167                     FT_STRINGZ, BASE_NONE, NULL, 0x0,
8168                     "Weather Conditions Response Packet", HFILL }
8169             },
8170             { &hf_cigi3_weather_conditions_response_request_id,
8171                 { "Request ID", "cigi.wea_cond_response.request_id",
8172                     FT_UINT8, BASE_DEC, NULL, 0x0,
8173                     "Identifies the environmental conditions request to which this response packet corresponds", HFILL }
8174             },
8175             { &hf_cigi3_weather_conditions_response_humidity,
8176                 { "Humidity (%)", "cigi.wea_cond_response.humidity",
8177                     FT_UINT8, BASE_DEC, NULL, 0x0,
8178                     "Indicates the humidity at the request location", HFILL }
8179             },
8180             { &hf_cigi3_weather_conditions_response_air_temp,
8181                 { "Air Temperature (°C)", "cigi.wea_cond_response.air_temp",
8182                     FT_FLOAT, BASE_DEC, NULL, 0x0,
8183                     "Indicates the air temperature at the requested location", HFILL }
8184             },
8185             { &hf_cigi3_weather_conditions_response_visibility_range,
8186                 { "Visibility Range (m)", "cigi.wea_cond_response.visibility_range",
8187                     FT_FLOAT, BASE_DEC, NULL, 0x0,
8188                     "Indicates the visibility range at the requested location", HFILL }
8189             },
8190             { &hf_cigi3_weather_conditions_response_horiz_speed,
8191                 { "Horizontal Wind Speed (m/s)", "cigi.wea_cond_response.horiz_speed",
8192                     FT_FLOAT, BASE_DEC, NULL, 0x0,
8193                     "Indicates the local wind speed parallel to the ellipsoid-tangential reference plane", HFILL }
8194             },
8195             { &hf_cigi3_weather_conditions_response_vert_speed,
8196                 { "Vertical Wind Speed (m/s)", "cigi.wea_cond_response.vert_speed",
8197                     FT_FLOAT, BASE_DEC, NULL, 0x0,
8198                     "Indicates the local vertical wind speed", HFILL }
8199             },
8200             { &hf_cigi3_weather_conditions_response_wind_direction,
8201                 { "Wind Direction (°)", "cigi.wea_cond_response.wind_direction",
8202                     FT_FLOAT, BASE_DEC, NULL, 0x0,
8203                     "Indicates the local wind direction", HFILL }
8204             },
8205             { &hf_cigi3_weather_conditions_response_barometric_pressure,
8206                 { "Barometric Pressure (mb âˆ¨ hPa)", "cigi.wea_cond_response.barometric_pressure",
8207                     FT_FLOAT, BASE_DEC, NULL, 0x0,
8208                     "Indicates the atmospheric pressure at the requested location", HFILL }
8209             },
8210
8211             /* CIGI3 Aerosol Concentration Response */
8212             { &hf_cigi3_aerosol_concentration_response,
8213                 { "Aerosol Concentration Response", "cigi.aerosol_concentration_response",
8214                     FT_STRINGZ, BASE_NONE, NULL, 0x0,
8215                     "Aerosol Concentration Response Packet", HFILL }
8216             },
8217             { &hf_cigi3_aerosol_concentration_response_request_id,
8218                 { "Request ID", "cigi.aerosol_concentration_response.request_id",
8219                     FT_UINT8, BASE_DEC, NULL, 0x0,
8220                     "Identifies the environmental conditions request to which this response packet corresponds", HFILL }
8221             },
8222             { &hf_cigi3_aerosol_concentration_response_layer_id,
8223                 { "Layer ID", "cigi.aerosol_concentration_response.layer_id",
8224                     FT_UINT8, BASE_DEC, NULL, 0x0,
8225                     "Identifies the weather layer whose aerosol concentration is being described", HFILL }
8226             },
8227             { &hf_cigi3_aerosol_concentration_response_aerosol_concentration,
8228                 { "Aerosol Concentration (g/m³)", "cigi.aerosol_concentration_response.aerosol_concentration",
8229                     FT_FLOAT, BASE_DEC, NULL, 0x0,
8230                     "Identifies the concentration of airborne particles", HFILL }
8231             },
8232
8233             /* CIGI3 Maritime Surface Conditions Response */
8234             { &hf_cigi3_maritime_surface_conditions_response,
8235                 { "Maritime Surface Conditions Response", "cigi.maritime_surface_conditions_response",
8236                     FT_STRINGZ, BASE_NONE, NULL, 0x0,
8237                     "Maritime Surface Conditions Response Packet", HFILL }
8238             },
8239             { &hf_cigi3_maritime_surface_conditions_response_request_id,
8240                 { "Request ID", "cigi.maritime_surface_conditions_response.request_id",
8241                     FT_UINT8, BASE_DEC, NULL, 0x0,
8242                     "Identifies the environmental conditions request to which this response packet corresponds", HFILL }
8243             },
8244             { &hf_cigi3_maritime_surface_conditions_response_sea_surface_height,
8245                 { "Sea Surface Height (m)", "cigi.maritime_surface_conditions_response.sea_surface_height",
8246                     FT_FLOAT, BASE_DEC, NULL, 0x0,
8247                     "Indicates the height of the sea surface at equilibrium", HFILL }
8248             },
8249             { &hf_cigi3_maritime_surface_conditions_response_surface_water_temp,
8250                 { "Surface Water Temperature (°C)", "cigi.maritime_surface_conditions_response.surface_water_temp",
8251                     FT_FLOAT, BASE_DEC, NULL, 0x0,
8252                     "Indicates the water temperature at the sea surface", HFILL }
8253             },
8254             { &hf_cigi3_maritime_surface_conditions_response_surface_clarity,
8255                 { "Surface Clarity (%)", "cigi.maritime_surface_conditions_response.surface_clarity",
8256                     FT_FLOAT, BASE_DEC, NULL, 0x0,
8257                     "Indicates the clarity of the water at its surface", HFILL }
8258             },
8259
8260             /* CIGI3 Terrestrial Surface Conditions Response */
8261             { &hf_cigi3_terrestrial_surface_conditions_response,
8262                 { "Terrestrial Surface Conditions Response", "cigi.terr_surface_cond_response",
8263                     FT_STRINGZ, BASE_NONE, NULL, 0x0,
8264                     "Terrestrial Surface Conditions Response Packet", HFILL }
8265             },
8266             { &hf_cigi3_terrestrial_surface_conditions_response_request_id,
8267                 { "Request ID", "cigi.terr_surface_cond_response.request_id",
8268                     FT_UINT8, BASE_DEC, NULL, 0x0,
8269                     "Identifies the environmental conditions request to which this response packet corresponds", HFILL }
8270             },
8271             { &hf_cigi3_terrestrial_surface_conditions_response_surface_id,
8272                 { "Surface Condition ID", "cigi.terr_surface_cond_response.surface_id",
8273                     FT_UINT32, BASE_DEC, NULL, 0x0,
8274                     "Indicates the presence of a specific surface condition or contaminant at the test point", HFILL }
8275             },
8276
8277             /* CIGI3 Collision Detection Segment Notification */
8278             { &hf_cigi3_collision_detection_segment_notification,
8279                 { "Collision Detection Segment Notification", "cigi.coll_det_seg_notification",
8280                     FT_STRINGZ, BASE_NONE, NULL, 0x0,
8281                     "Collision Detection Segment Notification Packet", HFILL }
8282             },
8283             { &hf_cigi3_collision_detection_segment_notification_entity_id,
8284                 { "Entity ID", "cigi.coll_det_seg_notification.entity_id",
8285                     FT_UINT16, BASE_DEC, NULL, 0x0,
8286                     "Indicates the entity to which the collision detection segment belongs", HFILL }
8287             },
8288             { &hf_cigi3_collision_detection_segment_notification_segment_id,
8289                 { "Segment ID", "cigi.coll_det_seg_notification.segment_id",
8290                     FT_UINT8, BASE_DEC, NULL, 0x0,
8291                     "Indicates the ID of the collision detection segment along which the collision occurred", HFILL }
8292             },
8293             { &hf_cigi3_collision_detection_segment_notification_type,
8294                 { "Collision Type", "cigi.coll_det_seg_notification.type",
8295                     FT_BOOLEAN, 8, TFS(&cigi3_collision_detection_segment_notification_type_tfs), 0x01,
8296                     "Indicates whether the collision occurred with another entity or with a non-entity object", HFILL }
8297             },
8298             { &hf_cigi3_collision_detection_segment_notification_contacted_entity_id,
8299                 { "Contacted Entity ID", "cigi.coll_det_seg_notification.contacted_entity_id",
8300                     FT_UINT16, BASE_DEC, NULL, 0x0,
8301                     "Indicates the entity with which the collision occurred", HFILL }
8302             },
8303             { &hf_cigi3_collision_detection_segment_notification_material_code,
8304                 { "Material Code", "cigi.coll_det_seg_notification.material_code",
8305                     FT_UINT32, BASE_DEC, NULL, 0x0,
8306                     "Indicates the material code of the surface at the point of collision", HFILL }
8307             },
8308             { &hf_cigi3_collision_detection_segment_notification_intersection_distance,
8309                 { "Intersection Distance (m)", "cigi.coll_det_seg_notification.intersection_distance",
8310                     FT_FLOAT, BASE_DEC, NULL, 0x0,
8311                     "Indicates the distance along the collision test vector from the source endpoint to the point of intersection", HFILL }
8312             },
8313
8314             /* CIGI3 Collision Detection Volume Notification */
8315             { &hf_cigi3_collision_detection_volume_notification,
8316                 { "Collision Detection Volume Notification", "cigi.coll_det_vol_notification",
8317                     FT_STRINGZ, BASE_NONE, NULL, 0x0,
8318                     "Collision Detection Volume Notification Packet", HFILL }
8319             },
8320             { &hf_cigi3_collision_detection_volume_notification_entity_id,
8321                 { "Entity ID", "cigi.coll_det_vol_notification.entity_id",
8322                     FT_UINT16, BASE_DEC, NULL, 0x0,
8323                     "Indicates the entity to which the collision detection volume belongs", HFILL }
8324             },
8325             { &hf_cigi3_collision_detection_volume_notification_volume_id,
8326                 { "Volume ID", "cigi.coll_det_vol_notification.volume_id",
8327                     FT_UINT8, BASE_DEC, NULL, 0x0,
8328                     "Indicates the ID of the collision detection volume within which the collision occurred", HFILL }
8329             },
8330             { &hf_cigi3_collision_detection_volume_notification_type,
8331                 { "Collision Type", "cigi.coll_det_vol_notification.type",
8332                     FT_BOOLEAN, 8, TFS(&cigi3_collision_detection_volume_notification_type_tfs), 0x01,
8333                     "Indicates whether the collision occurred with another entity or with a non-entity object", HFILL }
8334             },
8335             { &hf_cigi3_collision_detection_volume_notification_contacted_entity_id,
8336                 { "Contacted Entity ID", "cigi.coll_det_vol_notification.contacted_entity_id",
8337                     FT_UINT16, BASE_DEC, NULL, 0x0,
8338                     "Indicates the entity with which the collision occurred", HFILL }
8339             },
8340             { &hf_cigi3_collision_detection_volume_notification_contacted_volume_id,
8341                 { "Contacted Volume ID", "cigi.coll_det_vol_notification.contacted_volume_id",
8342                     FT_UINT8, BASE_DEC, NULL, 0x0,
8343                     "Indicates the ID of the collision detection volume with which the collision occurred", HFILL }
8344             },
8345
8346             /* CIGI3 Animation Stop Notification */
8347             { &hf_cigi3_animation_stop_notification,
8348                 { "Animation Stop Notification", "cigi.animation_stop_notification",
8349                     FT_STRINGZ, BASE_NONE, NULL, 0x0,
8350                     "Animation Stop Notification Packet", HFILL }
8351             },
8352             { &hf_cigi3_animation_stop_notification_entity_id,
8353                 { "Entity ID", "cigi.animation_stop_notification.entity_id",
8354                     FT_UINT16, BASE_DEC, NULL, 0x0,
8355                     "Indicates the entity ID of the animation that has stopped", HFILL }
8356             },
8357
8358             /* CIGI3 Event Notification */
8359             { &hf_cigi3_event_notification,
8360                 { "Event Notification", "cigi.event_notification",
8361                     FT_STRINGZ, BASE_NONE, NULL, 0x0,
8362                     "Event Notification Packet", HFILL }
8363             },
8364             { &hf_cigi3_event_notification_event_id,
8365                 { "Event ID", "cigi.event_notification.event_id",
8366                     FT_UINT16, BASE_DEC, NULL, 0x0,
8367                     "Indicates which event has occurred", HFILL }
8368             },
8369             { &hf_cigi3_event_notification_data_1,
8370                 { "Event Data 1", "cigi.event_notification.data_1",
8371                     FT_BYTES, BASE_NONE, NULL, 0x0,
8372                     "Used for user-defined event data", HFILL }
8373             },
8374             { &hf_cigi3_event_notification_data_2,
8375                 { "Event Data 2", "cigi.event_notification.data_2",
8376                     FT_BYTES, BASE_NONE, NULL, 0x0,
8377                     "Used for user-defined event data", HFILL }
8378             },
8379             { &hf_cigi3_event_notification_data_3,
8380                 { "Event Data 3", "cigi.event_notification.data_3",
8381                     FT_BYTES, BASE_NONE, NULL, 0x0,
8382                     "Used for user-defined event data", HFILL }
8383             },
8384
8385             /* CIGI2 Image Generator Message */
8386             { &hf_cigi2_image_generator_message,
8387                 { "Image Generator Message", "cigi.image_generator_message",
8388                     FT_STRINGZ, BASE_NONE, NULL, 0x0,          
8389                     "Image Generator Message Packet", HFILL }
8390             },
8391             { &hf_cigi2_image_generator_message_id,
8392                 { "Message ID", "cigi.image_generator_message.message_id",
8393                     FT_UINT16, BASE_DEC, NULL, 0x0,
8394                     "Uniquely identifies an instance of an Image Generator Response Message", HFILL }
8395             },
8396             { &hf_cigi2_image_generator_message_message,
8397                 { "Message", "cigi.image_generator_message.message",
8398                     FT_STRINGZ, BASE_NONE, NULL, 0x0,
8399                     "Image generator message", HFILL }
8400             },
8401
8402             /* CIGI3 Image Generator Message */
8403             { &hf_cigi3_image_generator_message,
8404                 { "Image Generator Message", "cigi.image_generator_message",
8405                     FT_STRINGZ, BASE_NONE, NULL, 0x0,
8406                     "Image Generator Message Packet", HFILL }
8407             },
8408             { &hf_cigi3_image_generator_message_id,
8409                 { "Message ID", "cigi.image_generator_message.message_id",
8410                     FT_UINT16, BASE_DEC, NULL, 0x0,
8411                     "Specifies a numerical identifier for the message", HFILL }
8412             },
8413             { &hf_cigi3_image_generator_message_message,
8414                 { "Message", "cigi.image_generator_message.message",
8415                     FT_STRINGZ, BASE_NONE, NULL, 0x0,
8416                     "Message string", HFILL }
8417             },
8418
8419             /* CIGI2 User Definable */
8420             { &hf_cigi2_user_definable,
8421                 { "User Definable", "cigi.user_definable",
8422                     FT_STRINGZ, BASE_NONE, NULL, 0x0,          
8423                     "User definable packet", HFILL }
8424             },
8425
8426             /* CIGI3 User-Defined Packets */
8427             { &hf_cigi3_user_defined,
8428                 { "User-Defined", "cigi.user_defined",
8429                     FT_STRINGZ, BASE_NONE, NULL, 0x0,
8430                     "User-Defined Packet", HFILL }
8431             },
8432     };
8433
8434     /* CIGI preferences */
8435     static enum_val_t cigi_versions[] = {
8436         { "from_packet", "From Packet", CIGI_VERSION_FROM_PACKET },
8437         { "cigi2", "CIGI 2", CIGI_VERSION_2 },
8438         { "cigi3", "CIGI 3", CIGI_VERSION_3 },
8439         { NULL, NULL, 0 }
8440     };
8441
8442     static enum_val_t cigi_byte_orders[] = {
8443         { "from_packet", "From Packet", CIGI_BYTE_ORDER_FROM_PACKET },
8444         { "big_endian", "Big-Endian", CIGI_BYTE_ORDER_BIG_ENDIAN },
8445         { "little_endian", "Little-Endian", CIGI_BYTE_ORDER_LITTLE_ENDIAN },
8446         { NULL, NULL, 0 }
8447     };
8448
8449     /* Setup protocol subtree array */
8450     static gint *ett[] = {
8451         &ett_cigi,
8452     };
8453
8454     global_cigi_udp_ports = range_empty();
8455     cigi_udp_ports = range_empty();
8456     
8457     /* Register the protocol name and description */
8458     proto_cigi = proto_register_protocol("Common Image Generator Interface",
8459             "CIGI", "cigi");
8460
8461     /* Required function calls to register the header fields and subtrees used */
8462     proto_register_field_array(proto_cigi, hf, array_length(hf));
8463     proto_register_subtree_array(ett, array_length(ett));
8464
8465     /* Register preferences module */       
8466     cigi_module = prefs_register_protocol(proto_cigi, proto_reg_handoff_cigi);
8467
8468     /* Register preferences */
8469     prefs_register_enum_preference(cigi_module, "version", "CIGI version", "The version of CIGI with which to dissect packets", &global_cigi_version, cigi_versions, FALSE);
8470     prefs_register_enum_preference(cigi_module, "byte_order", "Byte Order", "The byte order with which to dissect CIGI packets (CIGI3)", &global_cigi_byte_order, cigi_byte_orders, FALSE);
8471     prefs_register_range_preference(cigi_module, "upd_ports", "CIGI UDP Ports", "Set the UDP ports for CIGI packets (e.g. 8000-8002,8004,8005)", &global_cigi_udp_ports, CIGI_MAX_PORT);
8472     prefs_register_string_preference(cigi_module, "host", "Host IP", "IPv4 address or hostname of the host", &global_host_ip);
8473     prefs_register_string_preference(cigi_module, "ig", "Image Generator IP", "IPv4 address or hostname of the image generator", &global_ig_ip);
8474
8475 }
8476
8477 /* This function is also called by preferences whenever "Apply" is pressed 
8478    (see prefs_register_protocol above) so it should accommodate being called 
8479    more than once.
8480 */
8481 void
8482 proto_reg_handoff_cigi(void)
8483 {
8484     static gboolean inited = FALSE;
8485
8486     /* If the CIGI version preference was changed update the cigi version
8487      * information for all packets */
8488     if ( global_cigi_version != CIGI_VERSION_FROM_PACKET ) {
8489         cigi_version = global_cigi_version;
8490     }
8491
8492     /* If the CIGI byte order preference was changed update the cigi byte
8493      * order information for all packets */
8494     if ( global_cigi_byte_order != CIGI_BYTE_ORDER_FROM_PACKET ) {
8495         cigi_byte_order = global_cigi_byte_order;
8496     }
8497
8498     if( !inited ) {
8499
8500         cigi_handle = new_create_dissector_handle(dissect_cigi, proto_cigi);
8501         dissector_add_handle("udp.port", cigi_handle);
8502         dissector_add_handle("tcp.port", cigi_handle);
8503         heur_dissector_add("udp", dissect_cigi, proto_cigi);
8504
8505         inited = TRUE;
8506     } else {
8507
8508         range_foreach(cigi_udp_ports, range_delete_udp_callback);
8509     }
8510
8511     /* Register the range ports */
8512     g_free(cigi_udp_ports);
8513     cigi_udp_ports = range_copy(global_cigi_udp_ports);
8514
8515     range_foreach(cigi_udp_ports, range_add_udp_callback);
8516 }
8517
8518 static void 
8519 range_delete_udp_callback(guint32 port)
8520 {
8521     if (port) {
8522         dissector_delete("udp.port", port, cigi_handle);
8523     }
8524 }
8525
8526 static void 
8527 range_add_udp_callback(guint32 port)
8528 {
8529     if (port) {
8530         dissector_add("udp.port", port, cigi_handle);
8531     }
8532 }
8533