Parameters file to add propellers info to 3D panel code.
More...
#include <panukl_acd.h>
|
void | Clean () |
| cleans local variables
|
|
int | Read (char *FileName) |
| reads parameters file
|
|
int | Write (char *Filename) |
| writes parameters file
|
|
|
double | ro |
| air density [kg/m^3]
|
|
double | V |
| airspeed [m/s]
|
|
std::vector< PropDef > | Prop |
| vector of propellers
|
|
Parameters file to add propellers info to 3D panel code.
Definition at line 46 of file panukl_acd.h.
◆ ACD_FILE()
ACD_FILE::ACD_FILE |
( |
void | | ) |
|
Definition at line 24 of file panukl_acd.cpp.
void Clean()
cleans local variables
◆ ~ACD_FILE()
ACD_FILE::~ACD_FILE |
( |
void | | ) |
|
◆ Clean()
void ACD_FILE::Clean |
( |
void | | ) |
|
cleans local variables
Definition at line 28 of file panukl_acd.cpp.
29{
31}
std::vector< PropDef > Prop
vector of propellers
◆ Read()
int ACD_FILE::Read |
( |
char * | FileName | ) |
|
reads parameters file
Definition at line 33 of file panukl_acd.cpp.
34{
35 ifstream in(FileName);
36
37 if(in.fail())
38 {
39 fprintf( stderr, "[.ACD] file open error to reading (%s)\n", FileName );
40 return (-1);
41 }
42 else
43 {
44 char Trush[256];
45 int n_Props;
47
48 in >> Trush >> n_Props >>
ro >>
V;
49
50 for(int x=0; x<n_Props; x++)
51 {
63
64 Prop.push_back(PropData);
65 }
66 }
67
68 in.close();
69 return 0;
70}
double ro
air density [kg/m^3]
Structure to define actuator (propeller disc)
double Zthrust
Z component of thrust direction.
double Y0
Y coordinate of disc center.
double P
shaft power of propeller [W]
double Ythrust
Y component of thrust direction.
int Id
identification number
double D
propeller diameter [m]
double T
thrust generated by propeller [N]
double Xthrust
X component of thrust direction (for definition vector normal to actuator disc plane,...
double X0
X coordinate of disc center.
double Z0
Z coordinate of disc center.
double Omega
propeller angular rate in RPM, positive direction of rotation (right hand rule) defined around the th...
◆ Write()
int ACD_FILE::Write |
( |
char * | Filename | ) |
|
writes parameters file
Definition at line 72 of file panukl_acd.cpp.
73{
74 ofstream out(FileName);
75
76 if(out.fail())
77 {
78 fprintf( stderr, "[.ACD] file open error to writing (%s)\n", FileName );
79 return (-1);
80 }
81 else
82 {
83 out <<
"n_Props:\t" <<
Prop.size() << endl;
84 out <<
ro <<
"\t" <<
V << endl << endl;
85
86 for(
unsigned int x=0; x<
Prop.size(); x++)
87 {
88 out <<
Prop[x].Id <<
"\t";
89 out <<
Prop[x].X0 <<
"\t";
90 out <<
Prop[x].Y0 <<
"\t";
91 out <<
Prop[x].Z0 <<
"\t";
92 out <<
Prop[x].Xthrust <<
"\t";
93 out <<
Prop[x].Ythrust <<
"\t";
94 out <<
Prop[x].Zthrust <<
"\t";
95 out <<
Prop[x].Omega <<
"\t";
96 out <<
Prop[x].D <<
"\t";
97 out <<
Prop[x].T <<
"\t";
98 out <<
Prop[x].P << endl;
99 }
100 }
101
102 out.close();
103 return 0;
104}
◆ Prop
std::vector<PropDef> ACD_FILE::Prop |
◆ ro
The documentation for this class was generated from the following files: