Class: AIXM::Feature::NavigationalAid::VOR
- Inherits:
-
AIXM::Feature::NavigationalAid
- Object
- Component
- AIXM::Feature
- AIXM::Feature::NavigationalAid
- AIXM::Feature::NavigationalAid::VOR
- Defined in:
- lib/aixm/feature/navigational_aid/vor.rb
Overview
VHF omni directional radio range (VOR) is a type of radio navigation for aircraft to determine their position and course. They operate in the frequency band between 108.00 Mhz to 117.95 MHz.
Cheat Sheet in Pseudo Code:
vor = AIXM.vor(
source: String or nil
region: String or nil
organisation: AIXM.organisation
id: String
name: String
xy: AIXM.xy
z: AIXM.z or nil
type: TYPES
f: AIXM.f
north: NORTHS
)
vor.timetable = AIXM.timetable or nil
vor.remarks = String or nil
vor.comment = Object or nil
vor.associate_dme # turns the VOR into a VOR/DME
vor.associate_tacan # turns the VOR into a VORTAC
Constant Summary collapse
- TYPES =
{ VOR: :conventional, DVOR: :doppler, OTHER: :other # specify in remarks }.freeze
- NORTHS =
{ TRUE: :geographic, GRID: :grid, # parallel to the north-south lines of the UTM grid MAG: :magnetic, OTHER: :other # specify in remarks }.freeze
Constants inherited from AIXM::Feature
Instance Attribute Summary collapse
-
#f ⇒ Object
Radio requency.
-
#north ⇒ Object
North indication.
-
#type ⇒ Object
Type of VOR.
Attributes inherited from AIXM::Feature::NavigationalAid
Attributes included from Concerns::Remarks
Attributes included from Concerns::Timetable
Attributes inherited from AIXM::Feature
Attributes inherited from Component
Instance Method Summary collapse
-
#associate_dme ⇒ AIXM::Feature::NavigationalAid::DME
Build a DME associated to this VOR (which turns it into a VOR/DME).
-
#dassociate_tacan ⇒ AIXM::Feature::NavigationalAid::TACAN
Build a TACAN associated to this VOR (which turns it into a VORTAC).
-
#dme ⇒ AIXM::Feature::NavigationalAid::DME?
Associated DME.
- #dme=(dme) ⇒ Object
-
#initialize(type:, f:, north:, **arguments) ⇒ VOR
constructor
See the cheat sheet for examples on how to create instances of this class.
- #north_key ⇒ Object private
-
#tacan ⇒ AIXM::Feature::NavigationalAid::TACAN?
Associated TACAN.
- #tacan=(tacan) ⇒ Object
- #type_key ⇒ Object private
Methods inherited from AIXM::Feature::NavigationalAid
#inspect, #kind, #organisation
Methods included from Concerns::Association
Methods inherited from AIXM::Feature
Methods included from Concerns::HashEquality
Methods included from Concerns::XMLBuilder
#build_fragment, #to_uid, #to_xml
Methods included from Concerns::Memoize
Constructor Details
#initialize(type:, f:, north:, **arguments) ⇒ VOR
See the cheat sheet for examples on how to create instances of this class.
87 88 89 90 |
# File 'lib/aixm/feature/navigational_aid/vor.rb', line 87 def initialize(type:, f:, north:, **arguments) super(**arguments) self.type, self.f, self.north = type, f, north end |
Instance Attribute Details
#f ⇒ AIXM::F #f=(value) ⇒ Object
Radio requency
75 76 77 |
# File 'lib/aixm/feature/navigational_aid/vor.rb', line 75 def f @f end |
#north ⇒ Symbol #north=(value) ⇒ Object
North indication
83 84 85 |
# File 'lib/aixm/feature/navigational_aid/vor.rb', line 83 def north @north end |
#type ⇒ Symbol #type=(value) ⇒ Object
Type of VOR
67 68 69 |
# File 'lib/aixm/feature/navigational_aid/vor.rb', line 67 def type @type end |
Instance Method Details
#associate_dme ⇒ AIXM::Feature::NavigationalAid::DME
Build a DME associated to this VOR (which turns it into a VOR/DME)
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/aixm/feature/navigational_aid/vor.rb', line 114 %i(dme tacan).each do |secondary| define_method("associate_#{secondary}") do send("#{secondary}=", AIXM.send(secondary, region: region, source: source, organisation: organisation, id: id, name: name, xy: xy, z: z, ghost_f: f ).tap do || . = .remarks = remarks end ) end end |
#dassociate_tacan ⇒ AIXM::Feature::NavigationalAid::TACAN
Build a TACAN associated to this VOR (which turns it into a VORTAC)
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/aixm/feature/navigational_aid/vor.rb', line 114 %i(dme tacan).each do |secondary| define_method("associate_#{secondary}") do send("#{secondary}=", AIXM.send(secondary, region: region, source: source, organisation: organisation, id: id, name: name, xy: xy, z: z, ghost_f: f ).tap do || . = .remarks = remarks end ) end end |
#dme ⇒ AIXM::Feature::NavigationalAid::DME?
Returns associated DME.
52 |
# File 'lib/aixm/feature/navigational_aid/vor.rb', line 52 has_one :dme, allow_nil: true |
#dme=(dme) ⇒ Object
52 |
# File 'lib/aixm/feature/navigational_aid/vor.rb', line 52 has_one :dme, allow_nil: true |
#north_key ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
173 174 175 |
# File 'lib/aixm/feature/navigational_aid/vor.rb', line 173 def north_key NORTHS.key(north) end |
#tacan ⇒ AIXM::Feature::NavigationalAid::TACAN?
Returns associated TACAN.
59 |
# File 'lib/aixm/feature/navigational_aid/vor.rb', line 59 has_one :tacan, allow_nil: true |
#tacan=(tacan) ⇒ Object
59 |
# File 'lib/aixm/feature/navigational_aid/vor.rb', line 59 has_one :tacan, allow_nil: true |