- line = line.replace("!ANG:","") # Delete "!ANG:"\r
- #print line\r
- f.write(line) # Write to the output log file\r
- words = string.split(line,"\t") # Fields split\r
- #print words\r
- print words\r
- if len(words) != 3:\r
- continue\r
-\r
- """\r
- a = float(words[0])#*grad2rad\r
- b = float(words[1])#*grad2rad\r
- c = float(words[2])#*grad2rad\r
- d = float(words[3])#*grad2rad\r
-\r
- platform.axis = (1, 1, 1)\r
- #print a, b, c, d\r
- platform.rotate(angle=a, axis = (b, c, d))\r
- continue\r
- """\r
- try:\r
- roll = float(words[0])#*grad2rad\r
- pitch = float(words[1])#*grad2rad\r
- yaw = float(words[2])#*grad2rad\r
- except:\r
- print "Invalid line"\r
+ #line = line.replace("!ANG:","") # Delete "!ANG:"\r
+ m = re.match(".*IMU received %s %s %s"%(INT, INT, INT), line)\r
+ if m == None:\r
+ print line\r