Class: IGC::Fix
- Inherits:
-
Object
- Object
- IGC::Fix
- Defined in:
- lib/igc/fix.rb
Overview
IGC::Fix represents a single fix in a recorder flight
Instance Attribute Summary collapse
-
#air_speed ⇒ Object
Returns the value of attribute air_speed.
-
#compensated_variomenter ⇒ Object
Returns the value of attribute compensated_variomenter.
-
#extensions ⇒ Object
Returns the value of attribute extensions.
-
#gps_altitude ⇒ Object
Returns the value of attribute gps_altitude.
-
#horizontal_accuracy ⇒ Object
Returns the value of attribute horizontal_accuracy.
-
#location ⇒ Object
Returns the value of attribute location.
-
#magnetic_heading ⇒ Object
Returns the value of attribute magnetic_heading.
-
#pressure_altitude ⇒ Object
Returns the value of attribute pressure_altitude.
-
#satellite_in_use ⇒ Object
Returns the value of attribute satellite_in_use.
-
#time ⇒ Object
Returns the value of attribute time.
-
#true_heading ⇒ Object
Returns the value of attribute true_heading.
-
#uncompensated_variometer ⇒ Object
Returns the value of attribute uncompensated_variometer.
-
#validity ⇒ Object
Returns the value of attribute validity.
-
#vertical_accuracy ⇒ Object
Returns the value of attribute vertical_accuracy.
-
#wind_direction ⇒ Object
Returns the value of attribute wind_direction.
-
#wind_speed ⇒ Object
Returns the value of attribute wind_speed.
Instance Method Summary collapse
- #assign_known_extensions! ⇒ Object
-
#initialize ⇒ Fix
constructor
A new instance of Fix.
Constructor Details
#initialize ⇒ Fix
Returns a new instance of Fix.
23 24 25 |
# File 'lib/igc/fix.rb', line 23 def initialize @extensions = {} end |
Instance Attribute Details
#air_speed ⇒ Object
Returns the value of attribute air_speed.
6 7 8 |
# File 'lib/igc/fix.rb', line 6 def air_speed @air_speed end |
#compensated_variomenter ⇒ Object
Returns the value of attribute compensated_variomenter.
6 7 8 |
# File 'lib/igc/fix.rb', line 6 def compensated_variomenter @compensated_variomenter end |
#extensions ⇒ Object
Returns the value of attribute extensions.
6 7 8 |
# File 'lib/igc/fix.rb', line 6 def extensions @extensions end |
#gps_altitude ⇒ Object
Returns the value of attribute gps_altitude.
6 7 8 |
# File 'lib/igc/fix.rb', line 6 def gps_altitude @gps_altitude end |
#horizontal_accuracy ⇒ Object
Returns the value of attribute horizontal_accuracy.
6 7 8 |
# File 'lib/igc/fix.rb', line 6 def horizontal_accuracy @horizontal_accuracy end |
#location ⇒ Object
Returns the value of attribute location.
6 7 8 |
# File 'lib/igc/fix.rb', line 6 def location @location end |
#magnetic_heading ⇒ Object
Returns the value of attribute magnetic_heading.
6 7 8 |
# File 'lib/igc/fix.rb', line 6 def magnetic_heading @magnetic_heading end |
#pressure_altitude ⇒ Object
Returns the value of attribute pressure_altitude.
6 7 8 |
# File 'lib/igc/fix.rb', line 6 def pressure_altitude @pressure_altitude end |
#satellite_in_use ⇒ Object
Returns the value of attribute satellite_in_use.
6 7 8 |
# File 'lib/igc/fix.rb', line 6 def satellite_in_use @satellite_in_use end |
#time ⇒ Object
Returns the value of attribute time.
6 7 8 |
# File 'lib/igc/fix.rb', line 6 def time @time end |
#true_heading ⇒ Object
Returns the value of attribute true_heading.
6 7 8 |
# File 'lib/igc/fix.rb', line 6 def true_heading @true_heading end |
#uncompensated_variometer ⇒ Object
Returns the value of attribute uncompensated_variometer.
6 7 8 |
# File 'lib/igc/fix.rb', line 6 def uncompensated_variometer @uncompensated_variometer end |
#validity ⇒ Object
Returns the value of attribute validity.
6 7 8 |
# File 'lib/igc/fix.rb', line 6 def validity @validity end |
#vertical_accuracy ⇒ Object
Returns the value of attribute vertical_accuracy.
6 7 8 |
# File 'lib/igc/fix.rb', line 6 def vertical_accuracy @vertical_accuracy end |
#wind_direction ⇒ Object
Returns the value of attribute wind_direction.
6 7 8 |
# File 'lib/igc/fix.rb', line 6 def wind_direction @wind_direction end |
#wind_speed ⇒ Object
Returns the value of attribute wind_speed.
6 7 8 |
# File 'lib/igc/fix.rb', line 6 def wind_speed @wind_speed end |
Instance Method Details
#assign_known_extensions! ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/igc/fix.rb', line 27 def assign_known_extensions! @extensions.each do |key, value| case key when "HDM" @magnetic_heading = value.to_i when "HDT" @true_heading = value.to_i when "IAS" @air_speed = value.to_i when "SIU" @satellite_in_use = value.to_i when "WDI" @wind_direction = value.to_i when "WSP" @wind_speed = value.to_i when "FXA" @horizontal_accuracy = value.to_i when "VXA" @vertical_accuracy = value.to_i when "VAT" @compensated_variomenter = value.to_i / 100 when "VAR" @uncompensated_variometer = value.to_i / 100 end end end |