Class: AIXM::Feature::NavigationalAid::VOR

Inherits:
AIXM::Feature::NavigationalAid show all
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

REGION_RE

Instance Attribute Summary collapse

Attributes inherited from AIXM::Feature::NavigationalAid

#id, #name, #xy, #z

Attributes included from Concerns::Remarks

#remarks

Attributes included from Concerns::Timetable

#timetable

Attributes inherited from AIXM::Feature

#comment, #region, #source

Attributes inherited from Component

#meta

Instance Method Summary collapse

Methods inherited from AIXM::Feature::NavigationalAid

#inspect, #kind, #organisation

Methods included from Concerns::Association

included

Methods inherited from AIXM::Feature

#==, #hash

Methods included from Concerns::HashEquality

#eql?, #hash

Methods included from Concerns::XMLBuilder

#build_fragment, #to_uid, #to_xml

Methods included from Concerns::Memoize

included, method

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

#fAIXM::F #f=(value) ⇒ Object

Radio requency

Overloads:



75
76
77
# File 'lib/aixm/feature/navigational_aid/vor.rb', line 75

def f
  @f
end

#northSymbol #north=(value) ⇒ Object

North indication

Overloads:

  • #northSymbol

    Returns any of NORTHS.

    Returns:

  • #north=(value) ⇒ Object

    Parameters:

    • value (Symbol)

      any of NORTHS



83
84
85
# File 'lib/aixm/feature/navigational_aid/vor.rb', line 83

def north
  @north
end

#typeSymbol #type=(value) ⇒ Object

Type of VOR

Overloads:

  • #typeSymbol

    Returns any of TYPES.

    Returns:

    • (Symbol)

      any of TYPES

  • #type=(value) ⇒ Object

    Parameters:

    • value (Symbol)

      any of TYPES



67
68
69
# File 'lib/aixm/feature/navigational_aid/vor.rb', line 67

def type
  @type
end

Instance Method Details

#associate_dmeAIXM::Feature::NavigationalAid::DME

Build a DME associated to this VOR (which turns it into a VOR/DME)

Returns:



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 |navigational_aid|
        navigational_aid.timetable = timetable
        navigational_aid.remarks = remarks
      end
    )
  end
end

#dassociate_tacanAIXM::Feature::NavigationalAid::TACAN

Build a TACAN associated to this VOR (which turns it into a VORTAC)

Returns:



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 |navigational_aid|
        navigational_aid.timetable = timetable
        navigational_aid.remarks = remarks
      end
    )
  end
end

#dmeAIXM::Feature::NavigationalAid::DME?

Returns associated DME.

Returns:



52
# File 'lib/aixm/feature/navigational_aid/vor.rb', line 52

has_one :dme, allow_nil: true

#dme=(dme) ⇒ Object

Parameters:



52
# File 'lib/aixm/feature/navigational_aid/vor.rb', line 52

has_one :dme, allow_nil: true

#north_keyObject

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

#tacanAIXM::Feature::NavigationalAid::TACAN?

Returns associated TACAN.

Returns:



59
# File 'lib/aixm/feature/navigational_aid/vor.rb', line 59

has_one :tacan, allow_nil: true

#tacan=(tacan) ⇒ Object

Parameters:



59
# File 'lib/aixm/feature/navigational_aid/vor.rb', line 59

has_one :tacan, allow_nil: true

#type_keyObject

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.



168
169
170
# File 'lib/aixm/feature/navigational_aid/vor.rb', line 168

def type_key
  TYPES.key(type)
end