The full code can be found here: Full Code Base
A compare for all modifications can be found here: Compare of Changed Files
I need to correct a misstatement in an earlier post. Additional files have been changed.
When making changes to the code base or operating procedures, the build-up testing includes “self-throw” which includes launching from the ground and flying to altitude before disarming, moving into Throw mode, and rearming to confirm the unit would recover. Only after it passes that test is a unit moved into airborne arming and releasing. Rarely, but occasionally, during the “self-throw” testing a unit will not arm as expected. Changes were made to additional files so that the unit would still report any failure to arm but then force it to arm anyway. In the BIN file referenced earlier in this thread there was one of the rare events where there was an arming problem, but the modified code forced arming anyway.
By necessity, this self-throw testing requires the unit to disarm, change the mode to Throw (done via script), and rearm while dropping from the sky. The changes mentioned above were considered helpful because the unit would either crash because it never armed, or we could force arming and hope for the best. Most times there is no problem arming and the unit flies well.
More recently, for units that are carried into the air by another aircraft before they are powered on and released, the process was changed to place them in Throw mode and arm them before they are released rather than waiting until they are released before switching into Throw mode and arming.
It is quite possible that the changes made to force arming during a self-drop are the root cause of this problem when performing an air-drop.
In addition, to the attitude difficulties with the previously posted file, another file has been posted that exhibits an altitude problem when operating in Altitude Hold mode after Throw. While waiting to acquire solid GPS the unit started ascending rapidly. Plotting CTUN:Alt seems to indicate that the unit thought it was descending at a very excessive rate, even before it was released, and was ascending in an attempt to maintain altitude. In this file there appears to have been no issue with arming. There are also instances where a unit will descend as fast as possible, thinking it is climbing, and others where a unit alternates between ascending and descending as fast as it can, alternating every 10-15 seconds until GPS is acquired.
Not sure if the two problems – altitude and attitude – are related, but both are quite sporadic and exciting when they happen.
The file exhibiting the altitude problem can be found here:
Altitude Hold Problem BIN File