class AIXM::Component::FATO

FATO (final approach and take-off area) for vertical take-off aircraft such as helicopters.

Cheat Sheet in Pseudo Code:

fato = AIXM.fato(
  name: String
)
fato.length = AIXM.d or nil   # must use same unit as width
fato.width = AIXM.d or nil    # must use same unit as length
fato.surface = AIXM.surface
fato.marking = String or nil
fato.profile = String or nil
fato.status = STATUSES or nil
fato.remarks = String or nil
fato.add_direction(
  name: String
) do |direction|
  direction.geographic_orientation = AIXM.a[precision=3] or nil
  direction.remarks = String or nil
end

@see gitlab.com/openflightmaps/ofmx/wikis/Airport#fto-fato

Constants

STATUSES

Attributes

length[R]

@return [AIXM::D, nil] length

marking[R]

@return [String, nil] markings

name[R]

@return [String] full name (e.g. “H1”)

profile[R]

@return [String, nil] profile description

remarks[R]

@return [String, nil] free text remarks

status[R]

@return [Symbol, nil] status of the FATO (see {STATUSES}) or nil for normal operation

width[R]

@return [AIXM::D, nil] width

Public Class Methods

new(name:) click to toggle source
   # File lib/aixm/component/fato.rb
83 def initialize(name:)
84   self.name = name
85   self.surface = AIXM.surface
86 end

Public Instance Methods

inspect() click to toggle source

@return [String]

   # File lib/aixm/component/fato.rb
89 def inspect
90   %Q(#<#{self.class} airport=#{airport&.id.inspect} name=#{name.inspect}>)
91 end
length=(value) click to toggle source
    # File lib/aixm/component/fato.rb
 98 def length=(value)
 99   @length = if value
100     fail(ArgumentError, "invalid length") unless value.is_a?(AIXM::D) && value.dist > 0
101     fail(ArgumentError, "invalid length unit") if width && width.unit != value.unit
102     @length = value
103   end
104 end
marking=(value) click to toggle source
    # File lib/aixm/component/fato.rb
114 def marking=(value)
115   @marking = value&.to_s
116 end
name=(value) click to toggle source
   # File lib/aixm/component/fato.rb
93 def name=(value)
94   fail(ArgumentError, "invalid name") unless value.is_a? String
95   @name = value.uptrans
96 end
profile=(value) click to toggle source
    # File lib/aixm/component/fato.rb
118 def profile=(value)
119   @profile = value&.to_s
120 end
remarks=(value) click to toggle source
    # File lib/aixm/component/fato.rb
126 def remarks=(value)
127   @remarks = value&.to_s
128 end
status=(value) click to toggle source
    # File lib/aixm/component/fato.rb
122 def status=(value)
123   @status = value.nil? ? nil : (STATUSES.lookup(value.to_s.to_sym, nil) || fail(ArgumentError, "invalid status"))
124 end
to_uid() click to toggle source

@return [String] UID markup

    # File lib/aixm/component/fato.rb
131 def to_uid
132   builder = Builder::XmlMarkup.new(indent: 2)
133   builder.FtoUid do |fto_uid|
134     fto_uid << airport.to_uid.indent(2)
135     fto_uid.txtDesig(name)
136   end
137 end
to_xml() click to toggle source

@return [String] AIXM or OFMX markup

    # File lib/aixm/component/fato.rb
141 def to_xml
142   builder = Builder::XmlMarkup.new(indent: 2)
143   builder.Fto do |fto|
144     fto << to_uid.indent(2)
145     fto.valLen(length.dist.trim) if length
146     fto.valWid(width.dist.trim) if width
147     fto.uomDim(length.unit.to_s.upcase) if length
148     fto.uomDim(width.unit.to_s.upcase) if width && !length
149     unless  (xml = surface.to_xml).empty?
150       fto << xml.indent(2)
151     end
152     fto.txtProfile(profile) if profile
153     fto.txtMarking(marking) if marking
154     fto.codeSts(STATUSES.key(status).to_s) if status
155     fto.txtRmk(remarks) if remarks
156   end
157   directions.each do |direction|
158     builder << direction.to_xml
159   end
160   builder.target!
161 end
width=(value) click to toggle source
    # File lib/aixm/component/fato.rb
106 def width=(value)
107   @width = if value
108     fail(ArgumentError, "invalid width") unless value.is_a?(AIXM::D)  && value.dist > 0
109     fail(ArgumentError, "invalid width unit") if length && length.unit != value.unit
110     @width = value
111   end
112 end