line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# Rinchi Common Image Generator Interface for Perl |
3
|
|
|
|
|
|
|
# Class Identifier: f78b1e14-200e-11de-bdc8-001c25551abc |
4
|
|
|
|
|
|
|
# Author: Brian M. Ames |
5
|
|
|
|
|
|
|
# |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
package Rinchi::CIGIPP::HAT_HOTExtendedResponse; |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
21
|
use 5.006; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
45
|
|
10
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
11
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
12
|
1
|
|
|
1
|
|
6
|
use Carp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
1453
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
require Exporter; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# Items to export into callers namespace by default. Note: do not export |
19
|
|
|
|
|
|
|
# names by default without a very good reason. Use EXPORT_OK instead. |
20
|
|
|
|
|
|
|
# Do not simply export all your public functions/methods/constants. |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
# This allows declaration use Rinchi::CIGI::AtmosphereControl ':all'; |
23
|
|
|
|
|
|
|
# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK |
24
|
|
|
|
|
|
|
# will save memory. |
25
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( 'all' => [ qw( |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
) ] ); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
our @EXPORT = qw( |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
); |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
# Preloaded methods go here. |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 NAME |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Rinchi::CIGIPP::HAT_HOTExtendedResponse - Perl extension for the Common Image |
42
|
|
|
|
|
|
|
Generator Interface - HAT/HOTExtended Response data packet. |
43
|
|
|
|
|
|
|
data packet. |
44
|
|
|
|
|
|
|
=head1 SYNOPSIS |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
use Rinchi::CIGIPP::HAT_HOTExtendedResponse; |
47
|
|
|
|
|
|
|
my $hgt_xresp = Rinchi::CIGIPP::HAT_HOTExtendedResponse->new(); |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
$packet_type = $hgt_xresp->packet_type(); |
50
|
|
|
|
|
|
|
$packet_size = $hgt_xresp->packet_size(); |
51
|
|
|
|
|
|
|
$response_ident = $hgt_xresp->response_ident(56733); |
52
|
|
|
|
|
|
|
$host_frame_number_lsn = $hgt_xresp->host_frame_number_lsn(4); |
53
|
|
|
|
|
|
|
$valid = $hgt_xresp->valid(Rinchi::CIGIPP->Invalid); |
54
|
|
|
|
|
|
|
$height_above_terrain = $hgt_xresp->height_above_terrain(86.966); |
55
|
|
|
|
|
|
|
$height_of_terrain = $hgt_xresp->height_of_terrain(74.029); |
56
|
|
|
|
|
|
|
$material_code = $hgt_xresp->material_code(53788); |
57
|
|
|
|
|
|
|
$normal_vector_azimuth = $hgt_xresp->normal_vector_azimuth(3.08); |
58
|
|
|
|
|
|
|
$normal_vector_elevation = $hgt_xresp->normal_vector_elevation(82.952); |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 DESCRIPTION |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
The HAT/HOT Extended Response packet is sent by the IG in response to a HAT/HOT |
63
|
|
|
|
|
|
|
Request packet whose Request Type attribute was set to Extended (2). This |
64
|
|
|
|
|
|
|
packet provides the Height Above Terrain (HAT) and Height Of Terrain (HOT) for |
65
|
|
|
|
|
|
|
the test point. This packet also contains the material code and surface-normal |
66
|
|
|
|
|
|
|
unit vector of the terrain. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
If the Update Period attribute of the originating HAT/HOT Request packet was |
69
|
|
|
|
|
|
|
set to a value greater than zero, then the Host Frame Number LSN attribute of |
70
|
|
|
|
|
|
|
each corresponding HAT/HOT Response packet must contain the least significant |
71
|
|
|
|
|
|
|
nybble of the Host Frame Number value last received by the IG before the HAT or |
72
|
|
|
|
|
|
|
HOT value is calculated. The Host may correlate this LSN to an eyepoint |
73
|
|
|
|
|
|
|
position or may use the value to determine latency. |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
The IG can only return the HAT and HOT for a point that is within the bounds of |
76
|
|
|
|
|
|
|
the current database. Likewise, the material code and normal vector can only be |
77
|
|
|
|
|
|
|
calculated within the database bounds. If these data cannot be returned, the |
78
|
|
|
|
|
|
|
Valid attribute will be set to zero (0). |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head2 EXPORT |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
None by default. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
#============================================================================== |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=item new $hgt_xresp = Rinchi::CIGIPP::HAT_HOTExtendedResponse->new() |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
Constructor for Rinchi::HAT_HOTExtendedResponse. |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=cut |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
sub new { |
93
|
1
|
|
|
1
|
1
|
62
|
my $class = shift; |
94
|
1
|
|
33
|
|
|
8
|
$class = ref($class) || $class; |
95
|
|
|
|
|
|
|
|
96
|
1
|
|
|
|
|
17
|
my $self = { |
97
|
|
|
|
|
|
|
'_Buffer' => '', |
98
|
|
|
|
|
|
|
'_ClassIdent' => 'f78b1e14-200e-11de-bdc8-001c25551abc', |
99
|
|
|
|
|
|
|
'_Pack' => 'CCSCCSddIffI', |
100
|
|
|
|
|
|
|
'_Swap1' => 'CCvCCvVVVVVVVV', |
101
|
|
|
|
|
|
|
'_Swap2' => 'CCnCCnNNNNNNNN', |
102
|
|
|
|
|
|
|
'packetType' => 103, |
103
|
|
|
|
|
|
|
'packetSize' => 40, |
104
|
|
|
|
|
|
|
'responseIdent' => 0, |
105
|
|
|
|
|
|
|
'_bitfields1' => 0, # Includes bitfields hostFrameNumberLSN, unused69, and valid. |
106
|
|
|
|
|
|
|
'hostFrameNumberLSN' => 0, |
107
|
|
|
|
|
|
|
'valid' => 0, |
108
|
|
|
|
|
|
|
'_unused70' => 0, |
109
|
|
|
|
|
|
|
'_unused71' => 0, |
110
|
|
|
|
|
|
|
'heightAboveTerrain' => 0, |
111
|
|
|
|
|
|
|
'heightOfTerrain' => 0, |
112
|
|
|
|
|
|
|
'materialCode' => 0, |
113
|
|
|
|
|
|
|
'normalVectorAzimuth' => 0, |
114
|
|
|
|
|
|
|
'normalVectorElevation' => 0, |
115
|
|
|
|
|
|
|
'_unused72' => 0, |
116
|
|
|
|
|
|
|
}; |
117
|
|
|
|
|
|
|
|
118
|
1
|
50
|
|
|
|
4
|
if (@_) { |
119
|
0
|
0
|
|
|
|
0
|
if (ref($_[0]) eq 'ARRAY') { |
|
|
0
|
|
|
|
|
|
120
|
0
|
|
|
|
|
0
|
$self->{'_Buffer'} = $_[0][0]; |
121
|
|
|
|
|
|
|
} elsif (ref($_[0]) eq 'HASH') { |
122
|
0
|
|
|
|
|
0
|
foreach my $attr (keys %{$_[0]}) { |
|
0
|
|
|
|
|
0
|
|
123
|
0
|
0
|
|
|
|
0
|
$self->{"_$attr"} = $_[0]->{$attr} unless ($attr =~ /^_/); |
124
|
|
|
|
|
|
|
} |
125
|
|
|
|
|
|
|
} |
126
|
|
|
|
|
|
|
} |
127
|
|
|
|
|
|
|
|
128
|
1
|
|
|
|
|
4
|
bless($self,$class); |
129
|
1
|
|
|
|
|
4
|
return $self; |
130
|
|
|
|
|
|
|
} |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
#============================================================================== |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=item sub packet_type() |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
$value = $hgt_xresp->packet_type(); |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
Data Packet Identifier. |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
This attribute identifies this data packet as the HAT/HOT Extended Response |
141
|
|
|
|
|
|
|
packet. The value of this attribute must be 103. |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=cut |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
sub packet_type() { |
146
|
1
|
|
|
1
|
1
|
8
|
my ($self) = @_; |
147
|
1
|
|
|
|
|
10
|
return $self->{'packetType'}; |
148
|
|
|
|
|
|
|
} |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
#============================================================================== |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
=item sub packet_size() |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
$value = $hgt_xresp->packet_size(); |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
Data Packet Size. |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
This attribute indicates the number of bytes in this data packet. The value of |
159
|
|
|
|
|
|
|
this attribute must be 40. |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
=cut |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
sub packet_size() { |
164
|
1
|
|
|
1
|
1
|
82
|
my ($self) = @_; |
165
|
1
|
|
|
|
|
5
|
return $self->{'packetSize'}; |
166
|
|
|
|
|
|
|
} |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
#============================================================================== |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
=item sub response_ident([$newValue]) |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
$value = $hgt_xresp->response_ident($newValue); |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
HAT/HOT ID. |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
This attribute identifies the HAT/HOT response. This value corresponds to the |
177
|
|
|
|
|
|
|
value of the HAT/HOT ID attribute in the associated HAT/HOT Request packet. |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
=cut |
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
sub response_ident() { |
182
|
1
|
|
|
1
|
1
|
5
|
my ($self,$nv) = @_; |
183
|
1
|
50
|
|
|
|
5
|
if (defined($nv)) { |
184
|
1
|
|
|
|
|
4
|
$self->{'responseIdent'} = $nv; |
185
|
|
|
|
|
|
|
} |
186
|
1
|
|
|
|
|
3
|
return $self->{'responseIdent'}; |
187
|
|
|
|
|
|
|
} |
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
#============================================================================== |
190
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
=item sub host_frame_number_lsn([$newValue]) |
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
$value = $hgt_xresp->host_frame_number_lsn($newValue); |
194
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
Host Frame Number LSN. |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
This attribute contains the least significant nybble of the Host Frame Number |
198
|
|
|
|
|
|
|
attribute of the last IG Control packet received before the HAT or HOT is |
199
|
|
|
|
|
|
|
calculated. |
200
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
This attribute is ignored if the Update Period attribute of the corresponding |
202
|
|
|
|
|
|
|
HAT/HOT Request packet was set to zero (0). |
203
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
=cut |
205
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
sub host_frame_number_lsn() { |
207
|
1
|
|
|
1
|
1
|
6
|
my ($self,$nv) = @_; |
208
|
1
|
50
|
|
|
|
4
|
if (defined($nv)) { |
209
|
1
|
|
|
|
|
3
|
$self->{'hostFrameNumberLSN'} = $nv; |
210
|
1
|
|
|
|
|
3
|
$self->{'_bitfields1'} |= ($nv << 4) &0xF0; |
211
|
|
|
|
|
|
|
} |
212
|
1
|
|
|
|
|
4
|
return (($self->{'_bitfields1'} & 0xF0) >> 4); |
213
|
|
|
|
|
|
|
} |
214
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
#============================================================================== |
216
|
|
|
|
|
|
|
|
217
|
|
|
|
|
|
|
=item sub valid([$newValue]) |
218
|
|
|
|
|
|
|
|
219
|
|
|
|
|
|
|
$value = $hgt_xresp->valid($newValue); |
220
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
Valid. |
222
|
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
This attribute indicates whether the remaining attributes in this packet |
224
|
|
|
|
|
|
|
contain valid numbers. A value of zero (0) indicates that the test point was |
225
|
|
|
|
|
|
|
beyond the database bounds. |
226
|
|
|
|
|
|
|
|
227
|
|
|
|
|
|
|
Invalid 0 |
228
|
|
|
|
|
|
|
Valid 1 |
229
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
=cut |
231
|
|
|
|
|
|
|
|
232
|
|
|
|
|
|
|
sub valid() { |
233
|
1
|
|
|
1
|
1
|
3
|
my ($self,$nv) = @_; |
234
|
1
|
50
|
|
|
|
99
|
if (defined($nv)) { |
235
|
1
|
50
|
33
|
|
|
7
|
if (($nv==0) or ($nv==1)) { |
236
|
1
|
|
|
|
|
3
|
$self->{'valid'} = $nv; |
237
|
1
|
|
|
|
|
3
|
$self->{'_bitfields1'} |= $nv &0x01; |
238
|
|
|
|
|
|
|
} else { |
239
|
0
|
|
|
|
|
0
|
carp "valid must be 0 (Invalid), or 1 (Valid)."; |
240
|
|
|
|
|
|
|
} |
241
|
|
|
|
|
|
|
} |
242
|
1
|
|
|
|
|
4
|
return ($self->{'_bitfields1'} & 0x01); |
243
|
|
|
|
|
|
|
} |
244
|
|
|
|
|
|
|
|
245
|
|
|
|
|
|
|
#============================================================================== |
246
|
|
|
|
|
|
|
|
247
|
|
|
|
|
|
|
=item sub height_above_terrain([$newValue]) |
248
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
$value = $hgt_xresp->height_above_terrain($newValue); |
250
|
|
|
|
|
|
|
|
251
|
|
|
|
|
|
|
Height Above Terrain (HAT). |
252
|
|
|
|
|
|
|
|
253
|
|
|
|
|
|
|
This attribute indicates the height of the test point above the terrain. A |
254
|
|
|
|
|
|
|
negative value indicates that the test point is below the terrain. |
255
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
This attribute is valid only if the Valid attribute is set to one (1). |
257
|
|
|
|
|
|
|
|
258
|
|
|
|
|
|
|
=cut |
259
|
|
|
|
|
|
|
|
260
|
|
|
|
|
|
|
sub height_above_terrain() { |
261
|
1
|
|
|
1
|
1
|
8
|
my ($self,$nv) = @_; |
262
|
1
|
50
|
|
|
|
5
|
if (defined($nv)) { |
263
|
1
|
|
|
|
|
2
|
$self->{'heightAboveTerrain'} = $nv; |
264
|
|
|
|
|
|
|
} |
265
|
1
|
|
|
|
|
5
|
return $self->{'heightAboveTerrain'}; |
266
|
|
|
|
|
|
|
} |
267
|
|
|
|
|
|
|
|
268
|
|
|
|
|
|
|
#============================================================================== |
269
|
|
|
|
|
|
|
|
270
|
|
|
|
|
|
|
=item sub height_of_terrain([$newValue]) |
271
|
|
|
|
|
|
|
|
272
|
|
|
|
|
|
|
$value = $hgt_xresp->height_of_terrain($newValue); |
273
|
|
|
|
|
|
|
|
274
|
|
|
|
|
|
|
Height Of Terrain (HOT). |
275
|
|
|
|
|
|
|
|
276
|
|
|
|
|
|
|
This attribute indicates the height of terrain above or below the test point. |
277
|
|
|
|
|
|
|
This value is relative to the ellipsoid height, or Mean Sea Level. |
278
|
|
|
|
|
|
|
|
279
|
|
|
|
|
|
|
This attribute is valid only if the Valid attribute is set to one (1). |
280
|
|
|
|
|
|
|
|
281
|
|
|
|
|
|
|
=cut |
282
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
sub height_of_terrain() { |
284
|
1
|
|
|
1
|
1
|
6
|
my ($self,$nv) = @_; |
285
|
1
|
50
|
|
|
|
13
|
if (defined($nv)) { |
286
|
1
|
|
|
|
|
4
|
$self->{'heightOfTerrain'} = $nv; |
287
|
|
|
|
|
|
|
} |
288
|
1
|
|
|
|
|
4
|
return $self->{'heightOfTerrain'}; |
289
|
|
|
|
|
|
|
} |
290
|
|
|
|
|
|
|
|
291
|
|
|
|
|
|
|
#============================================================================== |
292
|
|
|
|
|
|
|
|
293
|
|
|
|
|
|
|
=item sub material_code([$newValue]) |
294
|
|
|
|
|
|
|
|
295
|
|
|
|
|
|
|
$value = $hgt_xresp->material_code($newValue); |
296
|
|
|
|
|
|
|
|
297
|
|
|
|
|
|
|
Material Code. |
298
|
|
|
|
|
|
|
|
299
|
|
|
|
|
|
|
This attribute indicates the material code of the terrain surface at the point |
300
|
|
|
|
|
|
|
of intersection with the HAT/HOT test vector. |
301
|
|
|
|
|
|
|
|
302
|
|
|
|
|
|
|
This attribute is valid only if the Valid attribute is set to one (1). |
303
|
|
|
|
|
|
|
|
304
|
|
|
|
|
|
|
=cut |
305
|
|
|
|
|
|
|
|
306
|
|
|
|
|
|
|
sub material_code() { |
307
|
1
|
|
|
1
|
1
|
7
|
my ($self,$nv) = @_; |
308
|
1
|
50
|
|
|
|
5
|
if (defined($nv)) { |
309
|
1
|
|
|
|
|
2
|
$self->{'materialCode'} = $nv; |
310
|
|
|
|
|
|
|
} |
311
|
1
|
|
|
|
|
3
|
return $self->{'materialCode'}; |
312
|
|
|
|
|
|
|
} |
313
|
|
|
|
|
|
|
|
314
|
|
|
|
|
|
|
#============================================================================== |
315
|
|
|
|
|
|
|
|
316
|
|
|
|
|
|
|
=item sub normal_vector_azimuth([$newValue]) |
317
|
|
|
|
|
|
|
|
318
|
|
|
|
|
|
|
$value = $hgt_xresp->normal_vector_azimuth($newValue); |
319
|
|
|
|
|
|
|
|
320
|
|
|
|
|
|
|
Normal Vector Azimuth. |
321
|
|
|
|
|
|
|
|
322
|
|
|
|
|
|
|
This attribute indicates the azimuth of the normal unit vector of the surface |
323
|
|
|
|
|
|
|
intersected by the HAT/HOT test vector. This value is the horizontal angle from |
324
|
|
|
|
|
|
|
True North to the vector. |
325
|
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
This attribute is valid only if the Valid attribute is set to one (1). |
327
|
|
|
|
|
|
|
|
328
|
|
|
|
|
|
|
=cut |
329
|
|
|
|
|
|
|
|
330
|
|
|
|
|
|
|
sub normal_vector_azimuth() { |
331
|
1
|
|
|
1
|
1
|
5
|
my ($self,$nv) = @_; |
332
|
1
|
50
|
|
|
|
4
|
if (defined($nv)) { |
333
|
1
|
|
|
|
|
3
|
$self->{'normalVectorAzimuth'} = $nv; |
334
|
|
|
|
|
|
|
} |
335
|
1
|
|
|
|
|
15
|
return $self->{'normalVectorAzimuth'}; |
336
|
|
|
|
|
|
|
} |
337
|
|
|
|
|
|
|
|
338
|
|
|
|
|
|
|
#============================================================================== |
339
|
|
|
|
|
|
|
|
340
|
|
|
|
|
|
|
=item sub normal_vector_elevation([$newValue]) |
341
|
|
|
|
|
|
|
|
342
|
|
|
|
|
|
|
$value = $hgt_xresp->normal_vector_elevation($newValue); |
343
|
|
|
|
|
|
|
|
344
|
|
|
|
|
|
|
Normal Vector Elevation. |
345
|
|
|
|
|
|
|
|
346
|
|
|
|
|
|
|
This attribute indicates the elevation of the normal unit vector of the surface |
347
|
|
|
|
|
|
|
intersected by the HAT/HOT test vector. This value is the vertical angle from |
348
|
|
|
|
|
|
|
the geodetic reference plane to the vector. |
349
|
|
|
|
|
|
|
|
350
|
|
|
|
|
|
|
This attribute is valid only if the Valid attribute is set to one (1). |
351
|
|
|
|
|
|
|
|
352
|
|
|
|
|
|
|
=cut |
353
|
|
|
|
|
|
|
|
354
|
|
|
|
|
|
|
sub normal_vector_elevation() { |
355
|
1
|
|
|
1
|
1
|
6
|
my ($self,$nv) = @_; |
356
|
1
|
50
|
|
|
|
4
|
if (defined($nv)) { |
357
|
1
|
|
|
|
|
3
|
$self->{'normalVectorElevation'} = $nv; |
358
|
|
|
|
|
|
|
} |
359
|
1
|
|
|
|
|
3
|
return $self->{'normalVectorElevation'}; |
360
|
|
|
|
|
|
|
} |
361
|
|
|
|
|
|
|
|
362
|
|
|
|
|
|
|
#========================================================================== |
363
|
|
|
|
|
|
|
|
364
|
|
|
|
|
|
|
=item sub pack() |
365
|
|
|
|
|
|
|
|
366
|
|
|
|
|
|
|
$value = $hgt_xresp->pack(); |
367
|
|
|
|
|
|
|
|
368
|
|
|
|
|
|
|
Returns the packed data packet. |
369
|
|
|
|
|
|
|
|
370
|
|
|
|
|
|
|
=cut |
371
|
|
|
|
|
|
|
|
372
|
|
|
|
|
|
|
sub pack($) { |
373
|
1
|
|
|
1
|
1
|
5
|
my $self = shift ; |
374
|
|
|
|
|
|
|
|
375
|
1
|
|
|
|
|
9
|
$self->{'_Buffer'} = CORE::pack($self->{'_Pack'}, |
376
|
|
|
|
|
|
|
$self->{'packetType'}, |
377
|
|
|
|
|
|
|
$self->{'packetSize'}, |
378
|
|
|
|
|
|
|
$self->{'responseIdent'}, |
379
|
|
|
|
|
|
|
$self->{'_bitfields1'}, # Includes bitfields hostFrameNumberLSN, unused69, and valid. |
380
|
|
|
|
|
|
|
$self->{'_unused70'}, |
381
|
|
|
|
|
|
|
$self->{'_unused71'}, |
382
|
|
|
|
|
|
|
$self->{'heightAboveTerrain'}, |
383
|
|
|
|
|
|
|
$self->{'heightOfTerrain'}, |
384
|
|
|
|
|
|
|
$self->{'materialCode'}, |
385
|
|
|
|
|
|
|
$self->{'normalVectorAzimuth'}, |
386
|
|
|
|
|
|
|
$self->{'normalVectorElevation'}, |
387
|
|
|
|
|
|
|
$self->{'_unused72'}, |
388
|
|
|
|
|
|
|
); |
389
|
|
|
|
|
|
|
|
390
|
1
|
|
|
|
|
12
|
return $self->{'_Buffer'}; |
391
|
|
|
|
|
|
|
} |
392
|
|
|
|
|
|
|
|
393
|
|
|
|
|
|
|
#========================================================================== |
394
|
|
|
|
|
|
|
|
395
|
|
|
|
|
|
|
=item sub unpack() |
396
|
|
|
|
|
|
|
|
397
|
|
|
|
|
|
|
$value = $hgt_xresp->unpack(); |
398
|
|
|
|
|
|
|
|
399
|
|
|
|
|
|
|
Unpacks the packed data packet. |
400
|
|
|
|
|
|
|
|
401
|
|
|
|
|
|
|
=cut |
402
|
|
|
|
|
|
|
|
403
|
|
|
|
|
|
|
sub unpack($) { |
404
|
0
|
|
|
0
|
1
|
|
my $self = shift @_; |
405
|
|
|
|
|
|
|
|
406
|
0
|
0
|
|
|
|
|
if (@_) { |
407
|
0
|
|
|
|
|
|
$self->{'_Buffer'} = shift @_; |
408
|
|
|
|
|
|
|
} |
409
|
0
|
|
|
|
|
|
my ($a,$b,$c,$d,$e,$f,$g,$h,$i,$j,$k,$l) = CORE::unpack($self->{'_Pack'},$self->{'_Buffer'}); |
410
|
0
|
|
|
|
|
|
$self->{'packetType'} = $a; |
411
|
0
|
|
|
|
|
|
$self->{'packetSize'} = $b; |
412
|
0
|
|
|
|
|
|
$self->{'responseIdent'} = $c; |
413
|
0
|
|
|
|
|
|
$self->{'_bitfields1'} = $d; # Includes bitfields hostFrameNumberLSN, unused69, and valid. |
414
|
0
|
|
|
|
|
|
$self->{'_unused70'} = $e; |
415
|
0
|
|
|
|
|
|
$self->{'_unused71'} = $f; |
416
|
0
|
|
|
|
|
|
$self->{'heightAboveTerrain'} = $g; |
417
|
0
|
|
|
|
|
|
$self->{'heightOfTerrain'} = $h; |
418
|
0
|
|
|
|
|
|
$self->{'materialCode'} = $i; |
419
|
0
|
|
|
|
|
|
$self->{'normalVectorAzimuth'} = $j; |
420
|
0
|
|
|
|
|
|
$self->{'normalVectorElevation'} = $k; |
421
|
0
|
|
|
|
|
|
$self->{'_unused72'} = $l; |
422
|
|
|
|
|
|
|
|
423
|
0
|
|
|
|
|
|
$self->{'hostFrameNumberLSN'} = $self->host_frame_number_lsn(); |
424
|
0
|
|
|
|
|
|
$self->{'valid'} = $self->valid(); |
425
|
|
|
|
|
|
|
|
426
|
0
|
|
|
|
|
|
return $self->{'_Buffer'}; |
427
|
|
|
|
|
|
|
} |
428
|
|
|
|
|
|
|
|
429
|
|
|
|
|
|
|
#========================================================================== |
430
|
|
|
|
|
|
|
|
431
|
|
|
|
|
|
|
=item sub byte_swap() |
432
|
|
|
|
|
|
|
|
433
|
|
|
|
|
|
|
$obj_name->byte_swap(); |
434
|
|
|
|
|
|
|
|
435
|
|
|
|
|
|
|
Byte swaps the packed data packet. |
436
|
|
|
|
|
|
|
|
437
|
|
|
|
|
|
|
=cut |
438
|
|
|
|
|
|
|
|
439
|
|
|
|
|
|
|
sub byte_swap($) { |
440
|
0
|
|
|
0
|
1
|
|
my $self = shift @_; |
441
|
|
|
|
|
|
|
|
442
|
0
|
0
|
|
|
|
|
if (@_) { |
443
|
0
|
|
|
|
|
|
$self->{'_Buffer'} = shift @_; |
444
|
|
|
|
|
|
|
} else { |
445
|
0
|
|
|
|
|
|
$self->pack(); |
446
|
|
|
|
|
|
|
} |
447
|
0
|
|
|
|
|
|
my ($a,$b,$c,$d,$e,$f,$g,$h,$i,$j,$k,$l,$m,$n) = CORE::unpack($self->{'_Swap1'},$self->{'_Buffer'}); |
448
|
|
|
|
|
|
|
|
449
|
0
|
|
|
|
|
|
$self->{'_Buffer'} = CORE::pack($self->{'_Swap2'},$a,$b,$c,$d,$e,$f,$h,$g,$j,$i,$k,$l,$m,$n); |
450
|
0
|
|
|
|
|
|
$self->unpack(); |
451
|
|
|
|
|
|
|
|
452
|
0
|
|
|
|
|
|
return $self->{'_Buffer'}; |
453
|
|
|
|
|
|
|
} |
454
|
|
|
|
|
|
|
|
455
|
|
|
|
|
|
|
1; |
456
|
|
|
|
|
|
|
__END__ |