Class: NMEAPlus::Message::AIS::VDMPayload::VDMMsg8d200f10
- Inherits:
-
VDMMsg8DynamicPayload
- Object
- Payload
- VDMMsg8DynamicPayload
- NMEAPlus::Message::AIS::VDMPayload::VDMMsg8d200f10
- Defined in:
- lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d200f10.rb
Overview
Type 8: Binary Broadcast Message Subtype: Meteorological and Hydrological Data (IMO289)
Instance Attribute Summary collapse
-
#course_quality ⇒ Object
readonly
The field defined by the 1 bits starting at payload bit 158, formatted with the function Payload#_b(, , ).
-
#dimension_beam ⇒ Object
readonly
The field defined by the 10 bits starting at payload bit 117, formatted with the function Payload#_U(10, 0, ).
-
#dimension_draught ⇒ Object
readonly
The field defined by the 11 bits starting at payload bit 144, formatted with the function Payload#_U(100, 0, ).
-
#dimension_length ⇒ Object
readonly
The field defined by the 13 bits starting at payload bit 104, formatted with the function Payload#_U(10, 0, ).
-
#european_vessel_id ⇒ Object
readonly
The field defined by the 48 bits starting at payload bit 56, formatted with the function Payload#_t(, , ).
-
#hazardous_cargo ⇒ Object
readonly
The field defined by the 3 bits starting at payload bit 141, formatted with the function Payload#_e(, , ).
-
#hazardous_cargo_description ⇒ String
readonly
Hazardous cargo description.
-
#heading_quality ⇒ Object
readonly
The field defined by the 1 bits starting at payload bit 159, formatted with the function Payload#_b(, , ).
-
#load_status ⇒ Object
readonly
The field defined by the 2 bits starting at payload bit 155, formatted with the function Payload#_e(0, , ).
-
#load_status_description ⇒ String
readonly
Load status description.
-
#ship_type ⇒ Object
readonly
The field defined by the 14 bits starting at payload bit 127, formatted with the function Payload#_e(, , ).
-
#ship_type_description ⇒ String
readonly
Ship type description.
-
#speed_quality ⇒ Object
readonly
The field defined by the 1 bits starting at payload bit 157, formatted with the function Payload#_b(, , ).
Attributes inherited from Payload
#fill_bits, #payload_bitstring
Instance Method Summary collapse
-
#get_eri_description(code) ⇒ String
ERI description.
-
#get_eri_solas_description(code) ⇒ String
ERI SOLAS ship type.
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
#course_quality ⇒ Object (readonly)
Returns The field defined by the 1 bits starting at payload bit 158, formatted with the function Payload#_b(, , ).
50 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d200f10.rb', line 50 payload_reader :course_quality, 158, 1, :_b |
#dimension_beam ⇒ Object (readonly)
Returns The field defined by the 10 bits starting at payload bit 117, formatted with the function Payload#_U(10, 0, ).
12 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d200f10.rb', line 12 payload_reader :dimension_beam, 117, 10, :_U, 10, 0 |
#dimension_draught ⇒ Object (readonly)
Returns The field defined by the 11 bits starting at payload bit 144, formatted with the function Payload#_U(100, 0, ).
36 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d200f10.rb', line 36 payload_reader :dimension_draught, 144, 11, :_U, 100, 0 |
#dimension_length ⇒ Object (readonly)
Returns The field defined by the 13 bits starting at payload bit 104, formatted with the function Payload#_U(10, 0, ).
11 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d200f10.rb', line 11 payload_reader :dimension_length, 104, 13, :_U, 10, 0 |
#european_vessel_id ⇒ Object (readonly)
Returns The field defined by the 48 bits starting at payload bit 56, formatted with the function Payload#_t(, , ).
10 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d200f10.rb', line 10 payload_reader :european_vessel_id, 56, 48, :_t |
#hazardous_cargo ⇒ Object (readonly)
Returns The field defined by the 3 bits starting at payload bit 141, formatted with the function Payload#_e(, , ).
21 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d200f10.rb', line 21 payload_reader :hazardous_cargo, 141, 3, :_e |
#hazardous_cargo_description ⇒ String (readonly)
Returns hazardous cargo description.
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d200f10.rb', line 25 def hazardous_cargo_description case hazardous_cargo when 0 then return "0 blue cones/lights" when 1 then return "1 blue cone/light" when 2 then return "2 blue cones/lights" when 3 then return "3 blue cones/lights" when 4 then return "B-Flag" end "Unknown" end |
#heading_quality ⇒ Object (readonly)
Returns The field defined by the 1 bits starting at payload bit 159, formatted with the function Payload#_b(, , ).
51 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d200f10.rb', line 51 payload_reader :heading_quality, 159, 1, :_b |
#load_status ⇒ Object (readonly)
Returns The field defined by the 2 bits starting at payload bit 155, formatted with the function Payload#_e(0, , ).
37 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d200f10.rb', line 37 payload_reader :load_status, 155, 2, :_e, 0 |
#load_status_description ⇒ String (readonly)
Returns load status description.
41 42 43 44 45 46 47 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d200f10.rb', line 41 def load_status_description case load_status when 1 then return "Unloaded" when 2 then return "Loaded" end nil end |
#ship_type ⇒ Object (readonly)
Returns The field defined by the 14 bits starting at payload bit 127, formatted with the function Payload#_e(, , ).
13 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d200f10.rb', line 13 payload_reader :ship_type, 127, 14, :_e |
#ship_type_description ⇒ String (readonly)
Returns ship type description.
17 18 19 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d200f10.rb', line 17 def ship_type_description get_eri_description(ship_type) end |
#speed_quality ⇒ Object (readonly)
Returns The field defined by the 1 bits starting at payload bit 157, formatted with the function Payload#_b(, , ).
49 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d200f10.rb', line 49 payload_reader :speed_quality, 157, 1, :_b |
Instance Method Details
#get_eri_description(code) ⇒ String
Returns ERI description.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d200f10.rb', line 78 def get_eri_description(code) case code when 1..99 then get_eri_solas_description(code) when 1500 then "General cargo vessel maritime" when 1510 then "Unit carrier maritime" when 1520 then "Bulk carrier maritime" when 1530 then "Tanker" when 1540 then "Liquified gas tanker" when 1850 then "Pleasure craft, longer than 20m" when 1900 then "Fast ship" # You've never heard of the Maritime Falcon? when 1910 then "Hydrofoil" when 8000 then "Vessel, type unknown" when 8010 then "Motor freighter" when 8020 then "Motor tanker" when 8021 then "Motor tanker, liquid cargo, type N" when 8022 then "Motor tanker, liquid cargo, type C" when 8023 then "Motor tanker, dry cargo as if liquid" when 8030 then "Container vessel" when 8040 then "Gas tanker" when 8050 then "Motor freighter, tug" when 8060 then "Motor tanker, tug" when 8070 then "Motor freighter with one or more ships alongside" when 8080 then "Motor freighter with tanker" when 8090 then "Motor freighter pushing one or more freighters" when 8100 then "Motor freighter pushing at least one tank-ship" when 8110 then "Tug, freighter" when 8120 then "Tug, tanker" when 8130 then "Tug freighter, coupled" when 8140 then "Tug, freighter/tanker, coupled" when 8150 then "Freightbarge" when 8160 then "Tankbarge" when 8161 then "Tankbarge, liquid cargo, type N" when 8162 then "Tankbarge, liquid cargo, type C" when 8163 then "Tankbarge, dry cargo as if liquid" when 8170 then "Freightbarge with containers" when 8180 then "Tankbarge, gas" when 8210 then "Pushtow, one cargo barge" when 8220 then "Pushtow, two cargo barges" when 8230 then "Pushtow, three cargo barges" when 8240 then "Pushtow, four cargo barges" when 8250 then "Pushtow, five cargo barges" when 8260 then "Pushtow, six cargo barges" when 8270 then "Pushtow, seven cargo barges" when 8280 then "Pushtow, eigth cargo barges" when 8290 then "Pushtow, nine or more barges" when 8310 then "Pushtow, one tank/gas barge" when 8320 then "Pushtow, two barges at least one tanker or gas barge" when 8330 then "Pushtow, three barges at least one tanker or gas barge" when 8340 then "Pushtow, four barges at least one tanker or gas barge" when 8350 then "Pushtow, five barges at least one tanker or gas barge" when 8360 then "Pushtow, six barges at least one tanker or gas barge" when 8370 then "Pushtow, seven barges at least one tanker or gas barge" when 8380 then "Pushtow, eight barges at least one tanker or gas barge" when 8390 then "Pushtow, nine or more barges at least one tanker or gas barge" when 8400 then "Tug, single" when 8410 then "No tug, one or more tows" when 8420 then "Tug, assisting a vessel or linked combination" when 8430 then "Pushboat, single" when 8440 then "Passenger ship, ferry, cruise ship, red cross ship" when 8441 then "Ferry" when 8442 then "Red Cross ship" when 8443 then "Cruise ship" when 8444 then "Passenger ship without accommodation" when 8450 then "Service vessel, police partrol, port service" when 8460 then "Vessel, work maint. craft, derrick, cable ship, buoy ship, dredge" when 8470 then "Object, towed, not otherwise specified" when 8480 then "Fishing boat" when 8490 then "Bunkership" when 8500 then "Barge, tanker, chemical" when 8510 then "Object, not otherwise specified" end end |
#get_eri_solas_description(code) ⇒ String
Returns ERI SOLAS ship type.
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg8d200f10.rb', line 55 def get_eri_solas_description(code) return nil if code < 1 return nil if 99 < code i = code.to_i major = case i / 10 when 3 then "Vessel" when 7 then "Cargo ship" when 8 then "Tanker" when 9 then "Other types of ship" else "SOLAS1-#{i / 10}" end minor = case i % 10 when 0 then "All ships of this type" when 1 then "Towing" when 8 then "Tanker" when 9 then "No additional information" else "SOLAS2-#{i % 10}" end "#{major} (#{minor})" end |