Class: NMEAPlus::Message::AIS::VDMPayload::SubArea3::ShapePoint
- Inherits:
-
Object
- Object
- NMEAPlus::Message::AIS::VDMPayload::SubArea3::ShapePoint
- Defined in:
- lib/nmea_plus/message/ais/vdm_payload/sub_area.rb
Overview
Container for bearing / distance
Instance Attribute Summary collapse
-
#bearing ⇒ Object
Returns the value of attribute bearing.
-
#distance ⇒ Object
Returns the value of attribute distance.
-
#distance_meters ⇒ Integer
readonly
The scaled distance in meters.
-
#scale_factor ⇒ Object
Returns the value of attribute scale_factor.
Instance Attribute Details
permalink #bearing ⇒ Object
Returns the value of attribute bearing.
107 108 109 |
# File 'lib/nmea_plus/message/ais/vdm_payload/sub_area.rb', line 107 def bearing @bearing end |
permalink #distance ⇒ Object
Returns the value of attribute distance.
108 109 110 |
# File 'lib/nmea_plus/message/ais/vdm_payload/sub_area.rb', line 108 def distance @distance end |
permalink #distance_meters ⇒ Integer (readonly)
Returns The scaled distance in meters.
113 114 115 |
# File 'lib/nmea_plus/message/ais/vdm_payload/sub_area.rb', line 113 def distance_meters distance * (10**scale_factor) end |
permalink #scale_factor ⇒ Object
Returns the value of attribute scale_factor.
109 110 111 |
# File 'lib/nmea_plus/message/ais/vdm_payload/sub_area.rb', line 109 def scale_factor @scale_factor end |