Arduino Rocket Ejection at Certain Altitude

I mean its going mach .31, not too fast and i dont think i will have a problem

If I were to use a BMP085 barometric pressure sensor, then what would be a example of the code to lets say read the pressure at startup, set that at zero and actuate the parachute at 50meters. If i can get that much info, believe i could pull it off