Class: Argus::NavOptionDemo
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
.tag ⇒ Object
72
73
74
|
# File 'lib/argus/nav_option_demo.rb', line 72
def self.tag
NavTag::DEMO
end
|
Instance Method Details
#control_state_name ⇒ Object
56
57
58
|
# File 'lib/argus/nav_option_demo.rb', line 56
def control_state_name
CONTROL_STATE_NAMES[ctrl_state & 0x0f]
end
|
#pitch ⇒ Object
60
61
62
|
# File 'lib/argus/nav_option_demo.rb', line 60
def pitch
theta / 1000.0
end
|
#roll ⇒ Object
64
65
66
|
# File 'lib/argus/nav_option_demo.rb', line 64
def roll
phi / 1000.0
end
|
#yaw ⇒ Object
68
69
70
|
# File 'lib/argus/nav_option_demo.rb', line 68
def yaw
psi / 1000.0
end
|