From b76c5e16ae1f734b26a0b283c7b307ced79352c4 Mon Sep 17 00:00:00 2001
From: AndiGob <andreas.gobbbin@hotmail.de>
Date: Tue, 25 Feb 2025 15:33:32 +0100
Subject: [PATCH 1/4] fuselage_design: - add seats to
 accomodation_definiton.xml

---
 .../accommodation_definitions.xml             | 437 +++++++++++++++++-
 1 file changed, 433 insertions(+), 4 deletions(-)

diff --git a/fuselage_design/fuselage_design_lib/accommodation_definitions.xml b/fuselage_design/fuselage_design_lib/accommodation_definitions.xml
index 8df4f3d5..5acdd5c8 100644
--- a/fuselage_design/fuselage_design_lib/accommodation_definitions.xml
+++ b/fuselage_design/fuselage_design_lib/accommodation_definitions.xml
@@ -121,18 +121,18 @@
 		</seat>
 		<seat id="1" description="Definition of one single passenger seat.">
 			<name description="Name of the seat type.">
-				<value>A320-200-premium_economy</value>
+				<value>B757-200-economy</value>
 			</name>
 			<depth description="Depth of the seat without backrest adjustment range.">
 				<value>19</value>
 				<unit>inch</unit>
 			</depth>
 			<width description="Width of the single seat without armrests.">
-				<value>17.3</value>
+				<value>16.5</value>
 				<unit>inch</unit>
 			</width>
 			<width_inner_armrest description="Width of inner armrest.">
-				<value>2.5</value>
+				<value>2.2</value>
 				<unit>inch</unit>
 			</width_inner_armrest>
 			<width_outer_armrest description="Width of outer armrest.">
@@ -148,7 +148,7 @@
 				<unit>inch</unit>
 			</backrest_adjustment_range>
 			<mass description="Mass of a single seats without seat belt and without life jacket.">
-				<value>5.9</value>
+				<value>8.9</value>
 				<unit>kg</unit>
 			</mass>
 		</seat>
@@ -186,6 +186,303 @@
 			</mass>
 		</seat>
 		<seat id="3" description="Definition of one single passenger seat.">
