Class: AIXM::Feature::NavigationalAid::Marker
- Inherits:
-
AIXM::Feature::NavigationalAid
- Object
- AIXM::Feature
- AIXM::Feature::NavigationalAid
- AIXM::Feature::NavigationalAid::Marker
- Defined in:
- lib/aixm/feature/navigational_aid/marker.rb
Overview
Note:
Marker are not fully implemented because they usually have to be associated with an ILS which are not implemented as of now.
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
organisation: AIXM.organisation
id: String
name: String
xy: AIXM.xy
z: AIXM.z or nil
type: :outer or :middle or :inner or :backcourse
)
marker. = AIXM. or nil
marker.remarks = String or nil
Constant Summary collapse
- TYPES =
{ O: :outer, M: :middle, I: :inner, C: :backcourse, OTHER: :other # specify in remarks }
Instance Attribute Summary collapse
-
#type ⇒ Symbol
Type of marker (see TYPES).
Attributes inherited from AIXM::Feature::NavigationalAid
#id, #name, #remarks, #timetable, #xy, #z
Attributes inherited from AIXM::Feature
Instance Method Summary collapse
-
#initialize(type:, **arguments) ⇒ Marker
constructor
TODO: Marker require an associated ILS (not yet implemented).
-
#to_uid ⇒ String
UID markup.
-
#to_xml ⇒ String
AIXM or OFMX markup.
Methods inherited from AIXM::Feature::NavigationalAid
Methods inherited from AIXM::Feature
Constructor Details
#initialize(type:, **arguments) ⇒ Marker
TODO: Marker require an associated ILS (not yet implemented)
43 44 45 46 47 |
# File 'lib/aixm/feature/navigational_aid/marker.rb', line 43 def initialize(type:, **arguments) super(**arguments) self.type = type warn("WARNING: Maker is not fully implemented yet due to the lack of ILS") end |
Instance Attribute Details
#type ⇒ Symbol
Returns type of marker (see TYPES).
40 41 42 |
# File 'lib/aixm/feature/navigational_aid/marker.rb', line 40 def type @type end |
Instance Method Details
#to_uid ⇒ String
Returns UID markup.
54 55 56 57 58 59 60 61 |
# File 'lib/aixm/feature/navigational_aid/marker.rb', line 54 def to_uid builder = Builder::XmlMarkup.new(indent: 2) builder.MkrUid do |mkr_uid| mkr_uid.codeId(id) mkr_uid.geoLat(xy.lat(AIXM.schema)) mkr_uid.geoLong(xy.long(AIXM.schema)) end end |
#to_xml ⇒ String
Returns AIXM or OFMX markup.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/aixm/feature/navigational_aid/marker.rb', line 64 def to_xml builder = to_builder builder.Mkr({ source: (source if AIXM.ofmx?) }.compact) do |mkr| mkr << to_uid.indent(2) mkr << organisation.to_uid.indent(2) mkr.codePsnIls(type_key.to_s) if type_key mkr.valFreq(75) mkr.uomFreq('MHZ') mkr.txtName(name) if name mkr.codeDatum('WGE') if z mkr.valElev(z.alt) mkr.uomDistVer(z.unit.upcase.to_s) end mkr << .to_xml(as: :Mtt).indent(2) if mkr.txtRmk(remarks) if remarks mkr.target! end end |