Skip to content
Snippets Groups Projects
Commit 0c63ba43 authored by Kristina Mazur's avatar Kristina Mazur
Browse files

Delete parsing of aircraft xml - not necessary anymore

parent 69c7d261
Branches feature/CI
No related tags found
No related merge requests found
Pipeline #1544207 failed
......@@ -63,9 +63,6 @@ pages:
- pip install pipenv
- pipenv install
script:cmks
- mkdir $CI_PROJECT_DIR/documentation/aircraft-xml
#- python $CI_PROJECT_DIR/scripts/document_aircraft_xml.py --title Design specification --level 4 $CI_PROJECT_DIR/scripts/csmr-2020_startCSD.xml > $CI_PROJECT_DIR/documentation/aircraft-xml/specification.md
- python $CI_PROJECT_DIR/scripts/document_aircraft_xml.py --title DesignSpecification --level 4 $CI_PROJECT_DIR/scripts/csmr-2020_startCSD.xml > $CI_PROJECT_DIR/documentation/aircraft-xml/specification.md
- pipenv run mkdocs build --site-dir $CI_PROJECT_DIR/public
needs:
- doxygen
......
......@@ -104,9 +104,6 @@ nav: # Customizes the main navigation struc
- Libraries: 'documentation/libraries.md' # Link to libraries overview.
- Utilities: 'documentation/additional-software.md' # Link to additional software page.
- Workflow: 'workflow.md' # Link to the workflow page.
- Aircraft Exchange File:
- 'DesignSpecification': 'aircraft-xml/specification.md'
#- Design specification: 'aircraft-xml/specification.md'
- Get involved:
- Developer Guide: developer/developer-installation.md # Top-level item for contributions and development.
- Build Instructions:
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
<aircraft_exchange_file>
<requirements_and_specifications description="Requirements and specifications">
<general description="General aircraft information">
<type description="Aircraft type">
<value>CeRAS</value>
</type>
<model description="Model - Version">
<value>SMR-2020</value>
</model>
</general>
<mission_files description="Name of xml files which are located in the missionData directory and contain the flight phase data" tool_level="0">
<design_mission_file description="Name of the design mission xml">
<value>design_mission.xml</value>
</design_mission_file>
<study_mission_file description="Name of the study mission xml">
<value>study_mission.xml</value>
</study_mission_file>
<requirements_mission_file description="Name of the requirements mission xml">
<value>requirements_mission.xml</value>
</requirements_mission_file>
</mission_files>
<design_specification description="Design specification">
<configuration description="Configuration information">
<aerodynamic_technologies description="Integration of aerodynamic technologies on the aircraft: true / false">
<value>false</value>
</aerodynamic_technologies>
<configuration_type description="aircraft configuration: tube_and_wing / blended_wing_body">
<value>tube_and_wing</value>
</configuration_type>
<fuselage_definition description="Design description of the fuselage.">
<fuselage_type description="Fuselage type: single_aisle / wide_body">
<value>single_aisle</value>
</fuselage_type>
<fuselage_pressurization description="Switch to select a pressurized fuselage. (true: pressurized fuselage, false: non pressurized fuselage)">
<value>true</value>
</fuselage_pressurization>
<blended_wing_body_configuration description="Additional design description for blended wing body configurations.">
<number_of_payload_tubes description="Number of fuselage tubes for blendend wing body configurations. For tube and wing configuration is set to 1.">
<value>1</value>
<unit>1</unit>
<default>1</default>
<lower_boundary>1</lower_boundary>
<upper_boundary>5</upper_boundary>
</number_of_payload_tubes>
<center_body_wing_sweep description="Sweep of the leading edge of the center body.">
<value>60</value>
<unit>degree</unit>
<default>60</default>
<lower_boundary>0</lower_boundary>
<upper_boundary>75</upper_boundary>
<center_body_wing_sweep_tolerance Desc="Permissible deviation of the actual from the desired leading edge sweep of the center body.">
<value>5</value>
<unit>degree</unit>
<default>5</default>
<lower_boundary>0</lower_boundary>
<upper_boundary>15</upper_boundary>
</center_body_wing_sweep_tolerance>
</center_body_wing_sweep>
</blended_wing_body_configuration>
</fuselage_definition>
<wing_definition description="Definitions for wing design">
<mounting description="wing mounting for tube_and_wing configuration (ignored at blended_wing_body) - low / mid / high">
<value>low</value>
</mounting>
</wing_definition>
<empennage_definition description="Definitions for empennage design">
<empennage_type description="tube_and_wing configuration: conventional - blended_wing_body: vertical_tails">
<value>conventional</value>
</empennage_type>
</empennage_definition>
<undercarriage_definition description="Design description of the undercarriage.">
<main_gear_mounting description="Mounting position of the main landing gear: wing_mounted / fuselage_mounted.">
<value>wing_mounted</value>
</main_gear_mounting>
<undercarriage_retractability description="Switch to set retractability of landing gear: retractable / non_retractable.">
<value>retractable</value>
</undercarriage_retractability>
</undercarriage_definition>
<tank_definition description="Energy tanks information">
<tank ID="0" description="Inner left tank">
<energy_carrier_ID description="see energy carrier specification node">
<value>0</value>
<unit>1</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>5</upper_boundary>
</energy_carrier_ID>
<location description="Component where the tank is located: fuselage, wing, horizontal_stabilizer">
<value>wing</value>
</location>
<position description="Position of tank in location: tailcone, rear, front, top, bottom, center, inner_left, outer_left, inner_right, outer_right, total">
<value>inner_left</value>
</position>
<energy_share description="Share of this tanks energy in relation to required mission energy (of same energy carrier). Only relevant for liquid hydrogen tanks. Equals 0.0 for kerosene tanks.">
<value>0.0</value>
<unit>1</unit>
<lower_boundary>0.0</lower_boundary>
<upper_boundary>1.0</upper_boundary>
</energy_share>
</tank>
<tank ID="1" description="Outer left tank">
<energy_carrier_ID description="see energy carrier specification node">
<value>0</value>
<unit>1</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>5</upper_boundary>
</energy_carrier_ID>
<location description="Component where the tank is located: fuselage, wing, horizontal_stabilizer">
<value>wing</value>
</location>
<position description="Position of tank in location: tailcone, rear, front, top, bottom, center, inner_left, outer_left, inner_right, outer_right, total">
<value>outer_left</value>
</position>
<energy_share description="Share of this tanks energy in relation to required mission energy (of same energy carrier). Only relevant for liquid hydrogen tanks. Equals 0.0 for kerosene tanks.">
<value>0.0</value>
<unit>1</unit>
<lower_boundary>0.0</lower_boundary>
<upper_boundary>1.0</upper_boundary>
</energy_share>
</tank>
<tank ID="2" description="Inner right tank">
<energy_carrier_ID description="see energy carrier specification node">
<value>0</value>
<unit>1</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>5</upper_boundary>
</energy_carrier_ID>
<location description="Component where the tank is located: fuselage, wing, horizontal_stabilizer">
<value>wing</value>
</location>
<position description="Position of tank in location: tailcone, rear, front, top, bottom, center, inner_left, outer_left, inner_right, outer_right, total">
<value>inner_right</value>
</position>
<energy_share description="Share of this tanks energy in relation to required mission energy (of same energy carrier). Only relevant for liquid hydrogen tanks. Equals 0.0 for kerosene tanks.">
<value>0.0</value>
<unit>1</unit>
<lower_boundary>0.0</lower_boundary>
<upper_boundary>1.0</upper_boundary>
</energy_share>
</tank>
<tank ID="3" description="Outer right tank">
<energy_carrier_ID description="see energy carrier specification node">
<value>0</value>
<unit>1</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>5</upper_boundary>
</energy_carrier_ID>
<location description="Component where the tank is located: fuselage, wing, horizontal_stabilizer">
<value>wing</value>
</location>
<position description="Position of tank in location: tailcone, rear, front, top, bottom, center, inner_left, outer_left, inner_right, outer_right, total">
<value>outer_right</value>
</position>
<energy_share description="Share of this tanks energy in relation to required mission energy (of same energy carrier). Only relevant for liquid hydrogen tanks. Equals 0.0 for kerosene tanks.">
<value>0.0</value>
<unit>1</unit>
<lower_boundary>0.0</lower_boundary>
<upper_boundary>1.0</upper_boundary>
</energy_share>
</tank>
<tank ID="4" description="Center wing tank">
<energy_carrier_ID description="see energy carrier specification node">
<value>0</value>
<unit>1</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>5</upper_boundary>
</energy_carrier_ID>
<location description="Component where the tank is located: fuselage, wing, horizontal_stabilizer">
<value>wing</value>
</location>
<position description="Position of tank in location: tailcone, rear, front, top, bottom, center, inner_left, outer_left, inner_right, outer_right, total">
<value>center</value>
</position>
<energy_share description="Share of this tanks energy in relation to required mission energy (of same energy carrier). Only relevant for liquid hydrogen tanks. Equals 0.0 for kerosene tanks.">
<value>0.0</value>
<unit>1</unit>
<lower_boundary>0.0</lower_boundary>
<upper_boundary>1.0</upper_boundary>
</energy_share>
</tank>
<tank ID="5" description="Additional center tank">
<energy_carrier_ID description="see energy carrier specification node">
<value>0</value>
<unit>1</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>5</upper_boundary>
</energy_carrier_ID>
<location description="Component where the tank is located: fuselage, wing, horizontal_stabilizer">
<value>fuselage</value>
</location>
<position description="Position of tank in location: tailcone, rear, front, top, bottom, center, inner_left, outer_left, inner_right, outer_right, total">
<value>center</value>
</position>
<energy_share description="Share of this tanks energy in relation to required mission energy (of same energy carrier). Only relevant for liquid hydrogen tanks. Equals 0.0 for kerosene tanks.">
<value>0.0</value>
<unit>1</unit>
<lower_boundary>0.0</lower_boundary>
<upper_boundary>1.0</upper_boundary>
</energy_share>
</tank>
<tank ID="6" description="Trim tank">
<energy_carrier_ID description="see energy carrier specification node">
<value>0</value>
<unit>1</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>5</upper_boundary>
</energy_carrier_ID>
<location description="Component where the tank is located: fuselage, wing, horizontal_stabilizer">
<value>horizontal_stabilizer</value>
</location>
<position description="Position of tank in location: tailcone, rear, front, top, bottom, center, inner_left, outer_left, inner_right, outer_right, total">
<value>total</value>
</position>
<energy_share description="Share of this tanks energy in relation to required mission energy (of same energy carrier). Only relevant for liquid hydrogen tanks. Equals 0.0 for kerosene tanks.">
<value>0.0</value>
<unit>1</unit>
<lower_boundary>0.0</lower_boundary>
<upper_boundary>1.0</upper_boundary>
</energy_share>
</tank>
</tank_definition>
<loads description="Loads information">
<design_load_factor description="design load factor n">
<maximum description="maximum design load factor n">
<value>2.5</value>
<unit>1</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>4</upper_boundary>
</maximum>
<minimum description="maximum design load factor n">
<value>-1.0</value>
<unit>1</unit>
<lower_boundary>-2.0</lower_boundary>
<upper_boundary>0.0</upper_boundary>
</minimum>
<maneuver description="standard maneuver load factor for e.g. flare">
<value>1.1</value>
<unit>1</unit>
<lower_boundary>0.0</lower_boundary>
<upper_boundary>2.0</upper_boundary>
</maneuver>
</design_load_factor>
</loads>
</configuration>
<transport_task description="Define the transport task for aircraft project.">
<passenger_definition description="Define the masses of the passengers">
<total_number_passengers description="Design number of passengers">
<value>180</value>
<unit>1</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>1000</upper_boundary>
</total_number_passengers>
<mass_per_passenger description="Design mass of a single passenger WITHOUT luggage">
<value>80</value>
<unit>kg</unit>
<lower_boundary>50</lower_boundary>
<upper_boundary>200</upper_boundary>
</mass_per_passenger>
<luggage_mass_per_passenger description="Design mass of a the luggage for a single passenger">
<value>15</value>
<unit>kg</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>25</upper_boundary>
</luggage_mass_per_passenger>
</passenger_definition>
<multi_passenger_deck_layout description="Switch to select a multi passenger deck fuselage design. (true: multi passenger deck allowed, false: multi passenger deck denied)">
<value>false</value>
<default>false</default>
<specific_number_of_passenger_decks>
<value>2</value>
<unit>-</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>3</upper_boundary>
<default>2</default>
</specific_number_of_passenger_decks>
</multi_passenger_deck_layout>
<passenger_class_definition>
<class_distribution description="Relative passenger distribution for the classes: President Class/First Class/Business Class/Premium Economy/Economy. Sum must be equal to 1!">
<value>0/0/0/0/1</value>
</class_distribution>
</passenger_class_definition>
<cargo_definition description="Definition of cargo which does not belong to passengers">
<additional_cargo_mass description="Mass of cargo which does not belong to passengers">
<value>2200</value>
<unit>kg</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>25000</upper_boundary>
</additional_cargo_mass>
<cargo_density description="Density of cargo which does not belong to passengers">
<value>165</value>
<unit>kg/m^3</unit>
<lower_boundary>150</lower_boundary>
<upper_boundary>200</upper_boundary>
</cargo_density>
</cargo_definition>
</transport_task>
<energy_carriers description="Energy carriers information">
<energy_carrier ID="0" description="One specific energy carrier">
<type description="Energy type (for multifuel engine create new ID). Selector: kerosene / liquid_hydrogen / battery / saf">
<value>kerosene</value>
</type>
<density description="Energy carrier density.">
<value>785</value>
<unit>kg/m^3</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>10000</upper_boundary>
</density>
<volumetric_density description="Volumetric energy density of energy carrier.">
<value>33.833.500.000</value>
<unit>J/m^3</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>1e+12</upper_boundary>
</volumetric_density>
<gravimetric_density description="Gravimetric energy density of energy carrier.">
<value>43100000</value>
<unit>J/kg</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>1e+12</upper_boundary>
</gravimetric_density>
</energy_carrier>
</energy_carriers>
<propulsion description="Propulsion information">
<propulsor ID="0" description="Information for specific propulsor">
<powertrain description="Way the power is generated from the source. Selector: turbo / electric / fuel_cell">
<value>turbo</value>
</powertrain>
<type description="Type of main thrust generator. Selector: fan / prop">
<value>fan</value>
</type>
<position description="propulsor position (arrangement order acc to ID order)">
<parent_component description="position on component. Selector: wing / fuselage / empennage">
<value>wing</value>
</parent_component>
<x description="x-position (aircraft coordinate system). Selector: front / back">
<value>front</value>
</x>
<y description="y position (aircraft coordinate system). Selector: left / right">
<value>left</value>
</y>
<z description="z position (aircraft coordinate system). Selector: over / mid / under / in">
<value>under</value>
</z>
</position>
<energy_carrier_ID description="see energy carrier specification node">
<value>0</value>
<unit>1</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>5</upper_boundary>
</energy_carrier_ID>
<thrust_share description="Share of this thrust in relation to required aircraft thrust">
<value>0.5</value>
<unit>1</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>1</upper_boundary>
</thrust_share>
</propulsor>
<propulsor ID="1" description="Information for specific propulsor">
<powertrain description="Way the power is generated from the source. Selector: turbo / electric / fuel_cell">
<value>turbo</value>
</powertrain>
<type description="Type of main thrust generator. Selector: fan / prop">
<value>fan</value>
</type>
<position description="propulsor position (arrangement order acc to ID order)">
<parent_component description="position on component. Selector: wing / fuselage / empennage">
<value>wing</value>
</parent_component>
<x description="x-position (aircraft coordinate system). Selector: front / back">
<value>front</value>
</x>
<y description="y position (aircraft coordinate system). Selector: left / right">
<value>right</value>
</y>
<z description="z position (aircraft coordinate system). Selector: over / mid / under / in">
<value>under</value>
</z>
</position>
<energy_carrier_ID description="see energy carrier specification node">
<value>0</value>
<unit>1</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>5</upper_boundary>
</energy_carrier_ID>
<thrust_share description="Share of this thrust in relation to required aircraft thrust">
<value>0.5</value>
<unit>1</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>1</upper_boundary>
</thrust_share>
</propulsor>
<energy_provider description="source where energy is coming from per segment">
<ground description="source where energy is coming from in the ground mission segment">
<powertrain description="Way the power is generated from the source: propulsor, turbo, electric, fuel_cell">
<value>turbo</value>
</powertrain>
<energy_carrier_ID description="see energy carrier specification node">
<value>0</value>
<unit>1</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>5</upper_boundary>
</energy_carrier_ID>
</ground>
<taxi description="source where energy is coming from in the taxi mission segment">
<powertrain description="Way the power is generated from the source: propulsor, turbo, electric, fuel_cell">
<value>turbo</value>
</powertrain>
<energy_carrier_ID description="see energy carrier specification node">
<value>0</value>
<unit>1</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>5</upper_boundary>
</energy_carrier_ID>
</taxi>
<takeoff description="source where energy is coming from in the takeoff mission segment">
<powertrain description="Way the power is generated from the source: propulsor, turbo, electric, fuel_cell">
<value>turbo</value>
</powertrain>
<energy_carrier_ID description="see energy carrier specification node">
<value>0</value>
<unit>1</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>5</upper_boundary>
</energy_carrier_ID>
</takeoff>
<climb description="source where energy is coming from in the climb mission segment">
<powertrain description="Way the power is generated from the source: propulsor, turbo, electric, fuel_cell">
<value>turbo</value>
</powertrain>
<energy_carrier_ID description="see energy carrier specification node">
<value>0</value>
<unit>1</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>5</upper_boundary>
</energy_carrier_ID>
</climb>
<cruise description="source where energy is coming from in the cruise mission segment">
<powertrain description="Way the power is generated from the source: propulsor, turbo, electric, fuel_cell">
<value>turbo</value>
</powertrain>
<energy_carrier_ID description="see energy carrier specification node">
<value>0</value>
<unit>1</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>5</upper_boundary>
</energy_carrier_ID>
</cruise>
<descent description="source where energy is coming from in the descent mission segment">
<powertrain description="Way the power is generated from the source: propulsor, turbo, electric, fuel_cell">
<value>turbo</value>
</powertrain>
<energy_carrier_ID description="see energy carrier specification node">
<value>0</value>
<unit>1</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>5</upper_boundary>
</energy_carrier_ID>
</descent>
<landing description="source where energy is coming from in the landing mission segment">
<powertrain description="Way the power is generated from the source: propulsor, turbo, electric, fuel_cell">
<value>turbo</value>
</powertrain>
<energy_carrier_ID description="see energy carrier specification node">
<value>0</value>
<unit>1</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>5</upper_boundary>
</energy_carrier_ID>
</landing>
</energy_provider>
</propulsion>
<skinning description="Skinning Information">
<material description="Material of skinning">
<value>aluminium2024</value>
</material>
<thickness description="Thickness of skinning">
<value>0.003</value>
<unit>m</unit>
<lower_boundary>0.0001</lower_boundary>
<upper_boundary>0.1</upper_boundary>
</thickness>
</skinning>
<technology>
<variable_camber description="Switch if variable camber is used">
<value>false</value>
</variable_camber>
</technology>
</design_specification>
<requirements description="Aircraft design requirements">
<top_level_aircraft_requirements description="Top level aircraft requirements (TLAR)">
<maximum_structrual_payload_mass description="Maximum structual payload mass which can be carried by the aircraft (e.g. for short trips)">
<value>19300</value>
<unit>kg</unit>
<lower_boundary>100</lower_boundary>
<upper_boundary>150000</upper_boundary>
</maximum_structrual_payload_mass>
<takeoff_distance description="Design takeoff distance (Balanced Field Length) at Sea Level with maximum takeoff mass (MTOM) and (ISA + deltaISA)-Conditions">
<value>1951</value>
<unit>m</unit>
<lower_boundary>600</lower_boundary>
<upper_boundary>5000</upper_boundary>
</takeoff_distance>
<landing_field_length description="Needed runway length at Sea Level with maximum landiung mass (MLM) and (ISA + deltaISA)-Conditions (Safety-Landing Distance according to FAR 121.195: landing_field_required/0.6)">
<value>2425.67</value>
<unit>m</unit>
<lower_boundary>600</lower_boundary>
<upper_boundary>5000</upper_boundary>
</landing_field_length>
<icao_aerodrome_reference_code description="ICAO reference code - code_number 1-4 (field length) + code_letter A-F (wing span limits) + faa ADG code number I-VI (wing span limits + tail height limits) + Aircraft Approach Category letter A-D">
<value>3CIIIB</value>
</icao_aerodrome_reference_code>
<flight_envelope description="Maxima of design flight envelope">
<maximum_operating_mach_number description="Maximum operating mach number">
<value>0.82</value>
<unit>1</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>1</upper_boundary>
</maximum_operating_mach_number>
<maximum_operating_velocity description="Maximum operating speed (maximum dynamic pressure)">
<value>180</value>
<unit>m/s</unit>
<lower_boundary>50</lower_boundary>
<upper_boundary>250</upper_boundary>
</maximum_operating_velocity>
<maximum_approach_speed description="Maximum allowed approach speed.">
<value>67.65</value>
<unit>m/s</unit>
<lower_boundary>50</lower_boundary>
<upper_boundary>90</upper_boundary>
</maximum_approach_speed>
<maximum_operating_altitude description="Maximum operating altitude">
<value>12192</value>
<unit>m</unit>
<lower_boundary>4500</lower_boundary>
<upper_boundary>20000</upper_boundary>
</maximum_operating_altitude>
<maximum_one_engine_operating_altitude description="Maximum operating altitude with one engine inoperative">
<value>4572</value>
<unit>m</unit>
<lower_boundary>1500</lower_boundary>
<upper_boundary>12000</upper_boundary>
</maximum_one_engine_operating_altitude>
<climb_or_descend_segment_gradient description="climb / descend segment gradient">
<value>0.024</value>
<unit>1</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>1</upper_boundary>
</climb_or_descend_segment_gradient>
</flight_envelope>
<pavement_classification_number description="Runway pavment classification number (PCN) - limits the maximum allowed aircraft classification number of undercarriage.">
<value>55</value>
<unit>1</unit>
<lower_boundary>5</lower_boundary>
<upper_boundary>120</upper_boundary>
</pavement_classification_number>
<design_mission description="Requirements regarding the design mission">
<delta_ISA description="Temperature offset to the International Standard Atmosphere (ISA)">
<value>0</value>
<unit>K</unit>
<lower_boundary>-100</lower_boundary>
<upper_boundary>100</upper_boundary>
</delta_ISA>
<range description="Target range for the specified mission">
<value>4537400</value>
<unit>m</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>20000000</upper_boundary>
</range>
<contingency description="Reserved Fuel Percentage">
<value>0.06</value>
<unit>1</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>0.08</upper_boundary>
</contingency>
<alt_dist description="Reserved fuel - alternate distance">
<value>370400</value>
<unit>m</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>926000</upper_boundary>
</alt_dist>
<loiter_time description="Reserved fuel - loiter time in seconds">
<value>1800</value>
<unit>s</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>3600</upper_boundary>
</loiter_time>
<initial_cruise_mach_number description="Initial cruise Mach number at top of descent. May be altered during cruise.">
<value>0.78</value>
<unit>1</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>1</upper_boundary>
</initial_cruise_mach_number>
<initial_cruise_altitude description="Initial cruise altitude (ICA) at top of descent. May be altered during cruise.">
<value>10058.4</value>
<unit>m</unit>
<lower_boundary>1000</lower_boundary>
<upper_boundary>20000</upper_boundary>
</initial_cruise_altitude>
<climb_speed_schedule description="Climb speed for different altitudes">
<climb_speed_below_FL100 description="Calibrated airspeed in climb below FL100 (FL100 = 3048 m)">
<value>128.6112</value>
<unit>m/s</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>250</upper_boundary>
</climb_speed_below_FL100>
<climb_speed_above_FL100 description="Calibrated airspeed in climb above FL100 (FL100 = 3048 m)">
<value>154.3334</value>
<unit>m/s</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>250</upper_boundary>
</climb_speed_above_FL100>
<delta_mach_climb_cruise description="Difference between crossover altitude Mach number and cruise Mach number">
<value>-0.02</value>
<unit>1</unit>
<lower_boundary>-0.3</lower_boundary>
<upper_boundary>0.01</upper_boundary>
</delta_mach_climb_cruise>
</climb_speed_schedule>
<descent_speed_schedule description="Descent speed for different altitudes">
<descent_speed_below_FL100 description="Calibrated airspeed in descent below FL100 (FL100 = 3048 m)">
<value>128.6112</value>
<unit>m/s</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>250</upper_boundary>
</descent_speed_below_FL100>
<descent_speed_above_FL100 description="Calibrated airspeed in descent above FL100 (FL100 = 3048 m)">
<value>154.3334</value>
<unit>m/s</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>250</upper_boundary>
</descent_speed_above_FL100>
</descent_speed_schedule>
<time_to_climb description="Time the aircraft takes to climb to cruise altitude">
<value>2100</value>
<unit>s</unit>
<lower_boundary>600</lower_boundary>
<upper_boundary>3600</upper_boundary>
</time_to_climb>
<fuel_planning description="Fuel planning according to the Joint Aviation Requirements (JAR) or the Federal Aviation Regulations (FAR)">
<fuel_estimation_selector description="Fuel estimation method. Selector: mode_0 (Fuel planning according to JAR) / mode_1 (Domestic fuel planning according to FAR) / mode_2 (Flag or supplemental fuel planning according to FAR)">
<value>mode_0</value>
</fuel_estimation_selector>
</fuel_planning>
</design_mission>
<study_mission description="Requirements regarding the study mission">
<delta_ISA description="Temperature offset to the International Standard Atmosphere (ISA)">
<value>0</value>
<unit>K</unit>
<lower_boundary>-100</lower_boundary>
<upper_boundary>100</upper_boundary>
</delta_ISA>
<range description="Target range for the specified mission">
<value>1481600</value>
<unit>m</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>20000000</upper_boundary>
</range>
<initial_cruise_mach_number description="Initial cruise Mach number at top of descent. May be altered during cruise.">
<value>0.78</value>
<unit>1</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>1</upper_boundary>
</initial_cruise_mach_number>
<initial_cruise_altitude description="Initial cruise altitude at top of descent. May be altered during cruise.">
<value>10668</value>
<unit>m</unit>
<lower_boundary>1000</lower_boundary>
<upper_boundary>20000</upper_boundary>
</initial_cruise_altitude>
<climb_speed_schedule description="Climb speed for different altitudes">
<climb_speed_below_FL100 description="Calibrated airspeed in climb below FL100 (FL100 = 3048 m)">
<value>128.6112</value>
<unit>m/s</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>250</upper_boundary>
</climb_speed_below_FL100>
<climb_speed_above_FL100 description="Calibrated airspeed in climb above FL100 (FL100 = 3048 m)">
<value>154.3334</value>
<unit>m/s</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>250</upper_boundary>
</climb_speed_above_FL100>
<delta_mach_climb_cruise description="Difference between crossover altitude Mach number and cruise Mach number">
<value>-0.02</value>
<unit>1</unit>
<lower_boundary>-0.3</lower_boundary>
<upper_boundary>0.01</upper_boundary>
</delta_mach_climb_cruise>
</climb_speed_schedule>
<descent_speed_schedule description="Descent speed for different altitudes">
<descent_speed_below_FL100 description="Calibrated airspeed in descent below FL100 (FL100 = 3048 m)">
<value>128.6112</value>
<unit>m/s</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>250</upper_boundary>
</descent_speed_below_FL100>
<descent_speed_above_FL100 description="Calibrated airspeed in descent above FL100 (FL100 = 3048 m)">
<value>154.3334</value>
<unit>m/s</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>250</upper_boundary>
</descent_speed_above_FL100>
</descent_speed_schedule>
<fuel_planning description="Fuel planning according to the Joint Aviation Requirements (JAR) or the Federal Aviation Regulations (FAR)">
<fuel_estimation_selector description="Fuel estimation method. Selector: mode_0 (Fuel planning according to JAR) / mode_1 (Domestic fuel planning according to FAR) / mode_2 (Flag or supplemental fuel planning according to FAR)">
<value>mode_0</value>
</fuel_estimation_selector>
</fuel_planning>
<payload_fractions description="Set the fraction of different design payload values for the study mission">
<cargo_fraction description="Fraction of the design cargo mass which is used for the study mission">
<value>0.75</value>
<unit>1</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>1</upper_boundary>
</cargo_fraction>
<passenger_mass_fraction description="Fraction of the design passenger mass which is used for the study mission">
<value>0.75</value>
<unit>1</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>1</upper_boundary>
</passenger_mass_fraction>
</payload_fractions>
</study_mission>
</top_level_aircraft_requirements>
<additional_requirements description="Additional requirements">
<landing_gear description="Landing gear requirements and operational conditions">
<friction_coefficient description="Friction coefficient of tyres and pavement: Raymer p.486 - Table 17.1: 0.03 - 0.05">
<value>0.03</value>
<default>0.03</default>
<unit>1</unit>
<lower_boundary>0.02</lower_boundary>
<upper_boundary>0.08</upper_boundary>
</friction_coefficient>
<breaking_coefficient description="Raymer p.486 - Table 17.1: 0.3 - 0.5; Torenbeek: jet 0.4-0.5; prop 0.35-0.45; Airbus: Medium Deceleration = 11 ft/s^2 = 0.34189">
<value>0.34189</value>
<default>0.34189</default>
<unit>1</unit>
<lower_boundary>0.06</lower_boundary>
<upper_boundary>0.5</upper_boundary>
</breaking_coefficient>
</landing_gear>
</additional_requirements>
</requirements>
<assessment_scenario description="Scenario for ecological and economical assessment">
<flights_per_year description="Number of flights per year">
<value>2227</value>
<unit>1</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>4000</upper_boundary>
</flights_per_year>
<duration_operation description="Operating years of aircraft">
<value>25</value>
<unit>a</unit>
<lower_boundary>0</lower_boundary>
<upper_boundary>50</upper_boundary>
</duration_operation>
</assessment_scenario>
</requirements_and_specifications>
</aircraft_exchange_file>
import argparse
import xml.etree.ElementTree as ET
from pathlib import Path
# === Configuration ===
FORMAT = {
"Header": "\n{}## {:s}\n> **Description**: {:s}\n",
"Unit": "> **Unit**: {:s}\n",
"TableHeader": "| Relative XML Path | Unit | Description |\n|:---|:---:|:---|",
"Table": "| <nobr>`{:s}` | *{:s}* | {:s} |",
}
KEYS = {
"Description": "description",
"Unit": "unit",
}
# Define specific levels for each child node of "requirements_and_specifications"
CUSTOM_LEVELS = {
"general": 2,
"mission_files": 2,
"design_specification": 4,
"requirements": 3,
}
class Page:
def __init__(self, title):
self.title = title
self.current_level = 0
self.table_started = False
self.current_path = Path(".")
self.sections = [[]]
def create(self, node: ET.Element, level=None):
# Set the level based on custom levels if provided
if node.tag in CUSTOM_LEVELS:
level = CUSTOM_LEVELS[node.tag]
elif level is None:
level = self.current_level + 1
# Update current level and path
if level <= 4:
self.current_level = level
self.current_path /= node.tag
# Add header if appropriate
self.make_header_entry(node)
# Treat node attributes and values as part of the parent row
if len(node) == 0: # Leaf node
self.make_table_entry(node)
else: # Parent node
# Add a summary row for the parent node
self.make_table_entry(node)
# Process child elements recursively, skipping common attributes like 'value', 'unit', etc.
for child in node:
if child.tag not in ["value", "unit", "lower_boundary", "upper_boundary"]:
self.create(child, level + 1)
# Restore previous path after processing
self.current_path = self.current_path.parent
def make_header_entry(self, node: ET.Element):
# Reset the table when creating a new header
self.table_started = False
# Fetch description and adjust header level format
description = node.attrib.get(KEYS["Description"], "None")
header_level_prefix = "#" * min(self.current_level, 4)
# Create the header with description
print(
"\n"
+ header_level_prefix
+ FORMAT["Header"].format(self.current_level, node.tag, description)
)
# Try to add a unit description
unit = node.attrib.get(KEYS["Unit"])
if unit:
print(FORMAT["Unit"].format(unit))
def make_table_entry(self, node: ET.Element):
# Check if the table has already been started
if not self.table_started:
self.table_started = True
print(FORMAT["TableHeader"])
# Generate a relative XML path for the current node
path_name = str(self.current_path / node.tag).replace("\\", "/")
# Fetch the description and unit
description = node.attrib.get(KEYS["Description"], f"No description for {node.tag}")
unit = node.attrib.get(KEYS["Unit"], "No unit specified")
# Print the table row for the current node
print(FORMAT["Table"].format(path_name, unit, description))
def main():
parser = argparse.ArgumentParser(
description="Converts an aircraft XML file to a markdown file. The output is streamed to stdout and can be piped to a file."
)
# Add the filename argument
parser.add_argument(
"filename", metavar="filename", type=str, help="The XML file to convert."
)
# Add the layout arguments
parser.add_argument(
"--title",
metavar="title",
type=str,
help="The title of the output page. This also sets the root node which is used to create the document.",
)
# Parse the arguments
args = parser.parse_args()
# Read the XML file
tree = ET.parse(args.filename)
root = tree.getroot()
# Get the configuration parameters
page = Page(args.title)
node = root.find(page.title)
# Check whether the node exists
if node is None:
raise Warning("Could not find node with title '" + page.title + "'")
# Start creating the page
page.create(node)
if __name__ == "__main__":
main()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment