def calcRoll(self, accel):
x = accel[0]
y = accel[1]
z = accel[2]
try:
phi = math.atan(y / z)
except:
if y > 0:
phi = 1.0
else:
phi = -1.0
return phi