| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# |
|
2
|
|
|
|
|
|
|
# Rinchi Common Image Generator Interface for Perl |
|
3
|
|
|
|
|
|
|
# Class Identifier: f78af880-200e-11de-bdba-001c25551abc |
|
4
|
|
|
|
|
|
|
# Author: Brian M. Ames |
|
5
|
|
|
|
|
|
|
# |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
package Rinchi::CIGIPP::LineOfSightVectorRequest; |
|
8
|
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
24
|
use 5.006; |
|
|
1
|
|
|
|
|
5
|
|
|
|
1
|
|
|
|
|
43
|
|
|
10
|
1
|
|
|
1
|
|
6
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
48
|
|
|
11
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
34
|
|
|
12
|
1
|
|
|
1
|
|
6
|
use Carp; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
2968
|
|
|
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.02'; |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
# Preloaded methods go here. |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 NAME |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Rinchi::CIGIPP::LineOfSightVectorRequest - Perl extension for the Common Image |
|
42
|
|
|
|
|
|
|
Generator Interface - Line Of Sight Vector Request data packet. |
|
43
|
|
|
|
|
|
|
data packet. |
|
44
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
use Rinchi::CIGIPP::LineOfSightVectorRequest; |
|
47
|
|
|
|
|
|
|
my $losv_rqst = Rinchi::CIGIPP::LineOfSightVectorRequest->new(); |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
$packet_type = $losv_rqst->packet_type(); |
|
50
|
|
|
|
|
|
|
$packet_size = $losv_rqst->packet_size(); |
|
51
|
|
|
|
|
|
|
$request_ident = $losv_rqst->request_ident(38090); |
|
52
|
|
|
|
|
|
|
$response_coordinate_system = $losv_rqst->response_coordinate_system(Rinchi::CIGIPP->EntityCS); |
|
53
|
|
|
|
|
|
|
$source_point_coordinate_system = $losv_rqst->source_point_coordinate_system(Rinchi::CIGIPP->GeodeticCS); |
|
54
|
|
|
|
|
|
|
$request_type = $losv_rqst->request_type(Rinchi::CIGIPP->BasicLOS); |
|
55
|
|
|
|
|
|
|
$alpha_threshold = $losv_rqst->alpha_threshold(186); |
|
56
|
|
|
|
|
|
|
$source_entity_ident = $losv_rqst->source_entity_ident(37849); |
|
57
|
|
|
|
|
|
|
$azimuth = $losv_rqst->azimuth(41.692); |
|
58
|
|
|
|
|
|
|
$elevation = $losv_rqst->elevation(53.069); |
|
59
|
|
|
|
|
|
|
$minimum_range = $losv_rqst->minimum_range(8.405); |
|
60
|
|
|
|
|
|
|
$maximum_range = $losv_rqst->maximum_range(66.277); |
|
61
|
|
|
|
|
|
|
$source_latitude = $losv_rqst->source_latitude(54.95); |
|
62
|
|
|
|
|
|
|
$source_xoffset = $losv_rqst->source_xoffset(47.242); |
|
63
|
|
|
|
|
|
|
$source_longitude = $losv_rqst->source_longitude(63.473); |
|
64
|
|
|
|
|
|
|
$source_yoffset = $losv_rqst->source_yoffset(13.438); |
|
65
|
|
|
|
|
|
|
$source_altitude = $losv_rqst->source_altitude(52.653); |
|
66
|
|
|
|
|
|
|
$source_zoffset = $losv_rqst->source_zoffset(14.289); |
|
67
|
|
|
|
|
|
|
$material_mask = $losv_rqst->material_mask(37559); |
|
68
|
|
|
|
|
|
|
$update_period = $losv_rqst->update_period(103); |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Line-of-Sight (LOS) Vector testing is used to determine the range from a source |
|
73
|
|
|
|
|
|
|
point to an object along a test vector. Applications may include but are not |
|
74
|
|
|
|
|
|
|
limited to laser range finding, determining range to target, and testing for |
|
75
|
|
|
|
|
|
|
weight on wheels. The Line of Sight test vector emanates from the source |
|
76
|
|
|
|
|
|
|
position specified in the Line of Sight Vector Request packet. A minimum and a |
|
77
|
|
|
|
|
|
|
maximum range are specified in order to constrain the search. |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
The LOS ID attribute is used to correlate requests from the Host with responses |
|
80
|
|
|
|
|
|
|
from the IG. When the IG responds to a LOS request, it will copy the LOS ID |
|
81
|
|
|
|
|
|
|
value contained within the request to the LOS ID attribute of the corresponding |
|
82
|
|
|
|
|
|
|
response packet. The Host should manipulate the value of LOS ID so that the ID |
|
83
|
|
|
|
|
|
|
is not reused before the IG has sufficient time to respond to the LOS request. |
|
84
|
|
|
|
|
|
|
This will prevent similarly identified requests from being lost by the IG. |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
Note that Line of Sight Segment Request packets and Line of Sight Vector |
|
87
|
|
|
|
|
|
|
Request packets share the LOS ID attribute. Duplicating the LOS ID value |
|
88
|
|
|
|
|
|
|
between both request types can also cause data loss. |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
If the Request Type attribute is set to Basic (0), the IG will respond with a |
|
91
|
|
|
|
|
|
|
Line of Sight Response packet. If the attribute is set to Extended (1), the IG |
|
92
|
|
|
|
|
|
|
will respond with a Line of Sight Extended Response packet. |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
The Alpha Threshold attribute specifies the minimum alpha value with which an |
|
95
|
|
|
|
|
|
|
intersection should register. If an LOS test vector intersects with a surface |
|
96
|
|
|
|
|
|
|
whose alpha at the intersection point is lower than this value, no Line of |
|
97
|
|
|
|
|
|
|
Sight Response or Line of Sight Extended Response packet will be generated. |
|
98
|
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
The Update Period attribute specifies the number of frames between periodic |
|
100
|
|
|
|
|
|
|
responses. This allows the Host to send just one Line of Sight Vector Request |
|
101
|
|
|
|
|
|
|
packet but receive continuous responses if the test point will not move with |
|
102
|
|
|
|
|
|
|
respect to the specified coordinate system. If Update Period is set to zero, |
|
103
|
|
|
|
|
|
|
the request will be treated as a one-shot request and the IG will return a |
|
104
|
|
|
|
|
|
|
single response. The Host should manipulate the value of LOS ID so that an ID |
|
105
|
|
|
|
|
|
|
is not reused before the IG has sufficient time to process and respond to the |
|
106
|
|
|
|
|
|
|
request. If Update Period is set to some value n greater than zero, the IG will |
|
107
|
|
|
|
|
|
|
return a request every nth frame until the Entity is destroyed or until the |
|
108
|
|
|
|
|
|
|
Update Period attribute set to zero. |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
The IG can only return valid LOS data if an intersection is detected along the |
|
111
|
|
|
|
|
|
|
LOS segment, that is, between the minimum and maximum ranges specified. If the |
|
112
|
|
|
|
|
|
|
LOS data cannot be calculated, the Valid attribute of the response packet will |
|
113
|
|
|
|
|
|
|
be set to zero (0). |
|
114
|
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
The IG will generate a response for each intersection along the LOS vector. |
|
116
|
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
Besides the range of the LOS ID attribute, there is no restriction on the |
|
118
|
|
|
|
|
|
|
number of LOS requests that can be sent in a single frame; however, the |
|
119
|
|
|
|
|
|
|
response time of the IG might be degraded as the number of LOS requests increases. |
|
120
|
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=head2 EXPORT |
|
122
|
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
None by default. |
|
124
|
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
#============================================================================== |
|
126
|
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=item new $losv_rqst = Rinchi::CIGIPP::LineOfSightVectorRequest->new() |
|
128
|
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
Constructor for Rinchi::LineOfSightVectorRequest. |
|
130
|
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=cut |
|
132
|
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
sub new { |
|
134
|
1
|
|
|
1
|
1
|
217
|
my $class = shift; |
|
135
|
1
|
|
33
|
|
|
8
|
$class = ref($class) || $class; |
|
136
|
|
|
|
|
|
|
|
|
137
|
1
|
|
|
|
|
23
|
my $self = { |
|
138
|
|
|
|
|
|
|
'_Buffer' => '', |
|
139
|
|
|
|
|
|
|
'_ClassIdent' => 'f78af880-200e-11de-bdba-001c25551abc', |
|
140
|
|
|
|
|
|
|
'_Pack' => 'CCSCCSffffdddICCS', |
|
141
|
|
|
|
|
|
|
'_Swap1' => 'CCvCCvVVVVVVVVVVVCCv', |
|
142
|
|
|
|
|
|
|
'_Swap2' => 'CCnCCnNNNNNNNNNNNCCn', |
|
143
|
|
|
|
|
|
|
'packetType' => 26, |
|
144
|
|
|
|
|
|
|
'packetSize' => 56, |
|
145
|
|
|
|
|
|
|
'requestIdent' => 0, |
|
146
|
|
|
|
|
|
|
'_bitfields1' => 0, # Includes bitfields unused44, responseCoordinateSystem, sourcePointCoordinateSystem, and requestType. |
|
147
|
|
|
|
|
|
|
'responseCoordinateSystem' => 0, |
|
148
|
|
|
|
|
|
|
'sourcePointCoordinateSystem' => 0, |
|
149
|
|
|
|
|
|
|
'requestType' => 0, |
|
150
|
|
|
|
|
|
|
'alphaThreshold' => 0, |
|
151
|
|
|
|
|
|
|
'sourceEntityIdent' => 0, |
|
152
|
|
|
|
|
|
|
'azimuth' => 0, |
|
153
|
|
|
|
|
|
|
'elevation' => 0, |
|
154
|
|
|
|
|
|
|
'minimumRange' => 0, |
|
155
|
|
|
|
|
|
|
'maximumRange' => 0, |
|
156
|
|
|
|
|
|
|
'sourceLatitude_xOffset' => 0, |
|
157
|
|
|
|
|
|
|
'sourceLongitude_yOffset' => 0, |
|
158
|
|
|
|
|
|
|
'sourceAltitude_zOffset' => 0, |
|
159
|
|
|
|
|
|
|
'materialMask' => 0, |
|
160
|
|
|
|
|
|
|
'updatePeriod' => 0, |
|
161
|
|
|
|
|
|
|
'_unused45' => 0, |
|
162
|
|
|
|
|
|
|
'_unused46' => 0, |
|
163
|
|
|
|
|
|
|
}; |
|
164
|
|
|
|
|
|
|
|
|
165
|
1
|
50
|
|
|
|
5
|
if (@_) { |
|
166
|
0
|
0
|
|
|
|
0
|
if (ref($_[0]) eq 'ARRAY') { |
|
|
|
0
|
|
|
|
|
|
|
167
|
0
|
|
|
|
|
0
|
$self->{'_Buffer'} = $_[0][0]; |
|
168
|
|
|
|
|
|
|
} elsif (ref($_[0]) eq 'HASH') { |
|
169
|
0
|
|
|
|
|
0
|
foreach my $attr (keys %{$_[0]}) { |
|
|
0
|
|
|
|
|
0
|
|
|
170
|
0
|
0
|
|
|
|
0
|
$self->{"_$attr"} = $_[0]->{$attr} unless ($attr =~ /^_/); |
|
171
|
|
|
|
|
|
|
} |
|
172
|
|
|
|
|
|
|
} |
|
173
|
|
|
|
|
|
|
} |
|
174
|
|
|
|
|
|
|
|
|
175
|
1
|
|
|
|
|
2
|
bless($self,$class); |
|
176
|
1
|
|
|
|
|
3
|
return $self; |
|
177
|
|
|
|
|
|
|
} |
|
178
|
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
#============================================================================== |
|
180
|
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
=item sub packet_type() |
|
182
|
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
$value = $losv_rqst->packet_type(); |
|
184
|
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
Data Packet Identifier. |
|
186
|
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
This attribute identifies this data packet as the Line of Sight Vector Request |
|
188
|
|
|
|
|
|
|
packet. The value of this attribute must be 26. |
|
189
|
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
=cut |
|
191
|
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
sub packet_type() { |
|
193
|
1
|
|
|
1
|
1
|
7
|
my ($self) = @_; |
|
194
|
1
|
|
|
|
|
8
|
return $self->{'packetType'}; |
|
195
|
|
|
|
|
|
|
} |
|
196
|
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
#============================================================================== |
|
198
|
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
=item sub packet_size() |
|
200
|
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
$value = $losv_rqst->packet_size(); |
|
202
|
|
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
Data Packet Size. |
|
204
|
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
This attribute indicates the number of bytes in this data packet. The value of |
|
206
|
|
|
|
|
|
|
this attribute must be 56. |
|
207
|
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
=cut |
|
209
|
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
sub packet_size() { |
|
211
|
1
|
|
|
1
|
1
|
5
|
my ($self) = @_; |
|
212
|
1
|
|
|
|
|
3
|
return $self->{'packetSize'}; |
|
213
|
|
|
|
|
|
|
} |
|
214
|
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
#============================================================================== |
|
216
|
|
|
|
|
|
|
|
|
217
|
|
|
|
|
|
|
=item sub request_ident([$newValue]) |
|
218
|
|
|
|
|
|
|
|
|
219
|
|
|
|
|
|
|
$value = $losv_rqst->request_ident($newValue); |
|
220
|
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
LOS ID. |
|
222
|
|
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
This attribute identifies the LOS request. When the IG returns a Line of Sight |
|
224
|
|
|
|
|
|
|
Response packet in response to this request, the LOS ID attribute of that |
|
225
|
|
|
|
|
|
|
packet will contain this value to correlate the response with this request. |
|
226
|
|
|
|
|
|
|
|
|
227
|
|
|
|
|
|
|
Note: Because the Line of Sight Response data packet is used for responding to |
|
228
|
|
|
|
|
|
|
both the LOS segment and LOS vector requests, the LOS ID value used for one |
|
229
|
|
|
|
|
|
|
request type should not be duplicated for the other request type before the IG |
|
230
|
|
|
|
|
|
|
has sufficient time to generate a response. |
|
231
|
|
|
|
|
|
|
|
|
232
|
|
|
|
|
|
|
=cut |
|
233
|
|
|
|
|
|
|
|
|
234
|
|
|
|
|
|
|
sub request_ident() { |
|
235
|
1
|
|
|
1
|
1
|
5
|
my ($self,$nv) = @_; |
|
236
|
1
|
50
|
|
|
|
5
|
if (defined($nv)) { |
|
237
|
1
|
|
|
|
|
2
|
$self->{'requestIdent'} = $nv; |
|
238
|
|
|
|
|
|
|
} |
|
239
|
1
|
|
|
|
|
3
|
return $self->{'requestIdent'}; |
|
240
|
|
|
|
|
|
|
} |
|
241
|
|
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
#============================================================================== |
|
243
|
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
=item sub response_coordinate_system([$newValue]) |
|
245
|
|
|
|
|
|
|
|
|
246
|
|
|
|
|
|
|
$value = $losv_rqst->response_coordinate_system($newValue); |
|
247
|
|
|
|
|
|
|
|
|
248
|
|
|
|
|
|
|
Response Coordinate System. |
|
249
|
|
|
|
|
|
|
|
|
250
|
|
|
|
|
|
|
This attribute specifies the coordinate system to be used in the response. |
|
251
|
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
If this attribute is set to Geodetic (0), then the intersection point will be |
|
253
|
|
|
|
|
|
|
specified by latitude, longitude, and altitude. |
|
254
|
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
If this attribute is set to Entity (1), then the intersection point will be |
|
256
|
|
|
|
|
|
|
specified relative to the reference point of the intersected entity. |
|
257
|
|
|
|
|
|
|
|
|
258
|
|
|
|
|
|
|
GeodeticCS 0 |
|
259
|
|
|
|
|
|
|
EntityCS 1 |
|
260
|
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
=cut |
|
262
|
|
|
|
|
|
|
|
|
263
|
|
|
|
|
|
|
sub response_coordinate_system() { |
|
264
|
1
|
|
|
1
|
1
|
3
|
my ($self,$nv) = @_; |
|
265
|
1
|
50
|
|
|
|
3
|
if (defined($nv)) { |
|
266
|
1
|
50
|
33
|
|
|
7
|
if (($nv==0) or ($nv==1)) { |
|
267
|
1
|
|
|
|
|
3
|
$self->{'_bitfields1'} |= ($nv << 2) &0x04; |
|
268
|
|
|
|
|
|
|
} else { |
|
269
|
0
|
|
|
|
|
0
|
carp "response_coordinate_system must be 0 (GeodeticCS), or 1 (EntityCS)."; |
|
270
|
|
|
|
|
|
|
} |
|
271
|
|
|
|
|
|
|
} |
|
272
|
1
|
|
|
|
|
3
|
return (($self->{'_bitfields1'} & 0x04) >> 2); |
|
273
|
|
|
|
|
|
|
} |
|
274
|
|
|
|
|
|
|
|
|
275
|
|
|
|
|
|
|
#============================================================================== |
|
276
|
|
|
|
|
|
|
|
|
277
|
|
|
|
|
|
|
=item sub source_point_coordinate_system([$newValue]) |
|
278
|
|
|
|
|
|
|
|
|
279
|
|
|
|
|
|
|
$value = $losv_rqst->source_point_coordinate_system($newValue); |
|
280
|
|
|
|
|
|
|
|
|
281
|
|
|
|
|
|
|
Source Point Coordinate System. |
|
282
|
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
This attribute indicates the coordinate system relative to which the test |
|
284
|
|
|
|
|
|
|
vector source point is specified. |
|
285
|
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
If this attribute is set to Geodetic (0), then the point is given by latitude, |
|
287
|
|
|
|
|
|
|
longitude, and altitude. The vector, specified by Azimuth and Elevation, is |
|
288
|
|
|
|
|
|
|
defined relative to the Geodetic coordinate system. |
|
289
|
|
|
|
|
|
|
|
|
290
|
|
|
|
|
|
|
If this attribute is set to Entity (1), then the point is defined relative to |
|
291
|
|
|
|
|
|
|
the reference point of the entity specified by Entity ID. The vector is also |
|
292
|
|
|
|
|
|
|
specified relative to the entity's coordinate system. |
|
293
|
|
|
|
|
|
|
|
|
294
|
|
|
|
|
|
|
GeodeticCS 0 |
|
295
|
|
|
|
|
|
|
EntityCS 1 |
|
296
|
|
|
|
|
|
|
|
|
297
|
|
|
|
|
|
|
=cut |
|
298
|
|
|
|
|
|
|
|
|
299
|
|
|
|
|
|
|
sub source_point_coordinate_system() { |
|
300
|
1
|
|
|
1
|
1
|
2
|
my ($self,$nv) = @_; |
|
301
|
1
|
50
|
|
|
|
3
|
if (defined($nv)) { |
|
302
|
1
|
50
|
33
|
|
|
6
|
if (($nv==0) or ($nv==1)) { |
|
303
|
1
|
|
|
|
|
3
|
$self->{'_bitfields1'} |= ($nv << 1) &0x02; |
|
304
|
|
|
|
|
|
|
} else { |
|
305
|
0
|
|
|
|
|
0
|
carp "source_point_coordinate_system must be 0 (GeodeticCS), or 1 (EntityCS)."; |
|
306
|
|
|
|
|
|
|
} |
|
307
|
|
|
|
|
|
|
} |
|
308
|
1
|
|
|
|
|
4
|
return (($self->{'_bitfields1'} & 0x02) >> 1); |
|
309
|
|
|
|
|
|
|
} |
|
310
|
|
|
|
|
|
|
|
|
311
|
|
|
|
|
|
|
#============================================================================== |
|
312
|
|
|
|
|
|
|
|
|
313
|
|
|
|
|
|
|
=item sub request_type([$newValue]) |
|
314
|
|
|
|
|
|
|
|
|
315
|
|
|
|
|
|
|
$value = $losv_rqst->request_type($newValue); |
|
316
|
|
|
|
|
|
|
|
|
317
|
|
|
|
|
|
|
Request Type. |
|
318
|
|
|
|
|
|
|
|
|
319
|
|
|
|
|
|
|
This attribute determines what type of response the IG should return for this |
|
320
|
|
|
|
|
|
|
request. |
|
321
|
|
|
|
|
|
|
If this attribute is set to Basic (0), the IG will respond with a Line of Sight |
|
322
|
|
|
|
|
|
|
Response packet. If this attribute is set to Extended (1), the IG will respond |
|
323
|
|
|
|
|
|
|
with a Line of Sight Extended Response packet. |
|
324
|
|
|
|
|
|
|
|
|
325
|
|
|
|
|
|
|
BasicLOS 0 |
|
326
|
|
|
|
|
|
|
ExtendedLOS 1 |
|
327
|
|
|
|
|
|
|
|
|
328
|
|
|
|
|
|
|
=cut |
|
329
|
|
|
|
|
|
|
|
|
330
|
|
|
|
|
|
|
sub request_type() { |
|
331
|
1
|
|
|
1
|
1
|
8
|
my ($self,$nv) = @_; |
|
332
|
1
|
50
|
|
|
|
9
|
if (defined($nv)) { |
|
333
|
1
|
50
|
33
|
|
|
14
|
if (($nv==0) or ($nv==1)) { |
|
334
|
1
|
|
|
|
|
3
|
$self->{'_bitfields1'} |= $nv &0x01; |
|
335
|
|
|
|
|
|
|
} else { |
|
336
|
0
|
|
|
|
|
0
|
carp "request_type must be 0 (BasicLOS), or 1 (ExtendedLOS)."; |
|
337
|
|
|
|
|
|
|
} |
|
338
|
|
|
|
|
|
|
} |
|
339
|
1
|
|
|
|
|
5
|
return ($self->{'_bitfields1'} & 0x01); |
|
340
|
|
|
|
|
|
|
} |
|
341
|
|
|
|
|
|
|
|
|
342
|
|
|
|
|
|
|
#============================================================================== |
|
343
|
|
|
|
|
|
|
|
|
344
|
|
|
|
|
|
|
=item sub alpha_threshold([$newValue]) |
|
345
|
|
|
|
|
|
|
|
|
346
|
|
|
|
|
|
|
$value = $losv_rqst->alpha_threshold($newValue); |
|
347
|
|
|
|
|
|
|
|
|
348
|
|
|
|
|
|
|
Alpha Threshold. |
|
349
|
|
|
|
|
|
|
|
|
350
|
|
|
|
|
|
|
This attribute specifies the minimum alpha value (i.e., minimum opacity) a |
|
351
|
|
|
|
|
|
|
surface may have for an LOS response to be generated. |
|
352
|
|
|
|
|
|
|
|
|
353
|
|
|
|
|
|
|
=cut |
|
354
|
|
|
|
|
|
|
|
|
355
|
|
|
|
|
|
|
sub alpha_threshold() { |
|
356
|
1
|
|
|
1
|
1
|
6
|
my ($self,$nv) = @_; |
|
357
|
1
|
50
|
|
|
|
3
|
if (defined($nv)) { |
|
358
|
1
|
|
|
|
|
3
|
$self->{'alphaThreshold'} = $nv; |
|
359
|
|
|
|
|
|
|
} |
|
360
|
1
|
|
|
|
|
3
|
return $self->{'alphaThreshold'}; |
|
361
|
|
|
|
|
|
|
} |
|
362
|
|
|
|
|
|
|
|
|
363
|
|
|
|
|
|
|
#============================================================================== |
|
364
|
|
|
|
|
|
|
|
|
365
|
|
|
|
|
|
|
=item sub source_entity_ident([$newValue]) |
|
366
|
|
|
|
|
|
|
|
|
367
|
|
|
|
|
|
|
$value = $losv_rqst->source_entity_ident($newValue); |
|
368
|
|
|
|
|
|
|
|
|
369
|
|
|
|
|
|
|
Entity ID. |
|
370
|
|
|
|
|
|
|
|
|
371
|
|
|
|
|
|
|
This attribute specifies the entity relative to which the test segment |
|
372
|
|
|
|
|
|
|
endpoints are defined. This attribute is ignored if Source Point Coordinate |
|
373
|
|
|
|
|
|
|
System is set to Geodetic (0). |
|
374
|
|
|
|
|
|
|
|
|
375
|
|
|
|
|
|
|
=cut |
|
376
|
|
|
|
|
|
|
|
|
377
|
|
|
|
|
|
|
sub source_entity_ident() { |
|
378
|
1
|
|
|
1
|
1
|
5
|
my ($self,$nv) = @_; |
|
379
|
1
|
50
|
|
|
|
4
|
if (defined($nv)) { |
|
380
|
1
|
|
|
|
|
2
|
$self->{'sourceEntityIdent'} = $nv; |
|
381
|
|
|
|
|
|
|
} |
|
382
|
1
|
|
|
|
|
3
|
return $self->{'sourceEntityIdent'}; |
|
383
|
|
|
|
|
|
|
} |
|
384
|
|
|
|
|
|
|
|
|
385
|
|
|
|
|
|
|
#============================================================================== |
|
386
|
|
|
|
|
|
|
|
|
387
|
|
|
|
|
|
|
=item sub azimuth([$newValue]) |
|
388
|
|
|
|
|
|
|
|
|
389
|
|
|
|
|
|
|
$value = $losv_rqst->azimuth($newValue); |
|
390
|
|
|
|
|
|
|
|
|
391
|
|
|
|
|
|
|
Azimuth. |
|
392
|
|
|
|
|
|
|
|
|
393
|
|
|
|
|
|
|
This attribute specifies the horizontal angle of the LOS test vector. |
|
394
|
|
|
|
|
|
|
|
|
395
|
|
|
|
|
|
|
=cut |
|
396
|
|
|
|
|
|
|
|
|
397
|
|
|
|
|
|
|
sub azimuth() { |
|
398
|
1
|
|
|
1
|
1
|
4
|
my ($self,$nv) = @_; |
|
399
|
1
|
50
|
|
|
|
4
|
if (defined($nv)) { |
|
400
|
1
|
|
|
|
|
3
|
$self->{'azimuth'} = $nv; |
|
401
|
|
|
|
|
|
|
} |
|
402
|
1
|
|
|
|
|
4
|
return $self->{'azimuth'}; |
|
403
|
|
|
|
|
|
|
} |
|
404
|
|
|
|
|
|
|
|
|
405
|
|
|
|
|
|
|
#============================================================================== |
|
406
|
|
|
|
|
|
|
|
|
407
|
|
|
|
|
|
|
=item sub elevation([$newValue]) |
|
408
|
|
|
|
|
|
|
|
|
409
|
|
|
|
|
|
|
$value = $losv_rqst->elevation($newValue); |
|
410
|
|
|
|
|
|
|
|
|
411
|
|
|
|
|
|
|
Elevation. |
|
412
|
|
|
|
|
|
|
|
|
413
|
|
|
|
|
|
|
This attribute specifies the vertical angle of the LOS test vector. |
|
414
|
|
|
|
|
|
|
|
|
415
|
|
|
|
|
|
|
=cut |
|
416
|
|
|
|
|
|
|
|
|
417
|
|
|
|
|
|
|
sub elevation() { |
|
418
|
1
|
|
|
1
|
1
|
4
|
my ($self,$nv) = @_; |
|
419
|
1
|
50
|
|
|
|
4
|
if (defined($nv)) { |
|
420
|
1
|
|
|
|
|
2
|
$self->{'elevation'} = $nv; |
|
421
|
|
|
|
|
|
|
} |
|
422
|
1
|
|
|
|
|
3
|
return $self->{'elevation'}; |
|
423
|
|
|
|
|
|
|
} |
|
424
|
|
|
|
|
|
|
|
|
425
|
|
|
|
|
|
|
#============================================================================== |
|
426
|
|
|
|
|
|
|
|
|
427
|
|
|
|
|
|
|
=item sub minimum_range([$newValue]) |
|
428
|
|
|
|
|
|
|
|
|
429
|
|
|
|
|
|
|
$value = $losv_rqst->minimum_range($newValue); |
|
430
|
|
|
|
|
|
|
|
|
431
|
|
|
|
|
|
|
Minimum Range. |
|
432
|
|
|
|
|
|
|
|
|
433
|
|
|
|
|
|
|
This attribute specifies the minimum range along the LOS test vector at which |
|
434
|
|
|
|
|
|
|
intersection testing should occur. |
|
435
|
|
|
|
|
|
|
|
|
436
|
|
|
|
|
|
|
=cut |
|
437
|
|
|
|
|
|
|
|
|
438
|
|
|
|
|
|
|
sub minimum_range() { |
|
439
|
1
|
|
|
1
|
1
|
4
|
my ($self,$nv) = @_; |
|
440
|
1
|
50
|
|
|
|
4
|
if (defined($nv)) { |
|
441
|
1
|
|
|
|
|
2
|
$self->{'minimumRange'} = $nv; |
|
442
|
|
|
|
|
|
|
} |
|
443
|
1
|
|
|
|
|
3
|
return $self->{'minimumRange'}; |
|
444
|
|
|
|
|
|
|
} |
|
445
|
|
|
|
|
|
|
|
|
446
|
|
|
|
|
|
|
#============================================================================== |
|
447
|
|
|
|
|
|
|
|
|
448
|
|
|
|
|
|
|
=item sub maximum_range([$newValue]) |
|
449
|
|
|
|
|
|
|
|
|
450
|
|
|
|
|
|
|
$value = $losv_rqst->maximum_range($newValue); |
|
451
|
|
|
|
|
|
|
|
|
452
|
|
|
|
|
|
|
Maximum Range. |
|
453
|
|
|
|
|
|
|
|
|
454
|
|
|
|
|
|
|
This attribute specifies the maximum range along the LOS test vector at which |
|
455
|
|
|
|
|
|
|
intersection testing should occur. |
|
456
|
|
|
|
|
|
|
|
|
457
|
|
|
|
|
|
|
=cut |
|
458
|
|
|
|
|
|
|
|
|
459
|
|
|
|
|
|
|
sub maximum_range() { |
|
460
|
1
|
|
|
1
|
1
|
6
|
my ($self,$nv) = @_; |
|
461
|
1
|
50
|
|
|
|
4
|
if (defined($nv)) { |
|
462
|
1
|
|
|
|
|
6
|
$self->{'maximumRange'} = $nv; |
|
463
|
|
|
|
|
|
|
} |
|
464
|
1
|
|
|
|
|
4
|
return $self->{'maximumRange'}; |
|
465
|
|
|
|
|
|
|
} |
|
466
|
|
|
|
|
|
|
|
|
467
|
|
|
|
|
|
|
#============================================================================== |
|
468
|
|
|
|
|
|
|
|
|
469
|
|
|
|
|
|
|
=item sub source_latitude([$newValue]) |
|
470
|
|
|
|
|
|
|
|
|
471
|
|
|
|
|
|
|
$value = $losv_rqst->source_latitude($newValue); |
|
472
|
|
|
|
|
|
|
|
|
473
|
|
|
|
|
|
|
Source Latitude. |
|
474
|
|
|
|
|
|
|
|
|
475
|
|
|
|
|
|
|
If Source point Coordinate System is set to Geodetic (0), this attribute |
|
476
|
|
|
|
|
|
|
specifies the latitude of the source point of the LOS test vector. |
|
477
|
|
|
|
|
|
|
|
|
478
|
|
|
|
|
|
|
=cut |
|
479
|
|
|
|
|
|
|
|
|
480
|
|
|
|
|
|
|
sub source_latitude() { |
|
481
|
1
|
|
|
1
|
1
|
4
|
my ($self,$nv) = @_; |
|
482
|
1
|
50
|
|
|
|
4
|
if (defined($nv)) { |
|
483
|
1
|
|
|
|
|
2
|
$self->{'sourceLatitude_xOffset'} = $nv; |
|
484
|
|
|
|
|
|
|
} |
|
485
|
1
|
|
|
|
|
3
|
return $self->{'sourceLatitude_xOffset'}; |
|
486
|
|
|
|
|
|
|
} |
|
487
|
|
|
|
|
|
|
|
|
488
|
|
|
|
|
|
|
#============================================================================== |
|
489
|
|
|
|
|
|
|
|
|
490
|
|
|
|
|
|
|
=item sub source_xoffset([$newValue]) |
|
491
|
|
|
|
|
|
|
|
|
492
|
|
|
|
|
|
|
$value = $losv_rqst->source_xoffset($newValue); |
|
493
|
|
|
|
|
|
|
|
|
494
|
|
|
|
|
|
|
Source X Offset. |
|
495
|
|
|
|
|
|
|
|
|
496
|
|
|
|
|
|
|
If Source Point Coordinate System is set to Entity (1), this attribute |
|
497
|
|
|
|
|
|
|
specifies the X offset of the source endpoint of the LOS test segment. |
|
498
|
|
|
|
|
|
|
|
|
499
|
|
|
|
|
|
|
=cut |
|
500
|
|
|
|
|
|
|
|
|
501
|
|
|
|
|
|
|
sub source_xoffset() { |
|
502
|
1
|
|
|
1
|
1
|
5
|
my ($self,$nv) = @_; |
|
503
|
1
|
50
|
|
|
|
3
|
if (defined($nv)) { |
|
504
|
1
|
|
|
|
|
5
|
$self->{'sourceLatitude_xOffset'} = $nv; |
|
505
|
|
|
|
|
|
|
} |
|
506
|
1
|
|
|
|
|
2
|
return $self->{'sourceLatitude_xOffset'}; |
|
507
|
|
|
|
|
|
|
} |
|
508
|
|
|
|
|
|
|
|
|
509
|
|
|
|
|
|
|
#============================================================================== |
|
510
|
|
|
|
|
|
|
|
|
511
|
|
|
|
|
|
|
=item sub source_longitude([$newValue]) |
|
512
|
|
|
|
|
|
|
|
|
513
|
|
|
|
|
|
|
$value = $losv_rqst->source_longitude($newValue); |
|
514
|
|
|
|
|
|
|
|
|
515
|
|
|
|
|
|
|
Source Longitude. |
|
516
|
|
|
|
|
|
|
|
|
517
|
|
|
|
|
|
|
If Source point Coordinate System is set to Geodetic (0), this attribute |
|
518
|
|
|
|
|
|
|
specifies the longitude of the source point of the LOS test vector. |
|
519
|
|
|
|
|
|
|
|
|
520
|
|
|
|
|
|
|
=cut |
|
521
|
|
|
|
|
|
|
|
|
522
|
|
|
|
|
|
|
sub source_longitude() { |
|
523
|
1
|
|
|
1
|
1
|
5
|
my ($self,$nv) = @_; |
|
524
|
1
|
50
|
|
|
|
3
|
if (defined($nv)) { |
|
525
|
1
|
|
|
|
|
3
|
$self->{'sourceLongitude_yOffset'} = $nv; |
|
526
|
|
|
|
|
|
|
} |
|
527
|
1
|
|
|
|
|
3
|
return $self->{'sourceLongitude_yOffset'}; |
|
528
|
|
|
|
|
|
|
} |
|
529
|
|
|
|
|
|
|
|
|
530
|
|
|
|
|
|
|
#============================================================================== |
|
531
|
|
|
|
|
|
|
|
|
532
|
|
|
|
|
|
|
=item sub source_yoffset([$newValue]) |
|
533
|
|
|
|
|
|
|
|
|
534
|
|
|
|
|
|
|
$value = $losv_rqst->source_yoffset($newValue); |
|
535
|
|
|
|
|
|
|
|
|
536
|
|
|
|
|
|
|
Source Y Offset. |
|
537
|
|
|
|
|
|
|
|
|
538
|
|
|
|
|
|
|
If Source Point Coordinate System is set to Entity (1), this attribute |
|
539
|
|
|
|
|
|
|
specifies the Y offset of the source endpoint of the LOS test segment. |
|
540
|
|
|
|
|
|
|
|
|
541
|
|
|
|
|
|
|
=cut |
|
542
|
|
|
|
|
|
|
|
|
543
|
|
|
|
|
|
|
sub source_yoffset() { |
|
544
|
1
|
|
|
1
|
1
|
4
|
my ($self,$nv) = @_; |
|
545
|
1
|
50
|
|
|
|
4
|
if (defined($nv)) { |
|
546
|
1
|
|
|
|
|
2
|
$self->{'sourceLongitude_yOffset'} = $nv; |
|
547
|
|
|
|
|
|
|
} |
|
548
|
1
|
|
|
|
|
4
|
return $self->{'sourceLongitude_yOffset'}; |
|
549
|
|
|
|
|
|
|
} |
|
550
|
|
|
|
|
|
|
|
|
551
|
|
|
|
|
|
|
#============================================================================== |
|
552
|
|
|
|
|
|
|
|
|
553
|
|
|
|
|
|
|
=item sub source_altitude([$newValue]) |
|
554
|
|
|
|
|
|
|
|
|
555
|
|
|
|
|
|
|
$value = $losv_rqst->source_altitude($newValue); |
|
556
|
|
|
|
|
|
|
|
|
557
|
|
|
|
|
|
|
Source Altitude. |
|
558
|
|
|
|
|
|
|
|
|
559
|
|
|
|
|
|
|
If Source Point Coordinate System is set to Geodetic (0), this attribute |
|
560
|
|
|
|
|
|
|
specifies the altitude of the source point of the LOS test vector. |
|
561
|
|
|
|
|
|
|
|
|
562
|
|
|
|
|
|
|
=cut |
|
563
|
|
|
|
|
|
|
|
|
564
|
|
|
|
|
|
|
sub source_altitude() { |
|
565
|
1
|
|
|
1
|
1
|
4
|
my ($self,$nv) = @_; |
|
566
|
1
|
50
|
|
|
|
3
|
if (defined($nv)) { |
|
567
|
1
|
|
|
|
|
3
|
$self->{'sourceAltitude_zOffset'} = $nv; |
|
568
|
|
|
|
|
|
|
} |
|
569
|
1
|
|
|
|
|
2
|
return $self->{'sourceAltitude_zOffset'}; |
|
570
|
|
|
|
|
|
|
} |
|
571
|
|
|
|
|
|
|
|
|
572
|
|
|
|
|
|
|
#============================================================================== |
|
573
|
|
|
|
|
|
|
|
|
574
|
|
|
|
|
|
|
=item sub source_zoffset([$newValue]) |
|
575
|
|
|
|
|
|
|
|
|
576
|
|
|
|
|
|
|
$value = $losv_rqst->source_zoffset($newValue); |
|
577
|
|
|
|
|
|
|
|
|
578
|
|
|
|
|
|
|
Source Z Offset. |
|
579
|
|
|
|
|
|
|
|
|
580
|
|
|
|
|
|
|
If Source Point Coordinate System is set to Entity (1), this attribute |
|
581
|
|
|
|
|
|
|
specifies the Z offset of the source endpoint of the LOS test segment. |
|
582
|
|
|
|
|
|
|
|
|
583
|
|
|
|
|
|
|
=cut |
|
584
|
|
|
|
|
|
|
|
|
585
|
|
|
|
|
|
|
sub source_zoffset() { |
|
586
|
1
|
|
|
1
|
1
|
5
|
my ($self,$nv) = @_; |
|
587
|
1
|
50
|
|
|
|
4
|
if (defined($nv)) { |
|
588
|
1
|
|
|
|
|
2
|
$self->{'sourceAltitude_zOffset'} = $nv; |
|
589
|
|
|
|
|
|
|
} |
|
590
|
1
|
|
|
|
|
3
|
return $self->{'sourceAltitude_zOffset'}; |
|
591
|
|
|
|
|
|
|
} |
|
592
|
|
|
|
|
|
|
|
|
593
|
|
|
|
|
|
|
#============================================================================== |
|
594
|
|
|
|
|
|
|
|
|
595
|
|
|
|
|
|
|
=item sub material_mask([$newValue]) |
|
596
|
|
|
|
|
|
|
|
|
597
|
|
|
|
|
|
|
$value = $losv_rqst->material_mask($newValue); |
|
598
|
|
|
|
|
|
|
|
|
599
|
|
|
|
|
|
|
Material Mask. |
|
600
|
|
|
|
|
|
|
|
|
601
|
|
|
|
|
|
|
This attribute specifies the environmental and cultural features to be included |
|
602
|
|
|
|
|
|
|
in LOS segment testing. Each bit represents a material code range; setting that |
|
603
|
|
|
|
|
|
|
bit to one (1) will cause the IG to register intersections with polygons whose |
|
604
|
|
|
|
|
|
|
material codes are within that range. |
|
605
|
|
|
|
|
|
|
|
|
606
|
|
|
|
|
|
|
Material code ranges are IG-dependent. Refer to the appropriate IG |
|
607
|
|
|
|
|
|
|
documentation for material code assignments. |
|
608
|
|
|
|
|
|
|
|
|
609
|
|
|
|
|
|
|
=cut |
|
610
|
|
|
|
|
|
|
|
|
611
|
|
|
|
|
|
|
sub material_mask() { |
|
612
|
1
|
|
|
1
|
1
|
4
|
my ($self,$nv) = @_; |
|
613
|
1
|
50
|
|
|
|
10
|
if (defined($nv)) { |
|
614
|
1
|
|
|
|
|
2
|
$self->{'materialMask'} = $nv; |
|
615
|
|
|
|
|
|
|
} |
|
616
|
1
|
|
|
|
|
8
|
return $self->{'materialMask'}; |
|
617
|
|
|
|
|
|
|
} |
|
618
|
|
|
|
|
|
|
|
|
619
|
|
|
|
|
|
|
#============================================================================== |
|
620
|
|
|
|
|
|
|
|
|
621
|
|
|
|
|
|
|
=item sub update_period([$newValue]) |
|
622
|
|
|
|
|
|
|
|
|
623
|
|
|
|
|
|
|
$value = $losv_rqst->update_period($newValue); |
|
624
|
|
|
|
|
|
|
|
|
625
|
|
|
|
|
|
|
Update Period. |
|
626
|
|
|
|
|
|
|
|
|
627
|
|
|
|
|
|
|
This attribute specifies the interval between successive responses to this |
|
628
|
|
|
|
|
|
|
request. A value of zero (0) indicates that the IG should return a single |
|
629
|
|
|
|
|
|
|
response. A value of n > 0 indicates that the IG should return a response every |
|
630
|
|
|
|
|
|
|
nth frame. |
|
631
|
|
|
|
|
|
|
|
|
632
|
|
|
|
|
|
|
=cut |
|
633
|
|
|
|
|
|
|
|
|
634
|
|
|
|
|
|
|
sub update_period() { |
|
635
|
1
|
|
|
1
|
1
|
5
|
my ($self,$nv) = @_; |
|
636
|
1
|
50
|
|
|
|
4
|
if (defined($nv)) { |
|
637
|
1
|
|
|
|
|
2
|
$self->{'updatePeriod'} = $nv; |
|
638
|
|
|
|
|
|
|
} |
|
639
|
1
|
|
|
|
|
3
|
return $self->{'updatePeriod'}; |
|
640
|
|
|
|
|
|
|
} |
|
641
|
|
|
|
|
|
|
|
|
642
|
|
|
|
|
|
|
#========================================================================== |
|
643
|
|
|
|
|
|
|
|
|
644
|
|
|
|
|
|
|
=item sub pack() |
|
645
|
|
|
|
|
|
|
|
|
646
|
|
|
|
|
|
|
$value = $losv_rqst->pack(); |
|
647
|
|
|
|
|
|
|
|
|
648
|
|
|
|
|
|
|
Returns the packed data packet. |
|
649
|
|
|
|
|
|
|
|
|
650
|
|
|
|
|
|
|
=cut |
|
651
|
|
|
|
|
|
|
|
|
652
|
|
|
|
|
|
|
sub pack($) { |
|
653
|
1
|
|
|
1
|
1
|
39
|
my $self = shift ; |
|
654
|
|
|
|
|
|
|
|
|
655
|
1
|
|
|
|
|
13
|
$self->{'_Buffer'} = CORE::pack($self->{'_Pack'}, |
|
656
|
|
|
|
|
|
|
$self->{'packetType'}, |
|
657
|
|
|
|
|
|
|
$self->{'packetSize'}, |
|
658
|
|
|
|
|
|
|
$self->{'requestIdent'}, |
|
659
|
|
|
|
|
|
|
$self->{'_bitfields1'}, # Includes bitfields unused44, responseCoordinateSystem, sourcePointCoordinateSystem, and requestType. |
|
660
|
|
|
|
|
|
|
$self->{'alphaThreshold'}, |
|
661
|
|
|
|
|
|
|
$self->{'sourceEntityIdent'}, |
|
662
|
|
|
|
|
|
|
$self->{'azimuth'}, |
|
663
|
|
|
|
|
|
|
$self->{'elevation'}, |
|
664
|
|
|
|
|
|
|
$self->{'minimumRange'}, |
|
665
|
|
|
|
|
|
|
$self->{'maximumRange'}, |
|
666
|
|
|
|
|
|
|
$self->{'sourceLatitude_xOffset'}, |
|
667
|
|
|
|
|
|
|
$self->{'sourceLongitude_yOffset'}, |
|
668
|
|
|
|
|
|
|
$self->{'sourceAltitude_zOffset'}, |
|
669
|
|
|
|
|
|
|
$self->{'materialMask'}, |
|
670
|
|
|
|
|
|
|
$self->{'updatePeriod'}, |
|
671
|
|
|
|
|
|
|
$self->{'_unused45'}, |
|
672
|
|
|
|
|
|
|
$self->{'_unused46'}, |
|
673
|
|
|
|
|
|
|
); |
|
674
|
|
|
|
|
|
|
|
|
675
|
1
|
|
|
|
|
4
|
return $self->{'_Buffer'}; |
|
676
|
|
|
|
|
|
|
} |
|
677
|
|
|
|
|
|
|
|
|
678
|
|
|
|
|
|
|
#========================================================================== |
|
679
|
|
|
|
|
|
|
|
|
680
|
|
|
|
|
|
|
=item sub unpack() |
|
681
|
|
|
|
|
|
|
|
|
682
|
|
|
|
|
|
|
$value = $losv_rqst->unpack(); |
|
683
|
|
|
|
|
|
|
|
|
684
|
|
|
|
|
|
|
Unpacks the packed data packet. |
|
685
|
|
|
|
|
|
|
|
|
686
|
|
|
|
|
|
|
=cut |
|
687
|
|
|
|
|
|
|
|
|
688
|
|
|
|
|
|
|
sub unpack($) { |
|
689
|
0
|
|
|
0
|
1
|
|
my $self = shift @_; |
|
690
|
|
|
|
|
|
|
|
|
691
|
0
|
0
|
|
|
|
|
if (@_) { |
|
692
|
0
|
|
|
|
|
|
$self->{'_Buffer'} = shift @_; |
|
693
|
|
|
|
|
|
|
} |
|
694
|
0
|
|
|
|
|
|
my ($a,$b,$c,$d,$e,$f,$g,$h,$i,$j,$k,$l,$m,$n,$o,$p,$q) = CORE::unpack($self->{'_Pack'},$self->{'_Buffer'}); |
|
695
|
0
|
|
|
|
|
|
$self->{'packetType'} = $a; |
|
696
|
0
|
|
|
|
|
|
$self->{'packetSize'} = $b; |
|
697
|
0
|
|
|
|
|
|
$self->{'requestIdent'} = $c; |
|
698
|
0
|
|
|
|
|
|
$self->{'_bitfields1'} = $d; # Includes bitfields unused44, responseCoordinateSystem, sourcePointCoordinateSystem, and requestType. |
|
699
|
0
|
|
|
|
|
|
$self->{'alphaThreshold'} = $e; |
|
700
|
0
|
|
|
|
|
|
$self->{'sourceEntityIdent'} = $f; |
|
701
|
0
|
|
|
|
|
|
$self->{'azimuth'} = $g; |
|
702
|
0
|
|
|
|
|
|
$self->{'elevation'} = $h; |
|
703
|
0
|
|
|
|
|
|
$self->{'minimumRange'} = $i; |
|
704
|
0
|
|
|
|
|
|
$self->{'maximumRange'} = $j; |
|
705
|
0
|
|
|
|
|
|
$self->{'sourceLatitude_xOffset'} = $k; |
|
706
|
0
|
|
|
|
|
|
$self->{'sourceLongitude_yOffset'} = $l; |
|
707
|
0
|
|
|
|
|
|
$self->{'sourceAltitude_zOffset'} = $m; |
|
708
|
0
|
|
|
|
|
|
$self->{'materialMask'} = $n; |
|
709
|
0
|
|
|
|
|
|
$self->{'updatePeriod'} = $o; |
|
710
|
0
|
|
|
|
|
|
$self->{'_unused45'} = $p; |
|
711
|
0
|
|
|
|
|
|
$self->{'_unused46'} = $q; |
|
712
|
|
|
|
|
|
|
|
|
713
|
0
|
|
|
|
|
|
$self->{'responseCoordinateSystem'} = $self->response_coordinate_system(); |
|
714
|
0
|
|
|
|
|
|
$self->{'sourcePointCoordinateSystem'} = $self->source_point_coordinate_system(); |
|
715
|
0
|
|
|
|
|
|
$self->{'requestType'} = $self->request_type(); |
|
716
|
|
|
|
|
|
|
|
|
717
|
0
|
|
|
|
|
|
return $self->{'_Buffer'}; |
|
718
|
|
|
|
|
|
|
} |
|
719
|
|
|
|
|
|
|
|
|
720
|
|
|
|
|
|
|
#========================================================================== |
|
721
|
|
|
|
|
|
|
|
|
722
|
|
|
|
|
|
|
=item sub byte_swap() |
|
723
|
|
|
|
|
|
|
|
|
724
|
|
|
|
|
|
|
$obj_name->byte_swap(); |
|
725
|
|
|
|
|
|
|
|
|
726
|
|
|
|
|
|
|
Byte swaps the packed data packet. |
|
727
|
|
|
|
|
|
|
|
|
728
|
|
|
|
|
|
|
=cut |
|
729
|
|
|
|
|
|
|
|
|
730
|
|
|
|
|
|
|
sub byte_swap($) { |
|
731
|
0
|
|
|
0
|
1
|
|
my $self = shift @_; |
|
732
|
|
|
|
|
|
|
|
|
733
|
0
|
0
|
|
|
|
|
if (@_) { |
|
734
|
0
|
|
|
|
|
|
$self->{'_Buffer'} = shift @_; |
|
735
|
|
|
|
|
|
|
} else { |
|
736
|
0
|
|
|
|
|
|
$self->pack(); |
|
737
|
|
|
|
|
|
|
} |
|
738
|
0
|
|
|
|
|
|
my ($a,$b,$c,$d,$e,$f,$g,$h,$i,$j,$k,$l,$m,$n,$o,$p,$q,$r,$s,$t) = CORE::unpack($self->{'_Swap1'},$self->{'_Buffer'}); |
|
739
|
|
|
|
|
|
|
|
|
740
|
0
|
|
|
|
|
|
$self->{'_Buffer'} = CORE::pack($self->{'_Swap2'},$a,$b,$c,$d,$e,$f,$g,$h,$i,$j,$l,$k,$n,$m,$p,$o,$q,$r,$s,$t); |
|
741
|
0
|
|
|
|
|
|
$self->unpack(); |
|
742
|
|
|
|
|
|
|
|
|
743
|
0
|
|
|
|
|
|
return $self->{'_Buffer'}; |
|
744
|
|
|
|
|
|
|
} |
|
745
|
|
|
|
|
|
|
|
|
746
|
|
|
|
|
|
|
1; |
|
747
|
|
|
|
|
|
|
__END__ |