From f9c9e639c07b5c797b192161c5206c00523f249a Mon Sep 17 00:00:00 2001
From: AndiGob <andreas.gobbbin@hotmail.de>
Date: Tue, 1 Apr 2025 13:44:06 +0200
Subject: [PATCH 1/3] landing_gear_design: - fix minimum percentage of nose
 gear load error for different aircraft configurations

---
 .../landing_gear_design_conf.xml              |  26 +-
 .../general/methodplot.py                     |  39 +-
 .../generatelandinggearplots.py               | 430 +++++++++---------
 .../kerosene/methodkerosene.py                |  23 +-
 .../liquid_hydrogen/methodliquidhydrogen.py   |  25 +-
 .../usermethoddatapreparation.py              |  10 +
 6 files changed, 318 insertions(+), 235 deletions(-)

diff --git a/landing_gear_design/landing_gear_design_conf.xml b/landing_gear_design/landing_gear_design_conf.xml
index aee8566e..6b4d725a 100644
--- a/landing_gear_design/landing_gear_design_conf.xml
+++ b/landing_gear_design/landing_gear_design_conf.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" ?>
+<?xml version="1.0" encoding="utf-8" ?>
 	<module_configuration_file Name="Landing Gear Design Runtime Configuration"> <!-- Change naming according to module name -->
         <control_settings description="General control settings for this tool">
 			<aircraft_exchange_file_name description="Specify the name of the exchange file">
@@ -124,7 +124,7 @@
 								<default>0.7</default>
 							</landing_gear_bay_keel_beam_width>
 							<landing_gear_mass_correction_factor>
-								<value>1</value>
+								<value>1.0</value>
 								<unit>1</unit>
 								<lower_boundary>0.5</lower_boundary>
 								<upper_boundary>1.5</upper_boundary>
@@ -216,6 +216,28 @@
 										<default>5.2</default>
 									</specific_nose_gear_starting_x_position>
 								</use_specific_nose_gear_starting_x_position>
+								<use_specific_minimum_percentage_of_nose_gear_load description="Switch to select using a specific starting position in x-direction for the nose gear strut(s). ('true': use, 'false': dont use">
+									<value>false</value>
+									<default>false</default>
+									<specific_minimum_percentage_of_nose_gear_load description="Set specific starting position in x-direction for the nose gear strut(s).">
+										<value>2.5</value>
+										<unit>percent</unit>
+										<lower_boundary>2.5</lower_boundary>
+										<upper_boundary>7.5</upper_boundary>
+										<default>6.0</default>
+									</specific_minimum_percentage_of_nose_gear_load>
+								</use_specific_minimum_percentage_of_nose_gear_load>
+								<use_specific_maximum_percentage_of_nose_gear_load description="Switch to select using a specific starting position in x-direction for the nose gear strut(s). ('true': use, 'false': dont use">
+									<value>false</value>
+									<default>false</default>
+									<specific_maximum_percentage_of_nose_gear_load description="Set specific starting position in x-direction for the nose gear strut(s).">
+										<value>25.0</value>
+										<unit>percent</unit>
+										<lower_boundary>15.0</lower_boundary>
+										<upper_boundary>25.0</upper_boundary>
+										<default>20.0</default>
+									</specific_maximum_percentage_of_nose_gear_load>
+								</use_specific_maximum_percentage_of_nose_gear_load>
 							</nose_gear_parameter>
 							<main_gear_parameter description="Parameter settings for the main landing gear design.">
 								<minimum_number_of_main_gear_tires_per_strut description="Set the number of minimum allowed tires per one main landing gear strut.">
diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/methodplot.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/methodplot.py
index 30c41d12..2dba3608 100644
--- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/methodplot.py
+++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/methodplot.py
@@ -40,23 +40,28 @@ def method_plot(paths_and_names, routing_dict, data_dict, method_specific_output
     :param logging.Logger runtime_output: Logging object used for capturing log messages in the module
     :return: None
     """
-    # Check path to directory for figure outputs
-    project_directory = paths_and_names["project_directory"]
-    plot_directory = project_directory + '/reporting/plots'
-    if not os.path.isdir(plot_directory):
-        os.makedirs(plot_directory)
-
-    ''' visualisation of results '''
-    # generate acn plot
-    # call function to create the plots of acn methode
-    # create_acn_plot(paths_and_names, data_dict['acn_estimation']['gross_mass_list'],
-    #                 data_dict['acn_estimation']['aircraft_classification_number_output_list'],
-    #                 data_dict['acn_estimation']['InputAlpha'], plot_directory)
-
-    # call function to create the top and side view plots of landing gear design
-    create_landing_gear_plots(paths_and_names, data_dict, plot_directory, runtime_output)
-
-    runtime_output.print('Plots for landing gear design are successfully generated and saved.')
+    # Check if plot data is available otherwise skip plotting
+    if not data_dict['dict_landing_gear_output'] == {}:
+        # Check path to directory for figure outputs
+        project_directory = paths_and_names["project_directory"]
+        plot_directory = project_directory + '/reporting/plots'
+        if not os.path.isdir(plot_directory):
+            os.makedirs(plot_directory)
+
+        ''' visualisation of results '''
+        # generate acn plot
+        # call function to create the plots of acn methode
+        # create_acn_plot(paths_and_names, data_dict['acn_estimation']['gross_mass_list'],
+        #                 data_dict['acn_estimation']['aircraft_classification_number_output_list'],
+        #                 data_dict['acn_estimation']['InputAlpha'], plot_directory)
+
+        # call function to create the top and side view plots of landing gear design
+        create_landing_gear_plots(paths_and_names, data_dict, plot_directory, runtime_output)
+
+        runtime_output.print('Plots for landing gear design are successfully generated and saved.')
+    else:
+        runtime_output.print('Plots for landing gear design are not generated.')
+        
     return
 
 
diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/plot_functions/generatelandinggearplots.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/plot_functions/generatelandinggearplots.py
index a4832d23..4a9db916 100644
--- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/plot_functions/generatelandinggearplots.py
+++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/plot_functions/generatelandinggearplots.py
@@ -31,246 +31,254 @@ def generate_landing_gear_plots(dict_ac_exchange, landing_gear_description, runt
     :param logging.Logger runtime_output: Logging object used for capturing log messages in the module
     :return: dict dict_landing_gear_output: Dictionary contains all outputs for plot generation of landing gear design
     """
-    ''' initialize local parameter '''
-    dict_landing_gear_output = {}
-    convert_inch_to_meter = 0.0254
+    if not dict_ac_exchange['configuration_type'] == 'blended_wing_body':
+        
+        ''' initialize local parameter '''
+        dict_landing_gear_output = {}
+        convert_inch_to_meter = 0.0254
 
-    ''' generate global reference point '''
-    dict_landing_gear_output['global_reference_point'] = {'x': 0.0, 'y': 0.0, 'z': 0.0},
+        ''' generate global reference point '''
+        dict_landing_gear_output['global_reference_point'] = {'x': 0.0, 'y': 0.0, 'z': 0.0},
 
-    ''' generate output data for front view of landing gear design '''
-    max_fuselage_section_upper_height = round(max(dict_ac_exchange['fuselage_section_upper_height'].values()), 4)
-    max_fuselage_section_lower_height = -round(max(dict_ac_exchange['fuselage_section_lower_height'].values()), 4)
-    semi_fuselage_section_width = round(max(dict_ac_exchange['fuselage_section_width'].values())/2, 4)
+        ''' generate output data for front view of landing gear design '''
+        max_fuselage_section_upper_height = round(max(dict_ac_exchange['fuselage_section_upper_height'].values()), 4)
+        max_fuselage_section_lower_height = -round(max(dict_ac_exchange['fuselage_section_lower_height'].values()), 4)
+        semi_fuselage_section_width = round(max(dict_ac_exchange['fuselage_section_width'].values())/2, 4)
 
-    # Compute the value of y for the upper and lower boundaries of the hyperellipse
-    dict_landing_gear_output['width_cross_section_points'] = np.linspace(-semi_fuselage_section_width,
-                                                                         semi_fuselage_section_width,
-                                                                         500)
-    dict_landing_gear_output['upper_cross_section_points'] = \
-        (max_fuselage_section_upper_height * np.sqrt(1 - (pow(dict_landing_gear_output['width_cross_section_points'], 2)
-                                                          / pow(semi_fuselage_section_width, 2))))
-    dict_landing_gear_output['lower_cross_section_points'] = \
-        (max_fuselage_section_lower_height * np.sqrt(1 - (pow(dict_landing_gear_output['width_cross_section_points'], 2)
-                                                          / pow(semi_fuselage_section_width, 2))))
+        # Compute the value of y for the upper and lower boundaries of the hyperellipse
+        dict_landing_gear_output['width_cross_section_points'] = np.linspace(-semi_fuselage_section_width,
+                                                                            semi_fuselage_section_width,
+                                                                            500)
+        dict_landing_gear_output['upper_cross_section_points'] = \
+            (max_fuselage_section_upper_height * np.sqrt(1 - (pow(dict_landing_gear_output['width_cross_section_points'], 2)
+                                                            / pow(semi_fuselage_section_width, 2))))
+        dict_landing_gear_output['lower_cross_section_points'] = \
+            (max_fuselage_section_lower_height * np.sqrt(1 - (pow(dict_landing_gear_output['width_cross_section_points'], 2)
+                                                            / pow(semi_fuselage_section_width, 2))))
 
-    # Generate a list of lists of all tires are visible in the front view.
-    tire_plot_list = []
-    strut_positions = []
+        # Generate a list of lists of all tires are visible in the front view.
+        tire_plot_list = []
+        strut_positions = []
 
-    # Add nose gear tires to tire plot list.
-    if landing_gear_description['nose_gear_description']['nose_gear_arrangement']['number_of_nose_gear_struts'] == 1:
+        # Add nose gear tires to tire plot list.
+        if landing_gear_description['nose_gear_description']['nose_gear_arrangement']['number_of_nose_gear_struts'] == 1:
+            max_section_width = float(next((value['max_section_width_in_inch'] for value in
+                                            landing_gear_description['nose_gear_description'][
+                                                'nose_gear_tires'].values()
+                                            if 'max_section_width_in_inch' in value), None))
+            max_tire_diameter = float(next((value['max_outside_diameter_in_inch'] for value in
+                                            landing_gear_description['nose_gear_description'][
+                                                'nose_gear_tires'].values()
+                                            if 'max_outside_diameter_in_inch' in value), None))
+            i = 0
+            while i < landing_gear_description['nose_gear_description']['nose_gear_arrangement']['number_of_nose_gear_tires_per_strut']:  # noPep8 e501
+                tire_plot_list.append(
+                    [round(landing_gear_description['landing_gear_positions']['nose_gear_strut_y_position']
+                        + landing_gear_description['landing_gear_cog']['nose_gear_cog'][
+                            'tire_positions_per_strut']['y'][i]
+                        - (max_section_width / 2 * convert_inch_to_meter), 4),
+                    round(landing_gear_description['landing_gear_positions']['nose_gear_z_position']
+                        + landing_gear_description['landing_gear_cog']['nose_gear_cog'][
+                            'tire_positions_per_strut']['z'][i]
+                        - (max_tire_diameter / 2 * convert_inch_to_meter), 4),
+                    max_section_width * convert_inch_to_meter,
+                    max_tire_diameter * convert_inch_to_meter])
+                i += 1
+            strut_positions.append([landing_gear_description['landing_gear_positions']['nose_gear_strut_y_position'],
+                                    landing_gear_description['landing_gear_positions']['nose_gear_z_position']])
+            strut_positions.append([landing_gear_description['landing_gear_positions']['nose_gear_strut_y_position'],
+                                    landing_gear_description['landing_gear_positions']['nose_gear_z_position']
+                                    - landing_gear_description['nose_gear_description']['nose_gear_arrangement'][
+                                        'nose_gear_strut_length']])
+
+        # Add main gear tires to tire plot list.
         max_section_width = float(next((value['max_section_width_in_inch'] for value in
-                                        landing_gear_description['nose_gear_description'][
-                                            'nose_gear_tires'].values()
+                                        landing_gear_description['main_gear_description'][
+                                            'main_gear_tires'].values()
                                         if 'max_section_width_in_inch' in value), None))
         max_tire_diameter = float(next((value['max_outside_diameter_in_inch'] for value in
-                                        landing_gear_description['nose_gear_description'][
-                                            'nose_gear_tires'].values()
+                                        landing_gear_description['main_gear_description'][
+                                            'main_gear_tires'].values()
                                         if 'max_outside_diameter_in_inch' in value), None))
         i = 0
-        while i < landing_gear_description['nose_gear_description']['nose_gear_arrangement']['number_of_nose_gear_tires_per_strut']:  # noPep8 e501
-            tire_plot_list.append(
-                [round(landing_gear_description['landing_gear_positions']['nose_gear_strut_y_position']
-                       + landing_gear_description['landing_gear_cog']['nose_gear_cog'][
-                           'tire_positions_per_strut']['y'][i]
-                       - (max_section_width / 2 * convert_inch_to_meter), 4),
-                 round(landing_gear_description['landing_gear_positions']['nose_gear_z_position']
-                       + landing_gear_description['landing_gear_cog']['nose_gear_cog'][
-                           'tire_positions_per_strut']['z'][i]
-                       - (max_tire_diameter / 2 * convert_inch_to_meter), 4),
-                 max_section_width * convert_inch_to_meter,
-                 max_tire_diameter * convert_inch_to_meter])
-            i += 1
-        strut_positions.append([landing_gear_description['landing_gear_positions']['nose_gear_strut_y_position'],
-                                landing_gear_description['landing_gear_positions']['nose_gear_z_position']])
-        strut_positions.append([landing_gear_description['landing_gear_positions']['nose_gear_strut_y_position'],
-                                landing_gear_description['landing_gear_positions']['nose_gear_z_position']
-                                - landing_gear_description['nose_gear_description']['nose_gear_arrangement'][
-                                    'nose_gear_strut_length']])
-
-    # Add main gear tires to tire plot list.
-    max_section_width = float(next((value['max_section_width_in_inch'] for value in
-                                    landing_gear_description['main_gear_description'][
-                                        'main_gear_tires'].values()
-                                    if 'max_section_width_in_inch' in value), None))
-    max_tire_diameter = float(next((value['max_outside_diameter_in_inch'] for value in
-                                    landing_gear_description['main_gear_description'][
-                                        'main_gear_tires'].values()
-                                    if 'max_outside_diameter_in_inch' in value), None))
-    i = 0
-    while i < landing_gear_description['main_gear_description'][
-                'main_gear_arrangement']['number_of_main_gear_tires_per_outer_strut'] and i < 2:
-        tire_plot_list.append(
-            [round(landing_gear_description['landing_gear_positions']['main_gear_outer_strut_y_position']
-                   + landing_gear_description['landing_gear_cog']['main_gear_cog'][
-                       'tire_positions_per_outer_strut']['y'][i]
-                   - (max_section_width / 2 * convert_inch_to_meter), 4),
-             round(landing_gear_description['landing_gear_positions']['main_gear_z_position_outer_strut']
-                   + landing_gear_description['landing_gear_cog']['main_gear_cog'][
-                       'tire_positions_per_outer_strut']['z'][i]
-                   - (max_tire_diameter / 2 * convert_inch_to_meter), 4),
-             max_section_width * convert_inch_to_meter,
-             max_tire_diameter * convert_inch_to_meter])
-        i += 1
-    strut_positions.append([landing_gear_description['landing_gear_positions']['main_gear_outer_strut_y_position'],
-                            landing_gear_description['landing_gear_positions']['main_gear_z_position_outer_strut']])
-    strut_positions.append([landing_gear_description['landing_gear_positions']['main_gear_outer_strut_y_position'],
-                            landing_gear_description['landing_gear_positions']['main_gear_z_position_outer_strut']
-                            - landing_gear_description['main_gear_description']['main_gear_arrangement'][
-                                'main_gear_outer_strut_length']])
-    strut_positions.append([-landing_gear_description['landing_gear_positions']['main_gear_outer_strut_y_position'],
-                            landing_gear_description['landing_gear_positions']['main_gear_z_position_outer_strut']])
-    strut_positions.append([-landing_gear_description['landing_gear_positions']['main_gear_outer_strut_y_position'],
-                            landing_gear_description['landing_gear_positions']['main_gear_z_position_outer_strut']
-                            - landing_gear_description['main_gear_description']['main_gear_arrangement'][
-                                'main_gear_outer_strut_length']])
-
-    tire_plot_list.append([-tire_plot_list[-1][0] - tire_plot_list[-1][2],
-                           tire_plot_list[-1][1],
-                           tire_plot_list[-1][2],
-                           tire_plot_list[-1][3]
-                           ])
-    if landing_gear_description['main_gear_description']['main_gear_arrangement'][
-            'number_of_main_gear_tires_per_outer_strut'] > 1:
-        tire_plot_list.append([-tire_plot_list[-3][0] - tire_plot_list[-3][2],
-                               tire_plot_list[-3][1],
-                               tire_plot_list[-3][2],
-                               tire_plot_list[-3][3]
-                               ])
-
-    if 'number_of_main_gear_inner_struts' in landing_gear_description['main_gear_description']['main_gear_arrangement']:
-        i = 0
         while i < landing_gear_description['main_gear_description'][
-                'main_gear_arrangement']['number_of_main_gear_tires_per_inner_strut'] and i < 2:
+                    'main_gear_arrangement']['number_of_main_gear_tires_per_outer_strut'] and i < 2:
             tire_plot_list.append(
-                [round(landing_gear_description['landing_gear_positions']['main_gear_inner_strut_y_position']
-                       + landing_gear_description['landing_gear_cog']['main_gear_cog'][
-                           'tire_positions_per_inner_strut']['y'][i]
-                       - (max_section_width / 2 * convert_inch_to_meter), 4),
-                 round(landing_gear_description['landing_gear_positions']['main_gear_z_position_inner_strut']
-                       + landing_gear_description['landing_gear_cog']['main_gear_cog'][
-                           'tire_positions_per_inner_strut']['z'][i]
-                       - (max_tire_diameter / 2 * convert_inch_to_meter), 4),
-                 max_section_width * convert_inch_to_meter,
-                 max_tire_diameter * convert_inch_to_meter])
+                [round(landing_gear_description['landing_gear_positions']['main_gear_outer_strut_y_position']
+                    + landing_gear_description['landing_gear_cog']['main_gear_cog'][
+                        'tire_positions_per_outer_strut']['y'][i]
+                    - (max_section_width / 2 * convert_inch_to_meter), 4),
+                round(landing_gear_description['landing_gear_positions']['main_gear_z_position_outer_strut']
+                    + landing_gear_description['landing_gear_cog']['main_gear_cog'][
+                        'tire_positions_per_outer_strut']['z'][i]
+                    - (max_tire_diameter / 2 * convert_inch_to_meter), 4),
+                max_section_width * convert_inch_to_meter,
+                max_tire_diameter * convert_inch_to_meter])
             i += 1