+			<name description="Name of the seat type.">
+				<value>737-800-economy</value>
+			</name>
+			<depth description="Depth of the seat without backrest adjustment range.">
+				<value>21</value>
+				<unit>inch</unit>
+			</depth>
+			<width description="Width of the single seat without armrests.">
+				<value>17.3</value>
+				<unit>inch</unit>
+			</width>
+			<width_inner_armrest description="Width of inner armrest.">
+				<value>2.5</value>
+				<unit>inch</unit>
+			</width_inner_armrest>
+			<width_outer_armrest description="Width of outer armrest.">
+				<value>1.9</value>
+				<unit>inch</unit>
+			</width_outer_armrest>
+			<height description="Height of the entire seat from ground to top of backrest.">
+				<value>48.5</value>
+				<unit>inch</unit>
+			</height>
+			<backrest_adjustment_range description="Maximum adjustment range of the backrest.">
+				<value>12</value>
+				<unit>inch</unit>
+			</backrest_adjustment_range>
+			<mass description="Mass of a single seats without seat belt and without life jacket.">
+				<value>8.9</value>
+				<unit>kg</unit>
+			</mass>
+		</seat>
+		<seat id="4" description="Definition of one single passenger seat.">
+			<name description="Name of the seat type.">
+				<value>A320-200-premium_economy</value>
+			</name>
+			<depth description="Depth of the seat without backrest adjustment range.">
+				<value>19</value>
+				<unit>inch</unit>
+			</depth>
+			<width description="Width of the single seat without armrests.">
+				<value>17.3</value>
+				<unit>inch</unit>
+			</width>
+			<width_inner_armrest description="Width of inner armrest.">
+				<value>2.5</value>
+				<unit>inch</unit>
+			</width_inner_armrest>
+			<width_outer_armrest description="Width of outer armrest.">
+				<value>1.9</value>
+				<unit>inch</unit>
+			</width_outer_armrest>
+			<height description="Height of the entire seat from ground to top of backrest.">
+				<value>48.5</value>
+				<unit>inch</unit>
+			</height>
+			<backrest_adjustment_range description="Maximum adjustment range of the backrest.">
+				<value>12</value>
+				<unit>inch</unit>
+			</backrest_adjustment_range>
+			<mass description="Mass of a single seats without seat belt and without life jacket.">
+				<value>5.9</value>
+				<unit>kg</unit>
+			</mass>
+		</seat>
+		<seat id="5" description="Definition of one single passenger seat.">
+			<name description="Name of the seat type.">
+				<value>B747-230-premium-economy</value>
+			</name>
+			<depth description="Depth of the seat without backrest adjustment range.">
+				<value>24</value>
+				<unit>inch</unit>
+			</depth>
+			<width description="Width of the single seat without armrests.">
+				<value>20.5</value>
+				<unit>inch</unit>
+			</width>
+			<width_inner_armrest description="Width of inner armrest.">
+				<value>3.0</value>
+				<unit>inch</unit>
+			</width_inner_armrest>
+			<width_outer_armrest description="Width of outer armrest.">
+				<value>2.5</value>
+				<unit>inch</unit>
+			</width_outer_armrest>
+			<height description="Height of the entire seat from ground to top of backrest.">
+				<value>48.5</value>
+				<unit>inch</unit>
+			</height>
+			<backrest_adjustment_range description="Maximum adjustment range of the backrest.">
+				<value>12</value>
+				<unit>inch</unit>
+			</backrest_adjustment_range>
+			<mass description="Mass of a single seats without seat belt and without life jacket.">
+				<value>14.5</value>
+				<unit>kg</unit>
+			</mass>
+		</seat>
+		<seat id="6" description="Definition of one single passenger seat.">
+			<name description="Name of the seat type.">
+				<value>B777-premium-economy</value>
+			</name>
+			<depth description="Depth of the seat without backrest adjustment range.">
+				<value>24</value>
+				<unit>inch</unit>
+			</depth>
+			<width description="Width of the single seat without armrests.">
+				<value>20.2</value>
+				<unit>inch</unit>
+			</width>
+			<width_inner_armrest description="Width of inner armrest.">
+				<value>3.0</value>
+				<unit>inch</unit>
+			</width_inner_armrest>
+			<width_outer_armrest description="Width of outer armrest.">
+				<value>2.5</value>
+				<unit>inch</unit>
+			</width_outer_armrest>
+			<height description="Height of the entire seat from ground to top of backrest.">
+				<value>48.5</value>
+				<unit>inch</unit>
+			</height>
+			<backrest_adjustment_range description="Maximum adjustment range of the backrest.">
+				<value>12</value>
+				<unit>inch</unit>
+			</backrest_adjustment_range>
+			<mass description="Mass of a single seats without seat belt and without life jacket.">
+				<value>14.5</value>
+				<unit>kg</unit>
+			</mass>
+		</seat>
+		<seat id="7" description="Definition of one single passenger seat.">
+			<name description="Name of the seat type.">
+				<value>A320-200-premium-economy</value>
+			</name>
+			<depth description="Depth of the seat without backrest adjustment range.">
+				<value>25</value>
+				<unit>inch</unit>
+			</depth>
+			<width description="Width of the single seat without armrests.">
+				<value>20.6</value>
+				<unit>inch</unit>
+			</width>
+			<width_inner_armrest description="Width of inner armrest.">
+				<value>3.0</value>
+				<unit>inch</unit>
+			</width_inner_armrest>
+			<width_outer_armrest description="Width of outer armrest.">
+				<value>2.5</value>
+				<unit>inch</unit>
+			</width_outer_armrest>
+			<height description="Height of the entire seat from ground to top of backrest.">
+				<value>48.5</value>
+				<unit>inch</unit>
+			</height>
+			<backrest_adjustment_range description="Maximum adjustment range of the backrest.">
+				<value>12</value>
+				<unit>inch</unit>
+			</backrest_adjustment_range>
+			<mass description="Mass of a single seats without seat belt and without life jacket.">
+				<value>15.7</value>
+				<unit>kg</unit>
+			</mass>
+		</seat>
+		<seat id="8" description="Definition of one single passenger seat.">
+			<name description="Name of the seat type.">
+				<value>A330-300-LH-premium-economy</value>
+			</name>
+			<depth description="Depth of the seat without backrest adjustment range.">
+				<value>21.9</value>
+				<unit>inch</unit>
+			</depth>
+			<width description="Width of the single seat without armrests.">
+				<value>18.7</value>
+				<unit>inch</unit>
+			</width>
+			<width_inner_armrest description="Width of inner armrest.">
+				<value>3.0</value>
+				<unit>inch</unit>
+			</width_inner_armrest>
+			<width_outer_armrest description="Width of outer armrest.">
+				<value>2.5</value>
+				<unit>inch</unit>
+			</width_outer_armrest>
+			<height description="Height of the entire seat from ground to top of backrest.">
+				<value>48.5</value>
+				<unit>inch</unit>
+			</height>
+			<backrest_adjustment_range description="Maximum adjustment range of the backrest.">
+				<value>12</value>
+				<unit>inch</unit>
+			</backrest_adjustment_range>
+			<mass description="Mass of a single seats without seat belt and without life jacket.">
+				<value>12.7</value>
+				<unit>kg</unit>
+			</mass>
+		</seat>
+		<seat id="9" description="Definition of one single passenger seat.">
+			<name description="Name of the seat type.">
+				<value>B747-230-LH-business</value>
+			</name>
+			<depth description="Depth of the seat without backrest adjustment range.">
+				<value>25</value>
+				<unit>inch</unit>
+			</depth>
+			<width description="Width of the single seat without armrests.">
+				<value>25</value>
+				<unit>inch</unit>
+			</width>
+			<width_inner_armrest description="Width of inner armrest.">
+				<value>3.5</value>
+				<unit>inch</unit>
+			</width_inner_armrest>
+			<width_outer_armrest description="Width of outer armrest.">
+				<value>2.5</value>
+				<unit>inch</unit>
+			</width_outer_armrest>
+			<height description="Height of the entire seat from ground to top of backrest.">
+				<value>48.5</value>
+				<unit>inch</unit>
+			</height>
+			<backrest_adjustment_range description="Maximum adjustment range of the backrest.">
+				<value>12</value>
+				<unit>inch</unit>
+			</backrest_adjustment_range>
+			<mass description="Mass of a single seats without seat belt and without life jacket.">
+				<value>47.2</value>
+				<unit>kg</unit>
+			</mass>
+		</seat>
+		<seat id="10" description="Definition of one single passenger seat.">
+			<name description="Name of the seat type.">
+				<value>B757-business</value>
+			</name>
+			<depth description="Depth of the seat without backrest adjustment range.">
+				<value>25</value>
+				<unit>inch</unit>
+			</depth>
+			<width description="Width of the single seat without armrests.">
+				<value>24</value>
+				<unit>inch</unit>
+			</width>
+			<width_inner_armrest description="Width of inner armrest.">
+				<value>3.5</value>
+				<unit>inch</unit>
+			</width_inner_armrest>
+			<width_outer_armrest description="Width of outer armrest.">
+				<value>2.5</value>
+				<unit>inch</unit>
+			</width_outer_armrest>
+			<height description="Height of the entire seat from ground to top of backrest.">
+				<value>48.5</value>
+				<unit>inch</unit>
+			</height>
+			<backrest_adjustment_range description="Maximum adjustment range of the backrest.">
+				<value>12</value>
+				<unit>inch</unit>
+			</backrest_adjustment_range>
+			<mass description="Mass of a single seats without seat belt and without life jacket.">
+				<value>42.3</value>
+				<unit>kg</unit>
+			</mass>
+		</seat>
+		<seat id="11" description="Definition of one single passenger seat.">
+			<name description="Name of the seat type.">
+				<value>A320-200-AF-business</value>
+			</name>
+			<depth description="Depth of the seat without backrest adjustment range.">
+				<value>21</value>
+				<unit>inch</unit>
+			</depth>
+			<width description="Width of the single seat without armrests.">
+				<value>21.9</value>
+				<unit>inch</unit>
+			</width>
+			<width_inner_armrest description="Width of inner armrest.">
+				<value>3.5</value>
+				<unit>inch</unit>
+			</width_inner_armrest>
+			<width_outer_armrest description="Width of outer armrest.">
+				<value>2.0</value>
+				<unit>inch</unit>
+			</width_outer_armrest>
+			<height description="Height of the entire seat from ground to top of backrest.">
+				<value>48.5</value>
+				<unit>inch</unit>
+			</height>
+			<backrest_adjustment_range description="Maximum adjustment range of the backrest.">
+				<value>12</value>
+				<unit>inch</unit>
+			</backrest_adjustment_range>
+			<mass description="Mass of a single seats without seat belt and without life jacket.">
+				<value>34.1</value>
+				<unit>kg</unit>
+			</mass>
+		</seat>
+		<seat id="12" description="Definition of one single passenger seat.">
 			<name description="Name of the seat type.">
 				<value>A330-200-LH-business</value>
 			</name>
