line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Device::Gyro::IXBLUE; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
56828
|
use Data::Dumper; |
|
1
|
|
|
|
|
5540
|
|
|
1
|
|
|
|
|
44
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
15
|
use 5.010001; |
|
1
|
|
|
|
|
3
|
|
6
|
|
|
|
|
|
|
#use strict; |
7
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
1343
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
require Exporter; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
# This allows declaration use Device::Gyro::IXBLUE ':all'; |
14
|
|
|
|
|
|
|
# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK |
15
|
|
|
|
|
|
|
# will save memory. |
16
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( 'all' => [ qw( |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
) ] ); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
our @EXPORT = qw( |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
our $VERSION = '1.0'; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub new |
29
|
|
|
|
|
|
|
{ |
30
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
31
|
0
|
|
|
|
|
|
my $arg_ref = shift; |
32
|
|
|
|
|
|
|
|
33
|
0
|
|
|
|
|
|
my $self = $arg_ref; |
34
|
0
|
|
|
|
|
|
bless $self, $class; |
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
|
|
|
$self->{'NMEADATA'} = {}; |
37
|
0
|
|
|
|
|
|
$self->{'err_msg'} = ''; |
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
|
$self; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
43
|
|
|
|
|
|
|
sub get_nmea_buf |
44
|
|
|
|
|
|
|
{ |
45
|
0
|
|
|
0
|
0
|
|
my $self = shift @_; |
46
|
0
|
|
|
|
|
|
$self->{'NMEADATA'} = {}; |
47
|
0
|
|
|
|
|
|
$self->{'sentence_fnd'} = {}; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
51
|
|
|
|
|
|
|
sub clr_nmea_buf |
52
|
|
|
|
|
|
|
{ |
53
|
0
|
|
|
0
|
0
|
|
my $self = shift @_; |
54
|
0
|
|
|
|
|
|
$self->{'NMEADATA'} = {}; |
55
|
0
|
|
|
|
|
|
$self->{'sentence_fnd'} = {}; |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
59
|
|
|
|
|
|
|
sub process_paragraph |
60
|
|
|
|
|
|
|
{ |
61
|
0
|
|
|
0
|
0
|
|
my $self = shift @_; |
62
|
0
|
|
|
|
|
|
my @ln_lst = @{shift @_}; |
|
0
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
0
|
|
|
|
|
|
$self->{err_msg_paragraph}=[]; |
65
|
0
|
|
|
|
|
|
$self->{'NMEADATA'}= {}; |
66
|
|
|
|
|
|
|
|
67
|
0
|
|
|
|
|
|
foreach my $ln ( @ln_lst ) |
68
|
|
|
|
|
|
|
{ |
69
|
0
|
|
|
|
|
|
my $rtn = $self->process_sentence($ln); |
70
|
|
|
|
|
|
|
|
71
|
0
|
0
|
|
|
|
|
unless ( $rtn ) { push @{ $self->{err_msg_paragraph} }, $self->{err_msg} } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
0
|
|
|
|
|
|
return $self->{'NMEADATA'}; |
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
78
|
|
|
|
|
|
|
sub process_sentence { |
79
|
0
|
|
|
0
|
0
|
|
my($self, $line) = @_; |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
# Remove trailing chars |
82
|
0
|
|
|
|
|
|
chomp($line); $line =~ s/\r//g; |
|
0
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
# Test checksum |
85
|
0
|
0
|
|
|
|
|
if ($line =~ s/\*(\w\w)$//) { |
86
|
0
|
|
|
|
|
|
my $csum = $1; |
87
|
0
|
|
|
|
|
|
$csum_calc = $self->checksum($line); |
88
|
|
|
|
|
|
|
|
89
|
0
|
0
|
|
|
|
|
if ( $csum ne $csum_calc ) { |
90
|
0
|
|
|
|
|
|
$self->{err_msg} = "Checksum fail"; |
91
|
|
|
|
|
|
|
return undef |
92
|
0
|
|
|
|
|
|
} |
93
|
|
|
|
|
|
|
} |
94
|
|
|
|
|
|
|
else { |
95
|
0
|
|
|
|
|
|
$self->{err_msg} = "Improper formed sentence"; |
96
|
|
|
|
|
|
|
return undef |
97
|
0
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
|
99
|
0
|
|
|
|
|
|
$line =~ s/^\$//; |
100
|
0
|
|
|
|
|
|
my @cmd_lst = split ',',$line; |
101
|
|
|
|
|
|
|
|
102
|
0
|
|
|
|
|
|
my $func = $cmd_lst[0]; |
103
|
|
|
|
|
|
|
|
104
|
0
|
0
|
|
|
|
|
if ( $cmd_lst[0] eq 'PIXSE' ) { |
105
|
0
|
|
|
|
|
|
$func = "$cmd_lst[0]_$cmd_lst[1]"; |
106
|
|
|
|
|
|
|
} |
107
|
|
|
|
|
|
|
|
108
|
0
|
0
|
|
|
|
|
print "COMMAND: $func\n" if $self->{verbose}; |
109
|
0
|
0
|
|
|
|
|
if ($self->can($func)) { |
|
|
0
|
|
|
|
|
|
110
|
0
|
|
|
|
|
|
$self->$func(@cmd_lst); # Calling via symbolic reference... where the work is done |
111
|
0
|
|
|
|
|
|
$self->{sentence_fnd}->{$func} = 1 ; |
112
|
|
|
|
|
|
|
} |
113
|
0
|
|
|
|
|
|
elsif ($self->{verbose}) { print "Can't handle $func\n"; } |
114
|
|
|
|
|
|
|
|
115
|
0
|
|
|
|
|
|
return $self->{'NMEADATA'}; |
116
|
|
|
|
|
|
|
} |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
121
|
|
|
|
|
|
|
sub sentences_fnd |
122
|
|
|
|
|
|
|
{ |
123
|
0
|
|
|
0
|
0
|
|
my $self = shift @_; |
124
|
|
|
|
|
|
|
|
125
|
0
|
|
|
|
|
|
return $self->{'sentences_fnd'}; |
126
|
|
|
|
|
|
|
} |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
sub nmea_data_dump { |
130
|
|
|
|
|
|
|
#dumps data received |
131
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
132
|
0
|
|
|
|
|
|
my $d = $self->{NMEADATA}; |
133
|
0
|
|
|
|
|
|
print map {"$_ => $$d{$_}\n"} sort keys %{$self->{NMEADATA}}; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
} |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
# Calculate the checksum |
137
|
|
|
|
|
|
|
# |
138
|
|
|
|
|
|
|
sub checksum { |
139
|
0
|
|
|
0
|
0
|
|
my ($self,$line) = @_; |
140
|
0
|
|
|
|
|
|
my $csum = 0; |
141
|
0
|
|
|
|
|
|
$csum ^= unpack("C",(substr($line,$_,1))) for(1..length($line)-1); |
142
|
|
|
|
|
|
|
|
143
|
0
|
0
|
|
|
|
|
print "Checksum: $csum\n" if $self->{verbose}; |
144
|
0
|
|
|
|
|
|
return (sprintf("%2.2X",$csum)); |
145
|
|
|
|
|
|
|
} |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
####################### NMEA MESSAGE HANDLERS ###################### |
149
|
|
|
|
|
|
|
# IXBLUE Stuff |
150
|
|
|
|
|
|
|
#################################################################### |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
# $HEHDT,105.325,T*2F |
154
|
|
|
|
|
|
|
# |
155
|
|
|
|
|
|
|
# $HEHDT,xxx.xxx,T*hh |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
# 1) x.xx heading degrees |
158
|
|
|
|
|
|
|
# 2) T - true heading |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
sub HEHDT { |
161
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
162
|
0
|
0
|
|
|
|
|
$self->{NMEADATA} = {} unless ref($self->{NMEADATA}); |
163
|
0
|
|
|
|
|
|
my $d = $self->{NMEADATA}; |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
(undef, |
166
|
|
|
|
|
|
|
$$d{heading}, |
167
|
0
|
|
|
|
|
|
) = @_; |
168
|
0
|
|
|
|
|
|
1; |
169
|
|
|
|
|
|
|
} |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
# $PIXSE,ATITUD,-0.035,0.445*4C |
172
|
|
|
|
|
|
|
# |
173
|
|
|
|
|
|
|
# $PIXSE,ATITUD,xxx.xxx,xxx.xxx*hh |
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
# 1) xx.xx roll degrees |
176
|
|
|
|
|
|
|
# 2) xx.xx pitch degrees |
177
|
|
|
|
|
|
|
sub PIXSE_ATITUD { |
178
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
179
|
0
|
0
|
|
|
|
|
$self->{NMEADATA} = {} unless ref($self->{NMEADATA}); |
180
|
0
|
|
|
|
|
|
my $d = $self->{NMEADATA}; |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
(undef,undef, |
183
|
|
|
|
|
|
|
$$d{roll}, |
184
|
|
|
|
|
|
|
$$d{pitch}, |
185
|
0
|
|
|
|
|
|
) = @_; |
186
|
0
|
|
|
|
|
|
1; |
187
|
|
|
|
|
|
|
} |
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
# $PIXSE,POSITI,47.98095919,243.43224120,445.497*54 |
190
|
|
|
|
|
|
|
# |
191
|
|
|
|
|
|
|
# $PIXSE,POSITI,xxx.xxx,xxx.xxx,xx.xxx*hh |
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
# 1) xx.xx Lat degrees |
194
|
|
|
|
|
|
|
# 2) xx.xx Long degrees |
195
|
|
|
|
|
|
|
# 3) xx.xx Long degrees |
196
|
|
|
|
|
|
|
sub PIXSE_POSITI { |
197
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
198
|
0
|
0
|
|
|
|
|
$self->{NMEADATA} = {} unless ref($self->{NMEADATA}); |
199
|
0
|
|
|
|
|
|
my $d = $self->{NMEADATA}; |
200
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
(undef,undef, |
202
|
|
|
|
|
|
|
$$d{lat}, |
203
|
|
|
|
|
|
|
$$d{long}, |
204
|
|
|
|
|
|
|
$$d{alt}, |
205
|
0
|
|
|
|
|
|
) = @_; |
206
|
0
|
|
|
|
|
|
1; |
207
|
|
|
|
|
|
|
} |
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
# $PIXSE,SPEED_,-0.017,0.004,-0.000*63 |
210
|
|
|
|
|
|
|
# |
211
|
|
|
|
|
|
|
# $PIXSE,SPEED,xxx.xxx,xxx.xxx,xx.xxx*hh |
212
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
# 1) x.xxx Speed XEast in m/s (East speed) |
214
|
|
|
|
|
|
|
# 2) y.yyy Speed XNorth in m/s (North speed) |
215
|
|
|
|
|
|
|
# 3) z.zzz Speed XUP in m/s (Sign “+” towards up side) |
216
|
|
|
|
|
|
|
sub PIXSE_SPEED_ { |
217
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
218
|
0
|
0
|
|
|
|
|
$self->{NMEADATA} = {} unless ref($self->{NMEADATA}); |
219
|
0
|
|
|
|
|
|
my $d = $self->{NMEADATA}; |
220
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
(undef,undef, |
222
|
|
|
|
|
|
|
$$d{v_east}, |
223
|
|
|
|
|
|
|
$$d{v_north}, |
224
|
|
|
|
|
|
|
$$d{v_up}, |
225
|
0
|
|
|
|
|
|
) = @_; |
226
|
0
|
|
|
|
|
|
1; |
227
|
|
|
|
|
|
|
} |
228
|
|
|
|
|
|
|
|
229
|
|
|
|
|
|
|
# $PIXSE,HEAVE_,0.000,-0.000,-0.002*7B |
230
|
|
|
|
|
|
|
# |
231
|
|
|
|
|
|
|
# $PIXSE,HEAVE_,x.xxx,y.yyy,z.zzz*hh |
232
|
|
|
|
|
|
|
# |
233
|
|
|
|
|
|
|
# x.xxx surge in meters (signed) |
234
|
|
|
|
|
|
|
# y.yyy sway in meters (signed) |
235
|
|
|
|
|
|
|
# z.zzz heave in meters (signed) |
236
|
|
|
|
|
|
|
sub PIXSE_HEAVE_ { |
237
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
238
|
0
|
0
|
|
|
|
|
$self->{NMEADATA} = {} unless ref($self->{NMEADATA}); |
239
|
0
|
|
|
|
|
|
my $d = $self->{NMEADATA}; |
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
(undef,undef, |
242
|
|
|
|
|
|
|
$$d{surge}, |
243
|
|
|
|
|
|
|
$$d{sway}, |
244
|
|
|
|
|
|
|
$$d{heave}, |
245
|
0
|
|
|
|
|
|
) = @_; |
246
|
0
|
|
|
|
|
|
1; |
247
|
|
|
|
|
|
|
} |
248
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
# $PIXSE,TIME__,220419.809135*66 |
250
|
|
|
|
|
|
|
# |
251
|
|
|
|
|
|
|
# $TIME__, hhmmss.ssssss*hh |
252
|
|
|
|
|
|
|
# hhmmss.ssssss |
253
|
|
|
|
|
|
|
# |
254
|
|
|
|
|
|
|
# UTC time reference frame if available otherwise in the system |
255
|
|
|
|
|
|
|
# time reference frame. |
256
|
|
|
|
|
|
|
sub PIXSE_TIME__ { |
257
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
258
|
0
|
0
|
|
|
|
|
$self->{NMEADATA} = {} unless ref($self->{NMEADATA}); |
259
|
0
|
|
|
|
|
|
my $d = $self->{NMEADATA}; |
260
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
(undef,undef, |
262
|
|
|
|
|
|
|
$$d{gyro_time}, |
263
|
0
|
|
|
|
|
|
) = @_; |
264
|
0
|
|
|
|
|
|
1; |
265
|
|
|
|
|
|
|
} |
266
|
|
|
|
|
|
|
|
267
|
|
|
|
|
|
|
# $PIXSE,STDHRP,0.150,0.009,0.009*74 |
268
|
|
|
|
|
|
|
# |
269
|
|
|
|
|
|
|
# $PIXSE,STDHRP,x.xxx,y.yyy,z.zzz*hh |
270
|
|
|
|
|
|
|
# x.xxx heading std dev (degrees) |
271
|
|
|
|
|
|
|
# y.yyy roll std dev (degrees) |
272
|
|
|
|
|
|
|
# z.zzz pitch std dev (degrees) |
273
|
|
|
|
|
|
|
sub PIXSE_STDHRP { |
274
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
275
|
0
|
0
|
|
|
|
|
$self->{NMEADATA} = {} unless ref($self->{NMEADATA}); |
276
|
0
|
|
|
|
|
|
my $d = $self->{NMEADATA}; |
277
|
|
|
|
|
|
|
|
278
|
|
|
|
|
|
|
(undef,undef, |
279
|
|
|
|
|
|
|
$$d{std_heading}, |
280
|
|
|
|
|
|
|
$$d{std_roll}, |
281
|
|
|
|
|
|
|
$$d{std_pitch} |
282
|
0
|
|
|
|
|
|
) = @_; |
283
|
0
|
|
|
|
|
|
1; |
284
|
|
|
|
|
|
|
} |
285
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
# $PIXSE,STDPOS,2383.07,2395.77,50.00*73 |
287
|
|
|
|
|
|
|
# |
288
|
|
|
|
|
|
|
# $PIXSE,STDPOS,x.xx,y.yy,z.zz*hh |
289
|
|
|
|
|
|
|
# x.xx latitude std dev (meters) |
290
|
|
|
|
|
|
|
# y.yy longitude std dev (meters) |
291
|
|
|
|
|
|
|
# z.zz altitude std dev (meters) |
292
|
|
|
|
|
|
|
sub PIXSE_STDPOS { |
293
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
294
|
0
|
0
|
|
|
|
|
$self->{NMEADATA} = {} unless ref($self->{NMEADATA}); |
295
|
0
|
|
|
|
|
|
my $d = $self->{NMEADATA}; |
296
|
|
|
|
|
|
|
|
297
|
|
|
|
|
|
|
(undef,undef, |
298
|
|
|
|
|
|
|
$$d{std_north}, |
299
|
|
|
|
|
|
|
$$d{std_east}, |
300
|
|
|
|
|
|
|
$$d{std_up} |
301
|
0
|
|
|
|
|
|
) = @_; |
302
|
0
|
|
|
|
|
|
1; |
303
|
|
|
|
|
|
|
} |
304
|
|
|
|
|
|
|
|
305
|
|
|
|
|
|
|
# $PIXSE,ALGSTS,00000045,00034000*63 |
306
|
|
|
|
|
|
|
# |
307
|
|
|
|
|
|
|
# $PIXSE,ALGSTS,hhhhhhhh,llllllll *hh |
308
|
|
|
|
|
|
|
# INS Algo status (see Table V.5 and Table V.6 Part5 Library Interface) |
309
|
|
|
|
|
|
|
# hhhhhhhh hexadecimal value of INS Algo status1 (LSB) |
310
|
|
|
|
|
|
|
# llllllll hexadecimal value of INS Algo status 2 (MSB) |
311
|
|
|
|
|
|
|
sub PIXSE_ALGSTS { |
312
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
313
|
0
|
0
|
|
|
|
|
$self->{NMEADATA} = {} unless ref($self->{NMEADATA}); |
314
|
0
|
|
|
|
|
|
my $d = $self->{NMEADATA}; |
315
|
|
|
|
|
|
|
|
316
|
|
|
|
|
|
|
(undef,undef, |
317
|
|
|
|
|
|
|
$$d{algo_stat_lsb}, |
318
|
|
|
|
|
|
|
$$d{algo_stat_msb}, |
319
|
0
|
|
|
|
|
|
) = @_; |
320
|
0
|
|
|
|
|
|
1; |
321
|
|
|
|
|
|
|
} |
322
|
|
|
|
|
|
|
|
323
|
|
|
|
|
|
|
# $PIXSE,STATUS,00000000,00001000*6E |
324
|
|
|
|
|
|
|
# |
325
|
|
|
|
|
|
|
# $PIXSE,STATUS,hhhhhhhh,llllllll *hh |
326
|
|
|
|
|
|
|
# INS System status (see Table V.3 and Table V.4 Part4 Library Interface) |
327
|
|
|
|
|
|
|
# |
328
|
|
|
|
|
|
|
# hhhhhhhh hexadecimal value of INS System status 1 (LSB) |
329
|
|
|
|
|
|
|
# llllllll hexadecimal value of INS System status 2 (MSB) |
330
|
|
|
|
|
|
|
sub PIXSE_STATUS { |
331
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
332
|
0
|
0
|
|
|
|
|
$self->{NMEADATA} = {} unless ref($self->{NMEADATA}); |
333
|
0
|
|
|
|
|
|
my $d = $self->{NMEADATA}; |
334
|
|
|
|
|
|
|
|
335
|
|
|
|
|
|
|
(undef,undef, |
336
|
|
|
|
|
|
|
$$d{stat_lsb}, |
337
|
|
|
|
|
|
|
$$d{stat_msb}, |
338
|
0
|
|
|
|
|
|
) = @_; |
339
|
0
|
|
|
|
|
|
1; |
340
|
|
|
|
|
|
|
} |
341
|
|
|
|
|
|
|
|
342
|
|
|
|
|
|
|
#$PIXSE,UTMWGS,T,11,532255.081,5314274.311,445.497*13 |
343
|
|
|
|
|
|
|
# |
344
|
|
|
|
|
|
|
# $PIXSE,UTMWGS,c,nn,x.xxx,y.yyy,z.zzz*hh |
345
|
|
|
|
|
|
|
# C latitude UTM zone (character) |
346
|
|
|
|
|
|
|
# nn longitude UTM zone (integer) |
347
|
|
|
|
|
|
|
# x.xxx east UTM position in meter |
348
|
|
|
|
|
|
|
# y.yyy north UTM position in meter |
349
|
|
|
|
|
|
|
# z.zzz altitude in meters |
350
|
|
|
|
|
|
|
sub PIXSE_UTMWGS { |
351
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
352
|
0
|
0
|
|
|
|
|
$self->{NMEADATA} = {} unless ref($self->{NMEADATA}); |
353
|
0
|
|
|
|
|
|
my $d = $self->{NMEADATA}; |
354
|
|
|
|
|
|
|
|
355
|
|
|
|
|
|
|
(undef,undef, |
356
|
|
|
|
|
|
|
$$d{utm_lat_zone}, |
357
|
|
|
|
|
|
|
$$d{utm_long_zone}, |
358
|
|
|
|
|
|
|
$$d{utm_east}, |
359
|
|
|
|
|
|
|
$$d{utm_north}, |
360
|
|
|
|
|
|
|
$$d{utm_up}, |
361
|
0
|
|
|
|
|
|
) = @_; |
362
|
0
|
|
|
|
|
|
1; |
363
|
|
|
|
|
|
|
} |
364
|
|
|
|
|
|
|
|
365
|
|
|
|
|
|
|
# $PIXSE,HT_STS,7FFD5551*37 |
366
|
|
|
|
|
|
|
# |
367
|
|
|
|
|
|
|
# $PIXSE,HT_STS,hhhhhhhh *hh |
368
|
|
|
|
|
|
|
# hhhhhhhh hexadecimal value of PHINS High Level status |
369
|
|
|
|
|
|
|
sub PIXSE_HT_STATUS{ |
370
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
371
|
0
|
0
|
|
|
|
|
$self->{NMEADATA} = {} unless ref($self->{NMEADATA}); |
372
|
0
|
|
|
|
|
|
my $d = $self->{NMEADATA}; |
373
|
|
|
|
|
|
|
|
374
|
|
|
|
|
|
|
(undef,undef, |
375
|
|
|
|
|
|
|
$$d{ht_status}, |
376
|
0
|
|
|
|
|
|
) = @_; |
377
|
0
|
|
|
|
|
|
1; |
378
|
|
|
|
|
|
|
} |
379
|
|
|
|
|
|
|
|
380
|
|
|
|
|
|
|
# $INDYN,47.97790727,243.43950595,626.987,323.498,0.152,0.404,-0.002,0.000,-0.002,0.060*61 |
381
|
|
|
|
|
|
|
# $INDYN,47.97797975,243.43961208,626.991,323.489,0.152,0.402,-0.003,0.002,-0.000,0.042*6E |
382
|
|
|
|
|
|
|
# |
383
|
|
|
|
|
|
|
# $INDYN,x.xxxxxxxx,y.yyyyyyyy,z.zzz,h.hhh,r.rrr,p.ppp,a.aaa,b.bbb,c.ccc,s.sss*hh |
384
|
|
|
|
|
|
|
# |
385
|
|
|
|
|
|
|
# 1) x.xxxxxxxx is the latitude in degrees |
386
|
|
|
|
|
|
|
# 2) y.yyyyyyyy is the longitude in degrees |
387
|
|
|
|
|
|
|
# 3) z.zzz is the altitude in meters |
388
|
|
|
|
|
|
|
# 4) h.hhh is the heading in degrees |
389
|
|
|
|
|
|
|
# 5) r.rrr is the roll in degrees (positive for port up) |
390
|
|
|
|
|
|
|
# 6) p.ppp is the pitch in degrees (positive when bow down) |
391
|
|
|
|
|
|
|
# 7) a.aaa is the heading rate in °/s |
392
|
|
|
|
|
|
|
# 8) b.bbb is the roll rate in °/s (positive when roll increase) |
393
|
|
|
|
|
|
|
# 9) c.ccc is the pitch rate in °/s (positive when pitch increase) |
394
|
|
|
|
|
|
|
# 10) s.sss Speed XV1 in m/s (positive towards the bow) |
395
|
|
|
|
|
|
|
# 11) hh is the checksum |
396
|
|
|
|
|
|
|
sub INDYN { |
397
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
398
|
0
|
0
|
|
|
|
|
$self->{NMEADATA} = {} unless ref($self->{NMEADATA}); |
399
|
0
|
|
|
|
|
|
my $d = $self->{NMEADATA}; |
400
|
|
|
|
|
|
|
|
401
|
|
|
|
|
|
|
(undef, |
402
|
|
|
|
|
|
|
$$d{lat_indyn}, |
403
|
|
|
|
|
|
|
$$d{long_idyn}, |
404
|
|
|
|
|
|
|
$$d{alt_idyn}, |
405
|
|
|
|
|
|
|
$$d{heading_idyn}, |
406
|
|
|
|
|
|
|
$$d{roll_idyn}, |
407
|
|
|
|
|
|
|
$$d{pitch_idyn}, |
408
|
|
|
|
|
|
|
$$d{heading_rate}, |
409
|
|
|
|
|
|
|
$$d{roll_rate}, |
410
|
|
|
|
|
|
|
$$d{pitch_rate}, |
411
|
|
|
|
|
|
|
$$d{XV1} |
412
|
0
|
|
|
|
|
|
) = @_; |
413
|
|
|
|
|
|
|
|
414
|
0
|
|
|
|
|
|
1; |
415
|
|
|
|
|
|
|
} |
416
|
|
|
|
|
|
|
|
417
|
|
|
|
|
|
|
|
418
|
|
|
|
|
|
|
__END__ |