Class: NMEAPlus::Message::AIS::VDMPayload::SubArea3
- Inherits:
-
SubAreaScaled
- Object
- Payload
- SubArea
- SubAreaScaled
- NMEAPlus::Message::AIS::VDMPayload::SubArea3
- Defined in:
- lib/nmea_plus/message/ais/vdm_payload/sub_area.rb
Overview
SubArea structure type 3: Polyline
Direct Known Subclasses
Defined Under Namespace
Classes: ShapePoint
Instance Attribute Summary collapse
-
#bearing1 ⇒ Object
readonly
The field defined by the 10 bits starting at payload bit 5, formatted with the function Payload#_u(720, , ).
-
#bearing2 ⇒ Object
readonly
The field defined by the 10 bits starting at payload bit 25, formatted with the function Payload#_u(720, , ).
-
#bearing3 ⇒ Object
readonly
The field defined by the 10 bits starting at payload bit 45, formatted with the function Payload#_u(720, , ).
-
#bearing4 ⇒ Object
readonly
The field defined by the 10 bits starting at payload bit 65, formatted with the function Payload#_u(720, , ).
-
#distance1 ⇒ Object
readonly
The field defined by the 10 bits starting at payload bit 15, formatted with the function Payload#_u(, , ).
-
#distance2 ⇒ Object
readonly
The field defined by the 10 bits starting at payload bit 35, formatted with the function Payload#_u(, , ).
-
#distance3 ⇒ Object
readonly
The field defined by the 10 bits starting at payload bit 55, formatted with the function Payload#_u(, , ).
-
#distance4 ⇒ Object
readonly
The field defined by the 10 bits starting at payload bit 75, formatted with the function Payload#_u(, , ).
-
#points ⇒ Array
readonly
Array of ShapePoint objects.
Attributes inherited from SubAreaScaled
Attributes inherited from SubArea
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
#bearing1 ⇒ Object (readonly)
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 |
#bearing2 ⇒ Object (readonly)
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 |
#bearing3 ⇒ Object (readonly)
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 |
#bearing4 ⇒ Object (readonly)
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 |
#distance1 ⇒ Object (readonly)
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 |
#distance2 ⇒ Object (readonly)
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 |
#distance3 ⇒ Object (readonly)
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 |
#distance4 ⇒ Object (readonly)
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 |
#points ⇒ Array (readonly)
Returns Array of ShapePoint objects.
120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/nmea_plus/message/ais/vdm_payload/sub_area.rb', line 120 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 |