File: Controller.h

    1   /*
    2    * Controller.h
    3    *
    4    * Code generation for model "Controller".
    5    *
    6    * Model version              : 1.1303
    7    * Simulink Coder version : 8.3 (R2012b) 20-Jul-2012
    8    * C++ source code generated on : Sun Jun 01 14:58:10 2014
    9    *
   10    * Target selection: grt.tlc
   11    * Note: GRT includes extra infrastructure and instrumentation for prototyping
   12    * Embedded hardware selection: Generic->32-bit x86 compatible
   13    * Code generation objectives: Unspecified
   14    * Validation result: Not run
   15    */
   16   #ifndef RTW_HEADER_Controller_h_
   17   #define RTW_HEADER_Controller_h_
   18   #ifndef Controller_COMMON_INCLUDES_
   19   # define Controller_COMMON_INCLUDES_
   20   #include <math.h>
   21   #include <float.h>
   22   #include <stddef.h>
   23   #include <string.h>
   24   #include "rtwtypes.h"
   25   #include "rtw_continuous.h"
   26   #include "rtw_solver.h"
   27   #include "rt_logging.h"
   28   #include "rt_nonfinite.h"
   29   #include "rtGetInf.h"
   30   #include "rtGetNaN.h"
   31   #include "rt_defines.h"
   32   #include "rt_zcfcn.h"
   33   #endif                                 /* Controller_COMMON_INCLUDES_ */
   34   
   35   #include "Controller_types.h"
   36   
   37   /* Macros for accessing real-time model data structure */
   38   #ifndef rtmGetFinalTime
   39   # define rtmGetFinalTime(rtm)          ((rtm)->Timing.tFinal)
   40   #endif
   41   
   42   #ifndef rtmGetRTWLogInfo
   43   # define rtmGetRTWLogInfo(rtm)         ((rtm)->rtwLogInfo)
   44   #endif
   45   
   46   #ifndef rtmGetErrorStatus
   47   # define rtmGetErrorStatus(rtm)        ((rtm)->errorStatus)
   48   #endif
   49   
   50   #ifndef rtmSetErrorStatus
   51   # define rtmSetErrorStatus(rtm, val)   ((rtm)->errorStatus = (val))
   52   #endif
   53   
   54   #ifndef rtmGetStopRequested
   55   # define rtmGetStopRequested(rtm)      ((rtm)->Timing.stopRequestedFlag)
   56   #endif
   57   
   58   #ifndef rtmSetStopRequested
   59   # define rtmSetStopRequested(rtm, val) ((rtm)->Timing.stopRequestedFlag = (val))
   60   #endif
   61   
   62   #ifndef rtmGetStopRequestedPtr
   63   # define rtmGetStopRequestedPtr(rtm)   (&((rtm)->Timing.stopRequestedFlag))
   64   #endif
   65   
   66   #ifndef rtmGetT
   67   # define rtmGetT(rtm)                  (rtmGetTPtr((rtm))[0])
   68   #endif
   69   
   70   #ifndef rtmGetTFinal
   71   # define rtmGetTFinal(rtm)             ((rtm)->Timing.tFinal)
   72   #endif
   73   
   74   /* Block signals (auto storage) */
   75   typedef struct {
   76     real_T Integrator[3];                /* '<S106>/Integrator' */
   77     real_T Gain[3];                      /* '<S107>/Gain' */
   78     real_T Row1;                         /* '<S27>/Row1' */
   79     real_T Row2;                         /* '<S27>/Row2' */
   80     real_T Row3;                         /* '<S27>/Row3' */
   81     real_T TmpSignalConversionAtProduct1In[3];/* '<S15>/Transposed rotation  matrix ' */
   82     real_T Integrator_n;                 /* '<S33>/Integrator' */
   83     real_T Product3[3];                  /* '<S11>/Product3' */
   84     real_T Integrator1[3];               /* '<S84>/Integrator1' */
   85     real_T Integrator_o[3];              /* '<S84>/Integrator' */
   86     real_T Gain4[3];                     /* '<S84>/Gain4' */
   87     real_T Gain7[15];                    /* '<S13>/Gain7' */
   88     real_T TransportDelay[3];            /* '<S93>/Transport Delay' */
   89     real_T Gain3[6];                     /* '<S13>/Gain3' */
   90     real_T Integrator1_h;                /* '<S93>/Integrator1' */
   91     real_T Integrator2;                  /* '<S93>/Integrator2' */
   92     real_T Integrator3;                  /* '<S93>/Integrator3' */
   93     real_T Sum[3];                       /* '<S92>/Sum' */
   94     real_T Gain4_k[3];                   /* '<S82>/Gain4' */
   95     real_T Gain6[15];                    /* '<S13>/Gain6' */
   96     real_T Gain1;                        /* '<S33>/Gain1' */
   97     real_T Product2[3];                  /* '<S46>/Product2' */
   98     real_T Output;                       /* '<S58>/Output' */
   99     real_T Sum_a[3];                     /* '<S51>/Sum' */
  100     real_T Output_g;                     /* '<S63>/Output' */
  101     real_T Sum_f[3];                     /* '<S52>/Sum' */
  102     real_T Output_c;                     /* '<S68>/Output' */
  103     real_T Sum_l[3];                     /* '<S53>/Sum' */
  104     real_T Output_o;                     /* '<S73>/Output' */
  105     real_T Sum_aq[3];                    /* '<S54>/Sum' */
  106     real_T Output_h[3];                  /* '<S75>/Output' */
  107     real_T M[3];                         /* '<S82>/M' */
  108     real_T Sum_k[3];                     /* '<S91>/Sum' */
  109     real_T Sum2[3];                      /* '<S82>/Sum2' */
  110     real_T Sum3[3];                      /* '<S104>/Sum3' */
  111     real_T Sum4[3];                      /* '<S104>/Sum4' */
  112     real_T Gain_n[3];                    /* '<S108>/Gain' */
  113     real_T Sum_o[3];                     /* '<S106>/Sum' */
  114     real_T Sum2_g[3];                    /* '<S106>/Sum2' */
  115     real_T Gain2[3];                     /* '<S107>/Gain2' */
  116     real_T M_j[3];                       /* '<S84>/M' */
  117     real_T Sum1[3];                      /* '<S119>/Sum1' */
  118     real_T Sum2_h[3];                    /* '<S84>/Sum2' */
  119     real_T Gain1_b[3];                   /* '<S14>/Gain1' */
  120     real_T Product;                      /* '<S3>/Product' */
  121     real_T u[12];                        /* '<S14>/MATLAB Function' */
  122     real_T error_w[3];                   /* '<S106>/MATLAB Function1' */
  123     real_T rst[3];                       /* '<S82>/MATLAB Function' */
  124     real_T xm_dot[6];                    /* '<S16>/reference_model' */
  125     real_T Fm_dot[6];                    /* '<S16>/reference_model' */
  126     real_T theta_ves_hat_dot[18];        /* '<S16>/normalized _adaptive_law1' */
  127     real_T phi_dot[30];                  /* '<S16>/normalized _adaptive_law1' */
  128     real_T m_s_dot[3];                   /* '<S16>/normalized _adaptive_law1' */
  129     real_T m_s_dot_l[3];                 /* '<S16>/environment_estimation' */
  130     real_T phi_dot_e[18];                /* '<S16>/environment_estimation' */
  131     real_T theta_hat_dot[18];            /* '<S16>/environment_estimation' */
  132     real_T omega0_dot[9];                /* '<S16>/control_law' */
  133   } BlockIO_Controller;
  134   
  135   /* Block states (auto storage) for system '<Root>' */
  136   typedef struct {
  137     real_T NextOutput;                   /* '<S58>/White Noise' */
  138     real_T NextOutput_k;                 /* '<S63>/White Noise' */
  139     real_T NextOutput_f;                 /* '<S68>/White Noise' */
  140     real_T NextOutput_c;                 /* '<S73>/White Noise' */
  141     real_T NextOutput_m[3];              /* '<S75>/White Noise' */
  142     real_T u_prev[12];                   /* '<S14>/MATLAB Function' */
  143     real_T nu_x;                         /* '<S92>/MATLAB Function' */
  144     real_T nu_y;                         /* '<S92>/MATLAB Function' */
  145     real_T nu_psi;                       /* '<S92>/MATLAB Function' */
  146     real_T d_x;                          /* '<S91>/MATLAB Function' */
  147     real_T d_y;                          /* '<S91>/MATLAB Function' */
  148     real_T d_psi;                        /* '<S91>/MATLAB Function' */
  149     real_T time_reset_x;                 /* '<S82>/MATLAB Function' */
  150     real_T time_reset_y;                 /* '<S82>/MATLAB Function' */
  151     real_T time_reset_psi;               /* '<S82>/MATLAB Function' */
  152     real_T flag[3];                      /* '<S16>/reference_model' */
  153     real_T dphi01[6];                    /* '<S16>/normalized _adaptive_law1' */
  154     real_T dphi02[6];                    /* '<S16>/normalized _adaptive_law1' */
  155     real_T dphi03[6];                    /* '<S16>/normalized _adaptive_law1' */
  156     real_T dphi04[6];                    /* '<S16>/normalized _adaptive_law1' */
  157     real_T dphi05[6];                    /* '<S16>/normalized _adaptive_law1' */
  158     real_T phi1[3];                      /* '<S16>/normalized _adaptive_law1' */
  159     real_T phi2[3];                      /* '<S16>/normalized _adaptive_law1' */
  160     real_T phi3[3];                      /* '<S16>/normalized _adaptive_law1' */
  161     real_T phi5[3];                      /* '<S16>/normalized _adaptive_law1' */
  162     real_T z1_dot[6];                    /* '<S16>/environment_estimation' */
  163     real_T phi01_dot[6];                 /* '<S16>/environment_estimation' */
  164     real_T phi02_dot[6];                 /* '<S16>/environment_estimation' */
  165     real_T Z_p_bar_hat[3];               /* '<S16>/Control law parameter calculation' */
  166     real_T R_p_hat[9];                   /* '<S16>/Control law parameter calculation' */
  167     real_T Lambda_0[2];                  /* '<S16>/Control law parameter calculation' */
  168     real_T Q[6];                         /* '<S16>/Control law parameter calculation' */
  169     struct {
  170       real_T modelTStart;
  171       real_T TUbufferArea[6144];
  172     } TransportDelay_RWORK;              /* '<S93>/Transport Delay' */
  173   
  174     struct {
  175       void *TUbufferPtrs[6];
  176     } TransportDelay_PWORK;              /* '<S93>/Transport Delay' */
  177   
  178     struct {
  179       void *LoggedData;
  180     } Scope_PWORK;                       /* '<S13>/Scope' */
  181   
  182     struct {
  183       void *LoggedData;
  184     } Scope_PWORK_g;                     /* '<S82>/Scope' */
  185   
  186     struct {
  187       void *LoggedData;
  188     } Scope1_PWORK;                      /* '<S82>/Scope1' */
  189   
  190     struct {
  191       void *LoggedData;
  192     } Scope2_PWORK;                      /* '<S82>/Scope2' */
  193   
  194     struct {
  195       void *LoggedData;
  196     } Scope3_PWORK;                      /* '<S82>/Scope3' */
  197   
  198     struct {
  199       void *LoggedData;
  200     } Scope_PWORK_j;                     /* '<S84>/Scope' */
  201   
  202     struct {
  203       void *LoggedData;
  204     } Scope1_PWORK_g;                    /* '<S84>/Scope1' */
  205   
  206     struct {
  207       void *LoggedData;
  208     } Scope2_PWORK_h;                    /* '<S84>/Scope2' */
  209   
  210     uint32_T RandSeed;                   /* '<S58>/White Noise' */
  211     uint32_T RandSeed_f;                 /* '<S63>/White Noise' */
  212     uint32_T RandSeed_p;                 /* '<S68>/White Noise' */
  213     uint32_T RandSeed_a;                 /* '<S73>/White Noise' */
  214     uint32_T RandSeed_fl[3];             /* '<S75>/White Noise' */
  215     struct {
  216       int_T Tail[3];
  217       int_T Head[3];
  218       int_T Last[3];
  219       int_T CircularBufSize[3];
  220     } TransportDelay_IWORK;              /* '<S93>/Transport Delay' */
  221   
  222     struct {
  223       int_T IcNeedsLoading;
  224     } Integrator1_IWORK;                 /* '<S93>/Integrator1' */
  225   
  226     struct {
  227       int_T IcNeedsLoading;
  228     } Integrator2_IWORK;                 /* '<S93>/Integrator2' */
  229   
  230     struct {
  231       int_T IcNeedsLoading;
  232     } Integrator3_IWORK;                 /* '<S93>/Integrator3' */
  233   
  234     boolean_T nu_x_not_empty;            /* '<S92>/MATLAB Function' */
  235     boolean_T nu_y_not_empty;            /* '<S92>/MATLAB Function' */
  236     boolean_T nu_psi_not_empty;          /* '<S92>/MATLAB Function' */
  237     boolean_T d_x_not_empty;             /* '<S91>/MATLAB Function' */
  238     boolean_T d_y_not_empty;             /* '<S91>/MATLAB Function' */
  239     boolean_T d_psi_not_empty;           /* '<S91>/MATLAB Function' */
  240     boolean_T time_reset_x_not_empty;    /* '<S82>/MATLAB Function' */
  241     boolean_T time_reset_y_not_empty;    /* '<S82>/MATLAB Function' */
  242     boolean_T time_reset_psi_not_empty;  /* '<S82>/MATLAB Function' */
  243   } D_Work_Controller;
  244   
  245   /* Continuous states (auto storage) */
  246   typedef struct {
  247     real_T Integrator_CSTATE[3];         /* '<S14>/Integrator' */
  248     real_T Integrator1_CSTATE[3];        /* '<S104>/Integrator1' */
  249     real_T TransferFcn2_CSTATE[2];       /* '<S77>/Transfer Fcn2' */
  250     real_T TransferFcn1_CSTATE[2];       /* '<S77>/Transfer Fcn1' */
  251     real_T TransferFcn_CSTATE[2];        /* '<S77>/Transfer Fcn' */
  252     real_T Integrator_CSTATE_g[3];       /* '<S104>/Integrator' */
  253     real_T Integrator_CSTATE_f[3];       /* '<S106>/Integrator' */
  254     real_T Integrator2_CSTATE[3];        /* '<S107>/Integrator2' */
  255     real_T Integrator2_CSTATE_f[6];      /* '<S16>/Integrator2' */
  256     real_T Integrator6_CSTATE[6];        /* '<S16>/Integrator6' */
  257     real_T TransferFcn_CSTATE_e;         /* '<S22>/Transfer Fcn' */
  258     real_T TransferFcn1_CSTATE_d;        /* '<S22>/Transfer Fcn1' */
  259     real_T TransferFcn2_CSTATE_b;        /* '<S22>/Transfer Fcn2' */
  260     real_T Integrator10_CSTATE[18];      /* '<S16>/Integrator10' */
  261     real_T Integrator3_CSTATE[18];       /* '<S16>/Integrator3' */
  262     real_T Integrator1_CSTATE_m[9];      /* '<S16>/Integrator1' */
  263     real_T Integrator_CSTATE_p[3];       /* '<S15>/Integrator' */
  264     real_T Integrator1_CSTATE_f;         /* '<S33>/Integrator1' */
  265     real_T Integrator_CSTATE_c;          /* '<S33>/Integrator' */
  266     real_T Integrator_CSTATE_j;          /* '<S3>/Integrator' */
  267     real_T Integrator1_CSTATE_k[3];      /* '<S84>/Integrator1' */
  268     real_T Integrator_CSTATE_px[3];      /* '<S84>/Integrator' */
  269     real_T Integrator2_CSTATE_i[3];      /* '<S119>/Integrator2' */
  270     real_T Integrator1_CSTATE_g;         /* '<S93>/Integrator1' */
  271     real_T Integrator2_CSTATE_n;         /* '<S93>/Integrator2' */
  272     real_T Integrator3_CSTATE_m;         /* '<S93>/Integrator3' */
  273     real_T Integrator_CSTATE_d[3];       /* '<S92>/Integrator' */
  274     real_T Integrator2_CSTATE_n4[3];     /* '<S91>/Integrator2' */
  275     real_T Integrator11_CSTATE[3];       /* '<S16>/Integrator11' */
  276     real_T Integrator4_CSTATE[30];       /* '<S16>/Integrator4' */
  277     real_T Integrator5_CSTATE[3];        /* '<S16>/Integrator5' */
  278     real_T Integrator9_CSTATE[18];       /* '<S16>/Integrator9' */
  279     real_T TransferFcn_CSTATE_en[2];     /* '<S59>/Transfer Fcn' */
  280     real_T TransferFcn1_CSTATE_m[2];     /* '<S59>/Transfer Fcn1' */
  281     real_T TransferFcn2_CSTATE_j[2];     /* '<S59>/Transfer Fcn2' */
  282     real_T TransferFcn_CSTATE_d[2];      /* '<S64>/Transfer Fcn' */
  283     real_T TransferFcn1_CSTATE_e[2];     /* '<S64>/Transfer Fcn1' */
  284     real_T TransferFcn2_CSTATE_c[2];     /* '<S64>/Transfer Fcn2' */
  285     real_T TransferFcn_CSTATE_o[2];      /* '<S69>/Transfer Fcn' */
  286     real_T TransferFcn1_CSTATE_g[2];     /* '<S69>/Transfer Fcn1' */
  287     real_T TransferFcn2_CSTATE_i[2];     /* '<S69>/Transfer Fcn2' */
  288     real_T TransferFcn_CSTATE_c[2];      /* '<S74>/Transfer Fcn' */
  289     real_T TransferFcn1_CSTATE_l[2];     /* '<S74>/Transfer Fcn1' */
  290     real_T TransferFcn2_CSTATE_h[2];     /* '<S74>/Transfer Fcn2' */
  291     real_T TransferFcn_CSTATE_n[2];      /* '<S76>/Transfer Fcn' */
  292     real_T TransferFcn1_CSTATE_p[2];     /* '<S76>/Transfer Fcn1' */
  293     real_T TransferFcn2_CSTATE_ck[2];    /* '<S76>/Transfer Fcn2' */
  294     real_T Integrator_CSTATE_l[3];       /* '<S108>/Integrator' */
  295     real_T Integrator1_CSTATE_b[3];      /* '<S106>/Integrator1' */
  296     real_T Integrator2_CSTATE_h[3];      /* '<S106>/Integrator2' */
  297   } ContinuousStates_Controller;
  298   
  299   /* State derivatives (auto storage) */
  300   typedef struct {
  301     real_T Integrator_CSTATE[3];         /* '<S14>/Integrator' */
  302     real_T Integrator1_CSTATE[3];        /* '<S104>/Integrator1' */
  303     real_T TransferFcn2_CSTATE[2];       /* '<S77>/Transfer Fcn2' */
  304     real_T TransferFcn1_CSTATE[2];       /* '<S77>/Transfer Fcn1' */
  305     real_T TransferFcn_CSTATE[2];        /* '<S77>/Transfer Fcn' */
  306     real_T Integrator_CSTATE_g[3];       /* '<S104>/Integrator' */
  307     real_T Integrator_CSTATE_f[3];       /* '<S106>/Integrator' */
  308     real_T Integrator2_CSTATE[3];        /* '<S107>/Integrator2' */
  309     real_T Integrator2_CSTATE_f[6];      /* '<S16>/Integrator2' */
  310     real_T Integrator6_CSTATE[6];        /* '<S16>/Integrator6' */
  311     real_T TransferFcn_CSTATE_e;         /* '<S22>/Transfer Fcn' */
  312     real_T TransferFcn1_CSTATE_d;        /* '<S22>/Transfer Fcn1' */
  313     real_T TransferFcn2_CSTATE_b;        /* '<S22>/Transfer Fcn2' */
  314     real_T Integrator10_CSTATE[18];      /* '<S16>/Integrator10' */
  315     real_T Integrator3_CSTATE[18];       /* '<S16>/Integrator3' */
  316     real_T Integrator1_CSTATE_m[9];      /* '<S16>/Integrator1' */
  317     real_T Integrator_CSTATE_p[3];       /* '<S15>/Integrator' */
  318     real_T Integrator1_CSTATE_f;         /* '<S33>/Integrator1' */
  319     real_T Integrator_CSTATE_c;          /* '<S33>/Integrator' */
  320     real_T Integrator_CSTATE_j;          /* '<S3>/Integrator' */
  321     real_T Integrator1_CSTATE_k[3];      /* '<S84>/Integrator1' */
  322     real_T Integrator_CSTATE_px[3];      /* '<S84>/Integrator' */
  323     real_T Integrator2_CSTATE_i[3];      /* '<S119>/Integrator2' */
  324     real_T Integrator1_CSTATE_g;         /* '<S93>/Integrator1' */
  325     real_T Integrator2_CSTATE_n;         /* '<S93>/Integrator2' */
  326     real_T Integrator3_CSTATE_m;         /* '<S93>/Integrator3' */
  327     real_T Integrator_CSTATE_d[3];       /* '<S92>/Integrator' */
  328     real_T Integrator2_CSTATE_n4[3];     /* '<S91>/Integrator2' */
  329     real_T Integrator11_CSTATE[3];       /* '<S16>/Integrator11' */
  330     real_T Integrator4_CSTATE[30];       /* '<S16>/Integrator4' */
  331     real_T Integrator5_CSTATE[3];        /* '<S16>/Integrator5' */
  332     real_T Integrator9_CSTATE[18];       /* '<S16>/Integrator9' */
  333     real_T TransferFcn_CSTATE_en[2];     /* '<S59>/Transfer Fcn' */
  334     real_T TransferFcn1_CSTATE_m[2];     /* '<S59>/Transfer Fcn1' */
  335     real_T TransferFcn2_CSTATE_j[2];     /* '<S59>/Transfer Fcn2' */
  336     real_T TransferFcn_CSTATE_d[2];      /* '<S64>/Transfer Fcn' */
  337     real_T TransferFcn1_CSTATE_e[2];     /* '<S64>/Transfer Fcn1' */
  338     real_T TransferFcn2_CSTATE_c[2];     /* '<S64>/Transfer Fcn2' */
  339     real_T TransferFcn_CSTATE_o[2];      /* '<S69>/Transfer Fcn' */
  340     real_T TransferFcn1_CSTATE_g[2];     /* '<S69>/Transfer Fcn1' */
  341     real_T TransferFcn2_CSTATE_i[2];     /* '<S69>/Transfer Fcn2' */
  342     real_T TransferFcn_CSTATE_c[2];      /* '<S74>/Transfer Fcn' */
  343     real_T TransferFcn1_CSTATE_l[2];     /* '<S74>/Transfer Fcn1' */
  344     real_T TransferFcn2_CSTATE_h[2];     /* '<S74>/Transfer Fcn2' */
  345     real_T TransferFcn_CSTATE_n[2];      /* '<S76>/Transfer Fcn' */
  346     real_T TransferFcn1_CSTATE_p[2];     /* '<S76>/Transfer Fcn1' */
  347     real_T TransferFcn2_CSTATE_ck[2];    /* '<S76>/Transfer Fcn2' */
  348     real_T Integrator_CSTATE_l[3];       /* '<S108>/Integrator' */
  349     real_T Integrator1_CSTATE_b[3];      /* '<S106>/Integrator1' */
  350     real_T Integrator2_CSTATE_h[3];      /* '<S106>/Integrator2' */
  351   } StateDerivatives_Controller;
  352   
  353   /* State disabled  */
  354   typedef struct {
  355     boolean_T Integrator_CSTATE[3];      /* '<S14>/Integrator' */
  356     boolean_T Integrator1_CSTATE[3];     /* '<S104>/Integrator1' */
  357     boolean_T TransferFcn2_CSTATE[2];    /* '<S77>/Transfer Fcn2' */
  358     boolean_T TransferFcn1_CSTATE[2];    /* '<S77>/Transfer Fcn1' */
  359     boolean_T TransferFcn_CSTATE[2];     /* '<S77>/Transfer Fcn' */
  360     boolean_T Integrator_CSTATE_g[3];    /* '<S104>/Integrator' */
  361     boolean_T Integrator_CSTATE_f[3];    /* '<S106>/Integrator' */
  362     boolean_T Integrator2_CSTATE[3];     /* '<S107>/Integrator2' */
  363     boolean_T Integrator2_CSTATE_f[6];   /* '<S16>/Integrator2' */
  364     boolean_T Integrator6_CSTATE[6];     /* '<S16>/Integrator6' */
  365     boolean_T TransferFcn_CSTATE_e;      /* '<S22>/Transfer Fcn' */
  366     boolean_T TransferFcn1_CSTATE_d;     /* '<S22>/Transfer Fcn1' */
  367     boolean_T TransferFcn2_CSTATE_b;     /* '<S22>/Transfer Fcn2' */
  368     boolean_T Integrator10_CSTATE[18];   /* '<S16>/Integrator10' */
  369     boolean_T Integrator3_CSTATE[18];    /* '<S16>/Integrator3' */
  370     boolean_T Integrator1_CSTATE_m[9];   /* '<S16>/Integrator1' */
  371     boolean_T Integrator_CSTATE_p[3];    /* '<S15>/Integrator' */
  372     boolean_T Integrator1_CSTATE_f;      /* '<S33>/Integrator1' */
  373     boolean_T Integrator_CSTATE_c;       /* '<S33>/Integrator' */
  374     boolean_T Integrator_CSTATE_j;       /* '<S3>/Integrator' */
  375     boolean_T Integrator1_CSTATE_k[3];   /* '<S84>/Integrator1' */
  376     boolean_T Integrator_CSTATE_px[3];   /* '<S84>/Integrator' */
  377     boolean_T Integrator2_CSTATE_i[3];   /* '<S119>/Integrator2' */
  378     boolean_T Integrator1_CSTATE_g;      /* '<S93>/Integrator1' */
  379     boolean_T Integrator2_CSTATE_n;      /* '<S93>/Integrator2' */
  380     boolean_T Integrator3_CSTATE_m;      /* '<S93>/Integrator3' */
  381     boolean_T Integrator_CSTATE_d[3];    /* '<S92>/Integrator' */
  382     boolean_T Integrator2_CSTATE_n4[3];  /* '<S91>/Integrator2' */
  383     boolean_T Integrator11_CSTATE[3];    /* '<S16>/Integrator11' */
  384     boolean_T Integrator4_CSTATE[30];    /* '<S16>/Integrator4' */
  385     boolean_T Integrator5_CSTATE[3];     /* '<S16>/Integrator5' */
  386     boolean_T Integrator9_CSTATE[18];    /* '<S16>/Integrator9' */
  387     boolean_T TransferFcn_CSTATE_en[2];  /* '<S59>/Transfer Fcn' */
  388     boolean_T TransferFcn1_CSTATE_m[2];  /* '<S59>/Transfer Fcn1' */
  389     boolean_T TransferFcn2_CSTATE_j[2];  /* '<S59>/Transfer Fcn2' */
  390     boolean_T TransferFcn_CSTATE_d[2];   /* '<S64>/Transfer Fcn' */
  391     boolean_T TransferFcn1_CSTATE_e[2];  /* '<S64>/Transfer Fcn1' */
  392     boolean_T TransferFcn2_CSTATE_c[2];  /* '<S64>/Transfer Fcn2' */
  393     boolean_T TransferFcn_CSTATE_o[2];   /* '<S69>/Transfer Fcn' */
  394     boolean_T TransferFcn1_CSTATE_g[2];  /* '<S69>/Transfer Fcn1' */
  395     boolean_T TransferFcn2_CSTATE_i[2];  /* '<S69>/Transfer Fcn2' */
  396     boolean_T TransferFcn_CSTATE_c[2];   /* '<S74>/Transfer Fcn' */
  397     boolean_T TransferFcn1_CSTATE_l[2];  /* '<S74>/Transfer Fcn1' */
  398     boolean_T TransferFcn2_CSTATE_h[2];  /* '<S74>/Transfer Fcn2' */
  399     boolean_T TransferFcn_CSTATE_n[2];   /* '<S76>/Transfer Fcn' */
  400     boolean_T TransferFcn1_CSTATE_p[2];  /* '<S76>/Transfer Fcn1' */
  401     boolean_T TransferFcn2_CSTATE_ck[2]; /* '<S76>/Transfer Fcn2' */
  402     boolean_T Integrator_CSTATE_l[3];    /* '<S108>/Integrator' */
  403     boolean_T Integrator1_CSTATE_b[3];   /* '<S106>/Integrator1' */
  404     boolean_T Integrator2_CSTATE_h[3];   /* '<S106>/Integrator2' */
  405   } StateDisabled_Controller;
  406   
  407   /* Zero-crossing (trigger) state */
  408   typedef struct {
  409     ZCSigState Integrator1_Reset_ZCE;    /* '<S93>/Integrator1' */
  410     ZCSigState Integrator2_Reset_ZCE;    /* '<S93>/Integrator2' */
  411     ZCSigState Integrator3_Reset_ZCE;    /* '<S93>/Integrator3' */
  412   } PrevZCSigStates_Controller;
  413   
  414   #ifndef ODE4_INTG
  415   #define ODE4_INTG
  416   
  417   /* ODE4 Integration Data */
  418   typedef struct {
  419     real_T *y;                           /* output */
  420     real_T *f[4];                        /* derivatives */
  421   } ODE4_IntgData;
  422   
  423   #endif
  424   
  425   /* External inputs (root inport signals with auto storage) */
  426   typedef struct {
  427     real_T N;                            /* '<Root>/N' */
  428     real_T E;                            /* '<Root>/E' */
  429     real_T D;                            /* '<Root>/D' */
  430     real_T roll;                         /* '<Root>/roll' */
  431     real_T pitch;                        /* '<Root>/pitch' */
  432     real_T yaw;                          /* '<Root>/yaw' */
  433     real_T u;                            /* '<Root>/u' */
  434     real_T v;                            /* '<Root>/v' */
  435     real_T w;                            /* '<Root>/w' */
  436     real_T p;                            /* '<Root>/p' */
  437     real_T q;                            /* '<Root>/q' */
  438     real_T r;                            /* '<Root>/r' */
  439     real_T u_d;                          /* '<Root>/u_d' */
  440     real_T v_d;                          /* '<Root>/v_d' */
  441     real_T w_d;                          /* '<Root>/w_d' */
  442     real_T p_d;                          /* '<Root>/p_d' */
  443     real_T q_d;                          /* '<Root>/q_d' */
  444     real_T r_d;                          /* '<Root>/r_d' */
  445     real_T Ki_psi;                       /* '<Root>/Ki_psi' */
  446     real_T Kp_psi;                       /* '<Root>/Kp_psi' */
  447     real_T Kd_u;                         /* '<Root>/Kd_u' */
  448     real_T v_r;                          /* '<Root>/v_r' */
  449     real_T Kp_x;                         /* '<Root>/Kp_x' */
  450     real_T Kp_y;                         /* '<Root>/Kp_y' */
  451     real_T Ki_y;                         /* '<Root>/Ki_y' */
  452     real_T Ki_x;                         /* '<Root>/Ki_x' */
  453     real_T Kd_v;                         /* '<Root>/Kd_v' */
  454     real_T Kd_r;                         /* '<Root>/Kd_r' */
  455     real_T eta_d_x;                      /* '<Root>/eta_d_x' */
  456     real_T eta_d_y;                      /* '<Root>/eta_d_y' */
  457     real_T eta_d_psi;                    /* '<Root>/eta_d_psi' */
  458     real_T Ki_on;                        /* '<Root>/Ki_on' */
  459     real_T AFF_on;                       /* '<Root>/AFF_on' */
  460     real_T TA_sat;                       /* '<Root>/TA_sat' */
  461     real_T TA_rate_sat;                  /* '<Root>/TA_rate_sat' */
  462   } ExternalInputs_Controller;
  463   
  464   /* External outputs (root outports fed by signals with auto storage) */
  465   typedef struct {
  466     real_T tau_X;                        /* '<Root>/tau_X' */
  467     real_T tau_Y;                        /* '<Root>/tau_Y' */
  468     real_T tau_N;                        /* '<Root>/tau_N' */
  469     real_T eta_err_N;                    /* '<Root>/eta_err_N' */
  470     real_T eta_err_E;                    /* '<Root>/eta_err_E' */
  471     real_T eta_err_psi;                  /* '<Root>/eta_err_psi' */
  472     real_T eta_e_N_AFF;                  /* '<Root>/eta_e_N_AFF' */
  473     real_T eta_e_E_AFF;                  /* '<Root>/eta_e_E_AFF' */
  474     real_T eta_e_psi_AFF;                /* '<Root>/eta_e_psi_AFF' */
  475     real_T nu_e_u_AFF;                   /* '<Root>/nu_e_u_AFF' */
  476     real_T nu_e_v_AFF;                   /* '<Root>/nu_e_v_AFF' */
  477     real_T nu_e_r_AFF;                   /* '<Root>/nu_e_r_AFF' */
  478     real_T d_e_x_AFF;                    /* '<Root>/d_e_x_AFF' */
  479     real_T d_e_y_AFF;                    /* '<Root>/d_e_y_AFF' */
  480     real_T d_e_psi_AFF;                  /* '<Root>/d_e_psi_AFF' */
  481     real_T X_com;                        /* '<Root>/X_com' */
  482     real_T Y_com;                        /* '<Root>/Y_com' */
  483     real_T N_com;                        /* '<Root>/N_com' */
  484     real_T nu_sim_u;                     /* '<Root>/nu_sim_u' */
  485     real_T nu_sim_v;                     /* '<Root>/nu_sim_v' */
  486     real_T nu_sim_r;                     /* '<Root>/nu_sim_r' */
  487     real_T eta_sim_N;                    /* '<Root>/eta_sim_N' */
  488     real_T eta_sim_E;                    /* '<Root>/eta_sim_E' */
  489     real_T eta_sim_psi;                  /* '<Root>/eta_sim_psi' */
  490     real_T nu_d_sim_u;                   /* '<Root>/nu_d_sim_u' */
  491     real_T nu_d_sim_v;                   /* '<Root>/nu_d_sim_v' */
  492     real_T nu_d_sim_r;                   /* '<Root>/nu_d_sim_r' */
  493     real_T tau_Z;                        /* '<Root>/tau_Z' */
  494     real_T tau_K;                        /* '<Root>/tau_K' */
  495     real_T tau_M;                        /* '<Root>/tau_M' */
  496     real_T eta_e_N_NL;                   /* '<Root>/eta_e_N_NL' */
  497     real_T eta_e_E_NL;                   /* '<Root>/eta_e_E_NL' */
  498     real_T eta_e_psi_NL;                 /* '<Root>/eta_e_psi_NL' */
  499     real_T nu_e_u_NL;                    /* '<Root>/nu_e_u_NL' */
  500     real_T nu_e_v_NL;                    /* '<Root>/nu_e_v_NL' */
  501     real_T nu_e_r_NL;                    /* '<Root>/nu_e_r_NL' */
  502     real_T d_e_x_NL;                     /* '<Root>/d_e_x_NL' */
  503     real_T d_e_y_NL;                     /* '<Root>/d_e_y_NL' */
  504     real_T d_e_psi_NL;                   /* '<Root>/d_e_psi_NL' */
  505     real_T eta_e_N_HB;                   /* '<Root>/eta_e_N_HB' */
  506     real_T eta_e_E_HB;                   /* '<Root>/eta_e_E_HB' */
  507     real_T eta_e_psi_HB;                 /* '<Root>/eta_e_psi_HB' */
  508     real_T nu_e_u_HB;                    /* '<Root>/nu_e_u_HB' */
  509     real_T nu_e_v_HB;                    /* '<Root>/nu_e_v_HB' */
  510     real_T nu_e_r_HB;                    /* '<Root>/nu_e_r_HB' */
  511     real_T d_e_x_HB;                     /* '<Root>/d_e_x_HB' */
  512     real_T d_e_y_HB;                     /* '<Root>/d_e_y_HB' */
  513     real_T d_e_psi_HB;                   /* '<Root>/d_e_psi_HB' */
  514     real_T M_v_x;                        /* '<Root>/M_v_x' */
  515     real_T M_v_y;                        /* '<Root>/M_v_y' */
  516     real_T M_v_n;                        /* '<Root>/M_v_n' */
  517     real_T D_v_x;                        /* '<Root>/D_v_x' */
  518     real_T D_v_y;                        /* '<Root>/D_v_y' */
  519     real_T D_v_n;                        /* '<Root>/D_v_n' */
  520     real_T D_e_x;                        /* '<Root>/D_e_x' */
  521     real_T D_e_y;                        /* '<Root>/D_e_y' */
  522     real_T D_e_n;                        /* '<Root>/D_e_n' */
  523     real_T K_e_x;                        /* '<Root>/K_e_x' */
  524     real_T K_e_y;                        /* '<Root>/K_e_y' */
  525     real_T K_e_n;                        /* '<Root>/K_e_n' */
  526     real_T pref_x;                       /* '<Root>/pref_x' */
  527     real_T pref_y;                       /* '<Root>/pref_y' */
  528     real_T pref_n;                       /* '<Root>/pref_n' */
  529     real_T fref_x;                       /* '<Root>/fref_x' */
  530     real_T fref_y;                       /* '<Root>/fref_y' */
  531     real_T fref_n;                       /* '<Root>/fref_n' */
  532     real_T T_c_1x;                       /* '<Root>/T_c_1x' */
  533     real_T T_c_2x;                       /* '<Root>/T_c_2x' */
  534     real_T T_c_3x;                       /* '<Root>/T_c_3x' */
  535     real_T C_c_0x;                       /* '<Root>/C_c_0x' */
  536     real_T T_c_4y;                       /* '<Root>/T_c_4y' */
  537     real_T T_c_5y;                       /* '<Root>/T_c_5y' */
  538     real_T T_c_6y;                       /* '<Root>/T_c_6y' */
  539     real_T C_c_1y;                       /* '<Root>/C_c_1y' */
  540     real_T T_c_7n;                       /* '<Root>/T_c_7n' */
  541     real_T T_c_8n;                       /* '<Root>/T_c_8n' */
  542     real_T T_c_9n;                       /* '<Root>/T_c_9n' */
  543     real_T C_c_2n;                       /* '<Root>/C_c_2n' */
  544   } ExternalOutputs_Controller;
  545   
  546   /* Parameters (auto storage) */
  547   struct Parameters_Controller_ {
  548     real_T Integrator_IC;                /* Expression: 0
  549                                           * Referenced by: '<S14>/Integrator'
  550                                           */
  551     real_T Integrator1_IC[3];            /* Expression: [1 1 1]
  552                                           * Referenced by: '<S104>/Integrator1'
  553                                           */
  554     real_T TransferFcn2_A[2];            /* Computed Parameter: TransferFcn2_A
  555                                           * Referenced by: '<S77>/Transfer Fcn2'
  556                                           */
  557     real_T TransferFcn2_C[2];            /* Computed Parameter: TransferFcn2_C
  558                                           * Referenced by: '<S77>/Transfer Fcn2'
  559                                           */
  560     real_T Step2_Time;                   /* Expression: 500
  561                                           * Referenced by: '<S8>/Step2'
  562                                           */
  563     real_T Step2_Y0;                     /* Expression: 0
  564                                           * Referenced by: '<S8>/Step2'
  565                                           */
  566     real_T Step2_YFinal;                 /* Expression: 2
  567                                           * Referenced by: '<S8>/Step2'
  568                                           */
  569     real_T Step3_Time;                   /* Expression: 750
  570                                           * Referenced by: '<S8>/Step3'
  571                                           */
  572     real_T Step3_Y0;                     /* Expression: 0
  573                                           * Referenced by: '<S8>/Step3'
  574                                           */
  575     real_T Step3_YFinal;                 /* Expression: -2
  576                                           * Referenced by: '<S8>/Step3'
  577                                           */
  578     real_T Gain_Gain;                    /* Expression: 0
  579                                           * Referenced by: '<S8>/Gain'
  580                                           */
  581     real_T Step_Time;                    /* Expression: 250
  582                                           * Referenced by: '<S8>/Step'
  583                                           */
  584     real_T Step_Y0;                      /* Expression: 0
  585                                           * Referenced by: '<S8>/Step'
  586                                           */
  587     real_T Step_YFinal;                  /* Expression: 30
  588                                           * Referenced by: '<S8>/Step'
  589                                           */
  590     real_T Step1_Time;                   /* Expression: 500
  591                                           * Referenced by: '<S8>/Step1'
  592                                           */
  593     real_T Step1_Y0;                     /* Expression: 0
  594                                           * Referenced by: '<S8>/Step1'
  595                                           */
  596     real_T Step1_YFinal;                 /* Expression: -30
  597                                           * Referenced by: '<S8>/Step1'
  598                                           */
  599     real_T Gain1_Gain;                   /* Expression: 0
  600                                           * Referenced by: '<S8>/Gain1'
  601                                           */
  602     real_T Gain1_Gain_j;                 /* Expression: pi/180
  603                                           * Referenced by: '<S135>/Gain1'
  604                                           */
  605     real_T TransferFcn1_A[2];            /* Computed Parameter: TransferFcn1_A
  606                                           * Referenced by: '<S77>/Transfer Fcn1'
  607                                           */
  608     real_T TransferFcn1_C[2];            /* Computed Parameter: TransferFcn1_C
  609                                           * Referenced by: '<S77>/Transfer Fcn1'
  610                                           */
  611     real_T TransferFcn_A[2];             /* Computed Parameter: TransferFcn_A
  612                                           * Referenced by: '<S77>/Transfer Fcn'
  613                                           */
  614     real_T TransferFcn_C[2];             /* Computed Parameter: TransferFcn_C
  615                                           * Referenced by: '<S77>/Transfer Fcn'
  616                                           */
  617     real_T Integrator_IC_i[3];           /* Expression: [0 0 0]
  618                                           * Referenced by: '<S104>/Integrator'
  619                                           */
  620     real_T Integrator_IC_p;              /* Expression: 0
  621                                           * Referenced by: '<S106>/Integrator'
  622                                           */
  623     real_T Integrator2_IC[3];            /* Expression: [0 0 0]
  624                                           * Referenced by: '<S107>/Integrator2'
  625                                           */
  626     real_T Gain_Gain_a;                  /* Expression: 1
  627                                           * Referenced by: '<S107>/Gain'
  628                                           */
  629     real_T Integrator2_IC_h[6];          /* Expression: xm_0
  630                                           * Referenced by: '<S16>/Integrator2'
  631                                           */
  632     real_T Integrator6_IC[6];            /* Expression: Fm_0
  633                                           * Referenced by: '<S16>/Integrator6'
  634                                           */
  635     real_T TransferFcn_A_p;              /* Computed Parameter: TransferFcn_A_p
  636                                           * Referenced by: '<S22>/Transfer Fcn'
  637                                           */
  638     real_T TransferFcn_C_d;              /* Computed Parameter: TransferFcn_C_d
  639                                           * Referenced by: '<S22>/Transfer Fcn'
  640                                           */
  641     real_T TransferFcn1_A_e;             /* Computed Parameter: TransferFcn1_A_e
  642                                           * Referenced by: '<S22>/Transfer Fcn1'
  643                                           */
  644     real_T TransferFcn1_C_o;             /* Computed Parameter: TransferFcn1_C_o
  645                                           * Referenced by: '<S22>/Transfer Fcn1'
  646                                           */
  647     real_T TransferFcn2_A_p;             /* Computed Parameter: TransferFcn2_A_p
  648                                           * Referenced by: '<S22>/Transfer Fcn2'
  649                                           */
  650     real_T TransferFcn2_C_n;             /* Computed Parameter: TransferFcn2_C_n
  651                                           * Referenced by: '<S22>/Transfer Fcn2'
  652                                           */
  653     real_T Constant21_Value[6];          /* Expression: F_tol
  654                                           * Referenced by: '<S16>/Constant21'
  655                                           */
  656     real_T Constant22_Value[3];          /* Expression: e_tol
  657                                           * Referenced by: '<S16>/Constant22'
  658                                           */
  659     real_T Constant23_Value[3];          /* Expression: F_R
  660                                           * Referenced by: '<S16>/Constant23'
  661                                           */
  662     real_T TransferFcn3_D;               /* Computed Parameter: TransferFcn3_D
  663                                           * Referenced by: '<S22>/Transfer Fcn3'
  664                                           */
  665     real_T TransferFcn4_D;               /* Computed Parameter: TransferFcn4_D
  666                                           * Referenced by: '<S22>/Transfer Fcn4'
  667                                           */
  668     real_T TransferFcn5_D;               /* Computed Parameter: TransferFcn5_D
  669                                           * Referenced by: '<S22>/Transfer Fcn5'
  670                                           */
  671     real_T Constant16_Value;             /* Expression: F
  672                                           * Referenced by: '<S16>/Constant16'
  673                                           */
  674     real_T Constant18_Value;             /* Expression: g
  675                                           * Referenced by: '<S16>/Constant18'
  676                                           */
  677     real_T Constant15_Value[3];          /* Expression: F_R
  678                                           * Referenced by: '<S16>/Constant15'
  679                                           */
  680     real_T Integrator10_IC[18];          /* Expression: theta_e0
  681                                           * Referenced by: '<S16>/Integrator10'
  682                                           */
  683     real_T Integrator3_IC[18];           /* Expression: theta_ves_hat_0
  684                                           * Referenced by: '<S16>/Integrator3'
  685                                           */
  686     real_T Constant19_Value[6];          /* Expression: F_tol
  687                                           * Referenced by: '<S16>/Constant19'
  688                                           */
  689     real_T Integrator1_IC_m[9];          /* Expression: omega00
  690                                           * Referenced by: '<S16>/Integrator1'
  691                                           */
  692     real_T Gain2_Gain;                   /* Expression: 1
  693                                           * Referenced by: '<S11>/Gain2'
  694                                           */
  695     real_T Constant2_Value;              /* Expression: 0
  696                                           * Referenced by: '<S6>/Constant2'
  697                                           */
  698     real_T Constant1_Value;              /* Expression: 0
  699                                           * Referenced by: '<S6>/Constant1'
  700                                           */
  701     real_T Integrator_IC_m;              /* Expression: 0
  702                                           * Referenced by: '<S15>/Integrator'
  703                                           */
  704     real_T Constant1_Value_e[3];         /* Expression: [0 0 0]'
  705                                           * Referenced by: '<S18>/Constant1'
  706                                           */
  707     real_T Gain_Gain_b;                  /* Expression: -1
  708                                           * Referenced by: '<S18>/Gain'
  709                                           */
  710     real_T Constant2_Value_h;            /* Expression: 0
  711                                           * Referenced by: '<S5>/Constant2'
  712                                           */
  713     real_T Constant1_Value_c;            /* Expression: 0
  714                                           * Referenced by: '<S5>/Constant1'
  715                                           */
  716     real_T Constant2_Value_c;            /* Expression: 0
  717                                           * Referenced by: '<S7>/Constant2'
  718                                           */
  719     real_T Constant1_Value_g;            /* Expression: 0
  720                                           * Referenced by: '<S7>/Constant1'
  721                                           */
  722     real_T Constant4_Value[3];           /* Expression: [0 0 0]
  723                                           * Referenced by: '<S15>/Constant4'
  724                                           */
  725     real_T Gain_Gain_c;                  /* Expression: 0
  726                                           * Referenced by: '<S11>/Gain'
  727                                           */
  728     real_T Integrator1_IC_f;             /* Expression: 0
  729                                           * Referenced by: '<S33>/Integrator1'
  730                                           */
  731     real_T rho_Value;                    /* Expression: 5
  732                                           * Referenced by: '<S38>/rho'
  733                                           */
  734     real_T rho_Value_c;                  /* Expression: 5
  735                                           * Referenced by: '<S35>/rho'
  736                                           */
  737     real_T rho_Value_o;                  /* Expression: 1
  738                                           * Referenced by: '<S41>/rho'
  739                                           */
  740     real_T Normalization_BIAS;           /* Expression: Bias
  741                                           * Referenced by: '<S35>/Normalization'
  742                                           */
  743     real_T Kp_Gain;                      /* Expression: -65
  744                                           * Referenced by: '<S35>/Kp'
  745                                           */
  746     real_T Integrator_IC_p1;             /* Expression: 0
  747                                           * Referenced by: '<S33>/Integrator'
  748                                           */
  749     real_T Gain1_Gain_jx;                /* Expression: -1
  750                                           * Referenced by: '<S37>/Gain1'
  751                                           */
  752     real_T rho1_Value;                   /* Expression: 5
  753                                           * Referenced by: '<S37>/rho1'
  754                                           */
  755     real_T rho1_Value_e;                 /* Expression: 0
  756                                           * Referenced by: '<S35>/rho1'
  757                                           */
  758     real_T Kd_Gain;                      /* Expression: -1000
  759                                           * Referenced by: '<S35>/Kd'
  760                                           */
  761     real_T Gain_Gain_k;                  /* Expression: -250
  762                                           * Referenced by: '<S32>/Gain'
  763                                           */
  764     real_T Gain3_Gain;                   /* Expression: -1
  765                                           * Referenced by: '<S34>/Gain3'
  766                                           */
  767     real_T Gain2_Gain_l;                 /* Expression: -1
  768                                           * Referenced by: '<S34>/Gain2'
  769                                           */
  770     real_T Gain_Gain_i;                  /* Expression: 250
  771                                           * Referenced by: '<S34>/Gain'
  772                                           */
  773     real_T Constant_Value;               /* Expression: 0
  774                                           * Referenced by: '<S34>/Constant'
  775                                           */
  776     real_T Gain1_Gain_p;                 /* Expression: 2500
  777                                           * Referenced by: '<S34>/Gain1'
  778                                           */
  779     real_T Gain2_Gain_d[9];              /* Expression: -diag([1 0 1])
  780                                           * Referenced by: '<S17>/Gain2'
  781                                           */
  782     real_T Gain1_Gain_k;                 /* Expression: 0
  783                                           * Referenced by: '<S11>/Gain1'
  784                                           */
  785     real_T Step_Time_l;                  /* Expression: 12
  786                                           * Referenced by: '<S11>/Step'
  787                                           */
  788     real_T Step_Y0_k;                    /* Expression: 0
  789                                           * Referenced by: '<S11>/Step'
  790                                           */
  791     real_T Step_YFinal_j;                /* Expression: 1
  792                                           * Referenced by: '<S11>/Step'
  793                                           */
  794     real_T Constant2_Value_l[36];        /* Expression: T
  795                                           * Referenced by: '<S14>/Constant2'
  796                                           */
  797     real_T Constant3_Value[6];           /* Expression: [22 22 22 45 45 45]'
  798                                           * Referenced by: '<S14>/Constant3'
  799                                           */
  800     real_T Constant8_Value[6];           /* Expression: [10 10 10 10 10 10]'
  801                                           * Referenced by: '<S14>/Constant8'
  802                                           */
  803     real_T Gain_Gain_l[36];              /* Expression: T
  804                                           * Referenced by: '<S14>/Gain'
  805                                           */
  806     real_T Step_Time_j;                  /* Expression: 12
  807                                           * Referenced by: '<S4>/Step'
  808                                           */
  809     real_T Step_Y0_g;                    /* Expression: 0
  810                                           * Referenced by: '<S4>/Step'
  811                                           */
  812     real_T Step_YFinal_g;                /* Expression: 1
  813                                           * Referenced by: '<S4>/Step'
  814                                           */
  815     real_T Constant_Value_g;             /* Expression: 10.5
  816                                           * Referenced by: '<S3>/Constant'
  817                                           */
  818     real_T Integrator_IC_f;              /* Expression: 0
  819                                           * Referenced by: '<S3>/Integrator'
  820                                           */
  821     real_T Gravity_Value;                /* Expression: 0
  822                                           * Referenced by: '<S2>/Gravity'
  823                                           */
  824     real_T Integrator1_IC_a;             /* Expression: 0
  825                                           * Referenced by: '<S84>/Integrator1'
  826                                           */
  827     real_T Constant_Value_m;             /* Expression: 0
  828                                           * Referenced by: '<S85>/Constant'
  829                                           */
  830     real_T Integrator_IC_in;             /* Expression: 0
  831                                           * Referenced by: '<S84>/Integrator'
  832                                           */
  833     real_T D_Gain[9];                    /* Expression: diag([75 100 3205])
  834                                           * Referenced by: '<S84>/D'
  835                                           */
  836     real_T Gain_Gain_f;                  /* Expression: 1
  837                                           * Referenced by: '<S13>/Gain'
  838                                           */
  839     real_T Integrator2_IC_a;             /* Expression: 0
  840                                           * Referenced by: '<S119>/Integrator2'
  841                                           */
  842     real_T Gain4_Gain[9];                /* Expression: (diag([2535 2535 8485]))*diag([2 2 0.1])*0.05
  843                                           * Referenced by: '<S84>/Gain4'
  844                                           */
  845     real_T Gain7_Gain;                   /* Expression: 1
  846                                           * Referenced by: '<S13>/Gain7'
  847                                           */
  848     real_T TransportDelay_Delay;         /* Expression: 0.01
  849                                           * Referenced by: '<S93>/Transport Delay'
  850                                           */
  851     real_T TransportDelay_InitOutput;    /* Expression: 0
  852                                           * Referenced by: '<S93>/Transport Delay'
  853                                           */
  854     real_T Gain3_Gain_d;                 /* Expression: 1
  855                                           * Referenced by: '<S13>/Gain3'
  856                                           */
  857     real_T Constant_Value_e;             /* Expression: 0
  858                                           * Referenced by: '<S86>/Constant'
  859                                           */
  860     real_T Constant_Value_b[3];          /* Expression: [0.5 0.5 0.5]*1
  861                                           * Referenced by: '<S92>/Constant'
  862                                           */
  863     real_T Saturation_UpperSat;          /* Expression: 0.00185
  864                                           * Referenced by: '<S92>/Saturation'
  865                                           */
  866     real_T Saturation_LowerSat;          /* Expression: -0.00185
  867                                           * Referenced by: '<S92>/Saturation'
  868                                           */
  869     real_T Constant_Value_l[3];          /* Expression: [0.01 0.01 0.005]*0.1
  870                                           * Referenced by: '<S82>/Constant'
  871                                           */
  872     real_T Constant1_Value_o;            /* Expression: 0.5
  873                                           * Referenced by: '<S82>/Constant1'
  874                                           */
  875     real_T Gain_Gain_g;                  /* Expression: 1
  876                                           * Referenced by: '<S92>/Gain'
  877                                           */
  878     real_T Integrator_IC_e;              /* Expression: 0
  879                                           * Referenced by: '<S92>/Integrator'
  880                                           */
  881     real_T D_Gain_l[9];                  /* Expression: diag([75 100 3205])
  882                                           * Referenced by: '<S82>/D'
  883                                           */
  884     real_T Constant1_Value_eh[3];        /* Expression: [3 3 500]*1
  885                                           * Referenced by: '<S91>/Constant1'
  886                                           */
  887     real_T Gain6_Gain[9];                /* Expression: diag([1 1 0.1])
  888                                           * Referenced by: '<S82>/Gain6'
  889                                           */
  890     real_T Saturation_UpperSat_m;        /* Expression: 0.00185
  891                                           * Referenced by: '<S91>/Saturation'
  892                                           */
  893     real_T Saturation_LowerSat_m;        /* Expression: -0.00185
  894                                           * Referenced by: '<S91>/Saturation'
  895                                           */
  896     real_T Gain_Gain_h;                  /* Expression: 1
  897                                           * Referenced by: '<S91>/Gain'
  898                                           */
  899     real_T Integrator2_IC_g;             /* Expression: 0
  900                                           * Referenced by: '<S91>/Integrator2'
  901                                           */
  902     real_T Gain4_Gain_h[9];              /* Expression: (diag([2535 2535 8485]))*diag([2 2 0.1])*0.05
  903                                           * Referenced by: '<S82>/Gain4'
  904                                           */
  905     real_T Gain6_Gain_d;                 /* Expression: 1
  906                                           * Referenced by: '<S13>/Gain6'
  907                                           */
  908     real_T Gain_Gain_ix[3];              /* Expression: [1 1 180/pi]'
  909                                           * Referenced by: '<S16>/Gain'
  910                                           */
  911     real_T Step1_Time_n;                 /* Expression: 5
  912                                           * Referenced by: '<S11>/Step1'
  913                                           */
  914     real_T Step1_Y0_e;                   /* Expression: 0
  915                                           * Referenced by: '<S11>/Step1'
  916                                           */
  917     real_T Step1_YFinal_p;               /* Expression: 1
  918                                           * Referenced by: '<S11>/Step1'
  919                                           */
  920     real_T Constant1_Value_o3[4];        /* Expression: A01
  921                                           * Referenced by: '<S16>/Constant1'
  922                                           */
  923     real_T Constant11_Value[2];          /* Expression: C01
  924                                           * Referenced by: '<S16>/Constant11'
  925                                           */
  926     real_T Constant12_Value[2];          /* Expression: B01
  927                                           * Referenced by: '<S16>/Constant12'
  928                                           */
  929     real_T Constant17_Value[2];          /* Expression: C11
  930                                           * Referenced by: '<S16>/Constant17'
  931                                           */
  932     real_T Constant2_Value_g[2];         /* Expression: C11
  933                                           * Referenced by: '<S16>/Constant2'
  934                                           */
  935     real_T Constant3_Value_f[2];         /* Expression: B11
  936                                           * Referenced by: '<S16>/Constant3'
  937                                           */
  938     real_T Constant4_Value_p[4];         /* Expression: A11
  939                                           * Referenced by: '<S16>/Constant4'
  940                                           */
  941     real_T Constant5_Value[4];           /* Expression: A01
  942                                           * Referenced by: '<S16>/Constant5'
  943                                           */
  944     real_T Constant6_Value[2];           /* Expression: B01
  945                                           * Referenced by: '<S16>/Constant6'
  946                                           */
  947     real_T Constant7_Value[2];           /* Expression: C01
  948                                           * Referenced by: '<S16>/Constant7'
  949                                           */
  950     real_T Constant8_Value_i[4];         /* Expression: A11
  951                                           * Referenced by: '<S16>/Constant8'
  952                                           */
  953     real_T Constant9_Value[2];           /* Expression: B11
  954                                           * Referenced by: '<S16>/Constant9'
  955                                           */
  956     real_T Integrator11_IC[3];           /* Expression: m_s_0
  957                                           * Referenced by: '<S16>/Integrator11'
  958                                           */
  959     real_T Integrator4_IC[30];           /* Expression: phi_0
  960                                           * Referenced by: '<S16>/Integrator4'
  961                                           */
  962     real_T Integrator5_IC[3];            /* Expression: m_s_0
  963                                           * Referenced by: '<S16>/Integrator5'
  964                                           */
  965     real_T Integrator9_IC[18];           /* Expression: phi_0e
  966                                           * Referenced by: '<S16>/Integrator9'
  967                                           */
  968     real_T Oceancurrentcompensation_Value[3];/* Expression: [0.1 0 0]
  969                                               * Referenced by: '<S16>/Ocean current  compensation'
  970                                               */
  971     real_T Constant_Value_p;             /* Expression: -pi
  972                                           * Referenced by: '<S33>/Constant'
  973                                           */
  974     real_T Gain_Gain_bs;                 /* Expression: 250
  975                                           * Referenced by: '<S33>/Gain'
  976                                           */
  977     real_T Gain2_Gain_m;                 /* Expression: 1
  978                                           * Referenced by: '<S33>/Gain2'
  979                                           */
  980     real_T Gain1_Gain_f;                 /* Expression: 0
  981                                           * Referenced by: '<S33>/Gain1'
  982                                           */
  983     real_T Gravity_Value_n;              /* Expression: 9.81
  984                                           * Referenced by: '<S43>/Gravity'
  985                                           */
  986     real_T Accelerometerposition_Value[3];/* Expression: [r_x1 r_y1 r_z1]
  987                                            * Referenced by: '<S44>/Accelerometer position'
  988                                            */
  989     real_T WhiteNoise_Mean;              /* Expression: 0
  990                                           * Referenced by: '<S58>/White Noise'
  991                                           */
  992     real_T WhiteNoise_StdDev;            /* Computed Parameter: WhiteNoise_StdDev
  993                                           * Referenced by: '<S58>/White Noise'
  994                                           */
  995     real_T WhiteNoise_Seed;              /* Expression: seed
  996                                           * Referenced by: '<S58>/White Noise'
  997                                           */
  998     real_T Output_Gain;                  /* Expression: [sqrt(Cov)]/[sqrt(Ts)]
  999                                           * Referenced by: '<S58>/Output'
 1000                                           */
 1001     real_T TransferFcn_A_o[2];           /* Computed Parameter: TransferFcn_A_o
 1002                                           * Referenced by: '<S59>/Transfer Fcn'
 1003                                           */
 1004     real_T TransferFcn_C_n[2];           /* Computed Parameter: TransferFcn_C_n
 1005                                           * Referenced by: '<S59>/Transfer Fcn'
 1006                                           */
 1007     real_T TransferFcn1_A_g[2];          /* Computed Parameter: TransferFcn1_A_g
 1008                                           * Referenced by: '<S59>/Transfer Fcn1'
 1009                                           */
 1010     real_T TransferFcn1_C_e[2];          /* Computed Parameter: TransferFcn1_C_e
 1011                                           * Referenced by: '<S59>/Transfer Fcn1'
 1012                                           */
 1013     real_T TransferFcn2_A_g[2];          /* Computed Parameter: TransferFcn2_A_g
 1014                                           * Referenced by: '<S59>/Transfer Fcn2'
 1015                                           */
 1016     real_T TransferFcn2_C_c[2];          /* Computed Parameter: TransferFcn2_C_c
 1017                                           * Referenced by: '<S59>/Transfer Fcn2'
 1018                                           */
 1019     real_T Accelerometerposition1_Value[3];/* Expression: [r_x2 r_y2 r_z2]
 1020                                             * Referenced by: '<S44>/Accelerometer position1'
 1021                                             */
 1022     real_T WhiteNoise_Mean_f;            /* Expression: 0
 1023                                           * Referenced by: '<S63>/White Noise'
 1024                                           */
 1025     real_T WhiteNoise_StdDev_b;          /* Computed Parameter: WhiteNoise_StdDev_b
 1026                                           * Referenced by: '<S63>/White Noise'
 1027                                           */
 1028     real_T WhiteNoise_Seed_n;            /* Expression: seed
 1029                                           * Referenced by: '<S63>/White Noise'
 1030                                           */
 1031     real_T Output_Gain_b;                /* Expression: [sqrt(Cov)]/[sqrt(Ts)]
 1032                                           * Referenced by: '<S63>/Output'
 1033                                           */
 1034     real_T TransferFcn_A_j[2];           /* Computed Parameter: TransferFcn_A_j
 1035                                           * Referenced by: '<S64>/Transfer Fcn'
 1036                                           */
 1037     real_T TransferFcn_C_c[2];           /* Computed Parameter: TransferFcn_C_c
 1038                                           * Referenced by: '<S64>/Transfer Fcn'
 1039                                           */
 1040     real_T TransferFcn1_A_b[2];          /* Computed Parameter: TransferFcn1_A_b
 1041                                           * Referenced by: '<S64>/Transfer Fcn1'
 1042                                           */
 1043     real_T TransferFcn1_C_o2[2];         /* Computed Parameter: TransferFcn1_C_o2
 1044                                           * Referenced by: '<S64>/Transfer Fcn1'
 1045                                           */
 1046     real_T TransferFcn2_A_f[2];          /* Computed Parameter: TransferFcn2_A_f
 1047                                           * Referenced by: '<S64>/Transfer Fcn2'
 1048                                           */
 1049     real_T TransferFcn2_C_e[2];          /* Computed Parameter: TransferFcn2_C_e
 1050                                           * Referenced by: '<S64>/Transfer Fcn2'
 1051                                           */
 1052     real_T Accelerometerposition3_Value[3];/* Expression: [r_x3 r_y3 r_z3]
 1053                                             * Referenced by: '<S44>/Accelerometer position3'
 1054                                             */
 1055     real_T WhiteNoise_Mean_g;            /* Expression: 0
 1056                                           * Referenced by: '<S68>/White Noise'
 1057                                           */
 1058     real_T WhiteNoise_StdDev_h;          /* Computed Parameter: WhiteNoise_StdDev_h
 1059                                           * Referenced by: '<S68>/White Noise'
 1060                                           */
 1061     real_T WhiteNoise_Seed_k;            /* Expression: seed
 1062                                           * Referenced by: '<S68>/White Noise'
 1063                                           */
 1064     real_T Output_Gain_g;                /* Expression: [sqrt(Cov)]/[sqrt(Ts)]
 1065                                           * Referenced by: '<S68>/Output'
 1066                                           */
 1067     real_T TransferFcn_A_e[2];           /* Computed Parameter: TransferFcn_A_e
 1068                                           * Referenced by: '<S69>/Transfer Fcn'
 1069                                           */
 1070     real_T TransferFcn_C_e[2];           /* Computed Parameter: TransferFcn_C_e
 1071                                           * Referenced by: '<S69>/Transfer Fcn'
 1072                                           */
 1073     real_T TransferFcn1_A_f[2];          /* Computed Parameter: TransferFcn1_A_f
 1074                                           * Referenced by: '<S69>/Transfer Fcn1'
 1075                                           */
 1076     real_T TransferFcn1_C_m[2];          /* Computed Parameter: TransferFcn1_C_m
 1077                                           * Referenced by: '<S69>/Transfer Fcn1'
 1078                                           */
 1079     real_T TransferFcn2_A_h[2];          /* Computed Parameter: TransferFcn2_A_h
 1080                                           * Referenced by: '<S69>/Transfer Fcn2'
 1081                                           */
 1082     real_T TransferFcn2_C_m[2];          /* Computed Parameter: TransferFcn2_C_m
 1083                                           * Referenced by: '<S69>/Transfer Fcn2'
 1084                                           */
 1085     real_T Accelerometerposition2_Value[3];/* Expression: [r_x4 r_y4 r_z4]
 1086                                             * Referenced by: '<S44>/Accelerometer position2'
 1087                                             */
 1088     real_T WhiteNoise_Mean_j;            /* Expression: 0
 1089                                           * Referenced by: '<S73>/White Noise'
 1090                                           */
 1091     real_T WhiteNoise_StdDev_d;          /* Computed Parameter: WhiteNoise_StdDev_d
 1092                                           * Referenced by: '<S73>/White Noise'
 1093                                           */
 1094     real_T WhiteNoise_Seed_no;           /* Expression: seed
 1095                                           * Referenced by: '<S73>/White Noise'
 1096                                           */
 1097     real_T Output_Gain_e;                /* Expression: [sqrt(Cov)]/[sqrt(Ts)]
 1098                                           * Referenced by: '<S73>/Output'
 1099                                           */
 1100     real_T TransferFcn_A_d[2];           /* Computed Parameter: TransferFcn_A_d
 1101                                           * Referenced by: '<S74>/Transfer Fcn'
 1102                                           */
 1103     real_T TransferFcn_C_dx[2];          /* Computed Parameter: TransferFcn_C_dx
 1104                                           * Referenced by: '<S74>/Transfer Fcn'
 1105                                           */
 1106     real_T TransferFcn1_A_g2[2];         /* Computed Parameter: TransferFcn1_A_g2
 1107                                           * Referenced by: '<S74>/Transfer Fcn1'
 1108                                           */
 1109     real_T TransferFcn1_C_e2[2];         /* Computed Parameter: TransferFcn1_C_e2
 1110                                           * Referenced by: '<S74>/Transfer Fcn1'
 1111                                           */
 1112     real_T TransferFcn2_A_k[2];          /* Computed Parameter: TransferFcn2_A_k
 1113                                           * Referenced by: '<S74>/Transfer Fcn2'
 1114                                           */
 1115     real_T TransferFcn2_C_h[2];          /* Computed Parameter: TransferFcn2_C_h
 1116                                           * Referenced by: '<S74>/Transfer Fcn2'
 1117                                           */
 1118     real_T WhiteNoise_Mean_p;            /* Expression: 0
 1119                                           * Referenced by: '<S75>/White Noise'
 1120                                           */
 1121     real_T WhiteNoise_StdDev_j;          /* Computed Parameter: WhiteNoise_StdDev_j
 1122                                           * Referenced by: '<S75>/White Noise'
 1123                                           */
 1124     real_T WhiteNoise_Seed_kt[3];        /* Expression: seed
 1125                                           * Referenced by: '<S75>/White Noise'
 1126                                           */
 1127     real_T Output_Gain_p[3];             /* Expression: [sqrt(Cov)]/[sqrt(Ts)]
 1128                                           * Referenced by: '<S75>/Output'
 1129                                           */
 1130     real_T TransferFcn_A_p1[2];          /* Computed Parameter: TransferFcn_A_p1
 1131                                           * Referenced by: '<S76>/Transfer Fcn'
 1132                                           */
 1133     real_T TransferFcn_C_a[2];           /* Computed Parameter: TransferFcn_C_a
 1134                                           * Referenced by: '<S76>/Transfer Fcn'
 1135                                           */
 1136     real_T TransferFcn1_A_n[2];          /* Computed Parameter: TransferFcn1_A_n
 1137                                           * Referenced by: '<S76>/Transfer Fcn1'
 1138                                           */
 1139     real_T TransferFcn1_C_l[2];          /* Computed Parameter: TransferFcn1_C_l
 1140                                           * Referenced by: '<S76>/Transfer Fcn1'
 1141                                           */
 1142     real_T TransferFcn2_A_gl[2];         /* Computed Parameter: TransferFcn2_A_gl
 1143                                           * Referenced by: '<S76>/Transfer Fcn2'
 1144                                           */
 1145     real_T TransferFcn2_C_j[2];          /* Computed Parameter: TransferFcn2_C_j
 1146                                           * Referenced by: '<S76>/Transfer Fcn2'
 1147                                           */
 1148     real_T Gain1_Gain_fn;                /* Expression: 1
 1149                                           * Referenced by: '<S13>/Gain1'
 1150                                           */
 1151     real_T Gain2_Gain_k;                 /* Expression: 1
 1152                                           * Referenced by: '<S13>/Gain2'
 1153                                           */
 1154     real_T Gain4_Gain_j;                 /* Expression: 1
 1155                                           * Referenced by: '<S13>/Gain4'
 1156                                           */
 1157     real_T Gain5_Gain;                   /* Expression: 1
 1158                                           * Referenced by: '<S13>/Gain5'
 1159                                           */
 1160     real_T Gain1_Gain_c[9];              /* Expression: diag([2535 2535 8485])*0.5
 1161                                           * Referenced by: '<S82>/Gain1'
 1162                                           */
 1163     real_T Gain2_Gain_n;                 /* Expression: 10
 1164                                           * Referenced by: '<S82>/Gain2'
 1165                                           */
 1166     real_T Gain3_Gain_b[9];              /* Expression: diag([1 1 1])*1
 1167                                           * Referenced by: '<S82>/Gain3'
 1168                                           */
 1169     real_T Gain5_Gain_l;                 /* Expression: 15
 1170                                           * Referenced by: '<S82>/Gain5'
 1171                                           */
 1172     real_T M_Gain[9];                    /* Expression: inv(diag([2535 2535 8485]))
 1173                                           * Referenced by: '<S82>/M'
 1174                                           */
 1175     real_T Constant_Value_c;             /* Expression: 0
 1176                                           * Referenced by: '<S91>/Constant'
 1177                                           */
 1178     real_T Gain_Gain_bh;                 /* Expression: 0
 1179                                           * Referenced by: '<S93>/Gain'
 1180                                           */
 1181     real_T Gain_Gain_n[144];             /* Expression: inv(A)
 1182                                           * Referenced by: '<S103>/Gain'
 1183                                           */
 1184     real_T Gain_Gain_hw[9];              /* Expression: eye(3)*100
 1185                                           * Referenced by: '<S104>/Gain'
 1186                                           */
 1187     real_T Gain1_Gain_g[9];              /* Expression: eye(3)*10
 1188                                           * Referenced by: '<S104>/Gain1'
 1189                                           */
 1190     real_T Integrator_IC_ik[3];          /* Expression: [0 0 -9.81]
 1191                                           * Referenced by: '<S108>/Integrator'
 1192                                           */
 1193     real_T Gain_Gain_j[9];               /* Expression: eye(3)*25
 1194                                           * Referenced by: '<S108>/Gain'
 1195                                           */
 1196     real_T Integrator1_IC_c;             /* Expression: 0
 1197                                           * Referenced by: '<S106>/Integrator1'
 1198                                           */
 1199     real_T Gain_Gain_e;                  /* Expression: 1
 1200                                           * Referenced by: '<S106>/Gain'
 1201                                           */
 1202     real_T Gain1_Gain_gv;                /* Expression: 0.1
 1203                                           * Referenced by: '<S106>/Gain1'
 1204                                           */
 1205     real_T Integrator2_IC_hf;            /* Expression: 0
 1206                                           * Referenced by: '<S106>/Integrator2'
 1207                                           */
 1208     real_T Gain2_Gain_a;                 /* Expression: 0.01
 1209                                           * Referenced by: '<S106>/Gain2'
 1210                                           */
 1211     real_T Gain3_Gain_i;                 /* Expression: 2
 1212                                           * Referenced by: '<S106>/Gain3'
 1213                                           */
 1214     real_T M_Gain_a[9];                  /* Expression: diag([2535 2535 8485])
 1215                                           * Referenced by: '<S107>/M'
 1216                                           */
 1217     real_T Gain2_Gain_ni[9];             /* Expression: diag([1 1 2])
 1218                                           * Referenced by: '<S107>/Gain2'
 1219                                           */
 1220     real_T Gain1_Gain_fq[9];             /* Expression: diag([2535 2535 8485])*0.5
 1221                                           * Referenced by: '<S84>/Gain1'
 1222                                           */
 1223     real_T Gain2_Gain_l1;                /* Expression: 10
 1224                                           * Referenced by: '<S84>/Gain2'
 1225                                           */
 1226     real_T Gain3_Gain_bo[9];             /* Expression: diag([1 1 1])*1
 1227                                           * Referenced by: '<S84>/Gain3'
 1228                                           */
 1229     real_T Gain5_Gain_o;                 /* Expression: 15
 1230                                           * Referenced by: '<S84>/Gain5'
 1231                                           */
 1232     real_T Gain6_Gain_k[9];              /* Expression: diag([1 1 0.1])
 1233                                           * Referenced by: '<S84>/Gain6'
 1234                                           */
 1235     real_T M_Gain_g[9];                  /* Expression: inv(diag([2535 2535 8485]))
 1236                                           * Referenced by: '<S84>/M'
 1237                                           */
 1238     real_T Constant_Value_k;             /* Expression: 0
 1239                                           * Referenced by: '<S119>/Constant'
 1240                                           */
 1241     real_T Gain_Gain_k3;                 /* Expression: 0
 1242                                           * Referenced by: '<S119>/Gain'
 1243                                           */
 1244     real_T Gain1_Gain_kt;                /* Expression: 3
 1245                                           * Referenced by: '<S14>/Gain1'
 1246                                           */
 1247     real_T Step_Time_p;                  /* Expression: 12
 1248                                           * Referenced by: '<S3>/Step'
 1249                                           */
 1250     real_T Step_Y0_m;                    /* Expression: 0
 1251                                           * Referenced by: '<S3>/Step'
 1252                                           */
 1253     real_T Step_YFinal_a;                /* Expression: 1
 1254                                           * Referenced by: '<S3>/Step'
 1255                                           */
 1256     real_T Constant_Value_f[3];          /* Expression: [0 0 0]
 1257                                           * Referenced by: '<Root>/Constant'
 1258                                           */
 1259   };
 1260   
 1261   /* Real-time Model Data Structure */
 1262   struct tag_RTM_Controller {
 1263     const char_T *errorStatus;
 1264     RTWLogInfo *rtwLogInfo;
 1265     RTWSolverInfo solverInfo;
 1266   
 1267     /*
 1268      * ModelData:
 1269      * The following substructure contains information regarding
 1270      * the data used in the model.
 1271      */
 1272     struct {
 1273       real_T *contStates;
 1274       real_T *derivs;
 1275       boolean_T *contStateDisabled;
 1276       boolean_T zCCacheNeedsReset;
 1277       boolean_T derivCacheNeedsReset;
 1278       boolean_T blkStateChange;
 1279       real_T odeY[198];
 1280       real_T odeF[4][198];
 1281       ODE4_IntgData intgData;
 1282     } ModelData;
 1283   
 1284     /*
 1285      * Sizes:
 1286      * The following substructure contains sizes information
 1287      * for many of the model attributes such as inputs, outputs,
 1288      * dwork, sample times, etc.
 1289      */
 1290     struct {
 1291       int_T numContStates;
 1292       int_T numSampTimes;
 1293     } Sizes;
 1294   
 1295     /*
 1296      * Timing:
 1297      * The following substructure contains information regarding
 1298      * the timing information for the model.
 1299      */
 1300     struct {
 1301       uint32_T clockTick0;
 1302       uint32_T clockTickH0;
 1303       time_T stepSize0;
 1304       uint32_T clockTick1;
 1305       uint32_T clockTickH1;
 1306       boolean_T firstInitCondFlag;
 1307       time_T tFinal;
 1308       SimTimeStep simTimeStep;
 1309       boolean_T stopRequestedFlag;
 1310       time_T *t;
 1311       time_T tArray[2];
 1312     } Timing;
 1313   };
 1314   
 1315   /* Block parameters (auto storage) */
 1316   #ifdef __cplusplus
 1317   
 1318   extern "C" {
 1319   
 1320   #endif
 1321   
 1322     extern Parameters_Controller Controller_P;
 1323   
 1324   #ifdef __cplusplus
 1325   
 1326   }
 1327   #endif
 1328   
 1329   /* Block signals (auto storage) */
 1330   extern BlockIO_Controller Controller_B;
 1331   
 1332   /* Continuous states (auto storage) */
 1333   extern ContinuousStates_Controller Controller_X;
 1334   
 1335   /* Block states (auto storage) */
 1336   extern D_Work_Controller Controller_DWork;
 1337   
 1338   /* External inputs (root inport signals with auto storage) */
 1339   #ifdef __cplusplus
 1340   
 1341   extern "C" {
 1342   
 1343   #endif
 1344   
 1345     extern ExternalInputs_Controller Controller_U;
 1346   
 1347   #ifdef __cplusplus
 1348   
 1349   }
 1350   #endif
 1351   
 1352   /* External outputs (root outports fed by signals with auto storage) */
 1353   #ifdef __cplusplus
 1354   
 1355   extern "C" {
 1356   
 1357   #endif
 1358   
 1359     extern ExternalOutputs_Controller Controller_Y;
 1360   
 1361   #ifdef __cplusplus
 1362   
 1363   }
 1364   #endif
 1365   
 1366   #ifdef __cplusplus
 1367   
 1368   extern "C" {
 1369   
 1370   #endif
 1371   
 1372     /* Model entry point functions */
 1373     extern void Controller_initialize(void);
 1374     extern void Controller_step(void);
 1375     extern void Controller_terminate(void);
 1376   
 1377   #ifdef __cplusplus
 1378   
 1379   }
 1380   #endif
 1381   
 1382   /* Real-time Model object */
 1383   #ifdef __cplusplus
 1384   
 1385   extern "C" {
 1386   
 1387   #endif
 1388   
 1389     extern RT_MODEL_Controller *const Controller_M;
 1390   
 1391   #ifdef __cplusplus
 1392   
 1393   }
 1394   #endif
 1395   
 1396   /*-
 1397    * The generated code includes comments that allow you to trace directly
 1398    * back to the appropriate location in the model.  The basic format
 1399    * is <system>/block_name, where system is the system number (uniquely
 1400    * assigned by Simulink) and block_name is the name of the block.
 1401    *
 1402    * Use the MATLAB hilite_system command to trace the generated code back
 1403    * to the model.  For example,
 1404    *
 1405    * hilite_system('<S3>')    - opens system 3
 1406    * hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3
 1407    *
 1408    * Here is the system hierarchy for this model
 1409    *
 1410    * '<Root>' : 'Controller'
 1411    * '<S1>'   : 'Controller/Controll system'
 1412    * '<S2>'   : 'Controller/Gravity'
 1413    * '<S3>'   : 'Controller/Moving inertial frame'
 1414    * '<S4>'   : 'Controller/Moving inertial frame1'
 1415    * '<S5>'   : 'Controller/Subsystem'
 1416    * '<S6>'   : 'Controller/Subsystem1'
 1417    * '<S7>'   : 'Controller/Subsystem2'
 1418    * '<S8>'   : 'Controller/Subsystem3'
 1419    * '<S9>'   : 'Controller/Subsystem4'
 1420    * '<S10>'  : 'Controller/nu'
 1421    * '<S11>'  : 'Controller/Controll system/Control law'
 1422    * '<S12>'  : 'Controller/Controll system/Measurement system'
 1423    * '<S13>'  : 'Controller/Controll system/Observers'
 1424    * '<S14>'  : 'Controller/Controll system/Thrust allocation'
 1425    * '<S15>'  : 'Controller/Controll system/Control law/Nonlinear PID'
 1426    * '<S16>'  : 'Controller/Controll system/Control law/Robust MRAC'
 1427    * '<S17>'  : 'Controller/Controll system/Control law/WOPC'
 1428    * '<S18>'  : 'Controller/Controll system/Control law/Nonlinear PID/Subsystem'
 1429    * '<S19>'  : 'Controller/Controll system/Control law/Nonlinear PID/Transposed rotation  matrix '
 1430    * '<S20>'  : 'Controller/Controll system/Control law/Robust MRAC/Calculation of theta_p'
 1431    * '<S21>'  : 'Controller/Controll system/Control law/Robust MRAC/Control law parameter calculation'
 1432    * '<S22>'  : 'Controller/Controll system/Control law/Robust MRAC/LP Filtering '
 1433    * '<S23>'  : 'Controller/Controll system/Control law/Robust MRAC/Rotation matrix in yaw '
 1434    * '<S24>'  : 'Controller/Controll system/Control law/Robust MRAC/System parameter calculation'
 1435    * '<S25>'  : 'Controller/Controll system/Control law/Robust MRAC/System parameter calculation1'
 1436    * '<S26>'  : 'Controller/Controll system/Control law/Robust MRAC/Transposed rotation  matrix in yaw'
 1437    * '<S27>'  : 'Controller/Controll system/Control law/Robust MRAC/Transposed rotation  matrix in yaw1'
 1438    * '<S28>'  : 'Controller/Controll system/Control law/Robust MRAC/control_law'
 1439    * '<S29>'  : 'Controller/Controll system/Control law/Robust MRAC/environment_estimation'
 1440    * '<S30>'  : 'Controller/Controll system/Control law/Robust MRAC/normalized _adaptive_law1'
 1441    * '<S31>'  : 'Controller/Controll system/Control law/Robust MRAC/reference_model'
 1442    * '<S32>'  : 'Controller/Controll system/Control law/WOPC/WOPC'
 1443    * '<S33>'  : 'Controller/Controll system/Control law/WOPC/WOPC/Circle center update law'
 1444    * '<S34>'  : 'Controller/Controll system/Control law/WOPC/WOPC/Heading controller'
 1445    * '<S35>'  : 'Controller/Controll system/Control law/WOPC/WOPC/Pendulum length controller'
 1446    * '<S36>'  : 'Controller/Controll system/Control law/WOPC/WOPC/Polar transforrmation'
 1447    * '<S37>'  : 'Controller/Controll system/Control law/WOPC/WOPC/Circle center update law/Subsystem'
 1448    * '<S38>'  : 'Controller/Controll system/Control law/WOPC/WOPC/Circle center update law/Subsystem1'
 1449    * '<S39>'  : 'Controller/Controll system/Control law/WOPC/WOPC/Circle center update law/Subsystem2'
 1450    * '<S40>'  : 'Controller/Controll system/Control law/WOPC/WOPC/Pendulum length controller/Subsystem'
 1451    * '<S41>'  : 'Controller/Controll system/Control law/WOPC/WOPC/Pendulum length controller/yaw vector'
 1452    * '<S42>'  : 'Controller/Controll system/Measurement system/GPS '
 1453    * '<S43>'  : 'Controller/Controll system/Measurement system/Gravity'
 1454    * '<S44>'  : 'Controller/Controll system/Measurement system/IMU 2'
 1455    * '<S45>'  : 'Controller/Controll system/Measurement system/gyro and attitude'
 1456    * '<S46>'  : 'Controller/Controll system/Measurement system/nu'
 1457    * '<S47>'  : 'Controller/Controll system/Measurement system/Gravity/Rotation Angles to Direction Cosine Matrix'
 1458    * '<S48>'  : 'Controller/Controll system/Measurement system/Gravity/Rotation Angles to Direction Cosine Matrix1'
 1459    * '<S49>'  : 'Controller/Controll system/Measurement system/Gravity/Rotation Angles to Direction Cosine Matrix/Create 3x3 Matrix'
 1460    * '<S50>'  : 'Controller/Controll system/Measurement system/Gravity/Rotation Angles to Direction Cosine Matrix1/Create 3x3 Matrix'
 1461    * '<S51>'  : 'Controller/Controll system/Measurement system/IMU 2/3 axis accelerometer'
 1462    * '<S52>'  : 'Controller/Controll system/Measurement system/IMU 2/3 axis accelerometer1'
 1463    * '<S53>'  : 'Controller/Controll system/Measurement system/IMU 2/3 axis accelerometer2'
 1464    * '<S54>'  : 'Controller/Controll system/Measurement system/IMU 2/3 axis accelerometer3'
 1465    * '<S55>'  : 'Controller/Controll system/Measurement system/IMU 2/3 axis accelerometer/3x3 cross product'
 1466    * '<S56>'  : 'Controller/Controll system/Measurement system/IMU 2/3 axis accelerometer/3x3 cross product1'
 1467    * '<S57>'  : 'Controller/Controll system/Measurement system/IMU 2/3 axis accelerometer/3x3 cross product2'
 1468    * '<S58>'  : 'Controller/Controll system/Measurement system/IMU 2/3 axis accelerometer/Band-Limited White Noise'
 1469    * '<S59>'  : 'Controller/Controll system/Measurement system/IMU 2/3 axis accelerometer/Dynamics'
 1470    * '<S60>'  : 'Controller/Controll system/Measurement system/IMU 2/3 axis accelerometer1/3x3 cross product'
 1471    * '<S61>'  : 'Controller/Controll system/Measurement system/IMU 2/3 axis accelerometer1/3x3 cross product1'
 1472    * '<S62>'  : 'Controller/Controll system/Measurement system/IMU 2/3 axis accelerometer1/3x3 cross product2'
 1473    * '<S63>'  : 'Controller/Controll system/Measurement system/IMU 2/3 axis accelerometer1/Band-Limited White Noise'
 1474    * '<S64>'  : 'Controller/Controll system/Measurement system/IMU 2/3 axis accelerometer1/Dynamics'
 1475    * '<S65>'  : 'Controller/Controll system/Measurement system/IMU 2/3 axis accelerometer2/3x3 cross product'
 1476    * '<S66>'  : 'Controller/Controll system/Measurement system/IMU 2/3 axis accelerometer2/3x3 cross product1'
 1477    * '<S67>'  : 'Controller/Controll system/Measurement system/IMU 2/3 axis accelerometer2/3x3 cross product2'
 1478    * '<S68>'  : 'Controller/Controll system/Measurement system/IMU 2/3 axis accelerometer2/Band-Limited White Noise'
 1479    * '<S69>'  : 'Controller/Controll system/Measurement system/IMU 2/3 axis accelerometer2/Dynamics'
 1480    * '<S70>'  : 'Controller/Controll system/Measurement system/IMU 2/3 axis accelerometer3/3x3 cross product'
 1481    * '<S71>'  : 'Controller/Controll system/Measurement system/IMU 2/3 axis accelerometer3/3x3 cross product1'
 1482    * '<S72>'  : 'Controller/Controll system/Measurement system/IMU 2/3 axis accelerometer3/3x3 cross product2'
 1483    * '<S73>'  : 'Controller/Controll system/Measurement system/IMU 2/3 axis accelerometer3/Band-Limited White Noise'
 1484    * '<S74>'  : 'Controller/Controll system/Measurement system/IMU 2/3 axis accelerometer3/Dynamics'
 1485    * '<S75>'  : 'Controller/Controll system/Measurement system/gyro and attitude/Band-Limited White Noise'
 1486    * '<S76>'  : 'Controller/Controll system/Measurement system/gyro and attitude/Dynamics'
 1487    * '<S77>'  : 'Controller/Controll system/Measurement system/gyro and attitude/Dynamics1'
 1488    * '<S78>'  : 'Controller/Controll system/Measurement system/nu/Rotation Angles to Direction Cosine Matrix1'
 1489    * '<S79>'  : 'Controller/Controll system/Measurement system/nu/Rotation Angles to Direction Cosine Matrix2'
 1490    * '<S80>'  : 'Controller/Controll system/Measurement system/nu/Rotation Angles to Direction Cosine Matrix1/Create 3x3 Matrix'
 1491    * '<S81>'  : 'Controller/Controll system/Measurement system/nu/Rotation Angles to Direction Cosine Matrix2/Create 3x3 Matrix'
 1492    * '<S82>'  : 'Controller/Controll system/Observers/Hybrid nonlinear observer'
 1493    * '<S83>'  : 'Controller/Controll system/Observers/Kinematic observer'
 1494    * '<S84>'  : 'Controller/Controll system/Observers/Nonlinear observer'
 1495    * '<S85>'  : 'Controller/Controll system/Observers/Subsystem'
 1496    * '<S86>'  : 'Controller/Controll system/Observers/Subsystem1'
 1497    * '<S87>'  : 'Controller/Controll system/Observers/Hybrid nonlinear observer/MATLAB Function'
 1498    * '<S88>'  : 'Controller/Controll system/Observers/Hybrid nonlinear observer/Rot'
 1499    * '<S89>'  : 'Controller/Controll system/Observers/Hybrid nonlinear observer/Rot1'
 1500    * '<S90>'  : 'Controller/Controll system/Observers/Hybrid nonlinear observer/Rot2'
 1501    * '<S91>'  : 'Controller/Controll system/Observers/Hybrid nonlinear observer/Subsystem'
 1502    * '<S92>'  : 'Controller/Controll system/Observers/Hybrid nonlinear observer/Subsystem1'
 1503    * '<S93>'  : 'Controller/Controll system/Observers/Hybrid nonlinear observer/Subsystem2'
 1504    * '<S94>'  : 'Controller/Controll system/Observers/Hybrid nonlinear observer/Rot/Rotation Angles to Direction Cosine Matrix'
 1505    * '<S95>'  : 'Controller/Controll system/Observers/Hybrid nonlinear observer/Rot/Transpose'
 1506    * '<S96>'  : 'Controller/Controll system/Observers/Hybrid nonlinear observer/Rot/Rotation Angles to Direction Cosine Matrix/Create 3x3 Matrix'
 1507    * '<S97>'  : 'Controller/Controll system/Observers/Hybrid nonlinear observer/Rot1/Rotation Angles to Direction Cosine Matrix'
 1508    * '<S98>'  : 'Controller/Controll system/Observers/Hybrid nonlinear observer/Rot1/Rotation Angles to Direction Cosine Matrix/Create 3x3 Matrix'
 1509    * '<S99>'  : 'Controller/Controll system/Observers/Hybrid nonlinear observer/Rot2/Rotation Angles to Direction Cosine Matrix'
 1510    * '<S100>' : 'Controller/Controll system/Observers/Hybrid nonlinear observer/Rot2/Rotation Angles to Direction Cosine Matrix/Create 3x3 Matrix'
 1511    * '<S101>' : 'Controller/Controll system/Observers/Hybrid nonlinear observer/Subsystem/MATLAB Function'
 1512    * '<S102>' : 'Controller/Controll system/Observers/Hybrid nonlinear observer/Subsystem1/MATLAB Function'
 1513    * '<S103>' : 'Controller/Controll system/Observers/Kinematic observer/Acceleration determination'
 1514    * '<S104>' : 'Controller/Controll system/Observers/Kinematic observer/Observer'
 1515    * '<S105>' : 'Controller/Controll system/Observers/Kinematic observer/R'
 1516    * '<S106>' : 'Controller/Controll system/Observers/Kinematic observer/Rot observer'
 1517    * '<S107>' : 'Controller/Controll system/Observers/Kinematic observer/eta nu nu_d'
 1518    * '<S108>' : 'Controller/Controll system/Observers/Kinematic observer/Observer/bias  estimation'
 1519    * '<S109>' : 'Controller/Controll system/Observers/Kinematic observer/R/Rotation Angles to Direction Cosine Matrix'
 1520    * '<S110>' : 'Controller/Controll system/Observers/Kinematic observer/R/Rotation Angles to Direction Cosine Matrix/Create 3x3 Matrix'
 1521    * '<S111>' : 'Controller/Controll system/Observers/Kinematic observer/Rot observer/MATLAB Function'
 1522    * '<S112>' : 'Controller/Controll system/Observers/Kinematic observer/Rot observer/MATLAB Function1'
 1523    * '<S113>' : 'Controller/Controll system/Observers/Kinematic observer/eta nu nu_d/R'
 1524    * '<S114>' : 'Controller/Controll system/Observers/Kinematic observer/eta nu nu_d/R/Rotation Angles to Direction Cosine Matrix'
 1525    * '<S115>' : 'Controller/Controll system/Observers/Kinematic observer/eta nu nu_d/R/Rotation Angles to Direction Cosine Matrix/Create 3x3 Matrix'
 1526    * '<S116>' : 'Controller/Controll system/Observers/Nonlinear observer/Rot'
 1527    * '<S117>' : 'Controller/Controll system/Observers/Nonlinear observer/Rot1'
 1528    * '<S118>' : 'Controller/Controll system/Observers/Nonlinear observer/Rot2'
 1529    * '<S119>' : 'Controller/Controll system/Observers/Nonlinear observer/Subsystem'
 1530    * '<S120>' : 'Controller/Controll system/Observers/Nonlinear observer/Rot/Rotation Angles to Direction Cosine Matrix'
 1531    * '<S121>' : 'Controller/Controll system/Observers/Nonlinear observer/Rot/Transpose'
 1532    * '<S122>' : 'Controller/Controll system/Observers/Nonlinear observer/Rot/Rotation Angles to Direction Cosine Matrix/Create 3x3 Matrix'
 1533    * '<S123>' : 'Controller/Controll system/Observers/Nonlinear observer/Rot1/Rotation Angles to Direction Cosine Matrix'
 1534    * '<S124>' : 'Controller/Controll system/Observers/Nonlinear observer/Rot1/Rotation Angles to Direction Cosine Matrix/Create 3x3 Matrix'
 1535    * '<S125>' : 'Controller/Controll system/Observers/Nonlinear observer/Rot2/Rotation Angles to Direction Cosine Matrix'
 1536    * '<S126>' : 'Controller/Controll system/Observers/Nonlinear observer/Rot2/Rotation Angles to Direction Cosine Matrix/Create 3x3 Matrix'
 1537    * '<S127>' : 'Controller/Controll system/Thrust allocation/MATLAB Function'
 1538    * '<S128>' : 'Controller/Gravity/Rotation Angles to Direction Cosine Matrix'
 1539    * '<S129>' : 'Controller/Gravity/Rotation Angles to Direction Cosine Matrix1'
 1540    * '<S130>' : 'Controller/Gravity/Rotation Angles to Direction Cosine Matrix/Create 3x3 Matrix'
 1541    * '<S131>' : 'Controller/Gravity/Rotation Angles to Direction Cosine Matrix1/Create 3x3 Matrix'
 1542    * '<S132>' : 'Controller/Subsystem/Create 3x3 Matrix'
 1543    * '<S133>' : 'Controller/Subsystem1/Create 3x3 Matrix'
 1544    * '<S134>' : 'Controller/Subsystem2/Create 3x3 Matrix'
 1545    * '<S135>' : 'Controller/Subsystem3/Degrees to Radians'
 1546    * '<S136>' : 'Controller/nu/Rotation Angles to Direction Cosine Matrix'
 1547    * '<S137>' : 'Controller/nu/Rotation Angles to Direction Cosine Matrix1'
 1548    * '<S138>' : 'Controller/nu/Rotation Angles to Direction Cosine Matrix/Create 3x3 Matrix'
 1549    * '<S139>' : 'Controller/nu/Rotation Angles to Direction Cosine Matrix1/Create 3x3 Matrix'
 1550    */
 1551   #endif                                 /* RTW_HEADER_Controller_h_ */
 1552