Class: MAVLink::Log::Messages::ScaledPressure
- Inherits:
-
TimedMessageMilli
- Object
- MAVLink::Log::Message
- TimedMessageMilli
- MAVLink::Log::Messages::ScaledPressure
- Defined in:
- lib/mavlink/log/messages/scaled_pressure.rb
Instance Method Summary collapse
-
#press_abs ⇒ Object
absolute pressure (hectopascal).
-
#press_diff ⇒ Object
differential pressure (hectopascal).
-
#temperature(unit = :c) ⇒ Object
temperature ©.
Methods inherited from TimedMessageMilli
Methods inherited from MAVLink::Log::Message
Constructor Details
This class inherits a constructor from MAVLink::Log::Message
Instance Method Details
#press_abs ⇒ Object
absolute pressure (hectopascal)
6 7 8 |
# File 'lib/mavlink/log/messages/scaled_pressure.rb', line 6 def press_abs @press_abs ||= float(4..7) end |
#press_diff ⇒ Object
differential pressure (hectopascal)
11 12 13 |
# File 'lib/mavlink/log/messages/scaled_pressure.rb', line 11 def press_diff @press_diff ||= float(8..11) end |
#temperature(unit = :c) ⇒ Object
temperature ©
16 17 18 19 20 21 22 23 24 |
# File 'lib/mavlink/log/messages/scaled_pressure.rb', line 16 def temperature(unit = :c) @temperature ||= (int16_t(12..13) / 100.0) case unit when :f (@temperature * (9.0 / 5.0)) + 32 else @temperature end end |