class AIXM::Component::Helipad
Helipads are TLOF (touch-down and lift-off areas) for vertical take-off aircraft such as helicopters.
Cheat Sheet in Pseudo Code:¶ ↑
helipad = AIXM.helipad( name: String xy = AIXM.xy ) helipad.z = AIXM.z or nil helipad.length = AIXM.d or nil # must use same unit as width helipad.width = AIXM.d or nil # must use same unit as length helipad.surface = AIXM.surface helipad.marking = String or nil helipad.fato = AIXM.fato or nil helipad.helicopter_class = HELICOPTER_CLASSES or nil helipad.status = STATUSES or nil helipad.remarks = String or nil
@see gitlab.com/openflightmaps/ofmx/wikis/Airport#tla-helipad-tlof
Constants
- HELICOPTER_CLASSES
- STATUSES
Attributes
helicopter_class[R]
@return [Integer, Symbol, nil] suitable helicopter class
length[R]
@return [AIXM::D, nil] length
marking[R]
@return [String, nil] markings
name[R]
@return [String] full name (e.g. “H1”)
remarks[R]
@return [String, nil] free text remarks
status[R]
@return [Symbol, nil] status of the helipad (see {STATUSES}) or nil
for normal operation
width[R]
@return [AIXM::D, nil] width
xy[R]
@return [AIXM::XY] center point
z[R]
@return [AIXM::Z, nil] elevation in :qnh
Public Class Methods
new(name:, xy:)
click to toggle source
# File lib/aixm/component/helipad.rb 95 def initialize(name:, xy:) 96 self.name, self.xy = name, xy 97 self.surface = AIXM.surface 98 end
Public Instance Methods
helicopter_class=(value)
click to toggle source
# File lib/aixm/component/helipad.rb 140 def helicopter_class=(value) 141 @helicopter_class = value.nil? ? nil : (HELICOPTER_CLASSES.lookup(value.to_s.to_sym, nil) || fail(ArgumentError, "invalid helicopter class")) 142 end
inspect()
click to toggle source
@return [String]
# File lib/aixm/component/helipad.rb 101 def inspect 102 %Q(#<#{self.class} airport=#{airport&.id.inspect} name=#{name.inspect}>) 103 end
length=(value)
click to toggle source
# File lib/aixm/component/helipad.rb 120 def length=(value) 121 @length = if value 122 fail(ArgumentError, "invalid length") unless value.is_a?(AIXM::D) && value.dist > 0 123 fail(ArgumentError, "invalid length unit") if width && width.unit != value.unit 124 @length = value 125 end 126 end
marking=(value)
click to toggle source
# File lib/aixm/component/helipad.rb 136 def marking=(value) 137 @marking = value&.to_s 138 end
name=(value)
click to toggle source
# File lib/aixm/component/helipad.rb 105 def name=(value) 106 fail(ArgumentError, "invalid name") unless value.is_a? String 107 @name = value.uptrans 108 end
remarks=(value)
click to toggle source
# File lib/aixm/component/helipad.rb 148 def remarks=(value) 149 @remarks = value&.to_s 150 end
status=(value)
click to toggle source
# File lib/aixm/component/helipad.rb 144 def status=(value) 145 @status = value.nil? ? nil : (STATUSES.lookup(value.to_s.to_sym, nil) || fail(ArgumentError, "invalid status")) 146 end
to_uid()
click to toggle source
@return [String] UID markup
# File lib/aixm/component/helipad.rb 153 def to_uid 154 builder = Builder::XmlMarkup.new(indent: 2) 155 builder.TlaUid do |tla_uid| 156 tla_uid << airport.to_uid.indent(2) 157 tla_uid.txtDesig(name) 158 end 159 end
to_xml()
click to toggle source
@return [String] AIXM
or OFMX markup
# File lib/aixm/component/helipad.rb 163 def to_xml 164 builder = Builder::XmlMarkup.new(indent: 2) 165 builder.Tla do |tla| 166 tla << to_uid.indent(2) 167 tla << fato.to_uid.indent(2) if fato 168 tla.geoLat(xy.lat(AIXM.schema)) 169 tla.geoLong(xy.long(AIXM.schema)) 170 tla.codeDatum('WGE') 171 if z 172 tla.valElev(z.alt) 173 tla.uomDistVer(z.unit.upcase.to_s) 174 end 175 tla.valLen(length.dist.trim) if length 176 tla.valWid(width.dist.trim) if width 177 tla.uomDim(length.unit.to_s.upcase) if length 178 tla.uomDim(width.unit.to_s.upcase) if width && !length 179 unless (xml = surface.to_xml).empty? 180 tla << xml.indent(2) 181 end 182 tla.codeClassHel(HELICOPTER_CLASSES.key(helicopter_class).to_s) if helicopter_class 183 tla.txtMarking(marking) if marking 184 tla.codeSts(STATUSES.key(status).to_s) if status 185 tla.txtRmk(remarks) if remarks 186 end 187 lightings.each do |lighting| 188 builder << lighting.to_xml(as: :Tls) 189 end 190 builder.target! 191 end
width=(value)
click to toggle source
# File lib/aixm/component/helipad.rb 128 def width=(value) 129 @width = if value 130 fail(ArgumentError, "invalid width") unless value.is_a?(AIXM::D) && value.dist > 0 131 fail(ArgumentError, "invalid width unit") if length && length.unit != value.unit 132 @width = value 133 end 134 end
xy=(value)
click to toggle source
# File lib/aixm/component/helipad.rb 110 def xy=(value) 111 fail(ArgumentError, "invalid xy") unless value.is_a? AIXM::XY 112 @xy = value 113 end
z=(value)
click to toggle source
# File lib/aixm/component/helipad.rb 115 def z=(value) 116 fail(ArgumentError, "invalid z") unless value.nil? || (value.is_a?(AIXM::Z) && value.qnh?) 117 @z = value 118 end