class AIXM::Feature::NavigationalAid::Marker

Marker beacons guide an aircraft on a specific route e.g. towards a runway (which is why marker beacons are often part of an ILS). Their VHF radio beacons are transmitted on 75 MHz.

Cheat Sheet in Pseudo Code:

marker = AIXM.marker(
  source: String or nil
  region: String or nil
  organisation: AIXM.organisation
  id: String
  name: String
  xy: AIXM.xy
  z: AIXM.z or nil
  type: :outer or :middle or :inner or :backcourse
)
marker.timetable = AIXM.timetable or nil
marker.remarks = String or nil

@note Marker are not fully implemented because they usually have to be

associated with an ILS which are not implemented as of now.

@see gitlab.com/openflightmaps/ofmx/wikis/Navigational-aid#mkr-marker-beacon

Constants

TYPES

Attributes

type[R]

@return [Symbol] type of marker (see {TYPES})

Public Class Methods

new(source: nil, region: nil) click to toggle source
   # File lib/aixm/feature.rb
15 def initialize(source: nil, region: nil)
16   self.source = source
17   self.region = region || AIXM.config.region
18 end
new(type:, **arguments) click to toggle source

TODO: Marker require an associated ILS (not yet implemented)

Calls superclass method AIXM::Feature::NavigationalAid::new
   # File lib/aixm/feature/navigational_aid/marker.rb
46 def initialize(type:, **arguments)
47   super(**arguments)
48   self.type = type
49   warn("WARNING: Maker is not fully implemented yet due to the lack of ILS")
50 end

Public Instance Methods

to_uid() click to toggle source

@return [String] UID markup

   # File lib/aixm/feature/navigational_aid/marker.rb
57 def to_uid
58   builder = Builder::XmlMarkup.new(indent: 2)
59   builder.MkrUid({ region: (region if AIXM.ofmx?) }.compact) do |mkr_uid|
60     mkr_uid.codeId(id)
61     mkr_uid.geoLat(xy.lat(AIXM.schema))
62     mkr_uid.geoLong(xy.long(AIXM.schema))
63   end
64 end
to_xml() click to toggle source

@return [String] AIXM or OFMX markup

   # File lib/aixm/feature/navigational_aid/marker.rb
68 def to_xml
69   builder = to_builder
70   builder.Mkr({ source: (source if AIXM.ofmx?) }.compact) do |mkr|
71     mkr << to_uid.indent(2)
72     mkr << organisation.to_uid.indent(2)
73     mkr.codePsnIls(type_key.to_s) if type_key
74     mkr.valFreq(75)
75     mkr.uomFreq('MHZ')
76     mkr.txtName(name) if name
77     mkr.codeDatum('WGE')
78     if z
79       mkr.valElev(z.alt)
80       mkr.uomDistVer(z.unit.upcase.to_s)
81     end
82     mkr << timetable.to_xml(as: :Mtt).indent(2) if timetable
83     mkr.txtRmk(remarks) if remarks
84     mkr.target!
85   end
86 end
type=(value) click to toggle source
   # File lib/aixm/feature/navigational_aid/marker.rb
52 def type=(value)
53   @type = value.nil? ? nil : TYPES.lookup(value.to_s.to_sym, nil) || fail(ArgumentError, "invalid type")
54 end

Private Instance Methods

type_key() click to toggle source
   # File lib/aixm/feature/navigational_aid/marker.rb
90 def type_key
91   TYPES.key(type)
92 end