-        strut_positions.append([landing_gear_description['landing_gear_positions']['main_gear_inner_strut_y_position'],
-                                landing_gear_description['landing_gear_positions']['main_gear_z_position_inner_strut']])
-        strut_positions.append([landing_gear_description['landing_gear_positions']['main_gear_inner_strut_y_position'],
-                                landing_gear_description['landing_gear_positions']['main_gear_z_position_inner_strut']
+        strut_positions.append([landing_gear_description['landing_gear_positions']['main_gear_outer_strut_y_position'],
+                                landing_gear_description['landing_gear_positions']['main_gear_z_position_outer_strut']])
+        strut_positions.append([landing_gear_description['landing_gear_positions']['main_gear_outer_strut_y_position'],
+                                landing_gear_description['landing_gear_positions']['main_gear_z_position_outer_strut']
+                                - landing_gear_description['main_gear_description']['main_gear_arrangement'][
+                                    'main_gear_outer_strut_length']])
+        strut_positions.append([-landing_gear_description['landing_gear_positions']['main_gear_outer_strut_y_position'],
+                                landing_gear_description['landing_gear_positions']['main_gear_z_position_outer_strut']])
+        strut_positions.append([-landing_gear_description['landing_gear_positions']['main_gear_outer_strut_y_position'],
+                                landing_gear_description['landing_gear_positions']['main_gear_z_position_outer_strut']
                                 - landing_gear_description['main_gear_description']['main_gear_arrangement'][
-                                    'main_gear_inner_strut_length']])
+                                    'main_gear_outer_strut_length']])
 
