File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4020,15 +4020,15 @@ def calculate_rail_button_bending_moments(self):
40204020 )
40214021 lower_button_position = rail_buttons_tuple .position .z
40224022
4023- # Signed distances from buttons to center of dry mass
4024- D1 = upper_button_position - self .rocket .center_of_dry_mass_position (
4025- self .rocket ._csys
4026- )
4027- D2 = lower_button_position - self .rocket .center_of_dry_mass_position (
4028- self . rocket . _csys
4029- )
4030- d1 = abs (D1 )
4031- d2 = abs (D2 )
4023+ # Get center of dry mass (handle both callable and property)
4024+ if callable ( self .rocket .center_of_dry_mass_position ):
4025+ cdm = self .rocket .center_of_dry_mass_position ( self . rocket . _csys )
4026+ else :
4027+ cdm = self .rocket .center_of_dry_mass_position
4028+
4029+ # Distances from buttons to center of dry mass
4030+ d1 = abs (upper_button_position - cdm )
4031+ d2 = abs (lower_button_position - cdm )
40324032
40334033 # Rail button standoff height
40344034 h_button = rail_buttons_tuple .component .button_height
You can’t perform that action at this time.
0 commit comments