nmea_plus 1.0.18 → 1.0.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f22.rb +1 -1
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb +3 -0
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d200f10.rb +2 -1
- data/lib/nmea_plus/version.rb +1 -1
- metadata +3 -4
- data/lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d200f10.rb~ +0 -137
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4f010527bee0d7b099f325462192d6a4bec777d
|
4
|
+
data.tar.gz: 3ba3d24e2e9d7c528a715e78bcf75f9a2a8761c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c8e76585ed77014f380986bb8a096d153bf6623be0bbdfbd4ee995839112441faee45e494a91e23b538803644ed94735e4f4203804c98a879a6591b3d716d3b
|
7
|
+
data.tar.gz: 13822fff593849931ed44fbcfaddee29799cb7c7cb0cea01f28d40449c4f3aa16b2c7f6c71bb558ba6963b087bdec317887ef5b9ac733759f6eda04e71d0a785
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/nmea_plus.svg)](https://rubygems.org/gems/nmea_plus)
|
4
4
|
[![Build Status](https://travis-ci.org/ifreecarve/nmea_plus.svg)](https://travis-ci.org/ifreecarve/nmea_plus)
|
5
|
-
[![Documentation](http://img.shields.io/badge/docs-rdoc.info-blue.svg)](http://www.rubydoc.info/gems/nmea_plus/1.0.
|
5
|
+
[![Documentation](http://img.shields.io/badge/docs-rdoc.info-blue.svg)](http://www.rubydoc.info/gems/nmea_plus/1.0.19)
|
6
6
|
|
7
7
|
[NMEA Plus](https://github.com/ifreecarve/nmea_plus) is a Ruby gem for parsing and decoding "GPS" messages: NMEA, AIS, and any other similar formats of short messaging typically used by marine equipment. It provides convenient access (by name) to the fields of each message type, and a stream reader designed for use with Ruby Blocks.
|
8
8
|
|
@@ -102,7 +102,7 @@ module NMEAPlus
|
|
102
102
|
when 55 then "(reserved for future use)"
|
103
103
|
when 56 then "Security Alert - Level 1"
|
104
104
|
when 57 then "Security Alert - Level 2"
|
105
|
-
when
|
105
|
+
when 58 then "Security Alert - Level 3"
|
106
106
|
when 59 then "(reserved for future use)"
|
107
107
|
when 60 then "(reserved for future use)"
|
108
108
|
when 61 then "(reserved for future use)"
|
@@ -90,6 +90,7 @@ module NMEAPlus
|
|
90
90
|
when 6 then return "Reserved"
|
91
91
|
# 7 is nil
|
92
92
|
end
|
93
|
+
nil
|
93
94
|
end
|
94
95
|
|
95
96
|
# @!parse attr_reader :salinity
|
@@ -115,6 +116,7 @@ module NMEAPlus
|
|
115
116
|
when 1 then return "Yes"
|
116
117
|
when 2 then return "(reserved)"
|
117
118
|
end
|
119
|
+
nil
|
118
120
|
end
|
119
121
|
|
120
122
|
# trend description
|
@@ -126,6 +128,7 @@ module NMEAPlus
|
|
126
128
|
when 1 then return "decreasing"
|
127
129
|
when 2 then return "increasing"
|
128
130
|
end
|
131
|
+
nil
|
129
132
|
end
|
130
133
|
|
131
134
|
end
|
@@ -29,8 +29,8 @@ module NMEAPlus
|
|
29
29
|
when 2 then return "2 blue cones/lights"
|
30
30
|
when 3 then return "3 blue cones/lights"
|
31
31
|
when 4 then return "B-Flag"
|
32
|
-
else return "Unknown"
|
33
32
|
end
|
33
|
+
"Unknown"
|
34
34
|
end
|
35
35
|
|
36
36
|
payload_reader :dimension_draught, 144, 11, :_U, 100, 0
|
@@ -43,6 +43,7 @@ module NMEAPlus
|
|
43
43
|
when 1 then return "Unloaded"
|
44
44
|
when 2 then return "Loaded"
|
45
45
|
end
|
46
|
+
nil
|
46
47
|
end
|
47
48
|
|
48
49
|
payload_reader :speed_quality, 157, 1, :_b
|
data/lib/nmea_plus/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nmea_plus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ian Katz
|
@@ -73,7 +73,7 @@ dependencies:
|
|
73
73
|
version: '0'
|
74
74
|
- - '>='
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: 0.
|
76
|
+
version: 0.46.0
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -83,7 +83,7 @@ dependencies:
|
|
83
83
|
version: '0'
|
84
84
|
- - '>='
|
85
85
|
- !ruby/object:Gem::Version
|
86
|
-
version: 0.
|
86
|
+
version: 0.46.0
|
87
87
|
- !ruby/object:Gem::Dependency
|
88
88
|
name: rspec
|
89
89
|
requirement: !ruby/object:Gem::Requirement
|
@@ -233,7 +233,6 @@ files:
|
|
233
233
|
- lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f22.rb
|
234
234
|
- lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb
|
235
235
|
- lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d200f10.rb
|
236
|
-
- lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d200f10.rb~
|
237
236
|
- lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d366f56.rb
|
238
237
|
- lib/nmea_plus/message/ais/vdm_payload/vdm_msg9.rb
|
239
238
|
- lib/nmea_plus/message/ais/vdm_payload/vdm_msg_binary_acknowledgement.rb
|
@@ -1,137 +0,0 @@
|
|
1
|
-
require_relative 'vdm_msg8_dynamic_payload'
|
2
|
-
|
3
|
-
module NMEAPlus
|
4
|
-
module Message
|
5
|
-
module AIS
|
6
|
-
module VDMPayload
|
7
|
-
# Type 8: Binary Broadcast Message Subtype: Meteorological and Hydrological Data (IMO289)
|
8
|
-
class VDMMsg8d200f10 < NMEAPlus::Message::AIS::VDMPayload::VDMMsg8DynamicPayload
|
9
|
-
|
10
|
-
payload_reader :european_vessel_id, 56, 48, :_t
|
11
|
-
|
12
|
-
payload_reader :longitude, 56, 25, :_I, 60 * 10**3, 181
|
13
|
-
payload_reader :latitude, 81, 24, :_I, 60 * 10**3, 91
|
14
|
-
payload_reader :position_10m_accuracy?, 105, 1, :_b
|
15
|
-
|
16
|
-
# @!parse attr_reader :current_time
|
17
|
-
# @return [Time] current time, assumed to be in UTC
|
18
|
-
def current_time
|
19
|
-
day = _u(106, 5)
|
20
|
-
hour = _u(111, 5)
|
21
|
-
minute = _u(116, 6)
|
22
|
-
_get_date_mdhm(nil, day, hour, minute)
|
23
|
-
end
|
24
|
-
|
25
|
-
payload_reader :wind_speed_average, 122, 7, :_u, 127
|
26
|
-
payload_reader :wind_speed_gust, 129, 7, :_u, 127
|
27
|
-
payload_reader :wind_direction, 136, 9, :_u, 360
|
28
|
-
payload_reader :wind_direction_gust, 145, 9, :_u, 360
|
29
|
-
payload_reader :air_temperature, 154, 11, :_I, 10, -1024
|
30
|
-
payload_reader :relative_humidity, 165, 7, :_u, 101
|
31
|
-
payload_reader :dew_point, 172, 10, :_I, 10, 501
|
32
|
-
payload_reader :air_pressure_hpa, 182, 9, :_UU, 1, 799, 511
|
33
|
-
payload_reader :air_pressure_tendency, 191, 2, :_u, 3
|
34
|
-
|
35
|
-
# @!parse attr_reader :air_pressure_tendency_description
|
36
|
-
# @return [String] pressure tendency description
|
37
|
-
def air_pressure_tendency_description
|
38
|
-
trend_description(air_pressure_tendency)
|
39
|
-
end
|
40
|
-
|
41
|
-
payload_reader :visibility_greater_than, 193, 1, :_b
|
42
|
-
payload_reader :horizontal_visibility, 194, 8, :_U, 10, 255
|
43
|
-
payload_reader :water_level, 201, 12, :_UU, 10**2, -10, 4001
|
44
|
-
payload_reader :water_level_tendency, 213, 2, :_u, 3
|
45
|
-
|
46
|
-
# @!parse attr_reader :water_level_tendency_description
|
47
|
-
# @return [String] water level tendency description
|
48
|
-
def water_level_tendency_description
|
49
|
-
trend_description(water_level_tendency)
|
50
|
-
end
|
51
|
-
|
52
|
-
payload_reader :water_current_speed1, 215, 8, :_U, 10, 255
|
53
|
-
payload_reader :water_current_direction1, 223, 9, :_u, 360
|
54
|
-
|
55
|
-
# surface water current
|
56
|
-
# @!parse attr_reader :water_current_depth1
|
57
|
-
# @return [Float] depth of measurement
|
58
|
-
def water_current_depth1
|
59
|
-
0
|
60
|
-
end
|
61
|
-
|
62
|
-
payload_reader :water_current_speed2, 232, 8, :_U, 10, 255
|
63
|
-
payload_reader :water_current_direction2, 240, 9, :_u, 360
|
64
|
-
payload_reader :water_current_depth2, 249, 5, :_U, 10, 31
|
65
|
-
|
66
|
-
payload_reader :water_current_speed3, 254, 8, :_U, 10, 255
|
67
|
-
payload_reader :water_current_direction3, 262, 9, :_u, 360
|
68
|
-
payload_reader :water_current_depth3, 271, 5, :_U, 10, 31
|
69
|
-
|
70
|
-
payload_reader :wave_height, 276, 8, :_U, 10, 255
|
71
|
-
payload_reader :wave_period, 284, 6, :_u, 63
|
72
|
-
payload_reader :wave_direction, 290, 9, :_u, 360
|
73
|
-
payload_reader :swell_height, 299, 8, :_U, 10, 255
|
74
|
-
payload_reader :swell_period, 307, 6, :_u, 63
|
75
|
-
payload_reader :swell_direction, 313, 9, :_u, 360
|
76
|
-
payload_reader :sea_state_beaufort, 322, 4, :_e
|
77
|
-
|
78
|
-
payload_reader :water_temperature, 326, 10, :_I, 1, 501
|
79
|
-
payload_reader :precipitation_type, 336, 3, :_u, 7
|
80
|
-
|
81
|
-
# precipitation type description
|
82
|
-
# @param [Integer] code The code for precipitation
|
83
|
-
# @return [String] the description
|
84
|
-
def precipitation_description
|
85
|
-
case precipitation_type
|
86
|
-
when 0 then return "Reserved"
|
87
|
-
when 1 then return "Rain"
|
88
|
-
when 2 then return "Thunderstorm"
|
89
|
-
when 3 then return "Freezing rain"
|
90
|
-
when 4 then return "Mixed/ice"
|
91
|
-
when 5 then return "Snow"
|
92
|
-
when 6 then return "Reserved"
|
93
|
-
# 7 is nil
|
94
|
-
end
|
95
|
-
end
|
96
|
-
|
97
|
-
# @!parse attr_reader :salinity
|
98
|
-
# @return [Float] salinity
|
99
|
-
def salinity
|
100
|
-
ret = _U(339, 9, 10)
|
101
|
-
return nil if ret > 51.0 # 51.1 for sensor not available, otherwise n/a
|
102
|
-
end
|
103
|
-
|
104
|
-
# @!parse attr_reader :salinity_sensor_unavailable?
|
105
|
-
# @return [bool]
|
106
|
-
def salinity_sensor_unavailable?
|
107
|
-
_u(339, 9) == 511
|
108
|
-
end
|
109
|
-
|
110
|
-
payload_reader :ice_code, 348, 2, :_u, 3
|
111
|
-
|
112
|
-
# @param [Integer] code The code for ice
|
113
|
-
# @return [String] the description
|
114
|
-
def ice_description
|
115
|
-
case ice_code
|
116
|
-
when 0 then return "No"
|
117
|
-
when 1 then return "Yes"
|
118
|
-
when 2 then return "(reserved)"
|
119
|
-
end
|
120
|
-
end
|
121
|
-
|
122
|
-
# trend description
|
123
|
-
# @param [Integer] code The trend code
|
124
|
-
# @return [String] the description
|
125
|
-
def trend_description(code)
|
126
|
-
case code
|
127
|
-
when 0 then return "steady"
|
128
|
-
when 1 then return "decreasing"
|
129
|
-
when 2 then return "increasing"
|
130
|
-
end
|
131
|
-
end
|
132
|
-
|
133
|
-
end
|
134
|
-
end
|
135
|
-
end
|
136
|
-
end
|
137
|
-
end
|