+        tire_plot_list.append([-tire_plot_list[-1][0] - tire_plot_list[-1][2],
+                            tire_plot_list[-1][1],
+                            tire_plot_list[-1][2],
+                            tire_plot_list[-1][3]
+                            ])
         if landing_gear_description['main_gear_description']['main_gear_arrangement'][
-                'number_of_main_gear_inner_struts'] > 1:
-            tire_plot_list.append([-tire_plot_list[-1][0] - tire_plot_list[-1][2],
-                                   tire_plot_list[-1][1],
-                                   tire_plot_list[-1][2],
-                                   tire_plot_list[-1][3]
-                                   ])
-            strut_positions.append(
-                [-landing_gear_description['landing_gear_positions']['main_gear_inner_strut_y_position'],
-                 landing_gear_description['landing_gear_positions']['main_gear_z_position_inner_strut']])
-            strut_positions.append(
-                [-landing_gear_description['landing_gear_positions']['main_gear_inner_strut_y_position'],
-                 landing_gear_description['landing_gear_positions']['main_gear_z_position_inner_strut']
-                 - landing_gear_description['main_gear_description']['main_gear_arrangement'][
-                     'main_gear_inner_strut_length']])
+                'number_of_main_gear_tires_per_outer_strut'] > 1:
+            tire_plot_list.append([-tire_plot_list[-3][0] - tire_plot_list[-3][2],
+                                tire_plot_list[-3][1],
+                                tire_plot_list[-3][2],
+                                tire_plot_list[-3][3]
+                                ])
+
+        if 'number_of_main_gear_inner_struts' in landing_gear_description['main_gear_description']['main_gear_arrangement']:
+            i = 0
+            while i < landing_gear_description['main_gear_description'][
+                    'main_gear_arrangement']['number_of_main_gear_tires_per_inner_strut'] and i < 2:
+                tire_plot_list.append(
+                    [round(landing_gear_description['landing_gear_positions']['main_gear_inner_strut_y_position']
+                        + landing_gear_description['landing_gear_cog']['main_gear_cog'][
+                            'tire_positions_per_inner_strut']['y'][i]
+                        - (max_section_width / 2 * convert_inch_to_meter), 4),
+                    round(landing_gear_description['landing_gear_positions']['main_gear_z_position_inner_strut']
+                        + landing_gear_description['landing_gear_cog']['main_gear_cog'][
+                            'tire_positions_per_inner_strut']['z'][i]
+                        - (max_tire_diameter / 2 * convert_inch_to_meter), 4),
+                    max_section_width * convert_inch_to_meter,
+                    max_tire_diameter * convert_inch_to_meter])
+                i += 1
+            strut_positions.append([landing_gear_description['landing_gear_positions']['main_gear_inner_strut_y_position'],
+                                    landing_gear_description['landing_gear_positions']['main_gear_z_position_inner_strut']])
+            strut_positions.append([landing_gear_description['landing_gear_positions']['main_gear_inner_strut_y_position'],
+                                    landing_gear_description['landing_gear_positions']['main_gear_z_position_inner_strut']
+                                    - landing_gear_description['main_gear_description']['main_gear_arrangement'][
+                                        'main_gear_inner_strut_length']])
 
             if landing_gear_description['main_gear_description']['main_gear_arrangement'][
-                    'number_of_main_gear_tires_per_inner_strut'] > 1:
-                tire_plot_list.append([-tire_plot_list[-3][0] - tire_plot_list[-3][2],
-                                       tire_plot_list[-3][1],
-                                       tire_plot_list[-3][2],
-                                       tire_plot_list[-3][3]
-                                       ])
+                    'number_of_main_gear_inner_struts'] > 1:
+                tire_plot_list.append([-tire_plot_list[-1][0] - tire_plot_list[-1][2],
+                                    tire_plot_list[-1][1],
+                                    tire_plot_list[-1][2],
+                                    tire_plot_list[-1][3]
+                                    ])
+                strut_positions.append(
+                    [-landing_gear_description['landing_gear_positions']['main_gear_inner_strut_y_position'],
+                    landing_gear_description['landing_gear_positions']['main_gear_z_position_inner_strut']])
+                strut_positions.append(
+                    [-landing_gear_description['landing_gear_positions']['main_gear_inner_strut_y_position'],
+                    landing_gear_description['landing_gear_positions']['main_gear_z_position_inner_strut']
+                    - landing_gear_description['main_gear_description']['main_gear_arrangement'][
+                        'main_gear_inner_strut_length']])
 
-    dict_landing_gear_output['tire_plot_list'] = tire_plot_list
-    dict_landing_gear_output['strut_positions'] = strut_positions
+                if landing_gear_description['main_gear_description']['main_gear_arrangement'][
+                        'number_of_main_gear_tires_per_inner_strut'] > 1:
+                    tire_plot_list.append([-tire_plot_list[-3][0] - tire_plot_list[-3][2],
+                                        tire_plot_list[-3][1],
+                                        tire_plot_list[-3][2],
+                                        tire_plot_list[-3][3]
+                                        ])
 
-    dict_landing_gear_output['landing_gear_track'] = \
-        [(landing_gear_description['landing_gear_positions']['main_gear_outer_strut_y_position'],
-          landing_gear_description['landing_gear_positions']['main_gear_z_position_outer_strut']
-          - landing_gear_description['main_gear_description']['main_gear_arrangement']['main_gear_outer_strut_length']
-          - 2/3 * (max_tire_diameter * convert_inch_to_meter)
-          ),
-         (-landing_gear_description['landing_gear_positions']['main_gear_outer_strut_y_position'],
-          landing_gear_description['landing_gear_positions']['main_gear_z_position_outer_strut']
-          - landing_gear_description['main_gear_description']['main_gear_arrangement']['main_gear_outer_strut_length']
-          - 2/3 * (max_tire_diameter * convert_inch_to_meter)
-          ),
-         round(abs(2 * landing_gear_description['landing_gear_positions']['main_gear_outer_strut_y_position']), 2)
-         ]
+        dict_landing_gear_output['tire_plot_list'] = tire_plot_list
+        dict_landing_gear_output['strut_positions'] = strut_positions
 
