Class: NMEAPlus::Message::AIS::VDMPayload::VDMMsg4

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

Overview

Type 4: Base Station Report

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

#current_timeTime (readonly)

Returns current time.

Returns:

  • (Time)

    current time



12
13
14
15
16
17
18
19
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg4.rb', line 12

def current_time
  Time.new(_u(38, 14),
           _u(52, 4),
           _u(56, 5),
           _u(61, 5),
           _u(66, 6),
           _u(72, 6))
end

#epfd_typeObject (readonly)

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

Returns:



35
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg4.rb', line 35

payload_reader :epfd_type, 134, 4, :_e

#latitudeFloat (readonly)

Returns:

  • (Float)


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

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

#longitudeFloat (readonly)

Returns:

  • (Float)


25
26
27
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg4.rb', line 25

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

#position_10m_accuracy?Object (readonly)

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

Returns:



21
# File 'lib/nmea_plus/message/ais/vdm_payload/vdm_msg4.rb', line 21

payload_reader :position_10m_accuracy?, 78, 1, :_b

#raim?Object (readonly)

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

Returns:



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

payload_reader :raim?, 148, 1, :_b