after placing the Handler out the method, i can finally stream data, BUT, i am getting zero in all the values: x, y, z, w although i am moving the sensor, what am i doing wrong?
Fn_IntPtr sensorFusionHandlerDelegate = new Fn_IntPtr(dataPtr =>
{
var data = Marshal.PtrToStructure<Data>(dataPtr);
var sensor_fusion_value = Marshal.PtrToStructure<Quaternion>(data.value);
i am facing two problems with streaming the data correctly:
1. the sampling rate is not constant, and data received at 64-114 Hz
2. the data is being update only on slow movement of the sensor, when i move the sensor not very slow (but not very fast) the data is not refreshed.
i generated a graph for the quaternions over the time, you can clearly see the when i moved the sensor slow, the data updated, but when i moved it faster the data stayed constant:
i mean that i see the data refreshed only on a very gentle movement of the sensor, when moving it "normally", the data stucks and not refreshed.
we don't see this behavior when using the android app. where can i find the source code for this app? it will help me to verify that i'm setting everything correctly.
Comments