⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c1_vehicles.c

📁 多个无人机的群飞行仿真 多个无人机的群飞行仿真
💻 C
📖 第 1 页 / 共 5 页
字号:
/* Include files */
#include "vehicles_sfun.h"
#include "c1_vehicles.h"
#define CHARTINSTANCE_CHARTNUMBER       (chartInstance.chartNumber)
#define CHARTINSTANCE_INSTANCENUMBER    (chartInstance.instanceNumber)
#include "vehicles_sfun_debug_macros.h"

/* Type Definitions */

/* Named Constants */
#define c1_event_e1                     (24)
#define c1_event_e2                     (1)
#define c1_event_e3                     (21)
#define c1_event_e4                     (8)
#define c1_event_e5                     (2)
#define c1_event_e6                     (28)
#define c1_event_e7                     (34)
#define c1_event_e8                     (5)
#define c1_event_e9                     (17)
#define c1_event_e10                    (35)
#define c1_event_e11                    (22)
#define c1_event_e12                    (0)
#define c1_event_e13                    (18)
#define c1_event_e14                    (39)
#define c1_event_e15                    (12)
#define c1_event_e16                    (3)
#define c1_event_e17                    (33)
#define c1_event_e18                    (9)
#define c1_event_e19                    (20)
#define c1_event_e20                    (23)
#define c1_event_aa                     (36)
#define c1_event_fk                     (6)
#define c1_event_oa                     (15)
#define c1_event_ta                     (25)
#define c1_b_event_aa                   (7)
#define c1_b_event_fk                   (14)
#define c1_b_event_oa                   (37)
#define c1_b_event_ta                   (16)
#define c1_c_event_aa                   (13)
#define c1_c_event_fk                   (26)
#define c1_c_event_oa                   (27)
#define c1_c_event_ta                   (11)
#define c1_d_event_aa                   (38)
#define c1_d_event_fk                   (32)
#define c1_d_event_oa                   (30)
#define c1_d_event_ta                   (10)
#define c1_e_event_aa                   (31)
#define c1_e_event_fk                   (19)
#define c1_e_event_oa                   (4)
#define c1_e_event_ta                   (29)
#define c1_IN_NO_ACTIVE_CHILD           (0)
#define c1_IN_ac_avoid                  (1)
#define c1_IN_obs_avoid                 (3)
#define c1_IN_tgt_aquire                (4)
#define c1_IN_form_keep                 (2)

/* Variable Declarations */

/* Variable Definitions */
static SFc1_vehiclesInstanceStruct chartInstance;

/* Function Declarations */
static void initialize_c1_vehicles(void);
static void enable_c1_vehicles(void);
static void disable_c1_vehicles(void);
static void finalize_c1_vehicles(void);
static void sf_c1_vehicles(void);
static void c1_c1_vehicles(void);
static void c1_uav1(void);
static void c1_exit_internal_uav1(void);
static void c1_uav2(void);
static void c1_exit_internal_uav2(void);
static void c1_uav3(void);
static void c1_exit_internal_uav3(void);
static void c1_uav4(void);
static void c1_exit_internal_uav4(void);
static void c1_uav5(void);
static void c1_exit_internal_uav5(void);
static real_T *c1_e1(void);
static real_T *c1_e2(void);
static real_T *c1_e3(void);
static real_T *c1_e4(void);
static real_T *c1_e5(void);
static real_T *c1_e6(void);
static real_T *c1_e7(void);
static real_T *c1_e8(void);
static real_T *c1_e9(void);
static real_T *c1_e10(void);
static real_T *c1_e11(void);
static real_T *c1_e12(void);
static real_T *c1_e13(void);
static real_T *c1_e14(void);
static real_T *c1_e15(void);
static real_T *c1_e16(void);
static real_T *c1_e17(void);
static real_T *c1_e18(void);
static real_T *c1_e19(void);
static real_T *c1_e20(void);
static void init_test_point_addr_map(void);
static void **get_test_point_address_map(void);
static rtwCAPI_ModelMappingInfo *get_test_point_mapping_info(void);

/* Function Definitions */
static void initialize_c1_vehicles(void)
{
  chartInstance.c1_is_active_parse_events = 0;
  chartInstance.c1_tp_parse_events = 0;
  chartInstance.c1_is_active_uav1 = 0;
  chartInstance.c1_is_uav1 = 0;
  chartInstance.c1_tp_uav1 = 0;
  chartInstance.c1_tp_ac_avoid = 0;
  chartInstance.c1_tp_form_keep = 0;
  chartInstance.c1_tp_obs_avoid = 0;
  chartInstance.c1_tp_tgt_aquire = 0;
  chartInstance.c1_is_active_uav2 = 0;
  chartInstance.c1_is_uav2 = 0;
  chartInstance.c1_tp_uav2 = 0;
  chartInstance.c1_b_tp_ac_avoid = 0;
  chartInstance.c1_b_tp_form_keep = 0;
  chartInstance.c1_b_tp_obs_avoid = 0;
  chartInstance.c1_b_tp_tgt_aquire = 0;
  chartInstance.c1_is_active_uav3 = 0;
  chartInstance.c1_is_uav3 = 0;
  chartInstance.c1_tp_uav3 = 0;
  chartInstance.c1_c_tp_ac_avoid = 0;
  chartInstance.c1_c_tp_form_keep = 0;
  chartInstance.c1_c_tp_obs_avoid = 0;
  chartInstance.c1_c_tp_tgt_aquire = 0;
  chartInstance.c1_is_active_uav4 = 0;
  chartInstance.c1_is_uav4 = 0;
  chartInstance.c1_tp_uav4 = 0;
  chartInstance.c1_d_tp_ac_avoid = 0;
  chartInstance.c1_d_tp_form_keep = 0;
  chartInstance.c1_d_tp_obs_avoid = 0;
  chartInstance.c1_d_tp_tgt_aquire = 0;
  chartInstance.c1_is_active_uav5 = 0;
  chartInstance.c1_is_uav5 = 0;
  chartInstance.c1_tp_uav5 = 0;
  chartInstance.c1_e_tp_ac_avoid = 0;
  chartInstance.c1_e_tp_form_keep = 0;
  chartInstance.c1_e_tp_obs_avoid = 0;
  chartInstance.c1_e_tp_tgt_aquire = 0;
  chartInstance.c1_is_active_c1_vehicles = 0;
  {
    int32_T c1_sf_i0;
    int32_T c1_sf_i1;
    for(c1_sf_i1 = 0; c1_sf_i1 <= 3; c1_sf_i1++) {
      for(c1_sf_i0 = 0; c1_sf_i0 <= 4; c1_sf_i0++) {
        chartInstance.c1_mode_count[c1_sf_i1][c1_sf_i0] = 0.0;
      }
    }
  }
}

static void enable_c1_vehicles(void)
{
}

static void disable_c1_vehicles(void)
{
}

static void finalize_c1_vehicles(void)
{
  sf_mex_export("mode_count", sf_mex_create(&chartInstance.c1_mode_count,
    "mode_count", 0, 0U, 1U, 2, 5, 4), 0);
}