-    # Check if wing data are available -> if true: -> prepare plotting.
-    _, wing_section_y_position_value = \
-        next(iter(dict_ac_exchange['wing_chord_length_on_section'].items()), (None, None))
-    if wing_section_y_position_value is not None:
-        section_profile_thickness = 0.115
-        wing_plot_list = []
-        y_pos_list = list(dict_ac_exchange['wing_section_position_in_y'].values())
-        z_pos_list = list(dict_ac_exchange['wing_section_position_in_z'].values())
-        chord_length = list(dict_ac_exchange['wing_chord_length_on_section'].values())
-        i = 0
-        while i < len(dict_ac_exchange['wing_chord_length_on_section']):
-            section_height = round(chord_length[i] * section_profile_thickness, 4)
-            y = round(y_pos_list[i] + dict_ac_exchange['wing_reference_point_global_in_y'], 4)
-            z1 = round(z_pos_list[i] + 1/2 * section_height, 4)
-            z2 = round(z_pos_list[i] - 1/2 * section_height, 4)
-            wing_plot_list.append([y, z1, z2])
-            if dict_ac_exchange['wing_symmetry']:
-                wing_plot_list.append([-y, z1, z2])
-            i += 1
+        dict_landing_gear_output['landing_gear_track'] = \
+            [(landing_gear_description['landing_gear_positions']['main_gear_outer_strut_y_position'],
+            landing_gear_description['landing_gear_positions']['main_gear_z_position_outer_strut']
+            - landing_gear_description['main_gear_description']['main_gear_arrangement']['main_gear_outer_strut_length']
+            - 2/3 * (max_tire_diameter * convert_inch_to_meter)
+            ),
+            (-landing_gear_description['landing_gear_positions']['main_gear_outer_strut_y_position'],
+            landing_gear_description['landing_gear_positions']['main_gear_z_position_outer_strut']
+            - landing_gear_description['main_gear_description']['main_gear_arrangement']['main_gear_outer_strut_length']
+            - 2/3 * (max_tire_diameter * convert_inch_to_meter)
+            ),
+            round(abs(2 * landing_gear_description['landing_gear_positions']['main_gear_outer_strut_y_position']), 2)
+            ]
 
-        dict_landing_gear_output['wing_plot_list'] = sorted(wing_plot_list, key=lambda x: x[0])
+        # Check if wing data are available -> if true: -> prepare plotting.
+        _, wing_section_y_position_value = \
+            next(iter(dict_ac_exchange['wing_chord_length_on_section'].items()), (None, None))
+        if wing_section_y_position_value is not None:
+            section_profile_thickness = 0.115
+            wing_plot_list = []
+            y_pos_list = list(dict_ac_exchange['wing_section_position_in_y'].values())
+            z_pos_list = list(dict_ac_exchange['wing_section_position_in_z'].values())
+            chord_length = list(dict_ac_exchange['wing_chord_length_on_section'].values())
+            i = 0
+            while i < len(dict_ac_exchange['wing_chord_length_on_section']):
+                section_height = round(chord_length[i] * section_profile_thickness, 4)
+                y = round(y_pos_list[i] + dict_ac_exchange['wing_reference_point_global_in_y'], 4)
+                z1 = round(z_pos_list[i] + 1/2 * section_height, 4)
+                z2 = round(z_pos_list[i] - 1/2 * section_height, 4)
+                wing_plot_list.append([y, z1, z2])
+                if dict_ac_exchange['wing_symmetry']:
+                    wing_plot_list.append([-y, z1, z2])
+                i += 1
 
-        # Generate data for wing clearance plot
-        if 'wing_tip_clearance_angles' in landing_gear_description['landing_gear_limitations']:
-            wing_clearance_list = [
-                [round(landing_gear_description['landing_gear_positions']['main_gear_outer_strut_y_position']
-                       + abs(landing_gear_description['landing_gear_cog']['main_gear_cog'][
-                                 'tire_positions_per_outer_strut']['y'][0])
-                       + (max_section_width / 2 * convert_inch_to_meter), 4),
-                 round(landing_gear_description['landing_gear_positions']['main_gear_z_position_outer_strut']
-                       + landing_gear_description['landing_gear_cog']['main_gear_cog'][
-                           'tire_positions_per_outer_strut']['z'][0]
-                       - (max_tire_diameter / 2 * convert_inch_to_meter), 4)],
-                [y_pos_list[-1],
-                 round(landing_gear_description['landing_gear_positions']['main_gear_z_position_outer_strut']
-                       + landing_gear_description['landing_gear_cog']['main_gear_cog'][
-                           'tire_positions_per_outer_strut']['z'][0]
-                       - (max_tire_diameter / 2 * convert_inch_to_meter), 4)],
-                [round(landing_gear_description['landing_gear_limitations']['wing_tip_clearance_angles'], 2)]]
+            dict_landing_gear_output['wing_plot_list'] = sorted(wing_plot_list, key=lambda x: x[0])
 
-            dict_landing_gear_output['wing_clearance_list'] = wing_clearance_list
-        else:
-            dict_landing_gear_output['wing_clearance_list'] = None
-            
-    # Check if engine data are available -> if true: -> prepare plotting.
-    _, nacelle_y_position_value = \
-        next(iter(dict_ac_exchange['engine_y_position'].items()), (None, None))
+            # Generate data for wing clearance plot
+            if 'wing_tip_clearance_angles' in landing_gear_description['landing_gear_limitations']:
+                wing_clearance_list = [
+                    [round(landing_gear_description['landing_gear_positions']['main_gear_outer_strut_y_position']
+                        + abs(landing_gear_description['landing_gear_cog']['main_gear_cog'][
+                                    'tire_positions_per_outer_strut']['y'][0])
+                        + (max_section_width / 2 * convert_inch_to_meter), 4),
+                    round(landing_gear_description['landing_gear_positions']['main_gear_z_position_outer_strut']
+                        + landing_gear_description['landing_gear_cog']['main_gear_cog'][
+                            'tire_positions_per_outer_strut']['z'][0]
+                        - (max_tire_diameter / 2 * convert_inch_to_meter), 4)],
+                    [y_pos_list[-1],
+                    round(landing_gear_description['landing_gear_positions']['main_gear_z_position_outer_strut']
+                        + landing_gear_description['landing_gear_cog']['main_gear_cog'][
+                            'tire_positions_per_outer_strut']['z'][0]
+                        - (max_tire_diameter / 2 * convert_inch_to_meter), 4)],
+                    [round(landing_gear_description['landing_gear_limitations']['wing_tip_clearance_angles'], 2)]]
 
