Time interval for sensor calculations

Hi everybody,

I have two sensor which is connected over TTL to ESP board. I have a formula to calculate the sensor value and there is time interval variable. I am confused about variable value. sensor sends data at 20Hz and I read the value with serial read. Do I need to decleare interval value as 1000/20 = 50ms or read interval because two sensor is not synchronous and read time changes.

I don't understand the question.

For informed help, please read and follow the directions in the "How to get the best out of this forum" post.

Depends on the sensors and the formula. Since you don't specify either, it's hard to guess the answer to your question.

I am trying to implement gyro/gnss kalman filtering for angular speed. I am using gyro with 20 hz and gps data is 10hz. but they are not synchronous. There is time interval value on transition matrix. I am confused about the declering time interval as sensor speed or read time.
Thanks

The GPS won't give you any information about turning rate or direction so I don't think you can combine it with the rate gyro in any useful way.

GPS is Septentrio Mosaic-H dual antenna receiver and gives precise heading output.

If your system model does not take the different measurement times properly into account, that introduces a lag or mismatch and an additional source of error.

That complicates an already difficult problem. If you have not worked your way through Kalman filter theory and/or do not have an appropriate system model, you are better off just averaging the state variable estimates.

Your application description is not much clearer than your first post. But why the need to sync? I will guess, you could use independent filters for each sensor and then sample the Kalman output from each one at the same time. That should overcome any problem with interpolation.

Performance depends a lot on input data quality and matching filter coefficients to that input, as mentioned in the previous post.

System model get input of gyro yaw rate and heading change. time interval only needs at gyro output. Measurement is gyrorate*dt - headingchange. Trying to find error rate of gyro.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.