Class: NMEAPlus::Message::AIS::VDMPayload::VDMMsgCNB
- Defined in:
- lib/nmea_plus/message/ais/vdm_payload/vdm_msg_cnb.rb
Overview
CNB - The Common Navigation Block, transmitted by AIS messages 1, 2, and 3.
Instance Attribute Summary collapse
-
#course_over_ground ⇒ Object
readonly
The field defined by the 12 bits starting at payload bit 116, formatted with the function Payload#_U(10, 3600, ).
-
#latitude ⇒ Object
readonly
The field defined by the 27 bits starting at payload bit 89, formatted with the function Payload#_I(60 * 10**4, 91, ).
-
#longitude ⇒ Object
readonly
The field defined by the 28 bits starting at payload bit 61, formatted with the function Payload#_I(60 * 10**4, 181, ).
-
#navigational_status ⇒ Object
readonly
The field defined by the 4 bits starting at payload bit 38, formatted with the function Payload#_u(, , ).
-
#navigational_status_description ⇒ String
readonly
The human-readable description of navigational status.
-
#position_10m_accuracy? ⇒ Object
readonly
The field defined by the 1 bits starting at payload bit 60, formatted with the function Payload#_b(, , ).
-
#rate_of_turn ⇒ Float
readonly
The rate of turn in degrees per minute.
-
#speed_over_ground ⇒ Object
readonly
The field defined by the 10 bits starting at payload bit 50, formatted with the function Payload#_U(10, , ).
-
#true_heading ⇒ Object
readonly
The field defined by the 9 bits starting at payload bit 128, formatted with the function Payload#_u(511, , ).
Attributes inherited from VDMMsg
#message_type, #repeat_indicator, #source_mmsi, #source_mmsi_info
Attributes inherited from Payload
#fill_bits, #payload_bitstring
Method Summary
Methods inherited from VDMMsg
#auxiliary_craft?, #get_navigational_status_description, #get_ship_cargo_type_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
#course_over_ground ⇒ Object (readonly)
Returns The field defined by the 12 bits starting at payload bit 116, formatted with the function Payload#_U(10, 3600, ).
32 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg_cnb.rb', line 32 payload_reader :course_over_ground, 116, 12, :_U, 10, 3600 |
#latitude ⇒ Object (readonly)
Returns The field defined by the 27 bits starting at payload bit 89, formatted with the function Payload#_I(60 * 10**4, 91, ).
31 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg_cnb.rb', line 31 payload_reader :latitude, 89, 27, :_I, 60 * 10**4, 91 |
#longitude ⇒ Object (readonly)
Returns The field defined by the 28 bits starting at payload bit 61, formatted with the function Payload#_I(60 * 10**4, 181, ).
30 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg_cnb.rb', line 30 payload_reader :longitude, 61, 28, :_I, 60 * 10**4, 181 |
#navigational_status ⇒ Object (readonly)
Returns The field defined by the 4 bits starting at payload bit 38, formatted with the function Payload#_u(, , ).
10 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg_cnb.rb', line 10 payload_reader :navigational_status, 38, 4, :_u |
#navigational_status_description ⇒ String (readonly)
Returns the human-readable description of navigational status.
14 15 16 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg_cnb.rb', line 14 def () end |
#position_10m_accuracy? ⇒ Object (readonly)
Returns The field defined by the 1 bits starting at payload bit 60, formatted with the function Payload#_b(, , ).
29 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg_cnb.rb', line 29 payload_reader :position_10m_accuracy?, 60, 1, :_b |
#rate_of_turn ⇒ Float (readonly)
The rate of turn in degrees per minute
21 22 23 24 25 26 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg_cnb.rb', line 21 def rate_of_turn ret = _i(42, 8) # spec is wrong, we don't use I3 return nil if ret == -128 negative = ret < 0 (ret / 4.733)**2 * (negative ? -1 : 1) end |
#speed_over_ground ⇒ Object (readonly)
Returns The field defined by the 10 bits starting at payload bit 50, formatted with the function Payload#_U(10, , ).
28 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg_cnb.rb', line 28 payload_reader :speed_over_ground, 50, 10, :_U, 10 |
#true_heading ⇒ Object (readonly)
Returns The field defined by the 9 bits starting at payload bit 128, formatted with the function Payload#_u(511, , ).
33 |
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg_cnb.rb', line 33 payload_reader :true_heading, 128, 9, :_u, 511 |