Added code to determine the stage of the balloon launch