-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
added 3 functions to the module:
def get_y_rotation(self,x,y,z):
radians = math.atan2(x, math.sqrt((yy)+(zz)))
return -math.degrees(radians)
def get_x_rotation(self,x,y,z):
radians = math.atan2(y, math.sqrt((x*x)+(z*z)))
return math.degrees(radians)
def get_z_rotation(self,x,y,z):
radians = math.atan2(z, math.sqrt((x*x)+(y*y)))
return math.degrees(radians)
and 3 lines to the sample:
print(mpu.get_x_rotation(accel[0],accel[1],accel[2]))
print(mpu.get_y_rotation(accel[0],accel[1],accel[2]))
print(mpu.get_z_rotation(accel[0],accel[1],accel[2]))
any idea, how to calibrate the sensor? Greetings Bernd54Albrecht@gmail.com
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels