Osprey icon indicating copy to clipboard operation
Osprey copied to clipboard

MAIN is deployed when entering drogue mode due to freefall

Open trullock opened this issue 5 years ago • 2 comments

I may be wrong here, so please correct me...

in event.cpp inside phaseCoast(), at the bottom we have // If we're now in free fall we must have missed apogee so immediately fire the drogue which is a sensible safety check.

However, loop() will then tick, calling event.check() and we'll fire event.phaseDrogue(). In all likelyhood after this short a period of time between the droge event firing and a single clock tick, this block // If we're in the drogue phase and still in free fall fire everything in a desperate attempt to save our ass will immediately fire and deploy the MAIN, at whatever altitude we're at. Feels like this check should be delayed a bit if we entered the Drogue phase due to missing apogee...

Is this deliberate? Am I wrong?

Excellent project by the way, extremely well written. By far the best project of this type I've found so far!

trullock avatar Nov 24 '19 22:11 trullock

Hi @trullock, thanks for reporting this. I'm just now catching up on old issues across my GitHub repos tonight.

Yes, I think your analysis is correct. What's needed here is a timeout period to give the rocket time to deploy the drogue and slow down before firing the main too. That would need to be carefully timed, however, since if it's too long and the rocket remains in free fall the main may rip right off. I don't remember if the free fall apogee detection ever actually got tested since obviously that's not a scenario you want to find yourself in. It looks like I have a test case written for the case where it stays in free fall, but not the case for free fall then being slowed by the drogue. Adding a test case for that would be good and I assume reveal the issue you described above.

I'll leave this open for if I ever come back to this project. I left the rocketry world years ago after losing a quite expensive rocket that was controlled by this project. Despite multiple days of wandering around a farm I never found it which was extremely disappointing because I really wanted the logs to see what went wrong. It killed much of my interest in the hobby unfortunately. Nevertheless, I'd still like to get back to it some day.

shanet avatar May 25 '23 06:05 shanet

Hopefully not because the main deployed too early 😂

trullock avatar May 25 '23 10:05 trullock