-    if nacelle_y_position_value is not None:
-        nacelle_plot_list = []
-        cleaned_nacelle_dict = {key: value for key, value in dict_ac_exchange['nacelle_section_height'].items()
-                                if value is not None}
-        i = 0
-        y_pos_list = list(dict_ac_exchange['engine_y_position'].values())
-        z_pos_list = list(dict_ac_exchange['engine_z_position'].values())
-        nacelle_diameter_list = max(list(cleaned_nacelle_dict.values()))
-        engine_diameter = nacelle_diameter_list - nacelle_diameter_list / 100 * 9  # 9 percent wall thickness of total nacelle diameter assumed
-        nacelle_width = round(nacelle_diameter_list - engine_diameter, 2) * 100  # nacelle wall width in cm for plotting 
-        for i in range(0, len(y_pos_list)):
-            # List contains the following entries: [y_pos, z_pos, radius, wall_thickness_in_percent]
-            nacelle_plot_list.append([y_pos_list[i], z_pos_list[i], nacelle_diameter_list/2, nacelle_width])
+                dict_landing_gear_output['wing_clearance_list'] = wing_clearance_list
+            else:
+                dict_landing_gear_output['wing_clearance_list'] = None
+                
+        # Check if engine data are available -> if true: -> prepare plotting.
+        _, nacelle_y_position_value = \
+            next(iter(dict_ac_exchange['engine_y_position'].items()), (None, None))
 
-        dict_landing_gear_output['nacelle_plot_list'] = nacelle_plot_list
+        if nacelle_y_position_value is not None:
+            nacelle_plot_list = []
+            cleaned_nacelle_dict = {key: value for key, value in dict_ac_exchange['nacelle_section_height'].items()
+                                    if value is not None}
+            i = 0
+            y_pos_list = list(dict_ac_exchange['engine_y_position'].values())
+            z_pos_list = list(dict_ac_exchange['engine_z_position'].values())
+            nacelle_diameter_list = max(list(cleaned_nacelle_dict.values()))
+            engine_diameter = nacelle_diameter_list - nacelle_diameter_list / 100 * 9  # 9 percent wall thickness of total nacelle diameter assumed
+            nacelle_width = round(nacelle_diameter_list - engine_diameter, 2) * 100  # nacelle wall width in cm for plotting 
+            for i in range(0, len(y_pos_list)):
+                # List contains the following entries: [y_pos, z_pos, radius, wall_thickness_in_percent]
+                nacelle_plot_list.append([y_pos_list[i], z_pos_list[i], nacelle_diameter_list/2, nacelle_width])
 
-    ''' generate output data for side view of landing gear design '''
+            dict_landing_gear_output['nacelle_plot_list'] = nacelle_plot_list
 
-    ''' generate output data for top view of landing gear design '''
+        ''' generate output data for side view of landing gear design '''
 
+        ''' generate output data for top view of landing gear design '''
+    
+    # Else condition: -> current aircraft configuration is a blended wing body -> plotting currently not implemented
+    else:
+        dict_landing_gear_output = {}
+        runtime_output.warning('Attention! The current aircraft configuration is a blended wing body. \n'
+                               '                                    Plotting for this configuration is currently not implemented!')
+        
     # debug print
     runtime_output.debug('generate_landing_gear_plots successfully executed!')
 
diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/kerosene/methodkerosene.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/kerosene/methodkerosene.py
index 5cf30390..eb21ba2d 100644
--- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/kerosene/methodkerosene.py
+++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/kerosene/methodkerosene.py
@@ -59,8 +59,27 @@ def method_kerosene(paths_and_names, routing_dict, dict_ac_exchange, dict_mod_co
     dict_ac_exchange['lift_coefficient_lift_off'] = 2.1  # dimensionless
     dict_ac_exchange['lift_curve_slope_take_off'] = 4.5  # 1/radians
     dict_ac_exchange['maximum_take_off_stall_speed'] = 75  # m/s
-    dict_mod_config['minimum_percentage_nose_gear_load'] = 6.0
-    dict_mod_config['maximum_percentage_nose_gear_load'] = 20.0
+    
+    # Set minimum and maximum percentage of nose gear load depending on the aircraft configuration
+    if any(value == 'wing' for value in dict_ac_exchange['propulsor_mounting_position'].values()):
+        if dict_ac_exchange['fuselage_type'] == 'single_aisle' and dict_ac_exchange['configuration_type'] == 'tube_and_wing':
+            dict_mod_config['minimum_percentage_nose_gear_load'] = 6.0
+            dict_mod_config['maximum_percentage_nose_gear_load'] = 20.0
+            
+        elif dict_ac_exchange['fuselage_type'] == 'wide_body' or dict_ac_exchange['configuration_type'] == 'blended_wing_body':
+            dict_mod_config['minimum_percentage_nose_gear_load'] = 4.0
+            dict_mod_config['maximum_percentage_nose_gear_load'] = 21.5
+    else:
+        dict_mod_config['minimum_percentage_nose_gear_load'] = 3.5
+        dict_mod_config['maximum_percentage_nose_gear_load'] = 23.0
+    
+    # Check if a specific minimum percentage given by th module configuration file should be used
+    if dict_mod_config['use_specific_minimum_percentage_of_nose_gear_load']:
+        dict_mod_config['minimum_percentage_nose_gear_load'] = dict_mod_config['specific_minimum_percentage_of_nose_gear_load']
+        
+    # Check if a specific maximum percentage given by th module configuration file should be used
+    if dict_mod_config['use_specific_maximum_percentage_of_nose_gear_load']:
+        dict_mod_config['maximum_percentage_nose_gear_load'] = dict_mod_config['specific_maximum_percentage_of_nose_gear_load']
 
     # check which sizing mode is selected -> if no valid mode is selected -> raise an error and abort program
     if dict_mod_config['program_mode'] == 'mode_0' or dict_mod_config['program_mode'] == 'mode_1':
diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/liquid_hydrogen/methodliquidhydrogen.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/liquid_hydrogen/methodliquidhydrogen.py
index dec22be1..54c9488b 100644
--- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/liquid_hydrogen/methodliquidhydrogen.py
+++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/liquid_hydrogen/methodliquidhydrogen.py
@@ -60,15 +60,34 @@ def method_liquid_hydrogen(paths_and_names, routing_dict, dict_ac_exchange, dict
     dict_ac_exchange['lift_coefficient_lift_off'] = 2.1  # dimensionless
     dict_ac_exchange['lift_curve_slope_take_off'] = 4.5  # 1/radians
     dict_ac_exchange['maximum_take_off_stall_speed'] = 75  # m/s
-    dict_mod_config['minimum_percentage_nose_gear_load'] = 4.0
-    dict_mod_config['maximum_percentage_nose_gear_load'] = 20.0
+    
+    # Set minimum and maximum percentage of nose gear load depending on the aircraft configuration
+    if any(value == 'wing' for value in dict_ac_exchange['propulsor_mounting_position'].values()):
+        if dict_ac_exchange['fuselage_type'] == 'single_aisle' and dict_ac_exchange['configuration_type'] == 'tube_and_wing':
+            dict_mod_config['minimum_percentage_nose_gear_load'] = 4.0
+            dict_mod_config['maximum_percentage_nose_gear_load'] = 20.0
+            
+        elif dict_ac_exchange['fuselage_type'] == 'wide_body' or dict_ac_exchange['configuration_type'] == 'blended_wing_body':
+            dict_mod_config['minimum_percentage_nose_gear_load'] = 3.0
+            dict_mod_config['maximum_percentage_nose_gear_load'] = 22.0
+    else:
+        dict_mod_config['minimum_percentage_nose_gear_load'] = 2.5
+        dict_mod_config['maximum_percentage_nose_gear_load'] = 25.0
+        
+    # Check if a specific minimum percentage given by th module configuration file should be used
+    if dict_mod_config['use_specific_minimum_percentage_of_nose_gear_load']:
+        dict_mod_config['minimum_percentage_nose_gear_load'] = dict_mod_config['specific_minimum_percentage_of_nose_gear_load']
+        
+    # Check if a specific maximum percentage given by th module configuration file should be used
+    if dict_mod_config['use_specific_maximum_percentage_of_nose_gear_load']:
+        dict_mod_config['maximum_percentage_nose_gear_load'] = dict_mod_config['specific_maximum_percentage_of_nose_gear_load']
 
        # check which sizing mode is selected -> if no valid mode is selected -> raise an error and abort program
     if dict_mod_config['program_mode'] == 'mode_0' or dict_mod_config['program_mode'] == 'mode_1':
         # check if sizing mode "mode_0" is selected -> if true: -> perform landing gear design estimation
         if dict_mod_config['program_mode'] == 'mode_0':
             liquid_hydrogen_output_dict = landing_gear_design(paths_and_names, routing_dict, dict_ac_exchange,
-                                                       dict_mod_config, runtime_output)
+                                                              dict_mod_config, runtime_output)
 
         # Check if sizing mode "mode_1" is selected
         #  -> if true: -> perform retrofit landing gear design from existing geometry
diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/usermethoddatapreparation.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/usermethoddatapreparation.py
index ec5acbf8..addac59d 100644
--- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/usermethoddatapreparation.py
+++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/usermethoddatapreparation.py
@@ -54,6 +54,8 @@ def user_method_data_input_preparation(routing_dict):
             ['./analysis/masses_cg_inertia/design_mass/mass_properties/center_of_gravity/y', float],
         'center_of_gravity_in_z':
             ['./analysis/masses_cg_inertia/design_mass/mass_properties/center_of_gravity/z', float],
+        'configuration_type':
+            ['./requirements_and_specifications/design_specification/configuration/configuration_type', str],
         'fuselage_type':
             ['./requirements_and_specifications/design_specification/configuration/fuselage_definition/fuselage_type', str],  # noPep8 e501
         'fuselage_reference_point_in_x_direction':
@@ -222,6 +224,14 @@ def user_method_data_input_preparation(routing_dict):
             [tmp_specific + '/nose_gear_parameter/use_specific_nose_gear_starting_x_position', bool],
         'specific_nose_gear_starting_x_position':
             [tmp_specific + '/nose_gear_parameter/use_specific_nose_gear_starting_x_position/specific_nose_gear_starting_x_position', float],  # noPep8 e501
+        'use_specific_minimum_percentage_of_nose_gear_load':
+            [tmp_specific + '/nose_gear_parameter/use_specific_minimum_percentage_of_nose_gear_load', bool],
+        'specific_minimum_percentage_of_nose_gear_load':
+            [tmp_specific + '/nose_gear_parameter/use_specific_minimum_percentage_of_nose_gear_load/specific_minimum_percentage_of_nose_gear_load', float],  # noPep8 e501
+        'use_specific_maximum_percentage_of_nose_gear_load':
+            [tmp_specific + '/nose_gear_parameter/use_specific_maximum_percentage_of_nose_gear_load', bool],
+        'specific_maximum_percentage_of_nose_gear_load':
+            [tmp_specific + '/nose_gear_parameter/use_specific_maximum_percentage_of_nose_gear_load/specific_maximum_percentage_of_nose_gear_load', float],
         'minimum_number_of_main_gear_tires_per_strut':
             [tmp_specific + '/main_gear_parameter/minimum_number_of_main_gear_tires_per_strut', int],
         'dynamic_change_of_number_of_main_gear_struts':
-- 
GitLab


From 33cd5e75b31a258d0e53899b2b20870d52586d5a Mon Sep 17 00:00:00 2001
From: AndiGob <andreas.gobbbin@hotmail.de>
Date: Tue, 1 Apr 2025 14:47:51 +0200
Subject: [PATCH 2/3] landing_gear_design: - fix to skipp nacelle ground
 clearance check if no engine is mounted to the aircarft

---
 .../sub_function/nacellegroundclearance.py    | 58 +++++++++++--------
 1 file changed, 34 insertions(+), 24 deletions(-)

diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/sub_function/nacellegroundclearance.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/sub_function/nacellegroundclearance.py
index ea5ab4b1..04ce6563 100644
--- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/sub_function/nacellegroundclearance.py
+++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/sub_function/nacellegroundclearance.py
@@ -46,31 +46,41 @@ def nacelle_ground_clearance(dict_ac_exchange, dict_mod_config, landing_gear_des
     nacelle_section_heights = {key: value for key, value in dict_ac_exchange['nacelle_section_height'].items() if value is not None}
     nacelle_section_heights = list(nacelle_section_heights.values())
     
-    # Check if the current propulsor is mounted to the wing 
-    #  -> if true: -> prepare wing nacelle paramter for ground clearance check
-    for _, value in dict_ac_exchange['propulsor_mounting_position'].items():
-        if value == 'wing':
-            idx_start = int(engine_counter * (len(nacelle_section_widths)/len(nacelle_y_position)))
-            idx_end = int(engine_counter * (len(nacelle_section_widths)/len(nacelle_y_position)) 
-                          + (len(nacelle_section_widths)/len(nacelle_y_position)))
-            wing_nacelle_bottom_position.append(nacelle_z_position[engine_counter] 
-                                                - max(nacelle_section_heights[idx_start:idx_end])/2)
-            wing_nacelle_inboard_position.append(abs(nacelle_y_position[engine_counter])
-                                                - max(nacelle_section_widths[idx_start:idx_end])/2)
-        engine_counter += 1
+    # Check if at least one engine and nacelle are mounted to the aircraft 
+    #  -> if true: -> estimaet nacelle ground clearance
+    if len(nacelle_y_position) > 0:
+        # Check if the current propulsor is mounted to the wing 
+        #  -> if true: -> prepare wing nacelle paramter for ground clearance check
+        for _, value in dict_ac_exchange['propulsor_mounting_position'].items():
+            if value == 'wing':
+                idx_start = int(engine_counter * (len(nacelle_section_widths)/len(nacelle_y_position)))
+                idx_end = int(engine_counter * (len(nacelle_section_widths)/len(nacelle_y_position)) 
+                            + (len(nacelle_section_widths)/len(nacelle_y_position)))
+                wing_nacelle_bottom_position.append(nacelle_z_position[engine_counter] 
+                                                    - max(nacelle_section_heights[idx_start:idx_end])/2)
+                wing_nacelle_inboard_position.append(abs(nacelle_y_position[engine_counter])
+                                                    - max(nacelle_section_widths[idx_start:idx_end])/2)
+            engine_counter += 1
+        
+        # Multiply every second nacelle inboard postion by -1
+        wing_nacelle_inboard_position = [value if index % 2 == 0 else -value 
+                                    for index, value in enumerate(wing_nacelle_inboard_position)]
+        # Check if the posiotn of current nacelle under investigation is below the minimum required nacelle ground clearance.
+        for i in range(0, len(wing_nacelle_bottom_position)):
+            clearance_required = abs(wing_nacelle_bottom_position[i]) + dict_mod_config['nacelle_clearance']
+            clearance_available = landing_gear_description['lever_arms']['vertical_distance_between_ground_and_fuselage_center_line']
+            # Check if the required nachell clearance is greater than the current available clearance.
+            if (clearance_required > clearance_available):
+                nacelle_ground_clearance_flag = True
+                required_main_gear_strut_delta_length.append(clearance_required - clearance_available)
     
-    # Multiply every second nacelle inboard postion by -1
-    wing_nacelle_inboard_position = [value if index % 2 == 0 else -value 
-                                   for index, value in enumerate(wing_nacelle_inboard_position)]
-    # Check if the posiotn of current nacelle under investigation is below the minimum required nacelle ground clearance.
-    for i in range(0, len(wing_nacelle_bottom_position)):
-        clearance_required = abs(wing_nacelle_bottom_position[i]) + dict_mod_config['nacelle_clearance']
-        clearance_available = landing_gear_description['lever_arms']['vertical_distance_between_ground_and_fuselage_center_line']
-        # Check if the required nachell clearance is greater than the current available clearance.
-        if (clearance_required > clearance_available):
-            nacelle_ground_clearance_flag = True
-            required_main_gear_strut_delta_length.append(clearance_required - clearance_available)
-            
+    # Else condition: No engine is mounted to the aircraft -> print warning and skip nacelle ground clearance check
+    else:
+        nacelle_ground_clearance_flag = False
+        required_main_gear_strut_delta_length = 0
+        runtime_output.warning('Attention! There are currently no engines mounted on the aircraft. '
+                               'Ground clearance check of the nacelle skipped!')   
+
     # debug print
     runtime_output.debug('The function "nacelle_ground_clearance.py" successfully executed!')
 
-- 
GitLab


From 872fead1a021d7c05721a03a4233030ef21dbbc2 Mon Sep 17 00:00:00 2001
From: AndiGob <andreas.gobbbin@hotmail.de>
Date: Tue, 1 Apr 2025 15:20:53 +0200
Subject: [PATCH 3/3] =?UTF-8?q?landing=5Fgear=5Fdesign:=20-=20update=20des?=
 =?UTF-8?q?cription=20of=20module=20configuration=20file=20regarding=20rev?=
 =?UTF-8?q?iewer=20comments=20of=20F.=20Sch=C3=BCltke?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 landing_gear_design/landing_gear_design_conf.xml | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/landing_gear_design/landing_gear_design_conf.xml b/landing_gear_design/landing_gear_design_conf.xml
index 6b4d725a..113fe8d8 100644
--- a/landing_gear_design/landing_gear_design_conf.xml
+++ b/landing_gear_design/landing_gear_design_conf.xml
@@ -123,9 +123,9 @@
 								<upper_boundary>1.5</upper_boundary>
 								<default>0.7</default>
 							</landing_gear_bay_keel_beam_width>
-							<landing_gear_mass_correction_factor>
+							<landing_gear_mass_correction_factor description="Mass correction factor for the landing gear arrangement.">
 								<value>1.0</value>
-								<unit>1</unit>
+								<unit>1.0</unit>
 								<lower_boundary>0.5</lower_boundary>
 								<upper_boundary>1.5</upper_boundary>
 								<default>1.0</default>
@@ -216,10 +216,10 @@
 										<default>5.2</default>
 									</specific_nose_gear_starting_x_position>
 								</use_specific_nose_gear_starting_x_position>
-								<use_specific_minimum_percentage_of_nose_gear_load description="Switch to select using a specific starting position in x-direction for the nose gear strut(s). ('true': use, 'false': dont use">
+								<use_specific_minimum_percentage_of_nose_gear_load description="Switch to select using a specific minimum percentage of nose gear load. ('true': use, 'false': dont use">
 									<value>false</value>
 									<default>false</default>
-									<specific_minimum_percentage_of_nose_gear_load description="Set specific starting position in x-direction for the nose gear strut(s).">
+									<specific_minimum_percentage_of_nose_gear_load description="Set specific minimum percentage of nose gear load.">
 										<value>2.5</value>
 										<unit>percent</unit>
 										<lower_boundary>2.5</lower_boundary>
@@ -227,10 +227,10 @@
 										<default>6.0</default>
 									</specific_minimum_percentage_of_nose_gear_load>
 								</use_specific_minimum_percentage_of_nose_gear_load>
-								<use_specific_maximum_percentage_of_nose_gear_load description="Switch to select using a specific starting position in x-direction for the nose gear strut(s). ('true': use, 'false': dont use">
+								<use_specific_maximum_percentage_of_nose_gear_load description="Switch to select using a specific maximum percentage of nose gear load. ('true': use, 'false': dont use">
 									<value>false</value>
 									<default>false</default>
-									<specific_maximum_percentage_of_nose_gear_load description="Set specific starting position in x-direction for the nose gear strut(s).">
+									<specific_maximum_percentage_of_nose_gear_load description="Set specific maximum percentage of nose gear load.">
 										<value>25.0</value>
 										<unit>percent</unit>
 										<lower_boundary>15.0</lower_boundary>
-- 
GitLab