convertUNICADO2CPACS
convertUNICADO2CPACS.h
Go to the documentation of this file.
1/* Copyright (C) 2016-2022 Institute of Aerospace Systems, RWTH Aachen University - All rights reserved.
2 This file is part of UNICADO.
3
4 UNICADO is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
8
9 UNICADO is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with UNICADO. If not, see <http://www.gnu.org/licenses/>.
16*/
17#ifndef CPACSINTERFACE_CONVERTUNICADO2CPACS_SRC_CONVERTUNICADO2CPACS_H_
18#define CPACSINTERFACE_CONVERTUNICADO2CPACS_SRC_CONVERTUNICADO2CPACS_H_
19
20#include <string>
21#include <vector>
24#include "convertUNICADO2CPACS/src/lib/aircraftGeometry/liftingsurface.h"
25#include "convertUNICADO2CPACS/src/lib/aircraftGeometry/verticalsurface.h"
26#include "convertUNICADO2CPACS/src/lib/aixml/node.h"
27
29class landingGear;
30class nacelle;
31class pylon;
32
37 public:
41 explicit convertUNICADO2CPACS(const convertUNICADO2CPACSSettings &mySettings);
42
45 virtual ~convertUNICADO2CPACS();
46
49 void initialize();
50
54 void run();
55
58 std::vector<cpacsAcft::cpacsMaterial> theUsedMaterials;
59 std::vector<double> range;
61 private:
67 void createEmptyCpacsFile(const std::string& aFilename);
68
73 std::string getMaterial(const std::string& aMaterialName);
74
75 /* Read Functions (From UNICADO-File) */
76 //Mass information
80
84
85 //Geometry
88 void convertGeometry();
89
92 void convertFuselage();
93
96 void convertWing();
97
100 void convertStabiliser();
101
106 void convertLiftingSurface(liftingSurface* unicadoLiftingSurfacePt,
107 cpacsAcft::cpacsWing* cpacsWingPt);
108
111 void convertFin();
112
117 void convertVerticalSurface(verticalsurface* verticalSurfacePt,
118 cpacsAcft::cpacsWing* cpacsFinPt);
119
123
129 void convertEngines(unicadoAcft::unicadoPropulsion* unicadoEnginedPt, cpacsAcft::cpacsEngine* cpacsEnginePt,
130 int index);
131
136 void convertScaledPerformance(unicadoAcft::unicadoPropulsion* unicadoEnginedPt, cpacsAcft::cpacsEngine* cpacsEnginePt, std::string type);
137
142 void convertPylons(pylon* unicadoPylonPt, cpacsAcft::cpacsPylon* cpacsPylonPt);
143
146 void convertNacelles();
147
150 void convertlandingGear();
151
157 void createWheelGeometry(cpacsAcft::cpacsGear::wheel* thisWheelPt, const std::string& theGearName,
158 const Vec3& theWheelGroupReferencePt, const double& theWheelTrack);
166 void createStrutGeometry(cpacsAcft::cpacsGear::mainStrut* thisStrutPt, const std::string& theGearName,
167 const Vec3& theStrutGroupReferencePt, const double& strutLength, const double& strutRadius);
168
169 //Auxiliary functions for geometry
178 double calculateUnicadoLGRelHeight(double spanPos, double relChordPos, double globalLandingGearZRef);
179
184 void convertFuseDatProfile(std::string profileFilePath, std::string profileName);
185
194 void convertWingDatProfile(std::string profileFilePath, std::string profileName, cpacsAcft::cpacsWing* cpacsWingPt,
195 liftingSurface::segment* SegmentPt);
196
204 void convertVerticalWingDatProfile(std::string profileFilePath, std::string profileName, cpacsAcft::cpacsWing* cpacsWingPt,
205 verticalsurface::segment* SegmentPt);
206
213 void convertNacelleDatProfile(const std::string& profileFilePath, const std::string& profileName, const std::string& profileUID);
214
215
219 void collectVerticalWingDatProfilePoints(std::vector<Vec3> coords);
220
221 //Accommodation
225
226 //Propulsion
229 void convertPropulsion();
230
231 //Systems
234 void convertSystems();
235
236 //Aerodynamics
239 void convertAerodynamics();
240
241 //Stability and Control characteristics
245
246 //Performance
249 void convertPerformance();
250
255 void convertMission(unicadoAcft::unicadoPerformance::missionAnalysis *thisUnicadoMissionPt, cpacsAcft::cpacsMission *thisCpacsMissionPt);
256
257 //MonetaryValues
261
264 void convertRC();
265
268 void convertDOC();
269
272 void convertEOLCosts();
273
274 //Ecological Values
278
279 //Requirements
282 void convertRequirements();
283
284 //Design Specifications
287 void convertDesignSpecs();
288
292
296
300
304};
305#endif // CPACSINTERFACE_CONVERTUNICADO2CPACS_SRC_CONVERTUNICADO2CPACS_H_
Class for the control of all reading functions from UNICADO.
Definition: convertUNICADO2CPACS.h:36
convertUNICADO2CPACS(const convertUNICADO2CPACSSettings &mySettings)
Constructor of class convertUNICADO2CPACS.
Definition: convertUNICADO2CPACS.cpp:38
void createWheelGeometry(cpacsAcft::cpacsGear::wheel *thisWheelPt, const std::string &theGearName, const Vec3 &theWheelGroupReferencePt, const double &theWheelTrack)
function creates the wheel geometry based on the radius and the wheel track
Definition: convertUNICADO2CPACS.cpp:2091
void convertSystems()
Function that converts systems data from UNICADO-file into CPACS XML-Structure.
Definition: convertUNICADO2CPACS.cpp:2360
void convertNacelleDatProfile(const std::string &profileFilePath, const std::string &profileName, const std::string &profileUID)
Function that converts a Unicado Nacelle Profile from .dat file into CPACS XML-Structure.
Definition: convertUNICADO2CPACS.cpp:962
void convertDesignSpecsAccommodation()
Function that converts accommodation design specifications from UNICADO-file into CPACS XML-Structure...
Definition: convertUNICADO2CPACS.cpp:2723
void convertEOLCosts()
Function that converts end of life costs from UNICADO-file into CPACS XML-Structure.
Definition: convertUNICADO2CPACS.cpp:2676
void convertFuseDatProfile(std::string profileFilePath, std::string profileName)
Function that converts a Unicado Fuselage Profile from .dat file into CPACS XML-Structure.
Definition: convertUNICADO2CPACS.cpp:744
void convertGeometry()
Function that converts geometry from UNICADO-file into CPACS XML-Structure.
Definition: convertUNICADO2CPACS.cpp:539
void convertMission(unicadoAcft::unicadoPerformance::missionAnalysis *thisUnicadoMissionPt, cpacsAcft::cpacsMission *thisCpacsMissionPt)
converts mission file from UNICADO to CPACS
Definition: convertUNICADO2CPACS.cpp:2517
void initialize()
Function initializes unicado and cpacs aircraft.
Definition: convertUNICADO2CPACS.cpp:50
void collectVerticalWingDatProfilePoints(std::vector< Vec3 > coords)
Function collects half of the vertical lifting surface airfoil coordinates and closes the geometry ob...
Definition: convertUNICADO2CPACS.cpp:926
void convertMassBreakdown()
Function that converts massBreakdown from UNICADO-file into CPACS XML-Structure (MassBreakdown)
Definition: convertUNICADO2CPACS.cpp:264
void convertFuselage()
Function that converts fuselage from UNICADO-file into CPACS XML-Structure.
Definition: convertUNICADO2CPACS.cpp:591
void convertAccommodation()
Function that converts accommodation data from UNICADO-file into CPACS XML-Structure.
Definition: convertUNICADO2CPACS.cpp:2298
void convertStabilityAndControl()
Function that converts stability & control characteristics from UNICADO-file into CPACS XML-Structure...
Definition: convertUNICADO2CPACS.cpp:2503
cpacsAcft * myCpacsAcftPt
Definition: convertUNICADO2CPACS.h:57
void convertAerodynamics()
Function that converts aerodynamics from UNICADO-file into CPACS XML-Structure.
Definition: convertUNICADO2CPACS.cpp:2427
void convertVerticalWingDatProfile(std::string profileFilePath, std::string profileName, cpacsAcft::cpacsWing *cpacsWingPt, verticalsurface::segment *SegmentPt)
Function that converts a Unicado Vertical Wing Profile from .dat file into CPACS XML-Structure.
Definition: convertUNICADO2CPACS.cpp:880
void createStrutGeometry(cpacsAcft::cpacsGear::mainStrut *thisStrutPt, const std::string &theGearName, const Vec3 &theStrutGroupReferencePt, const double &strutLength, const double &strutRadius)
function creates cpacs strut geometry
Definition: convertUNICADO2CPACS.cpp:2169
void convertNacelles()
Function that converts Nacelles from UNICADO-file into CPACS XML-Structure.
Definition: convertUNICADO2CPACS.cpp:1684
void convertWing()
Function that converts wing from UNICADO-file into CPACS XML-Structure.
Definition: convertUNICADO2CPACS.cpp:990
void convertRequirements()
Function that converts requirements from UNICADO-file into CPACS XML-Structure.
Definition: convertUNICADO2CPACS.cpp:2691
void convertWingDatProfile(std::string profileFilePath, std::string profileName, cpacsAcft::cpacsWing *cpacsWingPt, liftingSurface::segment *SegmentPt)
Function that converts a Unicado Wing Profile from .dat file into CPACS XML-Structure.
Definition: convertUNICADO2CPACS.cpp:830
virtual ~convertUNICADO2CPACS()
Destructor of class convertUNICADO2CPACS.
Definition: convertUNICADO2CPACS.cpp:46
void convertMassesAndLoadings()
Function that converts MassesAndLoading from UNICADO-file into CPACS XML-Structure (MassesAndLoadings...
Definition: convertUNICADO2CPACS.cpp:223
void convertlandingGear()
Function that converts Landing Gear from UNICADO-file into CPACS XML-Structure.
Definition: convertUNICADO2CPACS.cpp:1868
void convertMonetaryValues()
Function that converts monetary values from UNICADO-file into CPACS XML-Structure.
Definition: convertUNICADO2CPACS.cpp:2588
void convertVerticalSurface(verticalsurface *verticalSurfacePt, cpacsAcft::cpacsWing *cpacsFinPt)
Function that converts a Geometry class VerticalSurface from UNICADO into CPACS XML-Structure.
Definition: convertUNICADO2CPACS.cpp:1391
void createEmptyCpacsFile(const std::string &aFilename)
Function to create an empty cpacs-file.
Definition: convertUNICADO2CPACS.cpp:75
void run()
Function converts from UNICADO aircraft to CPACS aircraft.
Definition: convertUNICADO2CPACS.cpp:101
void convertStabiliser()
Function that converts stabiliser from UNICADO-file into CPACS XML-Structure.
Definition: convertUNICADO2CPACS.cpp:996
void convertFin()
Function that converts Fin from UNICADO-file into CPACS XML-Structure.
Definition: convertUNICADO2CPACS.cpp:1383
void convertConfiguration()
Function that converts configuration data from UNICADO-file into CPACS XML-Structure.
Definition: convertUNICADO2CPACS.cpp:2719
void convertScaledPerformance(unicadoAcft::unicadoPropulsion *unicadoEnginedPt, cpacsAcft::cpacsEngine *cpacsEnginePt, std::string type)
Function that converts scaled performance from UNICADO-file into CPACS XML-Structure.
void convertDesignSpecPropulsion()
Function that converts propulsion design specifications from UNICADO-file into CPACS XML-Structure.
Definition: convertUNICADO2CPACS.cpp:2731
void convertEcologicalValues()
Function that converts ecological values from UNICADO-file into CPACS XML-Structure.
Definition: convertUNICADO2CPACS.cpp:2682
void convertEngines(unicadoAcft::unicadoPropulsion *unicadoEnginedPt, cpacsAcft::cpacsEngine *cpacsEnginePt, int index)
Function that converts Engines from UNICADO-file into CPACS XML-Structure.
Definition: convertUNICADO2CPACS.cpp:1554
void convertLiftingSurface(liftingSurface *unicadoLiftingSurfacePt, cpacsAcft::cpacsWing *cpacsWingPt)
Function that converts a Geometry class Liftingsurface from UNICADO into CPACS XML-Structure.
Definition: convertUNICADO2CPACS.cpp:1002
void convertPropulsionGeometry()
Function that prepares conversion and calls Engines and Pylons conversion functions.
Definition: convertUNICADO2CPACS.cpp:1523
void convertPropulsion()
Function that converts propulsion data from UNICADO-file into CPACS XML-Structure.
Definition: convertUNICADO2CPACS.cpp:2317
void convertDesignSpecsCargo()
Function that converts cargo design specifications from UNICADO-file into CPACS XML-Structure.
Definition: convertUNICADO2CPACS.cpp:2727
const convertUNICADO2CPACSSettings * mySettingsPt
Definition: convertUNICADO2CPACS.h:62
void convertPylons(pylon *unicadoPylonPt, cpacsAcft::cpacsPylon *cpacsPylonPt)
Function that converts Pylons from UNICADO-file into CPACS XML-Structure.
Definition: convertUNICADO2CPACS.cpp:1613
void convertRC()
Function that converts recurring costs from UNICADO-file into CPACS XML-Structure.
Definition: convertUNICADO2CPACS.cpp:2596
std::string getMaterial(const std::string &aMaterialName)
Function searches for a material or creates a new one.
Definition: convertUNICADO2CPACS.cpp:90
void convertDesignSpecs()
Function that converts design specifications from UNICADO-file into CPACS XML-Structure.
Definition: convertUNICADO2CPACS.cpp:2711
std::vector< double > range
Definition: convertUNICADO2CPACS.h:59
std::vector< cpacsAcft::cpacsMaterial > theUsedMaterials
Definition: convertUNICADO2CPACS.h:58
double calculateUnicadoLGRelHeight(double spanPos, double relChordPos, double globalLandingGearZRef)
Function that calculates relative height of unicado landing gear.
Definition: convertUNICADO2CPACS.cpp:2248
void convertDOC()
Function that converts direct operating costs from UNICADO-file into CPACS XML-Structure.
Definition: convertUNICADO2CPACS.cpp:2670
void convertPerformance()
Function that converts performance data from UNICADO-file into CPACS XML-Structure.
Definition: convertUNICADO2CPACS.cpp:2507
unicadoAcft * myUnicadoAcftPt
Definition: convertUNICADO2CPACS.h:56
Global class for the program settings, which are accessed throughout the program.
Definition: convertUNICADO2CPACSSettings.h:29
Class that represents the CPACS Aircrafts XML Structure.
Definition: cpacsAcftXML.h:33
Class which represents the CPACS wing XML block.
Definition: cpacsAcftXML.h:652
Class which represents the CPACS pylon XML block.
Definition: cpacsAcftXML.h:755
Class which contains geometry and performance parameters of the engine.
Definition: cpacsAcftXML.h:779
Class which contains the rough geometry of the wheel (cylinder)
Definition: cpacsAcftXML.h:1043
class contains length and radius of the main strut
Definition: cpacsAcftXML.h:1070
Class which represents the CPACS missions XML Block.
Definition: cpacsAcftXML.h:1200
Class that represents the UNICADO XML Structure.
Definition: unicadoAcftXML.h:40
Represents the unicado Propulsion Values-XML-Block.
Definition: unicadoAcftXML.h:437
The class contains general mission data, predefined mission steps and the resulting trajectory.
Definition: unicadoAcftXML.h:1051