@@ -677,7 +677,7 @@ def __simulate(self, verbose):
677677 )
678678
679679 # Initialize phase time nodes
680- self .__setup_phase_time_nodes (phase , phase_index )
680+ self .__setup_phase_time_nodes (phase )
681681
682682 # Iterate through time nodes
683683 for node_index , node in self .time_iterator (phase .time_nodes ):
@@ -811,15 +811,13 @@ def __simulate(self, verbose):
811811 if verbose :
812812 print (f"\n >>> Simulation Completed at Time: { self .t :3.4f} s" )
813813
814- def __setup_phase_time_nodes (self , phase , phase_index ):
814+ def __setup_phase_time_nodes (self , phase ):
815815 """Set up time nodes for the current phase.
816816
817817 Parameters
818818 ----------
819819 phase : FlightPhase
820820 The current flight phase.
821- phase_index : int
822- The index of the current phase.
823821 """
824822 phase .time_nodes = self .TimeNodes ()
825823
@@ -941,8 +939,11 @@ def __check_and_handle_parachute_triggers(
941939 ):
942940 continue # Check next parachute
943941
944- # Remove parachute from flight parachutes
945- self .parachutes .remove (parachute )
942+ # Remove parachute from flight parachutes (if not already removed)
943+ if parachute in self .parachutes :
944+ self .parachutes .remove (parachute )
945+ else :
946+ continue # Parachute already triggered, skip to next
946947
947948 # Create phase for time after detection and before inflation
948949 # Must only be created if parachute has any lag
@@ -1581,7 +1582,6 @@ def __init_controllers(self):
15811582 """Initialize controllers and sensors"""
15821583 self ._controllers = self .rocket ._controllers [:]
15831584 self .sensors = self .rocket .sensors .get_components ()
1584- # Note: time_overshoot now supports both controllers and sensors
15851585
15861586 # reset controllable object to initial state (only airbrakes for now)
15871587 for air_brakes in self .rocket .air_brakes :
0 commit comments