@@ -665,7 +665,7 @@ def __simulate(self, verbose):
665665 )
666666
667667 # Initialize phase time nodes
668- self .__setup_phase_time_nodes (phase , phase_index )
668+ self .__setup_phase_time_nodes (phase )
669669
670670 # Iterate through time nodes
671671 for node_index , node in self .time_iterator (phase .time_nodes ):
@@ -799,15 +799,13 @@ def __simulate(self, verbose):
799799 if verbose :
800800 print (f"\n >>> Simulation Completed at Time: { self .t :3.4f} s" )
801801
802- def __setup_phase_time_nodes (self , phase , phase_index ):
802+ def __setup_phase_time_nodes (self , phase ):
803803 """Set up time nodes for the current phase.
804804
805805 Parameters
806806 ----------
807807 phase : FlightPhase
808808 The current flight phase.
809- phase_index : int
810- The index of the current phase.
811809 """
812810 phase .time_nodes = self .TimeNodes ()
813811
@@ -929,8 +927,11 @@ def __check_and_handle_parachute_triggers(
929927 ):
930928 continue # Check next parachute
931929
932- # Remove parachute from flight parachutes
933- self .parachutes .remove (parachute )
930+ # Remove parachute from flight parachutes (if not already removed)
931+ if parachute in self .parachutes :
932+ self .parachutes .remove (parachute )
933+ else :
934+ continue # Parachute already triggered, skip to next
934935
935936 # Create phase for time after detection and before inflation
936937 # Must only be created if parachute has any lag
@@ -1569,7 +1570,6 @@ def __init_controllers(self):
15691570 """Initialize controllers and sensors"""
15701571 self ._controllers = self .rocket ._controllers [:]
15711572 self .sensors = self .rocket .sensors .get_components ()
1572- # Note: time_overshoot now supports both controllers and sensors
15731573
15741574 # reset controllable object to initial state (only airbrakes for now)
15751575 for air_brakes in self .rocket .air_brakes :
0 commit comments