20#include "panukl_acd.h"
24ACD_FILE::ACD_FILE(
void ){
Clean (); }
26ACD_FILE::~ACD_FILE(
void ){}
35 ifstream in(FileName);
39 fprintf( stderr,
"[.ACD] file open error to reading (%s)\n", FileName );
48 in >> Trush >> n_Props >>
ro >>
V;
50 for(
int x=0; x<n_Props; x++)
64 Prop.push_back(PropData);
74 ofstream out(FileName);
78 fprintf( stderr,
"[.ACD] file open error to writing (%s)\n", FileName );
83 out <<
"n_Props:\t" <<
Prop.size() << endl;
84 out <<
ro <<
"\t" <<
V << endl << endl;
86 for(
unsigned int x=0; x<
Prop.size(); x++)
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;
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]
std::vector< PropDef > Prop
vector of propellers
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...