Skip to content

Commit

Permalink
use measured gravity vs 9.81
Browse files Browse the repository at this point in the history
  • Loading branch information
DocGarbanzo committed Sep 30, 2024
1 parent fbd74e8 commit 35148aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion donkeycar/parts/imu.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def poll(self):
# self.lin_accel = np.dot(self.matrix, accel_phys)
# # remove gravity from world coordinate z-axis
# self.lin_accel[2] -= self.accel_zero[2]
self.lin_accel = self.accel_norm * self.ahrs.linear_acceleration
self.lin_accel = self.accel_norm * self.ahrs.earth_acceleration
delta_v = self.lin_accel * dt
self.speed += delta_v
self.pos += (self.speed - self.speed_drift) * dt
Expand Down

0 comments on commit 35148aa

Please sign in to comment.