22SDSA_FILE::SDSA_FILE( 
void ){ 
Clean(); }
 
   24SDSA_FILE::~SDSA_FILE( 
void ){}
 
   41    strcpy( file_name, SDSA_file );
 
 
   48    File = 
fopen( SDSA_file, 
"r" );
 
   51        fprintf( stderr, 
"[.sdsa] file open error to reading (%s)\n", SDSA_file );
 
 
   88    if( file_flag == 0 )
return -1;
 
   89    return Read( file_name );
 
 
   95    File = 
fopen( SDSA_file, 
"w" );
 
   98        fprintf( stderr, 
"[.sdsa] file open error to writing (%s)\n", SDSA_file );
 
  102    fprintf( File, 
"%14.8G # S\n", 
S );
 
  103    fprintf( File, 
"%14.8G # MAC\n", 
MAC );
 
  104    fprintf( File, 
"%14.8G # B\n", 
B );
 
  105    fprintf( File, 
"%14.8G # Swet\n", 
Swet );
 
  106    fprintf( File, 
"%14.8G %f # X,Y (ref)\n", 
X, 
Z );
 
  107    fprintf( File, 
"%14.8G # Alfa\n", 
Alfa );
 
  108    fprintf( File, 
"%14.8G # Beta\n", 
Beta );
 
  109    fprintf( File, 
"%14.8G # Mach\n", 
Mach );
 
  110    fprintf( File, 
"%14.8G # P\n", 
P );
 
  111    fprintf( File, 
"%14.8G # Q\n", 
Q );
 
  112    fprintf( File, 
"%14.8G # R\n", 
R );
 
  113    fprintf( File, 
"%14.8G # Cx\n", 
Cx );
 
  114    fprintf( File, 
"%14.8G # Cy\n", 
Cy );
 
  115    fprintf( File, 
"%14.8G # Cz\n", 
Cz );
 
  116    fprintf( File, 
"%14.8G # Cl\n", 
Cl );
 
  117    fprintf( File, 
"%14.8G # Cm\n", 
Cm );
 
  118    fprintf( File, 
"%14.8G # Cn\n", 
Cn );
 
  119    fprintf( File, 
"%14.8G # Cxs\n", 
Cxs );
 
  120    fprintf( File, 
"%14.8G # Cys\n", 
Cys );
 
  121    fprintf( File, 
"%14.8G # Czs\n", 
Czs );
 
  122    fprintf( File, 
"%14.8G # Cls\n", 
Cls );
 
  123    fprintf( File, 
"%14.8G # Cms\n", 
Cms );
 
  124    fprintf( File, 
"%14.8G # Cns\n", 
Cns );
 
  125    fprintf( File, 
"%14.8G # Cxi\n", 
Cxi );
 
  126    fprintf( File, 
"%14.8G # Czi\n", 
Czi );
 
 
  135    if( file_flag == 0 )
return -1;
 
  136    return Write( file_name );
 
 
static FILE * fopen(const char *filename, const char *mode)
Cross-platform function to fopen function that supports UTF-8 encoded name.
 
static int ReadPar(FILE *stream, const char *Format, void *Par)
Function to read one variable. The type of variable depends on Format, compatible with stdio library.
 
double B
reference wingspan
 
double Cxi
induced drag coefficient
 
int Read(void)
reads the [.sdsa] file defined by SetName function
 
double Z
Z coordinate fo the origin for moment components.
 
double Cls
rolling moment coefficient (stability axis system)
 
void Clean(void)
cleans local variables
 
double Cxs
drag coefficient (stability axis system - pressure component)
 
double Cx
drag coefficient (body axis system - pressure component)
 
double Cl
rolling moment coefficient (body axis system)
 
double Czi
lift coefficients that relates to induced drag
 
double Cys
sideforce coefficient (stability axis system)
 
double X
X coordinate fo the origin for moment components.
 
double Cns
yawing moment coefficient (stability axis system)
 
double Beta
sideslip angle [deg]
 
double Cz
lift coefficient (body axis system)
 
double Cn
yawing moment coefficient (body axis system)
 
void SetName(const char *FileName)
set pathname for the [.sdsa] file
 
double P
roll rate [rad/s]
 
double Cms
pitching moment coefficient (stability axis system)
 
double MAC
mean aerodynamic chord
 
double Q
pitch rate [rad/s]
 
double Cm
pitching moment coefficient (body axis system)
 
double Cy
sideforce coefficient (body axis system)
 
double Czs
lift coefficient (stability axis system)
 
double Alfa
angle of attack [deg]
 
int Write(void)
writes the [.sdsa] file defined by SetName function