I have the idea to measure the angle that the rocket is, and when it incline above ~70º the recovery sistem is ignited.
That will show that rocket is falling and it need to deploy the parachute.
The rocket is falling the moment the engine burns out. Yes it’s still moving in upward direction, but it’s technically also falling. Because of the engine burnout, it’s essentially weightless, and if not for the air resistance slowing down the ascend an accelerometer would measure zero acceleration.
Come to think of it, at azimuth should be the moment the accelerometer shows zero acceleration, as there is no air resistance at that point. Though in reality there’s always this thing called “wind” that will mess it up.
For detecting a tilt angle, you may also use a tilt sensor, but as the rocket is as good as weightless for most of the time after the rocket burns out that also won’t work.
So detecting the motion of the rocket by its acceleration profile is almost impossible. That leaves height measurements: barometric pressure and GPS are options for this.