@@ -218,6 +515,138 @@
 				<unit>kg</unit>
 			</mass>
 		</seat>
+		<seat id="13" description="Definition of one single passenger seat.">
+			<name description="Name of the seat type.">
+				<value>A330-300-LH-first</value>
+			</name>
+			<depth description="Depth of the seat without backrest adjustment range.">
+				<value>26</value>
+				<unit>inch</unit>
+			</depth>
+			<width description="Width of the single seat without armrests.">
+				<value>26.5</value>
+				<unit>inch</unit>
+			</width>
+			<width_inner_armrest description="Width of inner armrest.">
+				<value>5.0</value>
+				<unit>inch</unit>
+			</width_inner_armrest>
+			<width_outer_armrest description="Width of outer armrest.">
+				<value>3.0</value>
+				<unit>inch</unit>
+			</width_outer_armrest>
+			<height description="Height of the entire seat from ground to top of backrest.">
+				<value>48.5</value>
+				<unit>inch</unit>
+			</height>
+			<backrest_adjustment_range description="Maximum adjustment range of the backrest.">
+				<value>12</value>
+				<unit>inch</unit>
+			</backrest_adjustment_range>
+			<mass description="Mass of a single seats without seat belt and without life jacket.">
+				<value>80.9</value>
+				<unit>kg</unit>
+			</mass>
+		</seat>
+		<seat id="14" description="Definition of one single passenger seat.">
+			<name description="Name of the seat type.">
+				<value>B777-first</value>
+			</name>
+			<depth description="Depth of the seat without backrest adjustment range.">
+				<value>27</value>
+				<unit>inch</unit>
+			</depth>
+			<width description="Width of the single seat without armrests.">
+				<value>26.5</value>
+				<unit>inch</unit>
+			</width>
+			<width_inner_armrest description="Width of inner armrest.">
+				<value>5.0</value>
+				<unit>inch</unit>
+			</width_inner_armrest>
+			<width_outer_armrest description="Width of outer armrest.">
+				<value>3.0</value>
+				<unit>inch</unit>
+			</width_outer_armrest>
+			<height description="Height of the entire seat from ground to top of backrest.">
+				<value>48.5</value>
+				<unit>inch</unit>
+			</height>
+			<backrest_adjustment_range description="Maximum adjustment range of the backrest.">
+				<value>12</value>
+				<unit>inch</unit>
+			</backrest_adjustment_range>
+			<mass description="Mass of a single seats without seat belt and without life jacket.">
+				<value>91.6</value>
+				<unit>kg</unit>
+			</mass>
+		</seat>
+		<seat id="15" description="Definition of one single passenger seat.">
+			<name description="Name of the seat type.">
+				<value>B747-230-president</value>
+			</name>
+			<depth description="Depth of the seat without backrest adjustment range.">
+				<value>26</value>
+				<unit>inch</unit>
+			</depth>
+			<width description="Width of the single seat without armrests.">
+				<value>28.5</value>
+				<unit>inch</unit>
+			</width>
+			<width_inner_armrest description="Width of inner armrest.">
+				<value>5.0</value>
+				<unit>inch</unit>
+			</width_inner_armrest>
+			<width_outer_armrest description="Width of outer armrest.">
+				<value>3.0</value>
+				<unit>inch</unit>
+			</width_outer_armrest>
+			<height description="Height of the entire seat from ground to top of backrest.">
+				<value>48.5</value>
+				<unit>inch</unit>
+			</height>
+			<backrest_adjustment_range description="Maximum adjustment range of the backrest.">
+				<value>12</value>
+				<unit>inch</unit>
+			</backrest_adjustment_range>
+			<mass description="Mass of a single seats without seat belt and without life jacket.">
+				<value>100.4</value>
+				<unit>kg</unit>
+			</mass>
+		</seat>
+		<seat id="16" description="Definition of one single passenger seat.">
+			<name description="Name of the seat type.">
+				<value>B747-430-president</value>
+			</name>
+			<depth description="Depth of the seat without backrest adjustment range.">
+				<value>28</value>
+				<unit>inch</unit>
+			</depth>
+			<width description="Width of the single seat without armrests.">
+				<value>29</value>
+				<unit>inch</unit>
+			</width>
+			<width_inner_armrest description="Width of inner armrest.">
+				<value>5.0</value>
+				<unit>inch</unit>
+			</width_inner_armrest>
+			<width_outer_armrest description="Width of outer armrest.">
+				<value>3.0</value>
+				<unit>inch</unit>
+			</width_outer_armrest>
+			<height description="Height of the entire seat from ground to top of backrest.">
+				<value>48.5</value>
+				<unit>inch</unit>
+			</height>
+			<backrest_adjustment_range description="Maximum adjustment range of the backrest.">
+				<value>12</value>
+				<unit>inch</unit>
+			</backrest_adjustment_range>
+			<mass description="Mass of a single seats without seat belt and without life jacket.">
+				<value>114.5</value>
+				<unit>kg</unit>
+			</mass>
+		</seat>
 	</passenger_seats>
 	<lavatories description="Description of passenger aircraft lavatories.">
 		<lavatory id="0" description="Definition of one single passenger lavatory.">
