If I understand well, the current centripetal accelaration compensation is based on the d_fi / d_t from the z gyro and the v coming from the gps. I think it's only correct if there is no wind, because computing the acceleration this way requires the speed relative to the circle center. If there is wind, this is not the case and the correction is inaccurate.
(Easy to prove it considering a plane flying in a circle with a speed 100km/h relative to the air, and the wind is 100km/h too. Then the gps ground speed is 200km/h in wind direction and 0 km/h against the wind. So the compensation is double in one side of the circle and zero on the opposite side, while the centripetal acceleration is constant.)
The first idea is using the speed relative to the air instead of relative to ground. But it needs a Pitot sensor, or wind estimation based on gps data and some calibration circles etc.
I have a simple idea. (maybe I missed something important and it's just wrong?)
Here is it:
To keep the correct position of the horizont while flying in a circle, the algorithm needs the radial acceleration. Subtract the radial acceleration from the measured (g+a) value, get this way the correct g gravity vector and use that as the reference of vertical direction. So far the same as the the existing algorithm.
The difference is the way getting the radial acceleration value.
I think the algorithm needs the radial acceleration as a single scalar value, because it's supposedly perpendicular to the plane length axis. Let's calculate the scalar value from the gps data:
(vector subtraction, but we use the length of the result only)
Calculating the acceleration this way has an inherent noise because of the gps speed noise, but it's averaged in the the slow drift elimination loop, so hopefully doesn't kill the process. (the current algorithm suffers from this too, so my proposed process hopefully not worse)
This algorithm is not sensitive to wind speed at all, because it uses the speed difference, so any additional constant speed eliminated.
Nor is it sensitive to the heading, so no problem if the real heading and the ground speed vector is not equival.
The algorithm is pretty simple as well.
What do you think?