Class: Spektrum::Log::GForceRecord

Inherits:
Record
  • Object
show all
Defined in:
lib/spektrum/log/records.rb

Instance Attribute Summary

Attributes inherited from Record

#timestamp

Instance Method Summary collapse

Methods inherited from Record

#raw_hex_string, #type, #valid?

Constructor Details

#initialize(timestamp, raw_data) ⇒ GForceRecord

Returns a new instance of GForceRecord.



160
161
162
# File 'lib/spektrum/log/records.rb', line 160

def initialize(timestamp, raw_data)
  super timestamp, raw_data
end

Instance Method Details

#xObject



164
165
166
# File 'lib/spektrum/log/records.rb', line 164

def x
  @x ||= two_byte_field(2..3)
end

#x_maxObject



176
177
178
# File 'lib/spektrum/log/records.rb', line 176

def x_max
  @x_max ||= two_byte_field(8..9)
end

#yObject



168
169
170
# File 'lib/spektrum/log/records.rb', line 168

def y
  @y ||= two_byte_field(4..5)
end

#y_maxObject



180
181
182
# File 'lib/spektrum/log/records.rb', line 180

def y_max
  @y_max ||= two_byte_field(10..11)
end

#zObject



172
173
174
# File 'lib/spektrum/log/records.rb', line 172

def z
  @z ||= two_byte_field(6..7)
end

#z_maxObject



184
185
186
# File 'lib/spektrum/log/records.rb', line 184

def z_max
  @z_max ||= two_byte_field(12..13)
end