-- 
GitLab


From 2fe7bccd690e7e59580f4ef24f99f3c899e781f7 Mon Sep 17 00:00:00 2001
From: AndiGob <andreas.gobbbin@hotmail.de>
Date: Wed, 26 Feb 2025 13:52:25 +0100
Subject: [PATCH 2/4] fuselage_design: - update of configuration file to run in
 default settings

---
 fuselage_design/fuselage_design_conf.xml | 60 ++++++++++++------------
 1 file changed, 30 insertions(+), 30 deletions(-)

diff --git a/fuselage_design/fuselage_design_conf.xml b/fuselage_design/fuselage_design_conf.xml
index 2e312ff6..5fe15d17 100644
--- a/fuselage_design/fuselage_design_conf.xml
+++ b/fuselage_design/fuselage_design_conf.xml
@@ -2,10 +2,10 @@
 <module_configuration_file Name="Fuselage Design Runtime Configuration.">
 	<control_settings description="General control settings for this tool">
 		<aircraft_exchange_file_name description="Specify the name of the exchange file">
-			<value>CSMR-2020.xml</value>
+			<value>csmr-2020.xml</value>
 		</aircraft_exchange_file_name>
 		<aircraft_exchange_file_directory description="Specify the direction in which the aircraft exchange file can be found">
-			<value>../projects/CSMR/CSMR-2020/</value>
+			<value>../projects/csmr/csmr-2020</value>
 		</aircraft_exchange_file_directory>
 		<own_tool_level description="Specify the tool level of this tool">
 			<value>1</value>
@@ -50,6 +50,20 @@
 		</gnuplot_path>
     </control_settings>
 	<program_settings description="Program settings.">
+		<program_mode description="Select the fuselage design sizing mode. Selector: mode_0: (Initial sizing) / mode_1: (Use existing fuselage)">
+			<value>mode_0</value>
+			<default>mode_0</default>
+			<setting_use_existing_geometry description="Specific settings for use existing geometry mode.">
+				<apth_to_existing_geometry_file description="Name of the xml file containing an existing fuselage geometry.">
+					<value>./geometry_data/existing_component_geometries/existing_fuselage_geometry.xml</value>
+					<default>./geometry_data/existing_component_geometries/existing_fuselage_geometry.xml</default>
+				</apth_to_existing_geometry_file>
+				<use_as_starting_point description="Switch to select if the existing geometry should be used as an starting point for calculation or use the geometry without further calculation. Switch: false (no further calculation) / true (use as starting point)">
+					<value>false</value>
+					<default>false</default>
+				</use_as_starting_point>
+			</setting_use_existing_geometry>
+		</program_mode>
 		<configuration ID="tube_and_wing">
 			<fidelity_name description="Select fidelity name (options: empirical, numerical,...). Selector: empirical">
 				<value>empirical</value>
@@ -144,21 +158,7 @@
 								<upper_boundary>35</upper_boundary>
 								<default>26</default>
 							</pax_per_full_size_trolley_regional_range>
-						</on_board_service_load>
-						<sizing_mode description="Select the fuselage design sizing mode. Selector: mode_0: (Initial sizing) / mode_1: (Use existing fuselage)">
-							<value>mode_0</value>
-							<default>mode_0</default>
-							<setting_use_existing_fuselage description="Specific settings for use existing geometry mode.">
-								<name_of_existing_geometry_file description="Name of the xml file containing an existing fuselage geometry.">
-									<value>existing_fuselage_geometry.xml</value>
-									<default>existing_fuselage_geometry.xml</default>
-								</name_of_existing_geometry_file>
-								<use_as_starting_point description="Switch to select if the existing geometry should be used as an starting point for calculation or use the geometry without further calculation. Switch: false (no further calculation) / true (use as starting point)">
-									<value>false</value>
-									<default>false</default>
-								</use_as_starting_point>
-							</setting_use_existing_fuselage>
-						</sizing_mode>					
+						</on_board_service_load>					
 						<system_bay_height_above_cabin description="Height of the volume space for systems above the passenger cabin.">
 							<value>5</value>
 							<unit>inch</unit>
@@ -177,7 +177,7 @@
 						</cabin_floor_offset>
 						<cargo_accommodation  description="Definition of cargo accommodation.">
 							<uld_type description="Select the type of unit load device. Selector: container / pallet / mixed">
-								<value>pallet</value>
+								<value>container</value>
 								<default>container</default>			
 								<container description="Description of the ld-container.">
 									<name description="Name of the ld-container. Selector: LD3-45 / LD3 / LD6 / LD8)">
@@ -359,7 +359,7 @@
 									<seats description="Definiton of passenger class seats.">
 										<seat_on_left_side description="description of the seats for the left side of the aircraft.">
 											<name description="Name of selected seat type.">
-												<value>None</value>
+												<value>B747-230-president</value>
 											</name>
 											<seat_pitch description="Seat pitch of current seat row.">
 												<value>80</value>
@@ -371,7 +371,7 @@
 										</seat_on_left_side>
 										<seat_on_right_side description="Description of the seats for the right side of the aircraft.">
 											<name description="Name of selected seat type.">
-												<value>None</value>
+												<value>B747-230-president</value>
 											</name>
 											<seat_pitch description="Seat pitch of current seat row.">
 												<value>80</value>
@@ -383,7 +383,7 @@
 										</seat_on_right_side>
 										<seat_in_the_center description="Description of the seats in the center of a wide-body aircraft">
 											<name description="Name of selected seat type.">
-												<value>None</value>
+												<value>B747-230-president</value>
 											</name>
 											<seat_pitch description="Seat pitch of current seat row.">
 												<value>80</value>
@@ -403,7 +403,7 @@
 									</seat_space>
 									<lavatories description="Description of the lavatory of current passenger class">
 										<name description="Name of lavatory type.">
-											<value>None</value>
+											<value>swiss_business_lavatory</value>
 										</name>
 										<pax_per_lavatory description="Number of passenger per lavatorie.">
 											<value>8</value>
@@ -449,7 +449,7 @@
 									<seats description="Definiton of passenger class seats.">
 										<seat_on_left_side description="description of the seats for the left side of the aircraft.">
 											<name description="Name of selected seat type.">
-												<value>None</value>
+												<value>B777-first</value>
 											</name>
 											<seat_pitch description="Seat pitch of current seat row.">
 												<value>74</value>
@@ -461,7 +461,7 @@
 										</seat_on_left_side>
 										<seat_on_right_side description="Description of the seats for the right side of the aircraft.">
 											<name description="Name of selected seat type.">
-												<value>None</value>
+												<value>B777-first</value>
 											</name>
 											<seat_pitch description="Seat pitch of current seat row.">
 												<value>74</value>
@@ -473,7 +473,7 @@
 										</seat_on_right_side>
 										<seat_in_the_center description="Description of the seats in the center of a wide-body aircraft">
 											<name description="Name of selected seat type.">
-												<value>None</value>
+												<value>B777-first</value>
 											</name>
 											<seat_pitch description="Seat pitch of current seat row.">
 												<value>74</value>
@@ -493,7 +493,7 @@
 									</seat_space>
 									<lavatories description="Description of the lavatory of current passenger class">
 										<name description="Name of lavatory type.">
-											<value>None</value>
+											<value>swiss_business_lavatory</value>
 										</name>
 										<pax_per_lavatory description="Number of passenger per lavatorie.">
 											<value>16</value>
@@ -539,7 +539,7 @@
 									<seats description="Definiton of passenger class seats.">
 										<seat_on_left_side description="description of the seats for the left side of the aircraft.">
 											<name description="Name of selected seat type.">
-												<value>None</value>
+												<value>A320-200-AF-business</value>
 											</name>
 											<seat_pitch description="Seat pitch of current seat row.">
 												<value>62</value>
@@ -551,7 +551,7 @@
 										</seat_on_left_side>
 										<seat_on_right_side description="Description of the seats for the right side of the aircraft.">
 											<name description="Name of selected seat type.">
-												<value>None</value>
+												<value>A320-200-AF-business</value>
 											</name>
 											<seat_pitch description="Seat pitch of current seat row.">
 												<value>62</value>
@@ -563,7 +563,7 @@
 										</seat_on_right_side>
 										<seat_in_the_center description="Description of the seats in the center of a wide-body aircraft">
 											<name description="Name of selected seat type.">
-												<value>None</value>
+												<value>A320-200-AF-business</value>
 											</name>
 											<seat_pitch description="Seat pitch of current seat row.">
 												<value>62</value>
@@ -583,7 +583,7 @@
 									</seat_space>
 									<lavatories description="Description of the lavatory of current passenger class">
 										<name description="Name of lavatory type.">
-											<value>None</value>
+											<value>swiss_business_lavatory</value>
 										</name>
 										<pax_per_lavatory description="Number of passenger per lavatorie.">
 											<value>32</value>
-- 
GitLab


From 7429849e774025f6c4270431e94c5f178830fcf1 Mon Sep 17 00:00:00 2001
From: AndiGob <andreas.gobbbin@hotmail.de>
Date: Wed, 26 Feb 2025 17:31:06 +0100
Subject: [PATCH 3/4] fuselage_design: - bug fix for 0.0 inputs in class
 distribution tlar

