A small project has been to try to use the Spike Prime acceleration data and Newton’s Laws of Motion to calculate distance moved by a vehicle.
The upshot of working through this has been:
. that the Lego documentation is woefully lacking. ..it is not at all clear what the units are although given the the z acceleration is of the order of 989 I imagine that to be gravity in cm/s/s.
. even though the hub is at rest it reports small accelerations on x and y.
. applying the code ... integrating acceleration over time... the results are inconsistent even at standstill.... more so under movement. It is possible that there is a coding error but unlikely (famous last words!)
So.... any ideas gratefully received!
Thanks