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

Merge branch 'feature_report_generation' into 'develop'

report_generator updates

See merge request !4
parents 7ad8963c 8088c4d0
Branches
Tags 0.2.0
2 merge requests!11Initial open source version,!4report_generator updates
......@@ -23,7 +23,6 @@ target_link_libraries(${MODULE_NAME}
PRIVATE
UnicadoLibs::aixml
UnicadoLibs::runtimeInfo
UnicadoLibs::standardFiles
UnicadoLibs::moduleBasics
UnicadoLibs::aircraftGeometry2
)
......
This diff is collapsed.
<doxygenlayout version="1.0">
<!-- Generated by doxygen 1.9.7 -->
<!-- Navigation index tabs for HTML output -->
<navindex>
<tab type="mainpage" visible="yes" title="Home"/>
<!-- <tab type="user" url="md_content_2mypage.html" title="Getting Started"/> -->
<tab type="pages" visible="yes" title="" intro=""/>
<tab type="modules" visible="yes" title="" intro=""/>
<tab type="namespaces" visible="yes" title="">
<tab type="namespacelist" visible="yes" title="" intro=""/>
<tab type="namespacemembers" visible="yes" title="" intro=""/>
</tab>
<tab type="concepts" visible="yes" title="">
</tab>
<tab type="interfaces" visible="yes" title="">
<tab type="interfacelist" visible="yes" title="" intro=""/>
<tab type="interfaceindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="interfacehierarchy" visible="yes" title="" intro=""/>
</tab>
<tab type="classes" visible="yes" title="">
<tab type="classlist" visible="yes" title="" intro=""/>
<tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="hierarchy" visible="yes" title="" intro=""/>
<tab type="classmembers" visible="yes" title="" intro=""/>
</tab>
<tab type="structs" visible="yes" title="">
<tab type="structlist" visible="yes" title="" intro=""/>
<tab type="structindex" visible="$ALPHABETICAL_INDEX" title=""/>
</tab>
<tab type="exceptions" visible="yes" title="">
<tab type="exceptionlist" visible="yes" title="" intro=""/>
<tab type="exceptionindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="exceptionhierarchy" visible="yes" title="" intro=""/>
</tab>
<tab type="files" visible="yes" title="">
<tab type="filelist" visible="yes" title="" intro=""/>
<tab type="globals" visible="yes" title="" intro=""/>
</tab>
<tab type="examples" visible="yes" title="" intro=""/>
<tab type="user" url="https://unicado.pages.rwth-aachen.de/unicado.gitlab.io/modules/overview/" title="Module Overview" />
</navindex>
<!-- Layout definition for a class page -->
<class>
<briefdescription visible="yes"/>
<includes visible="$SHOW_HEADERFILE"/>
<inheritancegraph visible="$CLASS_GRAPH"/>
<collaborationgraph visible="$COLLABORATION_GRAPH"/>
<memberdecl>
<nestedclasses visible="yes" title=""/>
<publictypes title=""/>
<services title=""/>
<interfaces title=""/>
<publicslots title=""/>
<signals title=""/>
<publicmethods title=""/>
<publicstaticmethods title=""/>
<publicattributes title=""/>
<publicstaticattributes title=""/>
<protectedtypes title=""/>
<protectedslots title=""/>
<protectedmethods title=""/>
<protectedstaticmethods title=""/>
<protectedattributes title=""/>
<protectedstaticattributes title=""/>
<packagetypes title=""/>
<packagemethods title=""/>
<packagestaticmethods title=""/>
<packageattributes title=""/>
<packagestaticattributes title=""/>
<properties title=""/>
<events title=""/>
<privatetypes title=""/>
<privateslots title=""/>
<privatemethods title=""/>
<privatestaticmethods title=""/>
<privateattributes title=""/>
<privatestaticattributes title=""/>
<friends title=""/>
<related title="" subtitle=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<enums title=""/>
<services title=""/>
<interfaces title=""/>
<constructors title=""/>
<functions title=""/>
<related title=""/>
<variables title=""/>
<properties title=""/>
<events title=""/>
</memberdef>
<allmemberslink visible="yes"/>
<usedfiles visible="$SHOW_USED_FILES"/>
<authorsection visible="yes"/>
</class>
<!-- Layout definition for a namespace page -->
<namespace>
<briefdescription visible="yes"/>
<memberdecl>
<nestednamespaces visible="yes" title=""/>
<constantgroups visible="yes" title=""/>
<interfaces visible="yes" title=""/>
<classes visible="yes" title=""/>
<concepts visible="yes" title=""/>
<structs visible="yes" title=""/>
<exceptions visible="yes" title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection visible="yes"/>
</namespace>
<!-- Layout definition for a concept page -->
<concept>
<briefdescription visible="yes"/>
<includes visible="$SHOW_HEADERFILE"/>
<definition visible="yes" title=""/>
<detaileddescription title=""/>
<authorsection visible="yes"/>
</concept>
<!-- Layout definition for a file page -->
<file>
<briefdescription visible="yes"/>
<includes visible="$SHOW_INCLUDE_FILES"/>
<includegraph visible="$INCLUDE_GRAPH"/>
<includedbygraph visible="$INCLUDED_BY_GRAPH"/>
<sourcelink visible="yes"/>
<memberdecl>
<interfaces visible="yes" title=""/>
<classes visible="yes" title=""/>
<structs visible="yes" title=""/>
<exceptions visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<concepts visible="yes" title=""/>
<constantgroups visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection/>
</file>
<!-- Layout definition for a group page -->
<group>
<briefdescription visible="yes"/>
<groupgraph visible="$GROUP_GRAPHS"/>
<memberdecl>
<nestedgroups visible="yes" title=""/>
<dirs visible="yes" title=""/>
<files visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<concepts visible="yes" title=""/>
<classes visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<pagedocs/>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
</memberdef>
<authorsection visible="yes"/>
</group>
<!-- Layout definition for a directory page -->
<directory>
<briefdescription visible="yes"/>
<directorygraph visible="yes"/>
<memberdecl>
<dirs visible="yes"/>
<files visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
</directory>
</doxygenlayout>
<!-- HTML header for doxygen 1.9.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="$langISO">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen $doxygenversion"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/>
<!--BEGIN DISABLE_INDEX-->
<!--BEGIN FULL_SIDEBAR-->
<script type="text/javascript">var page_layout=1;</script>
<!--END FULL_SIDEBAR-->
<!--END DISABLE_INDEX-->
<script type="text/javascript" src="$relpath^jquery.js"></script>
<script type="text/javascript" src="$relpath^dynsections.js"></script>
<script type="text/javascript" src="$relpath^doxygen-awesome-darkmode-toggle.js"></script>
<script type="text/javascript">
DoxygenAwesomeDarkModeToggle.init()
</script>
<script type="text/javascript" src="$relpath^doxygen-awesome-tabs.js"></script>
<script type="text/javascript">
DoxygenAwesomeTabs.init()
</script>
<script type="text/javascript" src="$relpath^doxygen-awesome-fragment-copy-button.js"></script>
<script type="text/javascript">
DoxygenAwesomeFragmentCopyButton.init()
</script>
$treeview
$search
$mathjax
$darkmode
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
$extrastylesheet
</head>
<body>
<!--BEGIN DISABLE_INDEX-->
<!--BEGIN FULL_SIDEBAR-->
<div id="side-nav" class="ui-resizable side-nav-resizable"><!-- do not remove this div, it is closed by doxygen! -->
<!--END FULL_SIDEBAR-->
<!--END DISABLE_INDEX-->
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<!--BEGIN TITLEAREA-->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<!--BEGIN PROJECT_LOGO-->
<td id="projectlogo"><img alt="Logo" src="$relpath^$projectlogo"/></td>
<!--END PROJECT_LOGO-->
<!--BEGIN PROJECT_NAME-->
<td id="projectalign">
<div id="projectname">$projectname<!--BEGIN PROJECT_NUMBER--><span id="projectnumber">&#160;$projectnumber</span><!--END PROJECT_NUMBER-->
</div>
<!--BEGIN PROJECT_BRIEF--><div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF-->
</td>
<!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME-->
<!--BEGIN PROJECT_BRIEF-->
<td>
<div id="projectbrief">$projectbrief</div>
</td>
<!--END PROJECT_BRIEF-->
<!--END !PROJECT_NAME-->
<!--BEGIN DISABLE_INDEX-->
<!--BEGIN SEARCHENGINE-->
<!--BEGIN !FULL_SIDEBAR-->
<td>$searchbox</td>
<!--END !FULL_SIDEBAR-->
<!--END SEARCHENGINE-->
<!--END DISABLE_INDEX-->
</tr>
<!--BEGIN SEARCHENGINE-->
<!--BEGIN FULL_SIDEBAR-->
<tr><td colspan="2">$searchbox</td></tr>
<!--END FULL_SIDEBAR-->
<!--END SEARCHENGINE-->
</tbody>
</table>
</div>
<!--END TITLEAREA-->
<!-- end header part -->
......@@ -6,16 +6,16 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>UNICADO Report</title>
<link href="style.css" rel="stylesheet" />
<link rel="icon" href= "UNICADO_logo_refined.svg" type="image/x-icon" />
</head>
<body>
<div class="logo"></div>
<div class="content">
<h1>UNICADO Report
<font size="2">Version #number
</h1>
<div class="container">
<div class="box data">
<div class="box data" id="left-box">
<div class="left">
<h2>Top Level Aircraft Requirements (TLARs)</h2>
<div class="left">
......@@ -38,8 +38,6 @@
<th>Item</th>
<th>Value</th>
<th>Unit</th>
<th>Lower Bound</th>
<th>Upper Bound</th>
</tr>
</thead>
<tbody>
......@@ -47,8 +45,14 @@
</tbody>
</table>
</div>
<div class="right">
<div class="left" id="mission-profile-box">
<h2>Mission Profile</h2>
<label for="csvFileInput" class="select-items-btn">Choose Mission Profile</label>
<input type="file" accept=".csv" id="csvFileInput" style="display: none;">
<div class="center" id="graph-container">
<svg id="graph"></svg>
<div id="tooltip" class="tooltip"></div>
</div>
</div>
</div>
<div class="box link">
......@@ -60,6 +64,7 @@
<button class="cluster-selection off" id="aerodynamics" onclick="toggleButton(this)">Aerodynamics</button>
<button class="cluster-selection off" id="liftCoefficients" onclick="toggleButton(this)">Lift Coefficients</button>
<button class="cluster-selection off" id="masses" onclick="toggleButton(this)">Masses</button>
<button class="cluster-selection off" id="cost" onclick="toggleButton(this)">Cost</button>
</div>
<table class="content-table" id="aircraftTable">
<thead>
......@@ -75,12 +80,12 @@
</table>
</div>
<div class="right">
<h2>Aircraft Views</h2>
<h2>Aircraft Geometry</h2>
<div class="left" id="3d-view-container">
<!-- Placeholder for 3D model -->
<canvas id="3d-canvas" style="width: 100%; height: 100%;"></canvas>
</div>
<button class="select-items-btn" onclick="switchImage()">Switch View</button>
<button class="select-items-btn" onclick="switchImage()">Reset View</button>
</div>
<div class="right">
<h3>More Information</h3>
......@@ -105,6 +110,217 @@
}
}
</script>
<script src="https://d3js.org/d3.v7.min.js"></script>
<script>
function updateMissionProfile (segments) {
// The Mission Profile Graph Script
const width = 800;
const height = 480;
const margin = { top: 50, right: 50, bottom: 50, left: 50 };
const svg = d3.select("#graph").attr("width", width).attr("height", height);
const xScale = d3.scaleLinear().domain([0, 4600]).range([margin.left, width - margin.right]);
const yScale = d3.scaleLinear().domain([0, 11000]).range([height - margin.bottom, margin.top]);
const xAxis = d3.axisBottom(xScale).ticks(8).tickFormat(d3.format('d'));
const yAxis = d3.axisLeft(yScale).ticks(6);
svg.append("g")
.attr("transform", `translate(0,${height - margin.bottom})`)
.call(xAxis);
svg.append("g")
.attr("transform", `translate(${margin.left},0)`)
.call(yAxis);
svg.append("text")
.attr("x", width / 2)
.attr("y", height - margin.bottom + 40)
.attr("text-anchor", "middle")
.attr("class", "axis-label")
.text("Range (km)");
svg.append("text")
.attr("x", -height / 2)
.attr("y", margin.left - 40)
.attr("text-anchor", "middle")
.attr("transform", "rotate(-90)")
.attr("class", "axis-label")
.text("Altitude (m)");
// Create gridlines with proper visibility
svg.append('g')
.attr('class', 'gridlines')
.selectAll('.gridline')
.data(xScale.ticks(8)) // Data for x-axis ticks
.enter()
.append('line')
.attr('class', 'gridline')
.attr('x1', d => xScale(d))
.attr('x2', d => xScale(d))
.attr('y1', margin.top)
.attr('y2', height - margin.bottom)
.attr('stroke', 'lightgray') // Gridline color
.attr('stroke-width', 0.5) // Gridline width
.attr('stroke-dasharray', '2,2'); // Dashed lines
svg.append('g')
.attr('class', 'gridlines')
.selectAll('.gridline')
.data(yScale.ticks(6)) // Data for y-axis ticks
.enter()
.append('line')
.attr('class', 'gridline')
.attr('x1', margin.left)
.attr('x2', width - margin.right)
.attr('y1', d => yScale(d))
.attr('y2', d => yScale(d))
.attr('stroke', 'lightgray') // Gridline color
.attr('stroke-width', 0.5) // Gridline width
.attr('stroke-dasharray', '2,2'); // Dashed lines
// Create the tooltip and add basic styling
const tooltip = d3.select("#tooltip")
.style("position", "absolute")
.style("pointer-events", "none")
.style("color", "white")
.style("padding", "8px")
.style("border-radius", "4px")
.style("font-size", "12px")
.style("z-index", "10")
.style("display", "none") // Initially hide the tooltip
.style("background-color", "#2c3e50bd");
// Draw the mission profile lines with circular ends
segments.forEach(segment => {
const line = svg.append("line")
.attr("x1", xScale(segment.start))
.attr("y1", yScale(segment.startAlt))
.attr("x2", xScale(segment.end))
.attr("y2", yScale(segment.endAlt))
.attr("stroke", "#2c3e50") // Initial color of the lines
.attr("stroke-width", 4) // Set line width to 4
.attr("stroke-linecap", "round") // Apply circular ends to the lines
.on("mouseover", function(event) {
// Change color to red and make the line bold on hover
d3.select(this)
.attr("stroke", "#ee5253")
.attr("stroke-width", 6); // Make line thicker when hovered
// Display the tooltip and position it
tooltip.style("display", "block")
.html(`<strong>${segment.label}</strong><br>Range: ${segment.start.toPrecision(5)} km to ${segment.end.toPrecision(5)} km<br>Altitude: ${segment.startAlt.toPrecision(5)} m to ${segment.endAlt.toPrecision(5)} m<br>Time: ${segment.startTime.toPrecision(3)} min to ${segment.endTime.toPrecision(3)} min`);
const el = (sel, par) => (par||document).querySelector(sel);
const elMissionProfile = el("#graph-container");
const elLeftBox = el("#left-box");
// Dynamically adjust the tooltip position
const mouseX = event.clientX; // Adding a small offset to the right
const mouseY = event.clientY; // Adding a small offset below the cursor
tooltip.style("left", `${mouseX - elMissionProfile.offsetLeft + elLeftBox.scrollLeft}px`)
.style("top", `${mouseY - elMissionProfile.offsetTop + elLeftBox.scrollTop - 150}px`);
})
.on("mouseout", function() {
// Reset line color and thickness when mouse leaves
d3.select(this)
.attr("stroke", "#2c3e50")
.attr("stroke-width", 4); // Reset to original thickness
// Hide the tooltip
tooltip.style("display", "none");
});
});
// Tooltip follows cursor based on screen coordinates
svg.on("mousemove", function(event) {
const el = (sel, par) => (par||document).querySelector(sel);
const elMissionProfile = el("#graph-container");
const elLeftBox = el("#left-box");
// Get the mouse position relative to the viewport (clientX, clientY)
const [mouseX, mouseY] = [event.clientX, event.clientY];
if (tooltip.style("display") === "block") {
tooltip.style("left", (mouseX - elMissionProfile.offsetLeft + elLeftBox.scrollLeft) + "px") // Add an offset so the tooltip doesn't overlap with the pointer
.style("top", (mouseY - elMissionProfile.offsetTop + elLeftBox.scrollTop - 150) + "px");
}
});
};
document.getElementById('csvFileInput').addEventListener('change', function(event) {
const file = event.target.files[0];
if (!file) return;
const reader = new FileReader();
reader.onload = function(e) {
const text = e.target.result;
const rows = text.split('\n').map(row => row.trim()).filter(row => row.length > 0);
const header = rows[0].split(';');
// Identify the column indices for Altitude, Range, and Flight mode
const altitudeIndex = header.indexOf(' Altitude [m]');
const rangeIndex = header.indexOf(' Range [m]');
const modeIndex = header.indexOf(' Mode name [-]');
const timeIndex = header.indexOf('Time [s]');
if (altitudeIndex === -1 || rangeIndex === -1 || modeIndex === -1) {
console.error('CSV file is missing required headers.');
return;
}
const data = rows.slice(1).map(row => {
const columns = row.split(';');
return {
altitude: parseFloat(columns[altitudeIndex]),
range: parseFloat(columns[rangeIndex])/1000,
mode: columns[modeIndex],
time: parseFloat(columns[timeIndex])/(60),
};
});
// Clear and populate segments based on mode changes
segments = [];
let currentSegment = null;
data.forEach((point, index) => {
if (index === 0 || point.mode !== data[index - 1].mode) {
if (currentSegment) {
currentSegment.end = point.range;
currentSegment.endAlt = point.altitude;
currentSegment.endTime = point.time;
segments.push(currentSegment);
}
currentSegment = {
start: point.range,
end: null,
startAlt: point.altitude,
endAlt: null,
label: point.mode,
startTime: point.time,
endTime: null
};
}
if (index === data.length - 1 && currentSegment) {
currentSegment.end = point.range;
currentSegment.endAlt = point.altitude;
currentSegment.endTime = point.time;
segments.push(currentSegment);
}
});
console.log('Updated segments:', segments);
updateMissionProfile(segments);
};
reader.readAsText(file);
});
</script>
<script type="module">
import * as THREE from 'three';
......@@ -240,6 +456,10 @@
masses: [
{ item: "Mass Item 1", value: "2000", unit: "kg" },
{ item: "Mass Item 2", value: "2500", unit: "kg" }
],
cost: [
{ item: "Cost Item 1", value: "2000", unit: "$" },
{ item: "Cost Item 2", value: "2500", unit: "$" }
]
};
let initialCheckedState = []; // Store initial state of checkboxes
......@@ -291,15 +511,11 @@
const item = checkbox.value;
const value = checkbox.getAttribute('data-value');
const unit = checkbox.getAttribute('data-unit');
const lower = checkbox.getAttribute('data-lower');
const upper = checkbox.getAttribute('data-upper');
const row = resultTableBody.insertRow();
row.insertCell(0).textContent = item;
row.insertCell(1).textContent = value;
row.insertCell(2).textContent = unit;
row.insertCell(3).textContent = lower;
row.insertCell(4).textContent = upper;
});
}
......
......@@ -19,7 +19,7 @@ table {
}
.logo {
background-image: url('inc/logos/UNICADO_logo.svg');
background-image: url('UNICADO_logo.svg');
height: 75vh;
width: 100%;
opacity: 0.2;
......@@ -31,6 +31,17 @@ table {
}
.logo2 {
background-image: url('UNICADO_logo.svg');
width: 30%;
height: 5vh;
opacity: 0.5;
filter: grayscale(100%);
background-size: contain;
background-repeat: no-repeat;
display:inline-block;
}
.content {
position: absolute;
width: 98%;
......@@ -311,4 +322,30 @@ canvas {
display: block; /* Removes the default inline display */
width: 100% !important; /* Make sure canvas scales with its parent container */
height: 100% !important; /* Ensure canvas scales to fit the container */
}
\ No newline at end of file
}
#mission-profile {
padding: 2rem;
margin-top: 2rem;
}
#graph-container {
width: 100%;
height: 500px; /* Adjust height as needed */
position: relative;
}
.tooltip {
position: absolute;
background-color: #2c3e50bd;
color: white;
padding: 8px;
border-radius: 4px;
font-size: 12px;
display: none; /* Initially hidden */
pointer-events: none; /* Makes sure the tooltip doesn't interfere with mouse events */
z-index: 10; /* Ensures it's above other elements */
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5); /* Optional: Adds a shadow for better visibility */
}
This diff is collapsed.
......@@ -76,6 +76,10 @@ void ReportGenerator::initialize()
/* Copy the style.css file to the reporting folder */
std::filesystem::copy_file(std::filesystem::path("./inc/html_templates/style-template.css"), this->reporting_path / "style.css", std::filesystem::copy_options::overwrite_existing);
/* Copy the UNICADO logo to the reporting folder*/
std::filesystem::copy_file(std::filesystem::path("./inc/logos/UNICADO_logo_refined.svg"), this->reporting_path / "UNICADO_logo_refined.svg", std::filesystem::copy_options::overwrite_existing);
std::filesystem::copy_file(std::filesystem::path("./inc/logos/UNICADO_logo.svg"), this->reporting_path / "UNICADO_logo.svg", std::filesystem::copy_options::overwrite_existing);
}
void ReportGenerator::run()
......@@ -229,7 +233,7 @@ void ReportGenerator::add_clusters()
{
std::string line;
int entry = 0;
while ((getline(this->htmlcontent, line)) && (entry < 5))
while ((getline(this->htmlcontent, line)) && (entry < 6))
{
this->html_temp << line << std::endl;
/* Search the aircraft xml file for paths to clustered aircraft design parameters */
......@@ -292,6 +296,12 @@ void ReportGenerator::add_clusters()
this->html_temp << "{ item: \"maximum fuel mass\"," +
ReportGenerator::generic_writer("analysis/masses_cg_inertia/maximum_fuel_mass/mass_properties/mass") << std::endl;
}
if (line.find("cost: [") != std::string::npos)
{
entry += 1;
this->html_temp << "{ item: \"direct operating cost\"," +
ReportGenerator::generic_writer("assessment/cost_estimation/operating_cost/direct_operating_cost") << std::endl;
}
}
/* If cluster contains missing elements, inform the user */
catch (...)
......
......@@ -53,11 +53,11 @@ namespace geometry
*/
struct Aircraft
{
std::vector<Fuselage> fuselages;
std::vector<Wing> wings;
std::vector<Wing> empennage;
std::vector<Nacelle> nacelle;
std::vector<Pylon> pylon;
std::vector<Fuselage> fuselages; /** Fuselage(s) of the aircraft. */
std::vector<Wing> wings; /** Wings of the aircraft. */
std::vector<Wing> empennage; /** Empennage(s) of the aircraft. */
std::vector<Nacelle> nacelle; /** Nacelle(s) of the propulsion assembly. */
std::vector<Pylon> pylon; /** Pylon(s) of the propulsion assembly. */
};
}
/* === Classes === */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment