32#include "conect_data.h"
42 std::string
RemoveExt( std::string filename );
72 bool WriteConns( std::ostream &fout,
bool bCom =
true );
73 bool WriteWakes( std::ostream &fout,
bool bCom =
true );
76 virtual bool ReadWing( FILE *t,
MS2_Wing &wing,
int iW,
bool bRestrictive,
bool auto_mod );
99 bool Read(
const char * file,
bool bRestrictive,
bool auto_mod );
100 bool Write(
const char *file );
132 static bool has_section( FILE *t,
const char * sec );
Structure, which defines connection of two wings.
Simple I/O functions class.
MS2 data structure manipulation.
int GetDpWingNo(void)
returns number of depedentend wings (SLAVE)
int GetNWings(void)
returns number of wings
std::string WingSurfName(int n)
returns wing surface type (name) - see MS2WingSurf
void SetDefaults(void)
set default reference values
static std::map< int, const char * > AirfoilTypeStr
file, NACA, table
static void ClearWing(MS2_Wing &wing)
cleans MS2_Wing object (wing definition)
static std::map< int, const char * > NacelleSwirlStr
swirl up, swirl down
bool WriteEmbededProfiles(std::ostream &fout, std::vector< MS2_Profile > *airfoil)
writes embeded airfoil geometry
int GetIndpWingNo(void)
returns number of indepedentend wings (MASTER & INDEPENDENT)
static void ClearGeneral(MS2_General &gen)
cleans MS2_General object (general data)
bool WriteFuselage(std::ostream &fout)
writes fuselage data
static std::map< int, const char * > WingModTypeStr
root, equi line, arc, line
virtual void Comment(void)
displays comment (warning or information)
static std::map< int, const char * > FusTypeStr
file, parameters
static void SetSectionDefs(MS2_Section §)
sets MS2_Section object (wing section definition)
static void ClearSection(MS2_Section §)
cleans MS2_Section object (wing section definition)
static void SetModuleDefs(MS2_ModWingModule &mod)
sets MS2_ModWingModule object (wing module definition)
char cComment[256]
message text in case of error
bool ReadFusFromParams(FILE *t, bool bRestrictive)
reads Fuselage data in case fuselage defined using modules
static void ClearWake(MS2_Wake &wake)
cleans MS2_Wake object (wake information)
static void SetWingDefs(MS2_Wing &wing)
sets MS2_Wing object (wing definition)
bool WriteProfile(std::ostream &fout, MS2_Profile airfoil)
writes airfoil data
static void ClearModule(MS2_ModWingModule &mod)
cleans MS2_ModWingModule object (wing module definition)
bool WriteWingModule(std::ostream &fout, MS2_ModWingModule mod)
writes modular wing's data
static std::map< int, const char * > WingSectionDivStr
linear, cosine etc.
int iVersion
version of read file
std::string RemoveExt(std::string filename)
removes the filename extention
static void MS2_Conn2CONNECT(MS2_Conn &Conn, CONNECT_DATA &newCon)
converts MS2_Conn to CONNECT_DATA
int GetNProfs(void)
returns number of embeded airfoils
static std::string RemoveWhiteSpaces(std::string str)
removes white chars from string
static void ClearFuselage(MS2_Fuselage &fus)
cleans MS2_Fuselage object (fuselage definition)
static void SetFuselageDefs(MS2_Fuselage &fus)
sets MS2_Fuselage object (fuselage definition)
static void SetPrfDefs(MS2_Profile &prf)
sets MS2_Profile object (airfoil)
bool Read(const char *file, bool bRestrictive, bool auto_mod)
reads ms2 file
static const int CURRENT_VERSION
current version of ms2data module
static void ClearConnection(MS2_Conn &conn)
cleans MS2_Conn object (wings connection)
static int find_section(FILE *ff, const char *sec)
to find the section in ms2 file - imported from "mesh2.h"
bool ReadChordDivision(FILE *t, MS2_Wing &wing, bool bRestrictive)
reads user define chord division (see DT_USER)
int GetNWakes(void)
returns number of wake infos
bool ReadFusEllipse(FILE *t, MS2_SuperEllipse &SupEll, const char *desc)
reads fuselage elipse data
static std::string GetNACANoAsString(int no)
converts NACA profile number to string
static void SetWakeDefs(MS2_Wake &wake)
sets MS2_Wake object (wake information)
static void ClearPrf(MS2_Profile &prf)
cleans MS2_Profile object (airfoil)
static void CONNECT2MS2_Conn(CONNECT_DATA &Con, MS2_Conn &newConn)
converts CONNECT_DATA to MS2_Conn
static std::map< int, const char * > WingModPanConcStr
paneling distribution in module wings modules ( left, right center )
static std::string ConnTypeName(int n)
returns connection type name
static void SetFusCurveDefs(MS2_FusCurve &cvr, int elltype)
sets MS2_Profile object (airfoil)
static std::map< int, const char * > WingRibTypeStr
open, external, both
bool WriteWing(std::ostream &fout, MS2_Wing wing, int no)
writes wing's data
static std::string TruncateQuotMarks(std::string str)
truncates the quote marks from string
static std::map< int, const char * > FusCvrStr
spine, up cvr etc.
bool WriteConns(std::ostream &fout, bool bCom=true)
writes connections data
static std::map< int, const char * > WingTypeStr
sections, modules, nacelle
bool ReadFusAirfoil(FILE *t, MS2_FusAirfoil &airfoil, const char *desc, bool bRestrictive)
reads airfoil data used to define fuselage shape
int GetNConns(void)
returns number of connections
bool WriteWakes(std::ostream &fout, bool bCom=true)
writes extra wake infos
static std::map< int, const char * > FusAirfoilSide
up , down
static std::map< int, const char * > WingDivSourceStr
master, slave
static std::string WakeTypeName(int n)
returns wake info type name
static bool has_section(FILE *t, const char *sec)
check if section exist
static std::map< int, const char * > NacelleRangeStr
swirl range: full, half
static void SetConnectionDefs(MS2_Conn &conn)
sets MS2_Conn object (wings connection)
static std::map< int, const char * > WingSurfSideStr
all, top, bottom
static void SetNacelleWingDefs(MS2_NacelleWing &nac)
sets MS2_NacelleWing object (jet nacelle definition)
bool ReadWingModule(FILE *t, MS2_ModWingModule &mod, bool bRestrictive)
reads Wing Module data (see MS2_ModWingModule)
int GetVersion(void)
returns ms2 file version
static std::map< int, const char * > FusCvrTypeStr
ellipse, airfoil etc.
bool ReadProfile(FILE *t, MS2_Profile &airfoil, const char *desc, bool bRestrictive)
reads Profile data structure (see MS2_Profile)
std::string DivTypeName(int div)
returns chordwise division type (name) - see MS2DivType
bool WriteSection(std::ostream &fout, MS2_Section sect)
writes data of wing built from sections
void Clear(void)
clear local variables
bool Write(const char *file)
writes ms2 file
static void ClearFusCurve(MS2_FusCurve &cvr, int elltype)
cleans MS2_FusCurve object (fuselge module)
bool ReadSection(FILE *t, MS2_Section §)
reads Wing Section data (see MS2_Section)
virtual bool ReadWing(FILE *t, MS2_Wing &wing, int iW, bool bRestrictive, bool auto_mod)
reads wing data (see MS2_Wing)
static void ClearNacelleWing(MS2_NacelleWing &nac)
cleans MS2_NacelleWing object (jet nacelle definition)
bool WriteGeneral(std::ostream &f)
writes general data, incuding reference values
This file contains some smart I/O functions.
MS2 data structure definition.
std::vector< MS2_Wake > Wakes
special info for wake calculation
std::vector< MS2_Wing > Wings
wings data
std::vector< MS2_Profile > Profiles
embedded profiles
std::vector< MS2_Conn > Conns
connections data
data of airfoil taken to fuselage geometry generating
general data for ms2 structure (geometry)
module used for "module wing" definition
data of nacelle type of wing
definition of section (used in "Section Wing")
data for module of super ellipse type