Class: NMEAPlus::Message::AIS::VDMPayload::VDMMsg8d1f31
- Inherits:
-
VDMMsg8DynamicPayload
- Object
- Payload
- VDMMsg8DynamicPayload
- NMEAPlus::Message::AIS::VDMPayload::VDMMsg8d1f31
- Defined in:
- lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb
Overview
Type 8: Binary Broadcast Message Subtype: Meteorological and Hydrological Data (IMO289)
Instance Attribute Summary collapse
-
#air_pressure_hpa ⇒ Object
readonly
The field defined by the 9 bits starting at payload bit 182, formatted with the function Payload#_UU(1, 799, 511).
-
#air_pressure_tendency ⇒ Object
readonly
The field defined by the 2 bits starting at payload bit 191, formatted with the function Payload#_u(3, , ).
-
#air_pressure_tendency_description ⇒ String
readonly
Pressure tendency description.
-
#air_temperature ⇒ Object
readonly
The field defined by the 11 bits starting at payload bit 154, formatted with the function Payload#_I(10, -1024, ).
-
#current_time ⇒ Time
readonly
Current time, assumed to be in UTC.
-
#dew_point ⇒ Object
readonly
The field defined by the 10 bits starting at payload bit 172, formatted with the function Payload#_I(10, 501, ).
-
#horizontal_visibility ⇒ Object
readonly
The field defined by the 8 bits starting at payload bit 194, formatted with the function Payload#_U(10, 255, ).
-
#ice_code ⇒ Object
readonly
The field defined by the 2 bits starting at payload bit 348, formatted with the function Payload#_u(3, , ).
-
#latitude ⇒ Object
readonly
The field defined by the 24 bits starting at payload bit 81, formatted with the function Payload#_I(60 * 10**3, 91, ).
-
#longitude ⇒ Object
readonly
The field defined by the 25 bits starting at payload bit 56, formatted with the function Payload#_I(60 * 10**3, 181, ).
-
#position_10m_accuracy? ⇒ Object
readonly
The field defined by the 1 bits starting at payload bit 105, formatted with the function Payload#_b(, , ).
-
#precipitation_type ⇒ Object
readonly
The field defined by the 3 bits starting at payload bit 336, formatted with the function Payload#_u(7, , ).
-
#relative_humidity ⇒ Object
readonly
The field defined by the 7 bits starting at payload bit 165, formatted with the function Payload#_u(101, , ).
-
#salinity ⇒ Float
readonly
Salinity.
- #salinity_sensor_unavailable? ⇒ bool readonly
-
#sea_state_beaufort ⇒ Object
readonly
The field defined by the 4 bits starting at payload bit 322, formatted with the function Payload#_e(, , ).
-
#swell_direction ⇒ Object
readonly
The field defined by the 9 bits starting at payload bit 313, formatted with the function Payload#_u(360, , ).
-
#swell_height ⇒ Object
readonly
The field defined by the 8 bits starting at payload bit 299, formatted with the function Payload#_U(10, 255, ).
-
#swell_period ⇒ Object
readonly
The field defined by the 6 bits starting at payload bit 307, formatted with the function Payload#_u(63, , ).
-
#visibility_greater_than ⇒ Object
readonly
The field defined by the 1 bits starting at payload bit 193, formatted with the function Payload#_b(, , ).
-
#water_current_depth1 ⇒ Float
readonly
surface water current.
-
#water_current_depth2 ⇒ Object
readonly
The field defined by the 5 bits starting at payload bit 249, formatted with the function Payload#_U(10, 31, ).
-
#water_current_depth3 ⇒ Object
readonly
The field defined by the 5 bits starting at payload bit 271, formatted with the function Payload#_U(10, 31, ).
-
#water_current_direction1 ⇒ Object
readonly
The field defined by the 9 bits starting at payload bit 223, formatted with the function Payload#_u(360, , ).
-
#water_current_direction2 ⇒ Object
readonly
The field defined by the 9 bits starting at payload bit 240, formatted with the function Payload#_u(360, , ).
-
#water_current_direction3 ⇒ Object
readonly
The field defined by the 9 bits starting at payload bit 262, formatted with the function Payload#_u(360, , ).
-
#water_current_speed1 ⇒ Object
readonly
The field defined by the 8 bits starting at payload bit 215, formatted with the function Payload#_U(10, 255, ).
-
#water_current_speed2 ⇒ Object
readonly
The field defined by the 8 bits starting at payload bit 232, formatted with the function Payload#_U(10, 255, ).
-
#water_current_speed3 ⇒ Object
readonly
The field defined by the 8 bits starting at payload bit 254, formatted with the function Payload#_U(10, 255, ).
-
#water_level ⇒ Object
readonly
The field defined by the 12 bits starting at payload bit 201, formatted with the function Payload#_UU(10**2, -10,, 4001).
-
#water_level_tendency ⇒ Object
readonly
The field defined by the 2 bits starting at payload bit 213, formatted with the function Payload#_u(3, , ).
-
#water_level_tendency_description ⇒ String
readonly
Water level tendency description.
-
#water_temperature ⇒ Object
readonly
The field defined by the 10 bits starting at payload bit 326, formatted with the function Payload#_I(1, 501, ).
-
#wave_direction ⇒ Object
readonly
The field defined by the 9 bits starting at payload bit 290, formatted with the function Payload#_u(360, , ).
-
#wave_height ⇒ Object
readonly
The field defined by the 8 bits starting at payload bit 276, formatted with the function Payload#_U(10, 255, ).
-
#wave_period ⇒ Object
readonly
The field defined by the 6 bits starting at payload bit 284, formatted with the function Payload#_u(63, , ).
-
#wind_direction ⇒ Object
readonly
The field defined by the 9 bits starting at payload bit 136, formatted with the function Payload#_u(360, , ).
-
#wind_direction_gust ⇒ Object
readonly
The field defined by the 9 bits starting at payload bit 145, formatted with the function Payload#_u(360, , ).
-
#wind_speed_average ⇒ Object
readonly
The field defined by the 7 bits starting at payload bit 122, formatted with the function Payload#_u(127, , ).
-
#wind_speed_gust ⇒ Object
readonly
The field defined by the 7 bits starting at payload bit 129, formatted with the function Payload#_u(127, , ).
Attributes inherited from Payload
#fill_bits, #payload_bitstring
Instance Method Summary collapse
-
#ice_description ⇒ String
The description.
-
#precipitation_description ⇒ String
precipitation type description.
-
#trend_description(code) ⇒ String
trend description.
Methods inherited from Payload
#_2b_data_string, #_6b_ascii, #_6b_boolean, #_6b_integer, #_6b_integer_scaled, #_6b_integer_scaled_shifted, #_6b_negated_boolean, #_6b_string, #_6b_string_nullterminated, #_6b_unsigned_integer, #_6b_unsigned_integer_scaled, #_6b_unsigned_integer_scaled_shifted, #_8b_data_string, #_access, #_bit_slices, #_get_date_mdhm, #_object_by_name, #initialize, payload_reader
Constructor Details
This class inherits a constructor from NMEAPlus::Message::AIS::VDMPayload::Payload
Instance Attribute Details
#air_pressure_hpa ⇒ Object (readonly)
Returns The field defined by the 9 bits starting at payload bit 182, formatted with the function Payload#_UU(1, 799, 511).
30 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 30 payload_reader :air_pressure_hpa, 182, 9, :_UU, 1, 799, 511 |
#air_pressure_tendency ⇒ Object (readonly)
Returns The field defined by the 2 bits starting at payload bit 191, formatted with the function Payload#_u(3, , ).
31 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 31 payload_reader :air_pressure_tendency, 191, 2, :_u, 3 |
#air_pressure_tendency_description ⇒ String (readonly)
Returns pressure tendency description.
35 36 37 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 35 def air_pressure_tendency_description trend_description(air_pressure_tendency) end |
#air_temperature ⇒ Object (readonly)
Returns The field defined by the 11 bits starting at payload bit 154, formatted with the function Payload#_I(10, -1024, ).
27 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 27 payload_reader :air_temperature, 154, 11, :_I, 10, -1024 |
#current_time ⇒ Time (readonly)
Returns current time, assumed to be in UTC.
16 17 18 19 20 21 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 16 def current_time day = _u(106, 5) hour = _u(111, 5) minute = _u(116, 6) _get_date_mdhm(nil, day, hour, minute) end |
#dew_point ⇒ Object (readonly)
Returns The field defined by the 10 bits starting at payload bit 172, formatted with the function Payload#_I(10, 501, ).
29 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 29 payload_reader :dew_point, 172, 10, :_I, 10, 501 |
#horizontal_visibility ⇒ Object (readonly)
Returns The field defined by the 8 bits starting at payload bit 194, formatted with the function Payload#_U(10, 255, ).
40 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 40 payload_reader :horizontal_visibility, 194, 8, :_U, 10, 255 |
#ice_code ⇒ Object (readonly)
Returns The field defined by the 2 bits starting at payload bit 348, formatted with the function Payload#_u(3, , ).
109 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 109 payload_reader :ice_code, 348, 2, :_u, 3 |
#latitude ⇒ Object (readonly)
Returns The field defined by the 24 bits starting at payload bit 81, formatted with the function Payload#_I(60 * 10**3, 91, ).
11 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 11 payload_reader :latitude, 81, 24, :_I, 60 * 10**3, 91 |
#longitude ⇒ Object (readonly)
Returns The field defined by the 25 bits starting at payload bit 56, formatted with the function Payload#_I(60 * 10**3, 181, ).
10 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 10 payload_reader :longitude, 56, 25, :_I, 60 * 10**3, 181 |
#position_10m_accuracy? ⇒ Object (readonly)
Returns The field defined by the 1 bits starting at payload bit 105, formatted with the function Payload#_b(, , ).
12 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 12 payload_reader :position_10m_accuracy?, 105, 1, :_b |
#precipitation_type ⇒ Object (readonly)
Returns The field defined by the 3 bits starting at payload bit 336, formatted with the function Payload#_u(7, , ).
77 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 77 payload_reader :precipitation_type, 336, 3, :_u, 7 |
#relative_humidity ⇒ Object (readonly)
Returns The field defined by the 7 bits starting at payload bit 165, formatted with the function Payload#_u(101, , ).
28 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 28 payload_reader :relative_humidity, 165, 7, :_u, 101 |
#salinity ⇒ Float (readonly)
Returns salinity.
98 99 100 101 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 98 def salinity ret = _U(339, 9, 10) return nil if ret > 51.0 # 51.1 for sensor not available, otherwise n/a end |
#salinity_sensor_unavailable? ⇒ bool (readonly)
105 106 107 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 105 def salinity_sensor_unavailable? _u(339, 9) == 511 end |
#sea_state_beaufort ⇒ Object (readonly)
Returns The field defined by the 4 bits starting at payload bit 322, formatted with the function Payload#_e(, , ).
74 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 74 payload_reader :sea_state_beaufort, 322, 4, :_e |
#swell_direction ⇒ Object (readonly)
Returns The field defined by the 9 bits starting at payload bit 313, formatted with the function Payload#_u(360, , ).
73 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 73 payload_reader :swell_direction, 313, 9, :_u, 360 |
#swell_height ⇒ Object (readonly)
Returns The field defined by the 8 bits starting at payload bit 299, formatted with the function Payload#_U(10, 255, ).
71 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 71 payload_reader :swell_height, 299, 8, :_U, 10, 255 |
#swell_period ⇒ Object (readonly)
Returns The field defined by the 6 bits starting at payload bit 307, formatted with the function Payload#_u(63, , ).
72 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 72 payload_reader :swell_period, 307, 6, :_u, 63 |
#visibility_greater_than ⇒ Object (readonly)
Returns The field defined by the 1 bits starting at payload bit 193, formatted with the function Payload#_b(, , ).
39 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 39 payload_reader :visibility_greater_than, 193, 1, :_b |
#water_current_depth1 ⇒ Float (readonly)
surface water current
56 57 58 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 56 def water_current_depth1 0 end |
#water_current_depth2 ⇒ Object (readonly)
Returns The field defined by the 5 bits starting at payload bit 249, formatted with the function Payload#_U(10, 31, ).
62 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 62 payload_reader :water_current_depth2, 249, 5, :_U, 10, 31 |
#water_current_depth3 ⇒ Object (readonly)
Returns The field defined by the 5 bits starting at payload bit 271, formatted with the function Payload#_U(10, 31, ).
66 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 66 payload_reader :water_current_depth3, 271, 5, :_U, 10, 31 |
#water_current_direction1 ⇒ Object (readonly)
Returns The field defined by the 9 bits starting at payload bit 223, formatted with the function Payload#_u(360, , ).
51 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 51 payload_reader :water_current_direction1, 223, 9, :_u, 360 |
#water_current_direction2 ⇒ Object (readonly)
Returns The field defined by the 9 bits starting at payload bit 240, formatted with the function Payload#_u(360, , ).
61 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 61 payload_reader :water_current_direction2, 240, 9, :_u, 360 |
#water_current_direction3 ⇒ Object (readonly)
Returns The field defined by the 9 bits starting at payload bit 262, formatted with the function Payload#_u(360, , ).
65 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 65 payload_reader :water_current_direction3, 262, 9, :_u, 360 |
#water_current_speed1 ⇒ Object (readonly)
Returns The field defined by the 8 bits starting at payload bit 215, formatted with the function Payload#_U(10, 255, ).
50 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 50 payload_reader :water_current_speed1, 215, 8, :_U, 10, 255 |
#water_current_speed2 ⇒ Object (readonly)
Returns The field defined by the 8 bits starting at payload bit 232, formatted with the function Payload#_U(10, 255, ).
60 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 60 payload_reader :water_current_speed2, 232, 8, :_U, 10, 255 |
#water_current_speed3 ⇒ Object (readonly)
Returns The field defined by the 8 bits starting at payload bit 254, formatted with the function Payload#_U(10, 255, ).
64 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 64 payload_reader :water_current_speed3, 254, 8, :_U, 10, 255 |
#water_level ⇒ Object (readonly)
Returns The field defined by the 12 bits starting at payload bit 201, formatted with the function Payload#_UU(10**2, -10,, 4001).
41 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 41 payload_reader :water_level, 201, 12, :_UU, 10**2, -10, 4001 |
#water_level_tendency ⇒ Object (readonly)
Returns The field defined by the 2 bits starting at payload bit 213, formatted with the function Payload#_u(3, , ).
42 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 42 payload_reader :water_level_tendency, 213, 2, :_u, 3 |
#water_level_tendency_description ⇒ String (readonly)
Returns water level tendency description.
46 47 48 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 46 def water_level_tendency_description trend_description(water_level_tendency) end |
#water_temperature ⇒ Object (readonly)
Returns The field defined by the 10 bits starting at payload bit 326, formatted with the function Payload#_I(1, 501, ).
76 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 76 payload_reader :water_temperature, 326, 10, :_I, 1, 501 |
#wave_direction ⇒ Object (readonly)
Returns The field defined by the 9 bits starting at payload bit 290, formatted with the function Payload#_u(360, , ).
70 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 70 payload_reader :wave_direction, 290, 9, :_u, 360 |
#wave_height ⇒ Object (readonly)
Returns The field defined by the 8 bits starting at payload bit 276, formatted with the function Payload#_U(10, 255, ).
68 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 68 payload_reader :wave_height, 276, 8, :_U, 10, 255 |
#wave_period ⇒ Object (readonly)
Returns The field defined by the 6 bits starting at payload bit 284, formatted with the function Payload#_u(63, , ).
69 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 69 payload_reader :wave_period, 284, 6, :_u, 63 |
#wind_direction ⇒ Object (readonly)
Returns The field defined by the 9 bits starting at payload bit 136, formatted with the function Payload#_u(360, , ).
25 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 25 payload_reader :wind_direction, 136, 9, :_u, 360 |
#wind_direction_gust ⇒ Object (readonly)
Returns The field defined by the 9 bits starting at payload bit 145, formatted with the function Payload#_u(360, , ).
26 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 26 payload_reader :wind_direction_gust, 145, 9, :_u, 360 |
#wind_speed_average ⇒ Object (readonly)
Returns The field defined by the 7 bits starting at payload bit 122, formatted with the function Payload#_u(127, , ).
23 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 23 payload_reader :wind_speed_average, 122, 7, :_u, 127 |
#wind_speed_gust ⇒ Object (readonly)
Returns The field defined by the 7 bits starting at payload bit 129, formatted with the function Payload#_u(127, , ).
24 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 24 payload_reader :wind_speed_gust, 129, 7, :_u, 127 |
Instance Method Details
#ice_description ⇒ String
Returns the description.
113 114 115 116 117 118 119 120 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 113 def ice_description case ice_code when 0 then return "No" when 1 then return "Yes" when 2 then return "(reserved)" end nil end |
#precipitation_description ⇒ String
precipitation type description
82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 82 def precipitation_description case precipitation_type when 0 then return "Reserved" when 1 then return "Rain" when 2 then return "Thunderstorm" when 3 then return "Freezing rain" when 4 then return "Mixed/ice" when 5 then return "Snow" when 6 then return "Reserved" # 7 is nil end nil end |
#trend_description(code) ⇒ String
trend description
125 126 127 128 129 130 131 132 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d1f31.rb', line 125 def trend_description(code) case code when 0 then return "steady" when 1 then return "decreasing" when 2 then return "increasing" end nil end |