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
- #distance ⇒ Object
-
#distance_meters ⇒ Integer
readonly
The scaled distance in meters.
- #scale_factor ⇒ Object
Instance Attribute Details
#bearing ⇒ Integer #bearing=(Integer) ⇒ Object
112 113 114 |
# File 'lib/nmea_plus/message/ais/vdm_payload/sub_area.rb', line 112 def bearing @bearing end |
#distance ⇒ Integer #distance=(Integer) ⇒ Object
119 120 121 |
# File 'lib/nmea_plus/message/ais/vdm_payload/sub_area.rb', line 119 def distance @distance end |
#distance_meters ⇒ Integer (readonly)
Returns The scaled distance in meters.
130 131 132 |
# File 'lib/nmea_plus/message/ais/vdm_payload/sub_area.rb', line 130 def distance_meters distance * (10**scale_factor) end |
#scale_factor ⇒ Integer #scale_factor=(Integer) ⇒ Object
126 127 128 |
# File 'lib/nmea_plus/message/ais/vdm_payload/sub_area.rb', line 126 def scale_factor @scale_factor end |