Skip to content
Snippets Groups Projects
Commit 92bab73e authored by Duc Bui Tien's avatar Duc Bui Tien
Browse files

settings sketch (unfinished)

parent 3facb8ee
No related branches found
No related tags found
2 merge requests!2UnicadoGuiBackend,!1New UnicadoGUI Branch
......@@ -10,7 +10,8 @@
"dependencies": {
"@rollup/plugin-dsv": "^3.0.2",
"@sveltestrap/sveltestrap": "^6.2.4",
"layercake": "^8.0.2"
"layercake": "^8.0.2",
"svelte-chartjs": "^3.1.5"
},
"devDependencies": {
"@sveltejs/adapter-auto": "^3.0.0",
......@@ -446,6 +447,12 @@
"@jridgewell/sourcemap-codec": "^1.4.14"
}
},
"node_modules/@kurkle/color": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/@kurkle/color/-/color-0.3.2.tgz",
"integrity": "sha512-fuscdXJ9G1qb7W8VdHi+IwRqij3lBkosAm4ydQtEmbY58OzHXqQhvlxqEkoz0yssNVn38bcpRWgA9PP+OGoisw==",
"peer": true
},
"node_modules/@nodelib/fs.scandir": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
......@@ -921,6 +928,18 @@
"node": ">=6"
}
},
"node_modules/chart.js": {
"version": "4.4.2",
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.2.tgz",
"integrity": "sha512-6GD7iKwFpP5kbSD4MeRRRlTnQvxfQREy36uEtm1hzHzcOqwWx0YEHuspuoNlslu+nciLIB7fjjsHkUv/FzFcOg==",
"peer": true,
"dependencies": {
"@kurkle/color": "^0.3.0"
},
"engines": {
"pnpm": ">=8"
}
},
"node_modules/chokidar": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
......@@ -1905,6 +1924,15 @@
"node": ">=16"
}
},
"node_modules/svelte-chartjs": {
"version": "3.1.5",
"resolved": "https://registry.npmjs.org/svelte-chartjs/-/svelte-chartjs-3.1.5.tgz",
"integrity": "sha512-ka2zh7v5FiwfAX1oMflZ0HkNkgjHjFqANgRyC+vNYXfxtx2ku68Zo+2KgbKeBH2nS1ThDqkIACPzGxy4T0UaoA==",
"peerDependencies": {
"chart.js": "^3.5.0 || ^4.0.0",
"svelte": "^4.0.0"
}
},
"node_modules/svelte-check": {
"version": "3.6.4",
"resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-3.6.4.tgz",
......
......@@ -23,6 +23,7 @@
"dependencies": {
"@sveltestrap/sveltestrap": "^6.2.4",
"@rollup/plugin-dsv": "^3.0.2",
"layercake": "^8.0.2"
"layercake": "^8.0.2",
"svelte-chartjs": "^3.1.5"
}
}
<script>
import {Styles} from "@sveltestrap/sveltestrap";
<script lang="ts">
import {
Button,
ButtonGroup,
Form,
FormGroup,
Icon,
Input,
Styles,
TabContent,
TabPane
} from "@sveltestrap/sveltestrap";
let changed = false;
class EnergyCarrier{
constructor(value : string, id :number) {
this.value = value;
this.id = id;
}
}
class Propulsor{
constructor(powertrain : string,type : string,position : string ,energycarrier: EnergyCarrier[],thrust_share: string) {
this.powertrain = powertrain;
this.type = type;
this.position = position;
this.energycarrier = energycarrier;
this.thrust_share = thrust_share;
}
}
//Energy Carriers
let kerosin = new EnergyCarrier("kerosin",1);
let liquid_hydrogen = new EnergyCarrier("liquid_hydrogen",2);
let battery = new EnergyCarrier("battery",3);
let saf = new EnergyCarrier("saf",4);
let propulsors : Propulsor[]= [];
let energycarriers : EnergyCarrier[]=[];
let max_load_factor= 2;
let min_load_factor= -1;
let maneuver_load_factor= 1.1;
let passenger_nr= 150;
let mass_per_passenger=80;
let luggage_mass_per_passenger=17;
let additional_cargo_mass= 500;
let cargo_density =165;
let thrust_share = 1;
let thickness = 0.003;
let maximum_structrual_payload_mass = 30000;
let takeoff_distance = 2122;
let landing_field_length = 2387;
let requirements ={
general:{
type: String,
model: String,
},
mission_files: {
design_mission_file: String,
study_mission_file: String,
requirements_mission_file: String,
},
design_specification:{
configuration: {
configuration_type: String,
fuselage_type: String,
mounting: String,
empennage_type: String,
undercarriage_definition:{
main_gear_mounting: String,
undercarriage_retractability: String,
},
},
}
}
</script>
<h1>Welcome to the UNICADO WebApp</h1>
<p>Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation</p>
<h1>Aircraftmodelsettings</h1>
<ButtonGroup style="margin-bottom: 20px">
<Button color="dark" outline ><Icon name="bootstrap-reboot"/> Reset </Button>
{#if changed}
<Button color="danger" outline active><Icon name="cloud-upload" /> Save </Button>
{:else}
<Button color="dark" outline ><Icon name="cloud-upload" /> Save </Button>
{/if}
<Button color="dark" outline ><Icon name="cloud-download" /> Load </Button>
</ButtonGroup>
<TabContent vertical pills>
<TabPane tabId="general" tab="General" active>
<Form>
<h5>General aircraft information</h5>
<FormGroup floating label="Aircraft type">
<Input placeholder="Enter a value"/>
</FormGroup>
<FormGroup floating label="Model - Version">
<Input placeholder="Enter a value"/>
</FormGroup>
<h5>Name of xml files which are located in the missionData directory and contain the flight phase data</h5>
<FormGroup floating label="Name of the study mission xml">
<Input placeholder="Enter a value"/>
</FormGroup>
<FormGroup floating label="Name of the requirements mission xml">
<Input placeholder="Enter a value"/>
</FormGroup>
</Form>
</TabPane>
<TabPane tabId="design_specification" tab="Design Specification">
<Form>
<h5>Configuration information</h5>
<FormGroup floating label="Aircraft configuration">
<Input type="select" placeholder="Enter a value">
<option value="tube_and_wing">tube and wing</option>
<option value="blended_wing_body">blended wing body</option>
</Input>
</FormGroup>
<FormGroup floating label="Design description of the fuselage">
<Input type="select" placeholder="Enter a value">
<option value="single_aisle">single aisle</option>
<option value="weight_body">weight body</option>
</Input>
</FormGroup>
<FormGroup floating label="Definitions for wing design">
<Input type="select" placeholder="Enter a value">
<option value="low">low</option>
<option value="mid">mid</option>
<option value="high">high</option>
</Input>
</FormGroup>
<!-- <FormGroup floating label="Definitions for empennage design">-->
<!-- <Input type="select" placeholder="Enter a value">-->
<!-- <option value="low">low</option>-->
<!-- <option value="mid">mid</option>-->
<!-- </Input>-->
<!-- </FormGroup>-->
<h5>Design description of the undercarriage</h5>
<FormGroup floating label="Mounting position of the main landing gear">
<Input type="select" placeholder="Enter a value">
<option value="wing_mounted">wing mounted</option>
<option value="fuselage_mounted">fuselage mounted</option>
</Input>
</FormGroup>
<FormGroup floating label="Retractability of landing gear">
<Input type="select" placeholder="Enter a value">
<option value="retractable">retractable</option>
<option value="non_retractable">non retractable</option>
</Input>
</FormGroup>
<h5> Design Load information</h5>
<FormGroup floating label="maximum load factor">
<Input type="number" min={0} max={4} step={0.1} bind:value={max_load_factor} placeholder="number placeholder"/>
<Input type="range" min={0} max={4} step={0.1} bind:value={max_load_factor} placeholder="range placeholder"/>
</FormGroup>
<FormGroup floating label="minimum load factor">
<Input type="number" min={-2} max={0} step={0.1} bind:value={min_load_factor} placeholder="number placeholder"/>
<Input type="range" min={-2} max={0} step={0.1} bind:value={min_load_factor} placeholder="range placeholder"/>
</FormGroup>
<FormGroup floating label="standard maneuver load factor for e.g. flare">
<Input type="number" min={0} max={2} step={0.1} bind:value={maneuver_load_factor} placeholder="number placeholder"/>
<Input type="range" min={0} max={2} step={0.1} bind:value={maneuver_load_factor} placeholder="range placeholder"/>
</FormGroup>
<h5> Passenger definition</h5>
<FormGroup floating label="Number of passengers">
<Input type="number" min={0} step={1} bind:value={passenger_nr} placeholder="number placeholder"/>
</FormGroup>
<FormGroup floating label="Design mass of a single passenger WITHOUT luggage in kg">
<Input type="number" min={50} max={200} step={1} bind:value={mass_per_passenger} placeholder="number placeholder"/>
<Input type="range" min={50} max={200} step={1} bind:value={mass_per_passenger} placeholder="range placeholder"/>
</FormGroup>
<FormGroup floating label="Design mass of a the luggage for a single passenger in kg">
<Input type="number" min={0} max={25} step={1} bind:value={luggage_mass_per_passenger} placeholder="number placeholder"/>
<Input type="range" min={0} max={25} step={1} bind:value={luggage_mass_per_passenger} placeholder="range placeholder"/>
</FormGroup>
<h6>passenger class distro with bar and 5 classes</h6>
<h5>Cargo definition</h5>
<FormGroup floating label="Mass of cargo which does not belong to passengers in kg">
<Input type="number" min={0} max={1000} step={1} bind:value={additional_cargo_mass} placeholder="number placeholder"/>
<Input type="range" min={0} max={1000} step={1} bind:value={additional_cargo_mass} placeholder="range placeholder"/>
</FormGroup>
<FormGroup floating label="Density of cargo which does not belong to passengers in kg/m^3">
<Input type="number" min={150} max={200} step={1} bind:value={cargo_density} placeholder="number placeholder"/>
<Input type="range" min={150} max={200} step={1} bind:value={cargo_density} placeholder="range placeholder"/>
</FormGroup>
</Form>
</TabPane>
<TabPane tabId="requirements" tab="Requirements">
<Form>
</Form>
</TabPane>
<TabPane tabId="assessment_scenario" tab="Assessment Scenario">
<Form>
</Form>
</TabPane>
</TabContent>
<Form>
<h2>Requirements and Specifications</h2>
<h5>Design specification</h5>
<h5>Energy carriers information</h5>
<FormGroup floating label="ID of Energy type: kerosene / liquid_hydrogen / battery / saf (for multifuel engine create new ID)">
<Input type="number" placeholder="number placeholder"/>
</FormGroup>
<h5>Propulsion information?</h5>
<FormGroup floating label="Way the power is generated from the source">
<Input type="select" placeholder="Enter a value">
<option value="turbo">turbo</option>
<option value="electric">electric</option>
<option value="fuel_cell">fuel_cell</option>
</Input>
</FormGroup>
<FormGroup floating label="Type of main thrust generator">
<Input type="select" placeholder="Enter a value">
<option value="fan">fan</option>
<option value="prop">prop</option>
</Input>
</FormGroup>
<FormGroup floating label="position on component">
<Input type="select" placeholder="Enter a value">
<option value="wing">wing</option>
<option value="fuselage">fuselage</option>
<option value="empennage">empennage</option>
</Input>
</FormGroup>
<FormGroup floating label="x-position (aircraft coordinate system)">
<Input type="select" placeholder="Enter a value">
<option value="front">front</option>
<option value="back">back</option>
</Input>
</FormGroup>
<FormGroup floating label="y-position (aircraft coordinate system)">
<Input type="select" placeholder="Enter a value">
<option value="left">left</option>
<option value="right">right</option>
</Input>
</FormGroup>
<FormGroup floating label="z-position (aircraft coordinate system)">
<Input type="select" placeholder="Enter a value">
<option value="over">over</option>
<option value="mid">mid</option>
<option value="under">under</option>
<option value="in">in</option>
</Input>
</FormGroup>
<FormGroup floating label="see energy carrier specification node">
<Input type="number" min={0} max={5} step={1} bind:value={energycarriers} placeholder="number placeholder"/>
<Input type="range" min={0} max={5} step={1} bind:value={energycarriers} placeholder="range placeholder"/>
</FormGroup>
<FormGroup floating label="Share of this thrust in relation to required aircraft thrust">
<Input type="number" min={0} max={1} step={0.1} bind:value={thrust_share} placeholder="number placeholder"/>
<Input type="range" min={0} max={1} step={0.1} bind:value={thrust_share} placeholder="range placeholder"/>
</FormGroup>
<h5>Systems information</h5>
<FormGroup floating label="Way the power is generated from the source">
<Input type="select" placeholder="Enter a value">
<option value="propulsor">propulsor</option>
<option value="turbo">turbo</option>
<option value="electric">electric</option>
<option value="fuel_cell">fuel_cell</option>
</Input>
</FormGroup>
<p>dieser bereich ist verwirrend, unterkategorien?</p>
<h5>Skinning Information</h5>
<FormGroup floating label="Material of skinning">
<Input placeholder="Enter a value"/>
</FormGroup>
<FormGroup floating label="Thickness of skinning">
<Input type="number" min={0.0001} max={0.1} step={0.0001} bind:value={thickness} placeholder="number placeholder"/>
<Input type="range" min={0.0001} max={0.1} step={0.0001} bind:value={thickness} placeholder="range placeholder"/>
</FormGroup>
<h5>Technology</h5>
<Input type="switch" label="Switch if variable camber is used" />
<h5>Energy tanks information?</h5>
<p>energiecarrier wieder, machmal bei auswahl zahlen manchmal direkt wörter</p>
<FormGroup floating label="Component where the tank is located">
<Input type="select" placeholder="Enter a value">
<option value="fusalage">fusalage</option>
<option value="wing">wing</option>
<option value="horizontal_stabilizer">horizontal_stabilizer</option>
</Input>
</FormGroup>
<FormGroup floating label="Position of tank in location">
<Input type="select" placeholder="Enter a value">
<option value="tailcone">tailcone</option>
<option value="rear">rear</option>
<option value="front">front</option>
<option value="top">top</option>
<option value="bottom">bottom</option>
<option value="center">center</option>
<option value="inner_left">inner_left</option>
<option value="outer_left">outer_left</option>
<option value="inner_right">inner_right</option>
<option value="outer_right">outer_right</option>
<option value="total">total</option>
</Input>
</FormGroup>
<h5>Aircraft design requirements</h5>
<h6>TLAR</h6>
<FormGroup floating label="Maximum structual payload mass which can be carried by the aircraft (e.g. for short trips) in kg">
<Input type="number" min={100} max={150000} step={100} bind:value={maximum_structrual_payload_mass} placeholder="number placeholder"/>
<Input type="range" min={100} max={150000} step={100} bind:value={maximum_structrual_payload_mass} placeholder="range placeholder"/>
</FormGroup>
<FormGroup floating label="Design takeoff distance (Balanced Field Length) at Sea Level with maximum takeoff mass (MTOM) and (ISA + deltaISA)-Conditions in m">
<Input type="number" min={600} max={5000} step={1} bind:value={takeoff_distance} placeholder="number placeholder"/>
<Input type="range" min={600} max={5000} step={1} bind:value={takeoff_distance} placeholder="range placeholder"/>
</FormGroup>
<FormGroup floating label="Needed runway length at Sea Level with maximum landing mass (MLM) and (ISA + deltaISA)-Conditions (Safety-Landing Distance according to FAR 121.195: landing_field_required/0.6) in m">
<Input type="number" min={600} max={5000} step={1} bind:value={landing_field_length} placeholder="number placeholder"/>
<Input type="range" min={600} max={5000} step={1} bind:value={landing_field_length} placeholder="range placeholder"/>
</FormGroup>
<FormGroup floating label="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">
<Input placeholder="Enter a value"/>
</FormGroup>
<p>mit check dass code stimmt?</p>
</Form>
<Styles/>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment