- Main Page
- Namespaces
- Data Structures
- Files

- Search for |

- File List
- Globals

# HydroSDL/hydro_source/Datas.h

Go to the documentation of this file.

    00001
    00009 #ifndef DATAS_H_DEF
    00010 #define DATAS_H_DEF
    00011
    00012
    00013 #include "../CVODEincludes.h"  // ODE solver includes
    00014
    00015
    00016
    00018
    00021 struct parameters
    00022 {
    00023 //      double x0;
    00024 //      double y0;
    00025 //      double z0;
    00026 //      double alpha_cam;
    00027 //      double beta_cam;
    00028 //      double x_rel;
    00029 //      double y_rel;
    00030 //      double z_rel;
    00031 //      double Gain;
    00032 //      double time_stop;
    00033         double reltol;
    00034         double abstol[12];
    00035         double param[10];
    00036 };
    00037
    00038
    00040
    00044 struct datas
    00045 {
    00046         double x_foils;
    00047         double tanCal_yaw0;
    00048         double tanAngle_sail;
    00049         double G_shift;
    00050         double alpha_foils;
    00051         double Wind_angle;
    00052         double z_foils;
    00053
    00054         double g;
    00055
    00056         double Long;
    00057
    00058         double tanCal_left; //Max LD
    00059         double tanCal_right;
    00060         double tanCal_pitch;
    00061
    00062         double alpha_left;
    00063         double alpha_right;
    00064
    00065         double y_foil_left;
    00066         double y_foil_right;
    00067
    00068         double L_mast;
    00069
    00070         double x_sail;
    00071         double y_sail;
    00072         double z_sail;
    00073         double A_sail;
    00074         double Baume;
    00075         double A_structure;
    00076         double CD_structure;
    00077
    00078         double Ix;
    00079         double Iy;
    00080         double Iz;
    00081         double M;
    00082
    00083         double E_foils;
    00084         double Chord;
    00085
    00086         //Min & max chord for the hydrofoils
    00087         double Chord_min;
    00088         double Chord_max;
    00089         double epsilon;
    00090
    00091         double rho;
    00092         double rho_air;
    00093
    00094         double E_yaw; //2;
    00095
    00096         double Env_pitch;
    00097
    00098         double Chord_yaw;
    00099         double Chord_pitch;
    00100
    00101         double A_pitch;
    00102
    00103         double x_yaw;
    00104         double y_yaw;
    00105         double z_yaw; //E_yaw/2 - 5;
    00106
    00107         double x_pitch;
    00108         double y_pitch;
    00109         double z_pitch;
    00110
    00111         double Wind;
    00112         double Wind_x;
    00113         double Wind_y;
    00114
    00115         double Env;
    00116
    00117         double Lambda0;
    00118         double Wave_angle0;
    00119         double Wave_amp0;
    00120         double V_wave0;
    00121
    00122         double Lambda[2];
    00123         double Wave_angle[2];
    00124         double Wave_amp[2];
    00125         double V_wave[2];
    00126
    00127         int N; //length(Lambda);
    00128
    00129         double Lambda1;
    00130         double Lambda2;
    00131         double Wave_amp1;
    00132         double Wave_amp2;
    00133         double V_wave1;
    00134         double V_wave2;
    00135         double Wave_angle1;
    00136         double Wave_angle2;
    00137
    00138 //suite de Hydro_integ.m
    00139         double x;
    00140         double y;
    00141         double z;
    00142
    00143         double phi;
    00144         double theta;
    00145         double psi;
    00146
    00147         double dx;
    00148         double dy;
    00149         double dz;
    00150
    00151         double dphi;
    00152         double dtheta;
    00153         double dpsi;
    00154
    00155         double x_cam;
    00156         double y_cam;
    00157         double z_cam;
    00158
    00159         double dx_cam;
    00160         double dy_cam;
    00161         double dz_cam;
    00162 //
    00163
    00164         double tanCal_yaw;
    00165
    00166
    00167         //variables for EE_Flat
    00168         double EE_left;
    00169         double EE_right;
    00170         double EE_yaw;
    00171         double EE_left_flat;
    00172         double EE_right_flat;
    00173         double EE_yaw_flat;
    00174
    00175
    00176         double Fac_update;
    00177
    00178         //variables for Equ
    00179         double Equ_left;
    00180         double Equ_right;
    00181         double Equ_yaw;
    00182         double dEqu_left;
    00183         double dEqu_right;
    00184         double dEqu_yaw;
    00185
    00186         int k;
    00187
    00188         //variables for Angle
    00189         double Tan_AoA_left;
    00190         double Tan_AoA_right;
    00191         double Tan_AoA_pitch;
    00192         double Tan_AoA_yaw;
    00193         double Tan_AoA_sail;
    00194
    00195         //variables for forces
    00196         double Force_G_E1;
    00197         double Force_G_E2;
    00198         double Force_G_E3;
    00199         double Torque_G_E1;
    00200         double Torque_G_E2;
    00201         double Torque_G_E3;
    00202
    00203         //variables for forces_all
    00204         double Force_left[3];
    00205         double Force_right[3];
    00206         double Force_pitch[3];
    00207         double Force_yaw[3];
    00208         double Force_sail[3];
    00209         double Force_drag[3];
    00210
    00211         //variables for acceleration
    00212         double ddq[6];
    00213
    00214 //      double *t_array;
    00215 //      long tLength;// length of t_array
    00216
    00217
    00218         //MISSING VARIABLES ????: from generated functions
    00219         double t;
    00220         double A_left;
    00221         double CD_left;
    00222         double CL_left;
    00223         double CD_right;
    00224         double A_right;
    00225         double CL_right;
    00226         double CD_pitch;
    00227         double CL_pitch;
    00228         double A_yaw;
    00229         double CD_yaw;
    00230         double CL_yaw;
    00231         double CD_sail;
    00232         double CL_sail;
    00233
    00234
    00235         //variables for aero_coeff_control
    00236         double Chord_right;
    00237         double Chord_left;
    00238         double AR_left;
    00239         double AR_right;
    00240         double AR_yaw;
    00241         double AR_pitch;
    00242         double AR_sail;
    00243         double gamma;
    00244
    00245         //variables for system definition
    00246         double dd_cam[3];
    00247         double d_cam[3];
    00248
    00249
    00250         //for drawing
    00251         double L_nose;
    00252
    00253
    00254         //verifications:
    00255         double verif[26];
    00256
    00257         float target_x, target_y;
    00258         float Vslider_x, Hslider_x;
    00259
    00260         //Neutrel cal angles as given in P->param[] vector (from MATLAB):
    00261         double Cal_left_neutral;
    00262         double Cal_right_neutral;
    00263         double Cal_pitch_neutral;
    00264         double Cal_yaw_neutral;
    00265
    00266         //Baume control:
    00267         double angle_girouette;
    00268         double max_abs_angle_baume;
    00269
    00270 };
    00271
    00272
    00273
    00275
    00279 struct ODE_data
    00280 {
    00281         double *state;
    00282         parameters *P;
    00283         datas *d;
    00284
    00285         //time_param=0.0 => no output
    00286         //time_param=t   => simulation from 0 to t and give state back to MATLAB
    00287         double time_param;
    00288
    00289 //      double *XoutArray;
    00290         double CumulNumOfSteps; //type double for returning to MATLAB, but integer value
    00292
    00293
    00294         realtype reltol, t, tout;
    00295         N_Vector y, abstol;
    00296         void *cvode_mem;
    00297         int flag, flagr, iout;
    00298         int rootsfound[2];
    00299 };
    00300
    00301
    00303
    00306 struct joy_parameters
    00307 {
    00308         bool doX;
    00309         bool doY;
    00310         bool doZ;
    00311         bool doR;
    00312
    00313         float dirX;
    00314         float dirY;
    00315         float dirZ;
    00316         float dirR;
    00317 };
    00318
    00319 #endif