Class: Argus::NavOptionDemo

Inherits:
NavOption show all
Includes:
CFields
Defined in:
lib/argus/nav_option_demo.rb

Constant Summary collapse

CONTROL_STATE_NAMES =
[
  :default,
  :init,
  :landed,
  :flying,
  :hovering,
  :test,
  :trans_takeoff,
  :trans_gotofix,
  :trans_landing,
  :trans_looping,
]

Instance Attribute Summary

Attributes inherited from NavOption

#tag

Class Method Summary collapse

Instance Method Summary collapse

Methods included from CFields

included, #initialize, #unpack_data

Methods inherited from NavOption

initial_format, #initialize, options, parse, register, #size

Class Method Details

.tagObject


72
73
74
# File 'lib/argus/nav_option_demo.rb', line 72

def self.tag
  NavTag::DEMO
end

Instance Method Details

#control_state_nameObject


56
57
58
# File 'lib/argus/nav_option_demo.rb', line 56

def control_state_name
  CONTROL_STATE_NAMES[ctrl_state & 0x0f]
end

#pitchObject


60
61
62
# File 'lib/argus/nav_option_demo.rb', line 60

def pitch
  theta / 1000.0
end

#rollObject


64
65
66
# File 'lib/argus/nav_option_demo.rb', line 64

def roll
  phi / 1000.0
end

#yawObject


68
69
70
# File 'lib/argus/nav_option_demo.rb', line 68

def yaw
  psi / 1000.0
end