lib/aixm/component/helipad.rb in aixm-1.3.4 vs lib/aixm/component/helipad.rb in aixm-1.4.0
- old
+ new
@@ -9,10 +9,11 @@
# ===Cheat Sheet in Pseudo Code:
# helipad = AIXM.helipad(
# name: String
# xy: AIXM.xy
# )
+ # helipad.geographic_bearing = AIXM.a or nil (OFMX only)
# helipad.z = AIXM.z or nil
# helipad.dimensions = AIXM.r or nil
# helipad.surface = AIXM.surface
# helipad.marking = String or nil
# helipad.add_lighting = AIXM.lighting
@@ -75,10 +76,13 @@
# @return [String]
# @overload name=(value)
# @param value [String]
attr_reader :name
+ # @return [AIXM::A, nil] (true) geographic bearing of H-marking in degrees
+ attr_reader :geographic_bearing
+
# Center point
#
# @overload center_xy
# @return [AIXM::XY]
# @overload center_xy=(value)
@@ -133,10 +137,16 @@
def name=(value)
fail(ArgumentError, "invalid name") unless value.is_a? String
@name = value.uptrans
end
+ def geographic_bearing=(value)
+ return @geographic_bearing = nil if value.nil?
+ fail(ArgumentError, "invalid geographic bearing") unless value.is_a? AIXM::A
+ @geographic_bearing = value
+ end
+
def xy=(value)
fail(ArgumentError, "invalid xy") unless value.is_a? AIXM::XY
@xy = value
end
@@ -172,9 +182,10 @@
add_uid_to(tla)
fato.add_uid_to(tla) if fato
tla.geoLat(xy.lat(AIXM.schema))
tla.geoLong(xy.long(AIXM.schema))
tla.codeDatum('WGE')
+ tla.valTrueBrg(geographic_bearing.to_s(:bearing)) if AIXM.ofmx? && geographic_bearing
if z
tla.valElev(z.alt)
tla.uomDistVer(z.unit.upcase)
end
if dimensions