static void sf_c1_vehicles(void)
{
  int32_T c1_sf_i2;
  int32_T c1_sf_i3;
  _sfTime_ = (real_T)ssGetT(chartInstance.S);
  for(c1_sf_i3 = 0; c1_sf_i3 <= 3; c1_sf_i3++) {
    for(c1_sf_i2 = 0; c1_sf_i2 <= 4; c1_sf_i2++) {
      _SFD_DATA_RANGE_CHECK(chartInstance.c1_mode_count[c1_sf_i3][c1_sf_i2], 0U);
    }
  }
  if(*c1_e1() == 1.0) {
    {
      uint8_T c1_previousEvent;
      c1_previousEvent = _sfEvent_;
      _sfEvent_ = c1_event_e1;
      _SFD_CE_CALL(EVENT_ENTER_BROADCAST_FUNCTION_TAG,c1_event_e1);
      c1_c1_vehicles();
      _SFD_CE_CALL(EVENT_AFTER_BROADCAST_TAG,c1_event_e1);
      _sfEvent_ = c1_previousEvent;
    }
  }
  if(*c1_e2() == 1.0) {
    {
      uint8_T c1_b_previousEvent;
      c1_b_previousEvent = _sfEvent_;
      _sfEvent_ = c1_event_e2;
      _SFD_CE_CALL(EVENT_ENTER_BROADCAST_FUNCTION_TAG,c1_event_e2);
      c1_c1_vehicles();
      _SFD_CE_CALL(EVENT_AFTER_BROADCAST_TAG,c1_event_e2);
      _sfEvent_ = c1_b_previousEvent;
    }
  }
  if(*c1_e3() == 1.0) {
    {
      uint8_T c1_c_previousEvent;
      c1_c_previousEvent = _sfEvent_;
      _sfEvent_ = c1_event_e3;
      _SFD_CE_CALL(EVENT_ENTER_BROADCAST_FUNCTION_TAG,c1_event_e3);
      c1_c1_vehicles();
      _SFD_CE_CALL(EVENT_AFTER_BROADCAST_TAG,c1_event_e3);
      _sfEvent_ = c1_c_previousEvent;
    }
  }
  if(*c1_e4() == 1.0) {
    {
      uint8_T c1_d_previousEvent;
      c1_d_previousEvent = _sfEvent_;
      _sfEvent_ = c1_event_e4;
      _SFD_CE_CALL(EVENT_ENTER_BROADCAST_FUNCTION_TAG,c1_event_e4);
      c1_c1_vehicles();
      _SFD_CE_CALL(EVENT_AFTER_BROADCAST_TAG,c1_event_e4);
      _sfEvent_ = c1_d_previousEvent;
    }
  }
  if(*c1_e5() == 1.0) {
    {
      uint8_T c1_e_previousEvent;
      c1_e_previousEvent = _sfEvent_;
      _sfEvent_ = c1_event_e5;
      _SFD_CE_CALL(EVENT_ENTER_BROADCAST_FUNCTION_TAG,c1_event_e5);
      c1_c1_vehicles();
      _SFD_CE_CALL(EVENT_AFTER_BROADCAST_TAG,c1_event_e5);
      _sfEvent_ = c1_e_previousEvent;
    }
  }
  if(*c1_e6() == 1.0) {
    {
      uint8_T c1_f_previousEvent;
      c1_f_previousEvent = _sfEvent_;
      _sfEvent_ = c1_event_e6;
      _SFD_CE_CALL(EVENT_ENTER_BROADCAST_FUNCTION_TAG,c1_event_e6);
      c1_c1_vehicles();
      _SFD_CE_CALL(EVENT_AFTER_BROADCAST_TAG,c1_event_e6);
      _sfEvent_ = c1_f_previousEvent;
    }
  }
  if(*c1_e7() == 1.0) {
    {
      uint8_T c1_g_previousEvent;
      c1_g_previousEvent = _sfEvent_;
      _sfEvent_ = c1_event_e7;
      _SFD_CE_CALL(EVENT_ENTER_BROADCAST_FUNCTION_TAG,c1_event_e7);
      c1_c1_vehicles();
      _SFD_CE_CALL(EVENT_AFTER_BROADCAST_TAG,c1_event_e7);
      _sfEvent_ = c1_g_previousEvent;
    }
  }
  if(*c1_e8() == 1.0) {
    {
      uint8_T c1_h_previousEvent;
      c1_h_previousEvent = _sfEvent_;
      _sfEvent_ = c1_event_e8;
      _SFD_CE_CALL(EVENT_ENTER_BROADCAST_FUNCTION_TAG,c1_event_e8);
      c1_c1_vehicles();
      _SFD_CE_CALL(EVENT_AFTER_BROADCAST_TAG,c1_event_e8);
      _sfEvent_ = c1_h_previousEvent;
    }
  }
  if(*c1_e9() == 1.0) {
    {
      uint8_T c1_i_previousEvent;
      c1_i_previousEvent = _sfEvent_;
      _sfEvent_ = c1_event_e9;
      _SFD_CE_CALL(EVENT_ENTER_BROADCAST_FUNCTION_TAG,c1_event_e9);
      c1_c1_vehicles();
      _SFD_CE_CALL(EVENT_AFTER_BROADCAST_TAG,c1_event_e9);
      _sfEvent_ = c1_i_previousEvent;
    }
  }
  if(*c1_e10() == 1.0) {
    {
      uint8_T c1_j_previousEvent;
      c1_j_previousEvent = _sfEvent_;
      _sfEvent_ = c1_event_e10;
      _SFD_CE_CALL(EVENT_ENTER_BROADCAST_FUNCTION_TAG,c1_event_e10);
      c1_c1_vehicles();
      _SFD_CE_CALL(EVENT_AFTER_BROADCAST_TAG,c1_event_e10);
      _sfEvent_ = c1_j_previousEvent;
    }
  }
  if(*c1_e11() == 1.0) {
    {
      uint8_T c1_k_previousEvent;
      c1_k_previousEvent = _sfEvent_;
      _sfEvent_ = c1_event_e11;
      _SFD_CE_CALL(EVENT_ENTER_BROADCAST_FUNCTION_TAG,c1_event_e11);
      c1_c1_vehicles();
      _SFD_CE_CALL(EVENT_AFTER_BROADCAST_TAG,c1_event_e11);
      _sfEvent_ = c1_k_previousEvent;
    }
  }
  if(*c1_e12() == 1.0) {
    {
      uint8_T c1_l_previousEvent;
      c1_l_previousEvent = _sfEvent_;
      _sfEvent_ = c1_event_e12;
      _SFD_CE_CALL(EVENT_ENTER_BROADCAST_FUNCTION_TAG,c1_event_e12);
      c1_c1_vehicles();
      _SFD_CE_CALL(EVENT_AFTER_BROADCAST_TAG,c1_event_e12);
      _sfEvent_ = c1_l_previousEvent;
    }
  }
  if(*c1_e13() == 1.0) {
    {
      uint8_T c1_m_previousEvent;
      c1_m_previousEvent = _sfEvent_;
      _sfEvent_ = c1_event_e13;
      _SFD_CE_CALL(EVENT_ENTER_BROADCAST_FUNCTION_TAG,c1_event_e13);
      c1_c1_vehicles();
      _SFD_CE_CALL(EVENT_AFTER_BROADCAST_TAG,c1_event_e13);
      _sfEvent_ = c1_m_previousEvent;
    }
  }
  if(*c1_e14() == 1.0) {
    {
      uint8_T c1_n_previousEvent;
      c1_n_previousEvent = _sfEvent_;
      _sfEvent_ = c1_event_e14;
      _SFD_CE_CALL(EVENT_ENTER_BROADCAST_FUNCTION_TAG,c1_event_e14);
      c1_c1_vehicles();
      _SFD_CE_CALL(EVENT_AFTER_BROADCAST_TAG,c1_event_e14);
      _sfEvent_ = c1_n_previousEvent;
    }
  }
  if(*c1_e15() == 1.0) {
    {
      uint8_T c1_o_previousEvent;
      c1_o_previousEvent = _sfEvent_;
      _sfEvent_ = c1_event_e15;
      _SFD_CE_CALL(EVENT_ENTER_BROADCAST_FUNCTION_TAG,c1_event_e15);
      c1_c1_vehicles();
      _SFD_CE_CALL(EVENT_AFTER_BROADCAST_TAG,c1_event_e15);
      _sfEvent_ = c1_o_previousEvent;
    }
  }
  if(*c1_e16() == 1.0) {
    {
      uint8_T c1_p_previousEvent;
      c1_p_previousEvent = _sfEvent_;
      _sfEvent_ = c1_event_e16;
      _SFD_CE_CALL(EVENT_ENTER_BROADCAST_FUNCTION_TAG,c1_event_e16);
      c1_c1_vehicles();
      _SFD_CE_CALL(EVENT_AFTER_BROADCAST_TAG,c1_event_e16);
      _sfEvent_ = c1_p_previousEvent;
    }
  }
  if(*c1_e17() == 1.0) {
    {
      uint8_T c1_q_previousEvent;
      c1_q_previousEvent = _sfEvent_;
      _sfEvent_ = c1_event_e17;
      _SFD_CE_CALL(EVENT_ENTER_BROADCAST_FUNCTION_TAG,c1_event_e17);
      c1_c1_vehicles();
      _SFD_CE_CALL(EVENT_AFTER_BROADCAST_TAG,c1_event_e17);
      _sfEvent_ = c1_q_previousEvent;
    }
  }
  if(*c1_e18() == 1.0) {
    {
      uint8_T c1_r_previousEvent;
      c1_r_previousEvent = _sfEvent_;
      _sfEvent_ = c1_event_e18;
      _SFD_CE_CALL(EVENT_ENTER_BROADCAST_FUNCTION_TAG,c1_event_e18);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -