Class: NMEAPlus::Message::AIS::VDMPayload::SubAreaScaled
- Defined in:
- lib/nmea_plus/message/ais/vdm_payload/sub_area.rb
Overview
SubArea structure base type for a region with scale
Direct Known Subclasses
Instance Attribute Summary collapse
-
#scale_factor ⇒ Object
readonly
The field defined by the 2 bits starting at payload bit 3, formatted with the function Payload#_u(, , ).
-
#scale_meters ⇒ Integer
readonly
Scale factor represented in meters to multiply by.
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
#scale_factor ⇒ Object (readonly)
Returns The field defined by the 2 bits starting at payload bit 3, formatted with the function Payload#_u(, , ).
32 |
# File 'lib/nmea_plus/message/ais/vdm_payload/sub_area.rb', line 32 payload_reader :scale_factor, 3, 2, :_u |
#scale_meters ⇒ Integer (readonly)
Returns Scale factor represented in meters to multiply by.
36 37 38 |
# File 'lib/nmea_plus/message/ais/vdm_payload/sub_area.rb', line 36 def scale_meters 10**scale_factor end |