---
 .../general/call_functions/prepareexternaldata.py               | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fuselage_design/src/tube_and_wing/empirical/fuselage_design_tu_berlin/general/call_functions/prepareexternaldata.py b/fuselage_design/src/tube_and_wing/empirical/fuselage_design_tu_berlin/general/call_functions/prepareexternaldata.py
index 122cf7bb..89fceabb 100644
--- a/fuselage_design/src/tube_and_wing/empirical/fuselage_design_tu_berlin/general/call_functions/prepareexternaldata.py
+++ b/fuselage_design/src/tube_and_wing/empirical/fuselage_design_tu_berlin/general/call_functions/prepareexternaldata.py
@@ -99,7 +99,7 @@ def prepare_external_data(paths_and_names, routing_dict, dict_ac_exchange, dict_
     # Find relevant passenger classes.
     i = 0
     for passenger_class in class_distribution:
-        if not passenger_class == '0':
+        if not passenger_class == '0' and not passenger_class == '0.0':
             indexes.append(i)
             percentage.append(round(float(passenger_class), 3))
         i += 1
-- 
GitLab


From 11fdc11e6f171d477811fb659237ff84d5a1c661 Mon Sep 17 00:00:00 2001
From: AndiGob <andreas.gobbbin@hotmail.de>
Date: Wed, 26 Feb 2025 19:30:11 +0100
Subject: [PATCH 4/4] fuselage_design: - update srxc code to run new module
 configuration file

---
 .../general/useexistinggeometry.py            | 28 +++++++------
 .../kerosene/methodkerosene.py                | 39 ++++++++++++++-----
 .../liquid_hydrogen/methodliquidhydrogen.py   | 10 ++---
 .../usermethoddatapreparation.py              | 21 ++++++----
 4 files changed, 62 insertions(+), 36 deletions(-)

diff --git a/fuselage_design/src/tube_and_wing/empirical/fuselage_design_tu_berlin/general/useexistinggeometry.py b/fuselage_design/src/tube_and_wing/empirical/fuselage_design_tu_berlin/general/useexistinggeometry.py
index db93672f..ff7c0b0f 100644
--- a/fuselage_design/src/tube_and_wing/empirical/fuselage_design_tu_berlin/general/useexistinggeometry.py
+++ b/fuselage_design/src/tube_and_wing/empirical/fuselage_design_tu_berlin/general/useexistinggeometry.py
@@ -47,11 +47,10 @@ def use_existing_geometry(paths_and_names, routing_dict, dict_ac_exchange, dict_
     existing_x_position = []
 
     ''' initial operation for use existing geometry mode '''
-    # Try to read the existing geometry xml file of landing gear design.
+    # Try to read the existing geometry xml file of fuselage design.
     try:
         # Attempt to create an ElementTree and get the root element from the XML file.
-        existing_geometry_tree = ET.ElementTree(file=paths_and_names['working_directory'] + '/'
-                                                + dict_mod_config['name_of_existing_geometry_file'])
+        existing_geometry_tree = ET.ElementTree(file=dict_mod_config['path_to_existing_geometry_file'])
         root_of_existing_geometry_tree = existing_geometry_tree.getroot()
 
     # Exception handling for operating system (OS) error.
@@ -61,23 +60,20 @@ def use_existing_geometry(paths_and_names, routing_dict, dict_ac_exchange, dict_
                                 '                                            Program aborted!')
         sys.exit('Exit information: Existing fuselage geometry file could not be read!')
 
-    # Get landing gear assembly x-positions from existing geometry
+    # Get all exisitng fuselage elemnts from external data
     existing_elements = root_of_existing_geometry_tree.findall(
         './fuselage/specific/geometry/fuselage')
-    # Check if the required x-positions are in the existing landing gear geometry
+    # Check if the required x-positions are in the existing fuselage geometry
     #  -> if true: -> set to aircraft exchange dictionary and start further estimations.
     if existing_elements is not None:
-        for element in existing_elements:
-            existing_x_position.append(round(float(element.text), 4))
-
         # Check if at least three landing gear assembly are defined in the given existing geometry
         #  -> otherwise raise an error end abort program.
-        if len(existing_elements) < 3:
-            runtime_output.critical('Error: Not enough landing gear assembly has been defined in the existing '
-                                    'landing gear geometry. \n'
+        if len(existing_elements) < 1:
+            runtime_output.critical('Error: Not enough fuselage geometries has been defined in the existing '
+                                    'fuselage geometry file. \n'
                                     '                                            Program aborted!')
-            sys.exit('Exit information: Missing required lansing gear assembly in the existing landing gear '
-                     'geometry!')
+            sys.exit('Exit information: Missing required fuselage geometry in the existing fuslege '
+                     'geometry file!')
 
         # Check if the current aircraft exchange file contains no landing gear parameters.
         #   -> if true: -> initialize landing gear position dictionary
@@ -118,8 +114,10 @@ def use_existing_geometry(paths_and_names, routing_dict, dict_ac_exchange, dict_
     #  -> if true: -> call landing gear design with loaded data from geometry file
     if dict_mod_config['use_as_starting_point']:
         # Call function to run the landing gear design process with an existing geometry.
-        kerosene_output_dict = fuselage_design(paths_and_names, routing_dict, dict_ac_exchange, dict_mod_config,
-                                               runtime_output)
+        runtime_output.critical('Error: Mode use existing geometry with feature "use_as_starting_point" is currently under development. Program aborted!')
+        sys.exit('Exit information: Selected Mode is currently under development!')
+        #kerosene_output_dict = fuselage_design(paths_and_names, routing_dict, dict_ac_exchange, dict_mod_config,
+        #                                      runtime_output)
 
     # Else condition: Existing geometry should not be used for further estimation -> skip landing gear estimation steps
     else:
diff --git a/fuselage_design/src/tube_and_wing/empirical/fuselage_design_tu_berlin/kerosene/methodkerosene.py b/fuselage_design/src/tube_and_wing/empirical/fuselage_design_tu_berlin/kerosene/methodkerosene.py
index 14c54400..edd4b5c4 100644
--- a/fuselage_design/src/tube_and_wing/empirical/fuselage_design_tu_berlin/kerosene/methodkerosene.py
+++ b/fuselage_design/src/tube_and_wing/empirical/fuselage_design_tu_berlin/kerosene/methodkerosene.py
@@ -51,35 +51,56 @@ def method_kerosene(paths_and_names, routing_dict, dict_ac_exchange, dict_mod_co
     kerosene_output_dict = {}
 
     # check which sizing mode is selected -> if no valid mode is selected -> raise an error and abort program
-    if dict_mod_config['sizing_mode'] == 'mode_0' or dict_mod_config['sizing_mode'] == 'mode_1':
+    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 fuselage design estimation
-        if dict_mod_config['sizing_mode'] == 'mode_0':
+        if dict_mod_config['program_mode'] == 'mode_0':
             kerosene_output_dict = fuselage_design(paths_and_names, routing_dict, dict_ac_exchange,
                                                    dict_mod_config, runtime_output)
 
         # Check if sizing mode "mode_1" is selected
         #  -> if true: -> perform retrofit fuselage design from existing geometry
-        if dict_mod_config['sizing_mode'] == 'mode_1':
+        if dict_mod_config['program_mode'] == 'mode_1':
             runtime_output.print('Start reading of existing geometry from file.')
+            # If the script is compiled, sys._MEIPASS gives the temp directory for PyInstaller.
+            if getattr(sys, 'frozen', False):    
+                # ToDo Pfad anpassen, wenn als exe ausgeführt
+                path_to_existing_geometry_file = \
+                    sys._MEIPASS + '/' + dict_mod_config['path_to_existing_geometry_file']
+                print(paths_and_names['project_directory'] + os.path.realpath(dict_mod_config['path_to_existing_geometry_file']))
+
+            # Check if the system prefix is different from the base prefix -> code is runnig in a vitual environment
+            elif hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix:
+                # ToDo Pfad anpassen, wenn als exe ausgeführt
+                path_to_existing_geometry_file = \
+                    os.path.join(paths_and_names['working_directory'], 
+                                 os.path.relpath(dict_mod_config['path_to_existing_geometry_file']).replace(os.sep, '/'))
+                print(path_to_existing_geometry_file)
+                
+            # If running as a regular Python script, use the current directory.
+            else:
+                path_to_existing_geometry_file = \
+                    os.path.join(paths_and_names['project_directory'], 
+                                 os.path.relpath(dict_mod_config['path_to_existing_geometry_file'])).replace(os.sep, '/')
+                
             # Check if the file containing the geometrical description of the fuselage is existing
             #  -> if true: -> perform fuselage design with existing geometry
-            if os.path.isfile(paths_and_names['working_directory'] + '/'
-                              + dict_mod_config['name_of_existing_geometry_file']):
+            if os.path.isfile(path_to_existing_geometry_file):
+                dict_mod_config['path_to_existing_geometry_file'] = path_to_existing_geometry_file
                 # Call function to perform fuselage design from existing geometry.
                 kerosene_output_dict = use_existing_geometry(paths_and_names, routing_dict, dict_ac_exchange,
                                                              dict_mod_config, runtime_output)
             # Else condition: File containing the geometrical description of fuselage does not exist
             #  -> abort program.
             else:
-                runtime_output.critical('Error: Sizing mode "use existing geometry" is selected but the file: "'
-                                        + dict_mod_config['name_of_existing_geometry_file'] + '" could not be found. \n'
+                runtime_output.critical('Error: Program mode "use existing geometry" is selected but the file: "'
+                                        + dict_mod_config['path_to_existing_geometry_file'] + '" could not be found. \n'
                                         '                                            Program aborted!')
                 sys.exit('Exit information: Missing existing fuselage geometry file!')
 
     # else condition: no valid sizing mode is selected -> program aborted.
     else:
-        runtime_output.critical('Error: No valid sizing mode for fuselage design selected! '
+        runtime_output.critical('Error: No valid program mode for fuselage design selected! '
                                 '\nPlease check the module configuration file. Program Aborted!')
-        sys.exit('Exit information: No valid sizing mode is selected!')
+        sys.exit('Exit information: No valid program mode is selected!')
 
     return kerosene_output_dict
diff --git a/fuselage_design/src/tube_and_wing/empirical/fuselage_design_tu_berlin/liquid_hydrogen/methodliquidhydrogen.py b/fuselage_design/src/tube_and_wing/empirical/fuselage_design_tu_berlin/liquid_hydrogen/methodliquidhydrogen.py
index cf10c6ff..64368d87 100644
--- a/fuselage_design/src/tube_and_wing/empirical/fuselage_design_tu_berlin/liquid_hydrogen/methodliquidhydrogen.py
+++ b/fuselage_design/src/tube_and_wing/empirical/fuselage_design_tu_berlin/liquid_hydrogen/methodliquidhydrogen.py
@@ -51,20 +51,20 @@ def method_liquid_hydrogen(paths_and_names, routing_dict, dict_ac_exchange, dict
     liquid_hydrogen_output_dict = {}
 
     # check which sizing mode is selected -> if no valid mode is selected -> raise an error and abort program
-    if dict_mod_config['sizing_mode'] == 'mode_0' or dict_mod_config['sizing_mode'] == 'mode_1':
+    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 fuselage design estimation
-        if dict_mod_config['sizing_mode'] == 'mode_0':
+        if dict_mod_config['program_mode'] == 'mode_0':
             liquid_hydrogen_output_dict = fuselage_design(paths_and_names, routing_dict, dict_ac_exchange,
                                                           dict_mod_config, runtime_output)
 
         # Check if sizing mode "mode_1" is selected
         #  -> if true: -> perform retrofit fuselage design from existing geometry
-        if dict_mod_config['sizing_mode'] == 'mode_1':
+        if dict_mod_config['program_mode'] == 'mode_1':
             runtime_output.print('Start reading of existing geometry from file.')
             # Check if the file containing the geometrical description of the fuselage is existing
             #  -> if true: -> perform fuselage design with existing geometry
             if os.path.isfile(paths_and_names['working_directory'] + '/'
-                              + dict_mod_config['name_of_existing_geometry_file']):
+                              + dict_mod_config['path_to_existing_geometry_file']):
                 # Call function to perform fuselage design from existing geometry.
                 liquid_hydrogen_output_dict = use_existing_geometry(paths_and_names, routing_dict, dict_ac_exchange,
                                                                     dict_mod_config, runtime_output)
@@ -72,7 +72,7 @@ def method_liquid_hydrogen(paths_and_names, routing_dict, dict_ac_exchange, dict
             #  -> abort program.
             else:
                 runtime_output.critical('Error: Sizing mode "use existing geometry" is selected but the file: "'
-                                        + dict_mod_config['name_of_existing_geometry_file'] + '" could not be found. \n'
+                                        + dict_mod_config['path_to_existing_geometry_file'] + '" could not be found. \n'
                                         '                                            Program aborted!')
                 sys.exit('Exit information: Missing existing fuselage geometry file!')
 
diff --git a/fuselage_design/src/tube_and_wing/empirical/fuselage_design_tu_berlin/usermethoddatapreparation.py b/fuselage_design/src/tube_and_wing/empirical/fuselage_design_tu_berlin/usermethoddatapreparation.py
index 5f39da5c..8be0cf26 100644
--- a/fuselage_design/src/tube_and_wing/empirical/fuselage_design_tu_berlin/usermethoddatapreparation.py
+++ b/fuselage_design/src/tube_and_wing/empirical/fuselage_design_tu_berlin/usermethoddatapreparation.py
@@ -130,6 +130,16 @@ def user_method_data_input_preparation(routing_dict):
     # Enter all general parameters to be extracted from the module configuration file. 'general parameters' means
     # parameters that do not differ according to the user layer. It should be noted that 'tmp_general' is only used to
     # shorten the path information in the 'general_data_to_extract_from_module_configuration_dict'.
+    tmp_program_mode = ('./program_settings/program_mode')
+    program_mode_dict = {
+        'path_to_existing_geometry_file':
+        [tmp_program_mode + '/setting_use_existing_geometry/apth_to_existing_geometry_file', str],
+        'program_mode':
+        [tmp_program_mode, str], 
+        'use_as_starting_point':
+        [tmp_program_mode + '/setting_use_existing_geometry/use_as_starting_point', bool]              
+        }
+    
     tmp_general = ('./program_settings/configuration[@ID="tube_and_wing"]/fidelity[@ID="empirical"]/'
                    + 'fuselage_design_tu_berlin/general')
     general_data_to_extract_from_module_configuration_dict = {
@@ -147,8 +157,6 @@ def user_method_data_input_preparation(routing_dict):
             [tmp_general + '/length_of_flight_deck', float],
         'fuselage_structural_mass_technology_factor':
             [tmp_general + '/mass_technology_factors/fuselage_structural_mass_technology_factor', float],
-        'name_of_existing_geometry_file':
-            [tmp_general + '/sizing_mode/setting_use_existing_fuselage/name_of_existing_geometry_file', str],
         'name_of_fuselage':
             [tmp_general + '/name_of_fuselage', str],
         'pax_per_full_size_trolley_long_range':
@@ -158,15 +166,14 @@ def user_method_data_input_preparation(routing_dict):
         'pax_per_full_size_trolley_short_range':
             [tmp_general + '/on_board_service_load/pax_per_full_size_trolley_short_range', float],
         'pax_per_full_size_trolley_regional_range':
-            [tmp_general + '/on_board_service_load/pax_per_full_size_trolley_regional_range', float],
-        'sizing_mode':
-            [tmp_general + '/sizing_mode', str],
+            [tmp_general + '/on_board_service_load/pax_per_full_size_trolley_regional_range', float],     
         'system_bay_height_above_cabin':
             [tmp_general + '/system_bay_height_above_cabin', float],
-        'use_as_starting_point':
-            [tmp_general + '/sizing_mode/setting_use_existing_fuselage/use_as_starting_point', bool]
         }
 
+    general_data_to_extract_from_module_configuration_dict = \
+        general_data_to_extract_from_module_configuration_dict | program_mode_dict
+    
     # Enter all specific parameters to be extracted from the module configuration file. 'specific parameters' means
     # parameters that differ according to the user layer. It should be noted that 'tmp_specific' is only used to
     # shorten the path information in the 'specific_data_to_extract_from_module_configuration_dict'.
-- 
GitLab