Altitude estimation from barometer and accelerometer , fusion algoritm

frenky81:
I have a barometer that give me the altitude estimation but this is not enought because barometer have some drift and the sample rate is not enought fast for have a good stabilization so i thought to fuse the accelerometer z axis with the barometer datas for have a clean and fast altitude estimation.

Firstly the accelerometer can do nothing at all about barometer drift, you need good GPS data to do that.
(Or good weather forecast!)

The Accelerometer can fill in the short term changes, with the barometer correcting for the accelerometer drift
(which rapidly gets unmanagably, but most barometers sample 1 or more times a second which should be enough I think).

For flight in practice an accelerometer alone won't do, you need a 6DoF IMU to get attitude-corrected accelerometer. It would work in a lift mechanism where the z-axis is accurately aligned at all times, but
not for a drone.