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

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

Overview

Container for bearing / distance

Instance Attribute Summary collapse

Instance Attribute Details

#bearingObject

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

#distanceObject

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

#distance_metersInteger (readonly)

Returns The scaled distance in meters.

Returns:

  • (Integer)

    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

#scale_factorObject

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