Class: NMEAPlus::Message::AIS::VDMPayload::VDMMsgClassBCSPosition

Inherits:
VDMMsg
  • Object
show all
Defined in:
lib/nmea_plus/message/ais/vdm_payload/vdm_msg18.rb

Overview

Base class for “Class B CS Position Report” messages (18 and 19)

Direct Known Subclasses

VDMMsg18, VDMMsg19

Instance Attribute Summary collapse

Attributes inherited from VDMMsg

#fill_bits, #message_type, #payload_bitstring, #repeat_indicator, #source_mmsi

Method Summary

Methods inherited from VDMMsg

#_2b_data_string, #_6b_ascii, #_6b_boolean, #_6b_integer, #_6b_integer_scaled, #_6b_string, #_6b_string_nullterminated, #_6b_twoscomplement, #_6b_unsigned_integer, #_6b_unsigned_integer_scaled, #_8b_data_string, #_access, #_bit_slices, #get_ship_cargo_type_description, payload_reader

Instance Attribute Details

#course_over_groundObject (readonly)

Returns The field defined by 12 bits starting at bit 112 of the payload, formatted with the function NMEAPlus::Message::AIS::VDMPayload::VDMMsg#_U(1).

Returns:



26
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg18.rb', line 26

payload_reader :course_over_ground, 112, 12, :_U, 1

#latitudeFloat (readonly)

Returns:

  • (Float)


22
23
24
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg18.rb', line 22

def latitude
  _U(85, 27, 4) / 60
end

#longitudeFloat (readonly)

Returns:

  • (Float)


16
17
18
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg18.rb', line 16

def longitude
  _I(57, 28, 4) / 60
end

#position_10m_accuracy?Object (readonly)

Returns The field defined by 1 bits starting at bit 56 of the payload, formatted with the function NMEAPlus::Message::AIS::VDMPayload::VDMMsg#_b().

Returns:



12
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg18.rb', line 12

payload_reader :position_10m_accuracy?, 56, 1, :_b

#speed_over_groundObject (readonly)

Returns The field defined by 10 bits starting at bit 46 of the payload, formatted with the function NMEAPlus::Message::AIS::VDMPayload::VDMMsg#_U(1).

Returns:



11
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg18.rb', line 11

payload_reader :speed_over_ground, 46, 10, :_U, 1

#time_stampObject (readonly)

Returns The field defined by 6 bits starting at bit 133 of the payload, formatted with the function NMEAPlus::Message::AIS::VDMPayload::VDMMsg#_u().

Returns:



36
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg18.rb', line 36

payload_reader :time_stamp, 133, 6, :_u

#true_headingFloat (readonly)

Returns:

  • (Float)


30
31
32
33
34
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg18.rb', line 30

def true_heading
  ret = _u(124, 9)
  return nil if ret == 511  # means "not available"
  ret
end