19#include "sdsa_params.h"
21SDSA_PARAMS::SDSA_PARAMS(
void ){
Clean(); }
23SDSA_PARAMS::~SDSA_PARAMS(
void ){}
50 File =
fopen( ParFile,
"r" );
53 fprintf( stderr,
"SDSA params file open error (%s)\n", ParFile );
78 File =
fopen( ParFile,
"w" );
81 fprintf( stderr,
"SDSA params file open error to writing (%s)\n", ParFile );
85 fprintf( File,
"# SDSA batch mode configuration file\n");
86 fprintf( File,
"%6.2f %6.2f %6.2f # altitude range: mni, max, step\n",
dH0,
dH1,
dDH );
87 fprintf( File,
"%6.2f %6.2f %6.2f # airspeed range: mni, max, step\n",
dV0,
dV1,
dDV );
88 fprintf( File,
"%6.2f \t\t# aileron deflection angle\n",
dDA );
89 fprintf( File,
"%d \t\t# airspeed type: 0-TAS, 1-CAS\n",
iSpeedType );
90 fprintf( File,
"%d \t\t# aero data set (0,1)\n",
iAero );
91 fprintf( File,
"%d \t\t# LQR flag (0,1)\n",
iLQR );
94 fprintf( File,
"%d %d %d \t\t# actuators in the loop (H,A,V)\n",
iAct_h,
iAct_a,
iAct_r );
95 fprintf( File,
"%s # output file\n",
OutFile );
static FILE * fopen(const char *filename, const char *mode)
Cross-platform function to fopen function that supports UTF-8 encoded name.
static void ClipFileName(char *string)
Clipping of the ending blanc characters of "string".
static int ReadStr(FILE *stream, char *Par)
Function to read the new line from FILE "stream" and to store it in table of char "Par"....
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 dDH
step of hight of flight taken into the analysis
int Read(char *ParFile)
reads parameters file
int iSAS_r
SAS in rudder channel - flag (0-1)
double dV1
upper bound of airspeed taken into the analysis
int iAct_r
Actuator model in rudder channel - flag (0-1)
int iPilot_a
pilot in the loop in aileron channel - flag (0-1)
int iAct_h
Actuator model in elevator channel - flag (0-1)
void Clean()
cleans local variables
int iAct_a
Actuator model in aileron channel - flag (0-1)
int iAero
number of aerodynamic data (1/2)
double dDA
aileron deflection [deg] (for roll response characteristics, must be grater than 0)
int Write(char *ParFile)
writes parameters file
int iSAS_h
SAS in elevator channel - flag (0-1)
char OutFile[256]
pathname of output file
int iSAS_a
SAS in aileron channel - flag (0-1)
double dH1
upper bound of hight of flight taken into the analysis
double dDV
step of airspeed taken into the analysis
int iPilot_h
pilot in the loop in elevator channel - flag (0-1)
int iPilot_r
pilot in the loop in rudder channel - flag (0-1)
int iSpeedType
airspeed type (0-TAS, 1-CAS)
double dV0
lower bound of airspeed taken into the analysis
double dH0
lower bound of hight of flight taken into the analysis