Open s-celles opened 5 years ago
Example of a JSON config file (verified using https://jsonlint.com/ and beautified using https://jsonformatter.org/json-pretty-print )
or YAML file (via https://www.json2yaml.com/ )
Slider component https://quasar.dev/vue-components/slider
CHANGELOG
name
property is renamed to designation
in configuration file to avoid problems.
using jest https://jestjs.io/ for unit tests Added to dev dependencies using
yarn add --dev jest
using js-yaml https://github.com/nodeca/js-yaml for parsing YAML config files Added to dependencies using
yarn add js-yaml
coordinates of center of gravity is calculated and tested
ToDo: build user interface Adding sliders for each loads https://github.com/scls19fr/wnb/blob/master/data/f-bubk.yml#L33 to set current_value of each load
Creating a graph with centrogram First graph : mass = f(lever_arm) Second graph mass = f(moment)
ToDo: URL routing
/
should display list of aircrafts using .yml
files from data directory (with name and immat of aircraft)
/aircrafts/f-bubk
should show centrogram for a given aircraft
https://codepen.io/pen/?&editable=true
<head>
<!-- Load plotly.js into the DOM -->
<script src='https://cdn.plot.ly/plotly-latest.min.js'></script>
</head>
<body>
<div id='myDiv'><!-- Plotly chart will be drawn inside this DIV --></div>
</body>
var centrogram = {
x: [0.8, 0.8, 0.835, 0.952, 0.952, 0.8],
y: [250, 580, 726, 726, 250, 250],
mode: 'lines',
line: {
color: 'rgb(55, 128, 191)',
width: 3
}
};
var data = [centrogram];
var layout = {
title: 'Line and Scatter Styling'
};
Plotly.newPlot('myDiv', data, layout);
Display aicrafts list at app startup (sorted by owner, then by type, then by immat)... A LINQ like approach for Javascript should be considered https://sung.codes/blog/2018/02/24/approximate-equivalent-linq-methods-javascript/
Goal
Build an application for weight and balance of small aircrafts (SEP, glider...) https://en.wikipedia.org/wiki/Center_of_gravity_of_an_aircraft https://en.wikipedia.org/wiki/Center_of_gravity_of_an_aircraft
Example for a Cessna C150 https://www.aero-club-poitou.fr/acp/storage/app/media/FBUBK%20-%20Fiche%20de%20pes%C3%A9e%20V2.pdf https://www.aero-club-poitou.fr/acp/storage/app/media/FBUBK%20-%20Fiche%20de%20pes%C3%A9e%20V2.xlsx
Technical solution
Progressive web application pwa (HTML+JS)
Configuration of application
One folder per aicraft 1 configuration file JSON (or YAML or TOML or other) which contains
Units
User interface
should show centrogram should display position of center of mass (with current load but also with empty or full fuel) using a circle on plot and displaying coordinates of this point (mass and lever of arm) if center of mass is not inside centrogram a message should warm user ("Center of mass out of centrogram") and coordinates of center of mass should change from black to red.
Sliders should allow to change loads (mass for most load, volume for fuel)
Printing
PDF export of weight and balance sheet