Class: AIXM::Component::FATO::Direction

Inherits:
Object
  • Object
show all
Includes:
AIXM::Concerns::Association, AIXM::Concerns::Memoize, AIXM::Concerns::Remarks, AIXM::Concerns::XMLBuilder
Defined in:
lib/aixm/component/fato.rb

Overview

FATO directions further describe each direction to and from the FATO.

Instance Attribute Summary collapse

Attributes included from AIXM::Concerns::Remarks

#remarks

Instance Method Summary collapse

Methods included from AIXM::Concerns::XMLBuilder

#build_fragment, #to_uid, #to_xml

Methods included from AIXM::Concerns::Memoize

included, method

Methods included from AIXM::Concerns::Association

included

Constructor Details

#initialize(name:) ⇒ Direction

See the cheat sheet for examples on how to

create instances of this class.


203
204
205
206
# File 'lib/aixm/component/fato.rb', line 203

def initialize(name:)
  self.name = name
  self.vasis = AIXM.vasis
end

Instance Attribute Details

#geographic_bearingAIXM::A?

Returns (true) geographic bearing in degrees.

Returns:

  • (AIXM::A, nil)

    (true) geographic bearing in degrees



195
196
197
# File 'lib/aixm/component/fato.rb', line 195

def geographic_bearing
  @geographic_bearing
end

#nameAIXM::A #name=(value) ⇒ Object

Name of the FATO direction (e.g. “12” or “16L”)

Overloads:



192
193
194
# File 'lib/aixm/component/fato.rb', line 192

def name
  @name
end

#vasisAIXM::Component::VASIS?

Returns visual approach slope indicator system.

Returns:



199
200
201
# File 'lib/aixm/component/fato.rb', line 199

def vasis
  @vasis
end

Instance Method Details

#add_approach_lighting(approach_lighting) ⇒ self

Parameters:

Returns:

  • (self)


180
# File 'lib/aixm/component/fato.rb', line 180

has_many :approach_lightings, as: :approach_lightable

#add_lighting(lighting) ⇒ Object

Parameters:



172
# File 'lib/aixm/component/fato.rb', line 172

has_many :lightings, as: :lightable

#approach_lightingsArray<AIXM::Component::ApproachLighting>

Returns installed approach lighting systems.

Returns:



180
# File 'lib/aixm/component/fato.rb', line 180

has_many :approach_lightings, as: :approach_lightable

#fatoAIXM::Component::FATO

Returns FATO the FATO direction is further describing.

Returns:



184
# File 'lib/aixm/component/fato.rb', line 184

belongs_to :fato

#inspectString

Returns:

  • (String)


209
210
211
# File 'lib/aixm/component/fato.rb', line 209

def inspect
  %Q(#<#{self.class} airport=#{fato&.airport&.id.inspect} name=#{name.to_s(:runway).inspect}>)
end

#lightingsArray<AIXM::Component::Lighting>

Returns installed lighting systems.

Returns:



172
# File 'lib/aixm/component/fato.rb', line 172

has_many :lightings, as: :lightable

#magnetic_bearingAIXM::A

Returns magnetic bearing in degrees.

Returns:

  • (AIXM::A)

    magnetic bearing in degrees



225
226
227
228
229
# File 'lib/aixm/component/fato.rb', line 225

def magnetic_bearing
  if geographic_bearing && fato.airport.declination
    geographic_bearing - fato.airport.declination
  end
end