Gday - Thanks for reading my “HELP!”
I’m trying to use the Gy512 6dof. trying to work out the current angle
I have some questions. (I’m trying to build up to a kalman filter for… fun)
1 - The accelerometer
measures a change in angle since the last time you got data?
is only accurate in the short term, as you add the acc data together it drifts… presumably because of compunding rounding errors.
to get the rate of change per second you have to consider how many times per secod you are poling the acc… That’s the “DELTA T”
2 - The gyroscope
measures the angle it is at time of ‘get data’?
This data while is accurate is subject to short term errors.
the ‘angle’ it gives out seem to be between +/- 32727
using map(data,-32767,32767,0,360) ; will convert the data to an angle (or for the acc to work… you probably want -180,180 as the output range)
3 - the complementry filter (which doent work for me)
Filter Angle = .95 ( gyr data) + .5 (acc angle) ← the acc angle needs to remember the Delta T
if you use this method… wont the filtered angle drift over time (which mine seems to)…
I haven’t included code I’m trying to get my ‘overview correct’ I must be missing something really obvious!