@@ -687,7 +687,7 @@ def __simulate(self, verbose):
687687 )
688688
689689 # Initialize phase time nodes
690- self .__setup_phase_time_nodes (phase , phase_index )
690+ self .__setup_phase_time_nodes (phase )
691691
692692 # Iterate through time nodes
693693 for node_index , node in self .time_iterator (phase .time_nodes ):
@@ -821,15 +821,13 @@ def __simulate(self, verbose):
821821 if verbose :
822822 print (f"\n >>> Simulation Completed at Time: { self .t :3.4f} s" )
823823
824- def __setup_phase_time_nodes (self , phase , phase_index ):
824+ def __setup_phase_time_nodes (self , phase ):
825825 """Set up time nodes for the current phase.
826826
827827 Parameters
828828 ----------
829829 phase : FlightPhase
830830 The current flight phase.
831- phase_index : int
832- The index of the current phase.
833831 """
834832 phase .time_nodes = self .TimeNodes ()
835833
@@ -951,8 +949,11 @@ def __check_and_handle_parachute_triggers(
951949 ):
952950 continue # Check next parachute
953951
954- # Remove parachute from flight parachutes
955- self .parachutes .remove (parachute )
952+ # Remove parachute from flight parachutes (if not already removed)
953+ if parachute in self .parachutes :
954+ self .parachutes .remove (parachute )
955+ else :
956+ continue # Parachute already triggered, skip to next
956957
957958 # Create phase for time after detection and before inflation
958959 # Must only be created if parachute has any lag
@@ -1591,7 +1592,6 @@ def __init_controllers(self):
15911592 """Initialize controllers and sensors"""
15921593 self ._controllers = self .rocket ._controllers [:]
15931594 self .sensors = self .rocket .sensors .get_components ()
1594- # Note: time_overshoot now supports both controllers and sensors
15951595
15961596 # reset controllable object to initial state (only airbrakes for now)
15971597 for air_brakes in self .rocket .air_brakes :
0 commit comments