Class: NMEAPlus::Message::AIS::VDMPayload::SubArea3

Inherits:
SubAreaScaled show all
Defined in:
lib/nmea_plus/message/ais/vdm_payload/sub_area.rb

Overview

SubArea structure type 3: Polyline

Direct Known Subclasses

SubArea4

Defined Under Namespace

Classes: ShapePoint

Instance Attribute Summary collapse

Attributes inherited from SubAreaScaled

#scale_factor, #scale_meters

Attributes inherited from SubArea

#shape_description, #shape_id

Attributes inherited from Payload

#fill_bits, #payload_bitstring

Method Summary

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

#bearing1Object (readonly)

Returns The field defined by the 10 bits starting at payload bit 5, formatted with the function Payload#_u(720, , ).

Returns:

  • The field defined by the 10 bits starting at payload bit 5, formatted with the function Payload#_u(720, , )



96
# File 'lib/nmea_plus/message/ais/vdm_payload/sub_area.rb', line 96

payload_reader :bearing1, 5, 10, :_u, 720

#bearing2Object (readonly)

Returns The field defined by the 10 bits starting at payload bit 25, formatted with the function Payload#_u(720, , ).

Returns:

  • The field defined by the 10 bits starting at payload bit 25, formatted with the function Payload#_u(720, , )



98
# File 'lib/nmea_plus/message/ais/vdm_payload/sub_area.rb', line 98

payload_reader :bearing2, 25, 10, :_u, 720

#bearing3Object (readonly)

Returns The field defined by the 10 bits starting at payload bit 45, formatted with the function Payload#_u(720, , ).

Returns:

  • The field defined by the 10 bits starting at payload bit 45, formatted with the function Payload#_u(720, , )



100
# File 'lib/nmea_plus/message/ais/vdm_payload/sub_area.rb', line 100

payload_reader :bearing3, 45, 10, :_u, 720

#bearing4Object (readonly)

Returns The field defined by the 10 bits starting at payload bit 65, formatted with the function Payload#_u(720, , ).

Returns:

  • The field defined by the 10 bits starting at payload bit 65, formatted with the function Payload#_u(720, , )



102
# File 'lib/nmea_plus/message/ais/vdm_payload/sub_area.rb', line 102

payload_reader :bearing4, 65, 10, :_u, 720

#distance1Object (readonly)

Returns The field defined by the 10 bits starting at payload bit 15, formatted with the function Payload#_u(, , ).

Returns:

  • The field defined by the 10 bits starting at payload bit 15, formatted with the function Payload#_u(, , )



97
# File 'lib/nmea_plus/message/ais/vdm_payload/sub_area.rb', line 97

payload_reader :distance1, 15, 10, :_u

#distance2Object (readonly)

Returns The field defined by the 10 bits starting at payload bit 35, formatted with the function Payload#_u(, , ).

Returns:

  • The field defined by the 10 bits starting at payload bit 35, formatted with the function Payload#_u(, , )



99
# File 'lib/nmea_plus/message/ais/vdm_payload/sub_area.rb', line 99

payload_reader :distance2, 35, 10, :_u

#distance3Object (readonly)

Returns The field defined by the 10 bits starting at payload bit 55, formatted with the function Payload#_u(, , ).

Returns:

  • The field defined by the 10 bits starting at payload bit 55, formatted with the function Payload#_u(, , )



101
# File 'lib/nmea_plus/message/ais/vdm_payload/sub_area.rb', line 101

payload_reader :distance3, 55, 10, :_u

#distance4Object (readonly)

Returns The field defined by the 10 bits starting at payload bit 75, formatted with the function Payload#_u(, , ).

Returns:

  • The field defined by the 10 bits starting at payload bit 75, formatted with the function Payload#_u(, , )



103
# File 'lib/nmea_plus/message/ais/vdm_payload/sub_area.rb', line 103

payload_reader :distance4, 75, 10, :_u

#pointsArray (readonly)

Returns Array of ShapePoint objects.

Returns:



137
138
139
140
141
142
143
144
145
146
147
148
149
150
# File 'lib/nmea_plus/message/ais/vdm_payload/sub_area.rb', line 137

def points
  ret = []

  # load up from existing properties
  (1..4).each do |i|
    d = send("distance#{i}")
    sp = ShapePoint.new
    sp.bearing = send("bearing#{i}")
    sp.distance = d
    sp.scale_factor = scale_Factor
    ret << sp
  end
  ret
end