Hi All,
I'm planning a high altitude balloon flight and would like to use the pressure/temp sensor (BMP280) to determine if the payload is descending and under 2,000 metres. I have flown this sensor before and it worked well up to it's maximum rated ceiling of 9,000m.
I'm developing a deployable parachute (rather than a pre-deployed canopy) and need a way of actuating a servo to withdraw a cable to release a small drogue which in turn will extract the main canopy. So, I need to write some code to determine if the altitude is consistently decreasing over a period of time.
The calculated descent rate is around 10m/s under the small drogue. My thinking is to take 3 readings, 15 seconds apart:
initial reading - 15 seconds - next reading - 15 seconds - final reading)
and then determine if the decrease in altitude is more than 200m - this takes into account a slightly slower fall rate (calculating terminal velocity is difficult) but is more than enough loss of altitude to indicate the payload is descending and not just 'dipping' a bit on the way up.
If the change in altitude is > minus 200m, and the altitude is less than 2,000m then actuate servo to withdraw cable from drogue loop.
I'm struggling with how to store each of the readings so I can do the maths to work out if the change in altitude is more than minus 200m - I think it might be a FOR loop but I'm not sure?
Any help or suggestions would be much appreciated. I'm not flying the deployable parachute on this occasion, just testing the code to make sure it works!
Best wishes
Phil