The critical angle of attack is a constant directly related to the form of the wing. If you would look at airspeed for stall, you have to take into account all sorts of other factors, like weight. But angle of attack is a constant. Of course when the wing changes you get a different critical angle of attack, so you have as many critical angle of attacks as there are flap settings. For an Airbus that would be 4 i believe.
A fixed-wing aircraft by definition is stalled at or above the critical angle of attack rather than at or below a particular airspeed. The airspeed at which the aircraft stalls varies with the weight of the aircraft, the load factor, the center of gravity of the aircraft and other factors. However the aircraft always stalls at the same critical angle of attack.
So for stall protection in flightgear, the only thing needed is to be able to readout the angle of attack from the fdm, and know the 4 (on an Airbus) critical values.
Kind regards, Vincent