self.prev_reftime = None
self.data = ""
- def update(self):
+ def update_state(self):
# read from file/serial
while len(self.data) < 16384:
data = self.f.read(1024)
"\| magnet %s %s %s " % (FLOAT, FLOAT, FLOAT) +
"\| angles %s %s %s"% (FLOAT, FLOAT, FLOAT), l)
if m:
- cur_time = float(m.groups()[0]) / 20.
+ cur_time = float(m.groups()[0]) / 1000.
# first time, init prev_time and prev_reftime
if self.realtime == False and self.prev_time == None:
self.prev_time = cur_time
break
roll, pitch, yaw = (
map(lambda x: float(x), m.groups()[10:13]))
- print roll, pitch, yaw
self.roll = math.degrees(roll) + 180.
self.pitch = math.degrees(pitch)
self.yaw = math.degrees(yaw)