|
31 | 31 | time.sleep(0.1)
|
32 | 32 |
|
33 | 33 | print("Acceleration:")
|
34 |
| - accel_x, accel_y, accel_z = bno.accelerationdict |
| 34 | + accel_x, accel_y, accel_z = bno.acceleration |
35 | 35 | print("X: %0.6f Y: %0.6f Z: %0.6f m/s^2" % (accel_x, accel_y, accel_z))
|
36 | 36 | print("")
|
37 | 37 |
|
38 | 38 | print("Gyro:")
|
39 |
| - gyro_x, gyro_y, gyro_z = bno.gyrodict |
| 39 | + gyro_x, gyro_y, gyro_z = bno.gyro |
40 | 40 | print("X: %0.6f Y: %0.6f Z: %0.6f rads/s" % (gyro_x, gyro_y, gyro_z))
|
41 | 41 | print("")
|
42 | 42 |
|
43 | 43 | print("Magnetometer:")
|
44 |
| - mag_x, mag_y, mag_z = bno.magneticdict |
| 44 | + mag_x, mag_y, mag_z = bno.magnetic |
45 | 45 | print("X: %0.6f Y: %0.6f Z: %0.6f uT" % (mag_x, mag_y, mag_z))
|
46 | 46 | print("")
|
47 | 47 |
|
|
50 | 50 | linear_accel_x,
|
51 | 51 | linear_accel_y,
|
52 | 52 | linear_accel_z,
|
53 |
| - ) = bno.linear_accelerationdict |
| 53 | + ) = bno.linear_acceleration |
54 | 54 | print("X: %0.6f Y: %0.6f Z: %0.6f m/s^2" % (linear_accel_x, linear_accel_y, linear_accel_z))
|
55 | 55 | print("")
|
56 | 56 |
|
57 | 57 | print("Rotation Vector Quaternion:")
|
58 |
| - quat_i, quat_j, quat_k, quat_real = bno.quaterniondict |
| 58 | + quat_i, quat_j, quat_k, quat_real = bno.quaternion |
59 | 59 | print("I: %0.6f J: %0.6f K: %0.6f Real: %0.6f" % (quat_i, quat_j, quat_k, quat_real))
|
60 | 60 | print("")
|
61 | 61 |
|
|
65 | 65 | geo_quat_j,
|
66 | 66 | geo_quat_k,
|
67 | 67 | geo_quat_real,
|
68 |
| - ) = bno.geomagnetic_quaterniondict |
| 68 | + ) = bno.geomagnetic_quaternion |
69 | 69 | print(
|
70 | 70 | "I: %0.6f J: %0.6f K: %0.6f Real: %0.6f"
|
71 | 71 | % (geo_quat_i, geo_quat_j, geo_quat_k, geo_quat_real)
|
|
78 | 78 | game_quat_j,
|
79 | 79 | game_quat_k,
|
80 | 80 | game_quat_real,
|
81 |
| - ) = bno.game_quaterniondict |
| 81 | + ) = bno.game_quaternion |
82 | 82 | print(
|
83 | 83 | "I: %0.6f J: %0.6f K: %0.6f Real: %0.6f"
|
84 | 84 | % (game_quat_i, game_quat_j, game_quat_k, game_quat_real)
|
|
0 commit comments