Browse Source

更新pdoa定位逻辑代码

zengminguo 2 years ago
parent
commit
a5eb60e5c5

+ 0 - 160
GaussianFilter/CGaussianFilter.cpp

@@ -1,160 +0,0 @@
-//
-// File: CGaussianFilter.cpp
-//
-// MATLAB Coder version            : 4.3
-// C/C++ source code generated on  : 12-Jan-2022 14:46:32
-//
-
-// Include Files
-#include "CGaussianFilter.h"
-#include "GaussianFilter_data.h"
-#include "GaussianFilter_emxutil.h"
-#include "conv2AXPY.h"
-#include <math.h>
-
-// Function Definitions
-
-//
-// Arguments    : void
-// Return Type  : void
-//
-CGaussianFilter::~CGaussianFilter()
-{
-  //omp_destroy_nest_lock(&emlrtNestLockGlobal);
-}
-
-//
-// Arguments    : void
-// Return Type  : void
-//
-CGaussianFilter::CGaussianFilter()
-{
-  //omp_init_nest_lock(&emlrtNestLockGlobal);
-}
-
-//
-// Arguments    : const emxArray_real_T *x
-//                emxArray_real_T *xlpf
-// Return Type  : void
-//
-void CGaussianFilter::GaussianFilter(const emxArray_real_T *x, emxArray_real_T
-  *xlpf)
-{
-  emxArray_real_T *work;
-  int32_T rank;
-  int32_T k;
-  static const real_T s[25] = { 0.22354978351691851, 0.0, 0.0, 0.0, 0.0, 0.0,
-    3.1892324657149476E-17, 0.0, 0.0, 0.0, 0.0, 0.0, 8.1422304240527224E-18, 0.0,
-    0.0, 0.0, 0.0, 0.0, 6.5350494864904178E-19, 0.0, 0.0, 0.0, 0.0, 0.0,
-    2.4277338668394078E-34 };
-
-  int32_T nb;
-  int32_T i;
-  int32_T u1;
-  int32_T jlo;
-  int32_T ix;
-  static const real_T hrow[5] = { 0.1200783842432135, 0.23388075658535037,
-    0.29208171834287255, 0.23388075658535035, 0.1200783842432135 };
-
-  emxInit_real_T(&work, 2);
-  if (25 <= x->size[1]) {
-    frexp(2.4277338668394078E-34, &rank);
-    rank = 0;
-    for (k = 0; k < 5; k++) {
-      if (s[k + 5 * k] > 2.1382117680737565E-49) {
-        rank++;
-      }
-    }
-
-    if (rank == 1) {
-      nb = x->size[1];
-      i = work->size[0] * work->size[1];
-      work->size[0] = 1;
-      work->size[1] = x->size[1];
-      emxEnsureCapacity_real_T(work, i);
-      rank = x->size[1];
-      for (i = 0; i < rank; i++) {
-        work->data[i] = 0.0;
-      }
-
-      i = xlpf->size[0] * xlpf->size[1];
-      xlpf->size[0] = 1;
-      xlpf->size[1] = x->size[1];
-      emxEnsureCapacity_real_T(xlpf, i);
-      rank = x->size[1];
-      for (i = 0; i < rank; i++) {
-        xlpf->data[i] = 0.0;
-      }
-
-      for (rank = 0; rank < nb; rank++) {
-        work->data[rank] += 0.29208171834287244 * x->data[rank];
-      }
-
-      u1 = x->size[1] + 2;
-      if (5 < u1) {
-        u1 = 5;
-      }
-
-      for (k = 1; k <= u1; k++) {
-        if (k - 2 > 0) {
-          jlo = k - 3;
-        } else {
-          jlo = 0;
-        }
-
-        rank = (nb + k) - 3;
-        if (rank > nb) {
-          rank = nb;
-        }
-
-        rank -= jlo;
-        if (rank >= 1) {
-          ix = (jlo - k) + 3;
-          i = rank - 1;
-          for (rank = 0; rank <= i; rank++) {
-            xlpf->data[jlo] += hrow[k - 1] * work->data[ix];
-            ix++;
-            jlo++;
-          }
-        }
-      }
-    } else {
-      conv2AXPYSameCMP(x, xlpf);
-    }
-  } else {
-    conv2AXPYSameCMP(x, xlpf);
-  }
-
-  emxFree_real_T(&work);
-}
-
-void CGaussianFilter::SetPdoa1dEnable(bool bEnable)
-{
-	s_enabled_pdoa1d = bEnable;
-}
-
-bool CGaussianFilter::GetPdoa1dEnable()
-{
-	return s_enabled_pdoa1d;
-}
-
-void CGaussianFilter::SetPdoa1dDist(double dist)
-{
-	s_pdoa1d_act_dist = dist;
-}
-
-double CGaussianFilter::GetPdoa1dDist()
-{
-	return 25;
-	//return s_pdoa1d_act_dist;
-}
-
-bool CGaussianFilter::s_enabled_pdoa1d = false;
-
-double CGaussianFilter::s_pdoa1d_act_dist = 0.0;
-
-//
-// File trailer for CGaussianFilter.cpp
-//
-// [EOF]
-//

+ 0 - 39
GaussianFilter/CGaussianFilter.h

@@ -1,39 +0,0 @@
-//
-// File: CGaussianFilter.h
-//
-// MATLAB Coder version            : 4.3
-// C/C++ source code generated on  : 12-Jan-2022 14:46:32
-//
-#ifndef CGAUSSIANFILTER_H
-#define CGAUSSIANFILTER_H
-
-// Include Files
-#include <cstddef>
-#include <cstdlib>
-#include "rtwtypes.h"
-#include <omp.h>
-#include "GaussianFilter_types.h"
-
-// Type Definitions
-class CGaussianFilter
-{
- public:
-  CGaussianFilter();
-  ~CGaussianFilter();
-  void GaussianFilter(const emxArray_real_T *x, emxArray_real_T *xlpf);
-  static void SetPdoa1dEnable(bool bEnable);
-  static bool GetPdoa1dEnable();
-  static void SetPdoa1dDist(double dist);
-  static double GetPdoa1dDist();
-private:
-	static bool s_enabled_pdoa1d;
-	static double s_pdoa1d_act_dist; // PDOA一维中高斯滤波的生效范围
-};
-
-#endif
-
-//
-// File trailer for CGaussianFilter.h
-//
-// [EOF]
-//

+ 0 - 19
GaussianFilter/GaussianFilter_data.cpp

@@ -1,19 +0,0 @@
-//
-// File: GaussianFilter_data.cpp
-//
-// MATLAB Coder version            : 4.3
-// C/C++ source code generated on  : 12-Jan-2022 14:46:32
-//
-
-// Include Files
-#include "GaussianFilter_data.h"
-#include "CGaussianFilter.h"
-
-// Variable Definitions
-omp_nest_lock_t emlrtNestLockGlobal;
-
-//
-// File trailer for GaussianFilter_data.cpp
-//
-// [EOF]
-//

+ 0 - 26
GaussianFilter/GaussianFilter_data.h

@@ -1,26 +0,0 @@
-//
-// File: GaussianFilter_data.h
-//
-// MATLAB Coder version            : 4.3
-// C/C++ source code generated on  : 12-Jan-2022 14:46:32
-//
-#ifndef GAUSSIANFILTER_DATA_H
-#define GAUSSIANFILTER_DATA_H
-
-// Include Files
-#include <cstddef>
-#include <cstdlib>
-#include "rtwtypes.h"
-#include <omp.h>
-#include "GaussianFilter_types.h"
-
-// Variable Declarations
-extern omp_nest_lock_t emlrtNestLockGlobal;
-
-#endif
-
-//
-// File trailer for GaussianFilter_data.h
-//
-// [EOF]
-//

+ 0 - 127
GaussianFilter/GaussianFilter_emxAPI.cpp

@@ -1,127 +0,0 @@
-//
-// File: GaussianFilter_emxAPI.cpp
-//
-// MATLAB Coder version            : 4.3
-// C/C++ source code generated on  : 12-Jan-2022 14:46:32
-//
-
-// Include Files
-#include "GaussianFilter_emxAPI.h"
-#include "CGaussianFilter.h"
-#include "GaussianFilter_emxutil.h"
-#include <cstdlib>
-
-// Function Definitions
-
-//
-// Arguments    : int32_T numDimensions
-//                const int32_T *size
-// Return Type  : emxArray_real_T *
-//
-emxArray_real_T *emxCreateND_real_T(int32_T numDimensions, const int32_T *size)
-{
-  emxArray_real_T *emx;
-  int32_T numEl;
-  int32_T i;
-  emxInit_real_T(&emx, numDimensions);
-  numEl = 1;
-  for (i = 0; i < numDimensions; i++) {
-    numEl *= size[i];
-    emx->size[i] = size[i];
-  }
-
-  emx->data = (real_T *)std::calloc(static_cast<uint32_T>(numEl), sizeof(real_T));
-  emx->numDimensions = numDimensions;
-  emx->allocatedSize = numEl;
-  return emx;
-}
-
-//
-// Arguments    : real_T *data
-//                int32_T numDimensions
-//                const int32_T *size
-// Return Type  : emxArray_real_T *
-//
-emxArray_real_T *emxCreateWrapperND_real_T(real_T *data, int32_T numDimensions,
-  const int32_T *size)
-{
-  emxArray_real_T *emx;
-  int32_T numEl;
-  int32_T i;
-  emxInit_real_T(&emx, numDimensions);
-  numEl = 1;
-  for (i = 0; i < numDimensions; i++) {
-    numEl *= size[i];
-    emx->size[i] = size[i];
-  }
-
-  emx->data = data;
-  emx->numDimensions = numDimensions;
-  emx->allocatedSize = numEl;
-  emx->canFreeData = false;
-  return emx;
-}
-
-//
-// Arguments    : real_T *data
-//                int32_T rows
-//                int32_T cols
-// Return Type  : emxArray_real_T *
-//
-emxArray_real_T *emxCreateWrapper_real_T(real_T *data, int32_T rows, int32_T
-  cols)
-{
-  emxArray_real_T *emx;
-  emxInit_real_T(&emx, 2);
-  emx->size[0] = rows;
-  emx->size[1] = cols;
-  emx->data = data;
-  emx->numDimensions = 2;
-  emx->allocatedSize = rows * cols;
-  emx->canFreeData = false;
-  return emx;
-}
-
-//
-// Arguments    : int32_T rows
-//                int32_T cols
-// Return Type  : emxArray_real_T *
-//
-emxArray_real_T *emxCreate_real_T(int32_T rows, int32_T cols)
-{
-  emxArray_real_T *emx;
-  int32_T numEl;
-  emxInit_real_T(&emx, 2);
-  emx->size[0] = rows;
-  numEl = rows * cols;
-  emx->size[1] = cols;
-  emx->data = (real_T *)std::calloc(static_cast<uint32_T>(numEl), sizeof(real_T));
-  emx->numDimensions = 2;
-  emx->allocatedSize = numEl;
-  return emx;
-}
-
-//
-// Arguments    : emxArray_real_T *emxArray
-// Return Type  : void
-//
-void emxDestroyArray_real_T(emxArray_real_T *emxArray)
-{
-  emxFree_real_T(&emxArray);
-}
-
-//
-// Arguments    : emxArray_real_T **pEmxArray
-//                int32_T numDimensions
-// Return Type  : void
-//
-void emxInitArray_real_T(emxArray_real_T **pEmxArray, int32_T numDimensions)
-{
-  emxInit_real_T(pEmxArray, numDimensions);
-}
-
-//
-// File trailer for GaussianFilter_emxAPI.cpp
-//
-// [EOF]
-//

+ 0 - 35
GaussianFilter/GaussianFilter_emxAPI.h

@@ -1,35 +0,0 @@
-//
-// File: GaussianFilter_emxAPI.h
-//
-// MATLAB Coder version            : 4.3
-// C/C++ source code generated on  : 12-Jan-2022 14:46:32
-//
-#ifndef GAUSSIANFILTER_EMXAPI_H
-#define GAUSSIANFILTER_EMXAPI_H
-
-// Include Files
-#include <cstddef>
-#include <cstdlib>
-#include "rtwtypes.h"
-#include <omp.h>
-#include "GaussianFilter_types.h"
-
-// Function Declarations
-extern emxArray_real_T *emxCreateND_real_T(int32_T numDimensions, const int32_T *
-  size);
-extern emxArray_real_T *emxCreateWrapperND_real_T(real_T *data, int32_T
-  numDimensions, const int32_T *size);
-extern emxArray_real_T *emxCreateWrapper_real_T(real_T *data, int32_T rows,
-  int32_T cols);
-extern emxArray_real_T *emxCreate_real_T(int32_T rows, int32_T cols);
-extern void emxDestroyArray_real_T(emxArray_real_T *emxArray);
-extern void emxInitArray_real_T(emxArray_real_T **pEmxArray, int32_T
-  numDimensions);
-
-#endif
-
-//
-// File trailer for GaussianFilter_emxAPI.h
-//
-// [EOF]
-//

+ 0 - 105
GaussianFilter/GaussianFilter_emxutil.cpp

@@ -1,105 +0,0 @@
-//
-// File: GaussianFilter_emxutil.cpp
-//
-// MATLAB Coder version            : 4.3
-// C/C++ source code generated on  : 12-Jan-2022 14:46:32
-//
-
-// Include Files
-#include "GaussianFilter_emxutil.h"
-#include "CGaussianFilter.h"
-#include <cstdlib>
-#include <cstring>
-
-// Function Definitions
-
-//
-// Arguments    : emxArray_real_T *emxArray
-//                int32_T oldNumel
-// Return Type  : void
-//
-void emxEnsureCapacity_real_T(emxArray_real_T *emxArray, int32_T oldNumel)
-{
-  int32_T newNumel;
-  int32_T i;
-  void *newData;
-  if (oldNumel < 0) {
-    oldNumel = 0;
-  }
-
-  newNumel = 1;
-  for (i = 0; i < emxArray->numDimensions; i++) {
-    newNumel *= emxArray->size[i];
-  }
-
-  if (newNumel > emxArray->allocatedSize) {
-    i = emxArray->allocatedSize;
-    if (i < 16) {
-      i = 16;
-    }
-
-    while (i < newNumel) {
-      if (i > 1073741823) {
-        i = MAX_int32_T;
-      } else {
-        i *= 2;
-      }
-    }
-
-    newData = std::calloc(static_cast<uint32_T>(i), sizeof(real_T));
-    if (emxArray->data != NULL) {
-      std::memcpy(newData, emxArray->data, sizeof(real_T) * oldNumel);
-      if (emxArray->canFreeData) {
-        std::free(emxArray->data);
-      }
-    }
-
-    emxArray->data = (real_T *)newData;
-    emxArray->allocatedSize = i;
-    emxArray->canFreeData = true;
-  }
-}
-
-//
-// Arguments    : emxArray_real_T **pEmxArray
-// Return Type  : void
-//
-void emxFree_real_T(emxArray_real_T **pEmxArray)
-{
-  if (*pEmxArray != (emxArray_real_T *)NULL) {
-    if (((*pEmxArray)->data != (real_T *)NULL) && (*pEmxArray)->canFreeData) {
-      std::free((*pEmxArray)->data);
-    }
-
-    std::free((*pEmxArray)->size);
-    std::free(*pEmxArray);
-    *pEmxArray = (emxArray_real_T *)NULL;
-  }
-}
-
-//
-// Arguments    : emxArray_real_T **pEmxArray
-//                int32_T numDimensions
-// Return Type  : void
-//
-void emxInit_real_T(emxArray_real_T **pEmxArray, int32_T numDimensions)
-{
-  emxArray_real_T *emxArray;
-  int32_T i;
-  *pEmxArray = (emxArray_real_T *)std::malloc(sizeof(emxArray_real_T));
-  emxArray = *pEmxArray;
-  emxArray->data = (real_T *)NULL;
-  emxArray->numDimensions = numDimensions;
-  emxArray->size = (int32_T *)std::malloc(sizeof(int32_T) * numDimensions);
-  emxArray->allocatedSize = 0;
-  emxArray->canFreeData = true;
-  for (i = 0; i < numDimensions; i++) {
-    emxArray->size[i] = 0;
-  }
-}
-
-//
-// File trailer for GaussianFilter_emxutil.cpp
-//
-// [EOF]
-//

+ 0 - 28
GaussianFilter/GaussianFilter_emxutil.h

@@ -1,28 +0,0 @@
-//
-// File: GaussianFilter_emxutil.h
-//
-// MATLAB Coder version            : 4.3
-// C/C++ source code generated on  : 12-Jan-2022 14:46:32
-//
-#ifndef GAUSSIANFILTER_EMXUTIL_H
-#define GAUSSIANFILTER_EMXUTIL_H
-
-// Include Files
-#include <cstddef>
-#include <cstdlib>
-#include "rtwtypes.h"
-#include <omp.h>
-#include "GaussianFilter_types.h"
-
-// Function Declarations
-extern void emxEnsureCapacity_real_T(emxArray_real_T *emxArray, int32_T oldNumel);
-extern void emxFree_real_T(emxArray_real_T **pEmxArray);
-extern void emxInit_real_T(emxArray_real_T **pEmxArray, int32_T numDimensions);
-
-#endif
-
-//
-// File trailer for GaussianFilter_emxutil.h
-//
-// [EOF]
-//

+ 0 - 29
GaussianFilter/GaussianFilter_types.h

@@ -1,29 +0,0 @@
-//
-// File: GaussianFilter_types.h
-//
-// MATLAB Coder version            : 4.3
-// C/C++ source code generated on  : 12-Jan-2022 14:46:32
-//
-#ifndef GAUSSIANFILTER_TYPES_H
-#define GAUSSIANFILTER_TYPES_H
-
-// Include Files
-#include "rtwtypes.h"
-
-// Type Definitions
-struct emxArray_real_T
-{
-  real_T *data;
-  int32_T *size;
-  int32_T allocatedSize;
-  int32_T numDimensions;
-  bool canFreeData;
-};
-
-#endif
-
-//
-// File trailer for GaussianFilter_types.h
-//
-// [EOF]
-//

+ 0 - 101
GaussianFilter/conv2AXPY.cpp

@@ -1,101 +0,0 @@
-//
-// File: conv2AXPY.cpp
-//
-// MATLAB Coder version            : 4.3
-// C/C++ source code generated on  : 12-Jan-2022 14:46:32
-//
-
-// Include Files
-#include "conv2AXPY.h"
-#include "CGaussianFilter.h"
-#include "GaussianFilter_emxutil.h"
-
-// Function Definitions
-
-//
-// Arguments    : const emxArray_real_T *a
-//                emxArray_real_T *c
-// Return Type  : void
-//
-void conv2AXPYSameCMP(const emxArray_real_T *a, emxArray_real_T *c)
-{
-  int32_T na;
-  int32_T jcut;
-  int32_T ub_loop;
-  int32_T j;
-  int32_T imax;
-  int32_T imin;
-  real_T bij;
-  int32_T jbmax;
-  int32_T jbmin;
-  real_T cj;
-  int32_T jb;
-  int32_T ib;
-  static const real_T b[25] = { 0.014418818362460822, 0.028084023356349175,
-    0.0350727008055935, 0.028084023356349175, 0.014418818362460822,
-    0.028084023356349175, 0.054700208300935887, 0.068312293270780214,
-    0.054700208300935887, 0.028084023356349175, 0.0350727008055935,
-    0.068312293270780214, 0.085311730190125085, 0.068312293270780214,
-    0.0350727008055935, 0.028084023356349175, 0.054700208300935887,
-    0.068312293270780214, 0.054700208300935887, 0.028084023356349175,
-    0.014418818362460822, 0.028084023356349175, 0.0350727008055935,
-    0.028084023356349175, 0.014418818362460822 };
-
-  int32_T i;
-  na = a->size[1];
-  if (a->size[1] == 0) {
-    c->size[0] = 1;
-    c->size[1] = 0;
-  } else {
-    jcut = a->size[1] - 2;
-    ub_loop = c->size[0] * c->size[1];
-    c->size[0] = 1;
-    c->size[1] = a->size[1];
-    emxEnsureCapacity_real_T(c, ub_loop);
-    ub_loop = a->size[1] - 1;
-
-#pragma omp parallel for \
- num_threads(omp_get_max_threads()) \
- private(imax,imin,bij,jbmax,jbmin,cj,jb,ib,i)
-
-    for (j = 0; j <= ub_loop; j++) {
-      cj = 0.0;
-      if (j + 1 > 2) {
-        jbmin = 0;
-      } else {
-        jbmin = 2 - j;
-      }
-
-      if (j + 1 < jcut) {
-        jbmax = 4;
-      } else {
-        jbmax = (na - j) + 1;
-      }
-
-      for (jb = jbmin; jb <= jbmax; jb++) {
-        for (ib = 0; ib < 5; ib++) {
-          bij = b[(5 * (4 - jb) - ib) + 4];
-          if (ib < 2) {
-            imin = 3 - ib;
-            imax = 1;
-          } else {
-            imin = 1;
-            imax = 3 - ib;
-          }
-
-          for (i = imin; i <= imax; i++) {
-            cj += bij * a->data[(j + jb) - 2];
-          }
-        }
-      }
-
-      c->data[j] = cj;
-    }
-  }
-}
-
-//
-// File trailer for conv2AXPY.cpp
-//
-// [EOF]
-//

+ 0 - 26
GaussianFilter/conv2AXPY.h

@@ -1,26 +0,0 @@
-//
-// File: conv2AXPY.h
-//
-// MATLAB Coder version            : 4.3
-// C/C++ source code generated on  : 12-Jan-2022 14:46:32
-//
-#ifndef CONV2AXPY_H
-#define CONV2AXPY_H
-
-// Include Files
-#include <cstddef>
-#include <cstdlib>
-#include "rtwtypes.h"
-#include <omp.h>
-#include "GaussianFilter_types.h"
-
-// Function Declarations
-extern void conv2AXPYSameCMP(const emxArray_real_T *a, emxArray_real_T *c);
-
-#endif
-
-//
-// File trailer for conv2AXPY.h
-//
-// [EOF]
-//

+ 0 - 43
GaussianFilter/rtwtypes.h

@@ -1,43 +0,0 @@
-/*
- * File: rtwtypes.h
- *
- * MATLAB Coder version            : 4.3
- * C/C++ source code generated on  : 12-Jan-2022 14:46:32
- */
-
-#ifndef RTWTYPES_H
-#define RTWTYPES_H
-
-/*=======================================================================*
- * Fixed width word size data types:                                     *
- *   int64_T                      - signed 64 bit integers               *
- *   uint64_T                     - unsigned 64 bit integers             *
- *=======================================================================*/
-#if defined(__APPLE__)
-# ifndef INT64_T
-#  define INT64_T                      long
-#  define FMT64                        "l"
-#  if defined(__LP64__) && !defined(INT_TYPE_64_IS_LONG)
-#    define INT_TYPE_64_IS_LONG
-#  endif
-# endif
-#endif
-
-#if defined(__APPLE__)
-# ifndef UINT64_T
-#  define UINT64_T                     unsigned long
-#  define FMT64                        "l"
-#  if defined(__LP64__) && !defined(INT_TYPE_64_IS_LONG)
-#    define INT_TYPE_64_IS_LONG
-#  endif
-# endif
-#endif
-
-#include "tmwtypes.h"
-#endif
-
-/*
- * File trailer for rtwtypes.h
- *
- * [EOF]
- */

+ 0 - 849
GaussianFilter/tmwtypes.h

@@ -1,849 +0,0 @@
-/*
- * Copyright 1984-2018 The MathWorks, Inc.
- */
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-#if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 3))
-# pragma once
-#endif
-
-#ifndef tmwtypes_h
-#define tmwtypes_h
-
-#ifndef __TMWTYPES__
-#define __TMWTYPES__
-/*
- * File    : tmwtypes.h
- * Abstract:
- *      Data types for use with MATLAB/SIMULINK and the Real-Time Workshop.
- *
- *      When compiling stand-alone model code, data types can be overridden
- *      via compiler switches.
- *
- *      Define NO_FLOATS to eliminate reference to real_T, etc.
- */
-
-#include <limits.h>
-
-/* __STDC_VERSION__ version check below means "check for a C99 compiler".
-
-   Visual Studio (checked on versions 2015 and 2017) does
-   not define __STDC_VERSION__, however  it has stdbool.h available,
-   thus a separate check for _MSC_VER below.
- */
-#if defined(__APPLE_CC__) \
-    || (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) \
-    || (defined(_MSC_VER) && (_MSC_VER >= 1900))
-#include <stdbool.h>
-#endif
-
-#define LOGICAL_IS_A_TYPE
-#define SPARSE_GENERALIZATION
-
-#ifdef NO_FLOATS
-# define double double_not_allowed
-# define float  float_not_allowed
-#endif /*NO_FLOATS*/
-
-#ifndef NO_FLOATS
-
-#ifndef __MWERKS__
-# ifdef __STDC__
-#  include <float.h>
-# else
-#  define FLT_MANT_DIG 24
-#  define DBL_MANT_DIG 53
-# endif
-#endif
-
-#endif /*NO_FLOATS*/
-
-/*
- *      The following data types cannot be overridden when building MEX files.
- */
-#ifdef MATLAB_MEX_FILE
-# undef CHARACTER_T
-# undef INTEGER_T
-# undef BOOLEAN_T
-# undef REAL_T
-# undef TIME_T
-#endif
-
-/*
- * The uchar_T, ushort_T and ulong_T types are needed for compilers which do 
- * not allow defines to be specified, at the command line, with spaces in them.
- */
-
-typedef unsigned char       uchar_T;
-typedef unsigned short      ushort_T;
-typedef unsigned long       ulong_T;
-
-#if (defined(_MSC_VER) && _MSC_VER >= 1500)      \
-    || defined(__x86_64__) || defined(__LP64__)  \
-    || defined(__LCC64__)
-    
-typedef unsigned long long  ulonglong_T;
-#endif
-
-
-
-/*=======================================================================*
- * Fixed width word size data types:                                     *
- *   int8_T, int16_T, int32_T     - signed 8, 16, or 32 bit integers     *
- *   uint8_T, uint16_T, uint32_T  - unsigned 8, 16, or 32 bit integers   *
- *   real32_T, real64_T           - 32 and 64 bit floating point numbers *
- *=======================================================================*/
-
-/* When used with Real Time Workshop generated code, this
- * header file can be used with a variety of compilers.
- *
- * The compiler could be for an 8 bit embedded processor that
- * only had 8 bits per integer and 16 bits per long.
- * In that example, a 32 bit integer size is not even available.
- * This header file should be robust to that.   
- *
- * For the case of an 8 bit processor, the preprocessor
- * may be limited to 16 bit math like its target.  That limitation 
- * would mean that 32 bit comparisons can't be done accurately.  
- * To increase robustness to this, comparisons are done against
- * smaller values first.  An inaccurate 32 bit comparison isn't
- * attempted if the 16 bit comparison has already succeeded.
- *
- * Limitations on preprocessor math can also be stricter than
- * for the target.  There are known cases where a compiler
- * targeting processors with 64 bit longs can't do accurate
- * preprocessor comparisons on more than 32 bits.  
- */
-
-/* Determine the number of bits for int, long, short, and char.
- * If one fails to be determined, set the number of bits to -1
- */
-
-#ifndef TMW_BITS_PER_INT
-# if   INT_MAX  == 0x7FL
-#  define TMW_BITS_PER_INT 8
-# elif INT_MAX  == 0x7FFFL
-#  define TMW_BITS_PER_INT 16
-# elif INT_MAX  == 0x7FFFFFFFL
-#  define TMW_BITS_PER_INT 32
-# else
-#  define TMW_BITS_PER_INT -1
-# endif
-#endif
-
-#ifndef TMW_BITS_PER_LONG
-# if   LONG_MAX  == 0x7FL
-#  define TMW_BITS_PER_LONG 8
-# elif LONG_MAX  == 0x7FFFL
-#  define TMW_BITS_PER_LONG 16
-# elif LONG_MAX  == 0x7FFFFFFFL
-#  define TMW_BITS_PER_LONG 32
-# else
-#  define TMW_BITS_PER_LONG -1
-# endif
-#endif
-
-#ifndef TMW_BITS_PER_SHRT
-# if   SHRT_MAX  == 0x7FL
-#  define TMW_BITS_PER_SHRT 8
-# elif SHRT_MAX  == 0x7FFFL
-#  define TMW_BITS_PER_SHRT 16
-# elif SHRT_MAX  == 0x7FFFFFFFL
-#  define TMW_BITS_PER_SHRT 32
-# else
-#  define TMW_BITS_PER_SHRT -1
-# endif
-#endif
-
-#ifndef TMW_BITS_PER_SCHAR
-# if   SCHAR_MAX  == 0x7FL
-#  define TMW_BITS_PER_SCHAR 8
-# elif SCHAR_MAX  == 0x7FFFL
-#  define TMW_BITS_PER_SCHAR 16
-# elif SCHAR_MAX  == 0x7FFFFFFFL
-#  define TMW_BITS_PER_SCHAR 32
-# else
-#  define TMW_BITS_PER_SCHAR -1
-# endif
-#endif
-
-#ifndef TMW_CHAR_SIGNED
-# if SCHAR_MAX == CHAR_MAX
-#  define TMW_CHAR_SIGNED 1
-# else
-#  define TMW_CHAR_SIGNED 0
-# endif
-#endif
-
-/* It is common for one or more of the integer types
- * to be the same size.  For example, on many embedded
- * processors, both shorts and ints are 16 bits.  On
- * processors used for workstations, it is quite common
- * for both int and long to be 32 bits.  
- *   When there is more than one choice for typdef'ing
- * a portable type like int16_T or uint32_T, in
- * concept, it should not matter which choice is made.
- * However, some style guides and some code checking
- * tools do identify and complain about seemingly
- * irrelevant differences.  For example, a code
- * checking tool may complain about an implicit
- * conversion from int to short even though both
- * are 16 bits.  To reduce these types of
- * complaints, it is best to make int the
- * preferred choice when more than one is available.
- */
-
-#ifndef INT8_T
-# if   TMW_BITS_PER_INT   == 8
-#  define  INT8_T int
-# elif TMW_BITS_PER_LONG  == 8
-#  define  INT8_T long
-# elif TMW_BITS_PER_SCHAR == 8
-#  define  INT8_T signed char
-# elif TMW_BITS_PER_SHRT  == 8
-#  define  INT8_T short
-# endif
-#endif
-#ifdef INT8_T
- typedef INT8_T int8_T;
-#endif
-
-#ifndef UINT8_T
-# if   TMW_BITS_PER_INT   == 8
-#  define  UINT8_T unsigned int
-# elif TMW_BITS_PER_LONG  == 8
-#  define  UINT8_T unsigned long
-# elif TMW_BITS_PER_SCHAR == 8
-#  define  UINT8_T unsigned char
-# elif TMW_BITS_PER_SHRT  == 8
-#  define  UINT8_T unsigned short
-# endif
-#endif
-#ifdef UINT8_T
- typedef UINT8_T uint8_T;
-#endif
-
-
-#ifndef INT16_T
-# if   TMW_BITS_PER_INT   == 16
-#  define  INT16_T int
-# elif TMW_BITS_PER_LONG  == 16
-#  define  INT16_T long
-# elif TMW_BITS_PER_SCHAR == 16
-#  define  INT16_T signed char
-# elif TMW_BITS_PER_SHRT  == 16
-#  define  INT16_T short
-# endif
-#endif
-#ifdef INT16_T
- typedef INT16_T int16_T;
-#endif
-
-
-#ifndef UINT16_T
-# if   TMW_BITS_PER_INT   == 16
-#  define  UINT16_T unsigned int
-# elif TMW_BITS_PER_LONG  == 16
-#  define  UINT16_T unsigned long
-# elif TMW_BITS_PER_SCHAR == 16
-#  define  UINT16_T unsigned char
-# elif TMW_BITS_PER_SHRT  == 16
-#  define  UINT16_T unsigned short
-# endif
-#endif
-#ifdef UINT16_T
- typedef UINT16_T uint16_T;
-#endif
-
-
-#ifndef INT32_T
-# if   TMW_BITS_PER_INT   == 32
-#  define  INT32_T int
-# elif TMW_BITS_PER_LONG  == 32
-#  define  INT32_T long
-# elif TMW_BITS_PER_SCHAR == 32
-#  define  INT32_T signed char
-# elif TMW_BITS_PER_SHRT  == 32
-#  define  INT32_T short
-# endif
-#endif
-#ifdef INT32_T
- typedef INT32_T int32_T;
-#endif
-
-
-#ifndef UINT32_T
-# if   TMW_BITS_PER_INT   == 32
-#  define  UINT32_T unsigned int
-# elif TMW_BITS_PER_LONG  == 32
-#  define  UINT32_T unsigned long
-# elif TMW_BITS_PER_SCHAR == 32
-#   define UINT32_T unsigned char
-# elif TMW_BITS_PER_SHRT  == 32
-#  define  UINT32_T unsigned short
-# endif
-#endif
-#ifdef UINT32_T
- typedef UINT32_T uint32_T;
-#endif
-
-/* The following is used to emulate smaller integer types when only
- * larger types are available.  For example, compilers for TI C3x/C4x DSPs 
- * define char and short to be 32 bits, so 8 and 16 bits are not directly
- * available.  This target is commonly used with RTW rapid prototyping.
- * Other DSPs define char to be 16 bits, so 8 bits is not directly 
- * available.
- */
-#ifndef INT8_T
-# ifdef INT16_T
-#  define INT8_T INT16_T
-   typedef INT8_T int8_T;
-# else
-#  ifdef INT32_T
-#   define INT8_T INT32_T
-    typedef INT8_T int8_T;
-#  endif
-# endif
-#endif
-
-#ifndef UINT8_T
-# ifdef UINT16_T
-#   define UINT8_T UINT16_T
-    typedef UINT8_T uint8_T;
-# else
-#  ifdef UINT32_T
-#   define UINT8_T UINT32_T
-    typedef UINT8_T uint8_T;
-#  endif
-# endif
-#endif
-
-#ifndef INT16_T
-# ifdef INT32_T
-#   define INT16_T INT32_T
-    typedef INT16_T int16_T;
-# endif
-#endif
-
-#ifndef UINT16_T
-# ifdef UINT32_T
-#   define UINT16_T UINT32_T
-    typedef UINT16_T uint16_T;
-# endif
-#endif
-
-
-#ifndef NO_FLOATS
-
-#ifndef REAL32_T
-# ifndef __MWERKS__
-#  if FLT_MANT_DIG >= 23
-#   define REAL32_T float
-#  endif
-# else
-#  define REAL32_T float
-# endif
-#endif
-#ifdef REAL32_T
- typedef REAL32_T real32_T;
-#endif
-
-
-#ifndef REAL64_T
-# ifndef __MWERKS__
-#  if DBL_MANT_DIG >= 52
-#   define REAL64_T double
-#  endif
-# else
-#  define REAL64_T double
-# endif
-#endif
-#ifdef REAL64_T
- typedef REAL64_T real64_T;
-#endif
-
-#endif /* NO_FLOATS*/
-
-/*=======================================================================*
- * Fixed width word size data types:                                     *
- *   int64_T                      - signed 64 bit integers               *
- *   uint64_T                     - unsigned 64 bit integers             *
- *=======================================================================*/
-
-
-
-#ifndef INT64_T
-# if defined(__APPLE__)
-#  define INT64_T long long
-#  define FMT64 "ll"
-#  if defined(__LP64__) && !defined(INT_TYPE_64_IS_LONG)
-#    define INT_TYPE_64_IS_LONG
-#  endif
-# elif (defined(__x86_64__) || defined(__LP64__))&& !defined(__MINGW64__)
-#  define INT64_T long
-#  define FMT64 "l"
-#  if !defined(INT_TYPE_64_IS_LONG)
-#    define INT_TYPE_64_IS_LONG
-#  endif
-# elif defined(_MSC_VER) || (defined(__BORLANDC__) && __BORLANDC__ >= 0x530) \
-                         || (defined(__WATCOMC__)  && __WATCOMC__  >= 1100)
-#  define INT64_T __int64
-#  define FMT64 "I64"
-# elif defined(__GNUC__) || defined(TMW_ENABLE_INT64) \
-                         || defined(__LCC64__)
-#  define INT64_T long long
-#  define FMT64 "ll"
-# endif
-#endif
-
-
-
-#if defined(INT64_T)
-# if defined(__GNUC__) && \
-    ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >=9)))
-  __extension__
-# endif
- typedef INT64_T int64_T;
-#endif
-
-
-
-#ifndef UINT64_T
-# if defined(__APPLE__)
-#  define UINT64_T unsigned long long
-#  define FMT64 "ll"
-#  if defined(__LP64__) && !defined(INT_TYPE_64_IS_LONG)
-#    define INT_TYPE_64_IS_LONG
-#  endif
-# elif (defined(__x86_64__) || defined(__LP64__))&& !defined(__MINGW64__)
-#  define UINT64_T unsigned long
-#  define FMT64 "l"
-#  if !defined(INT_TYPE_64_IS_LONG)
-#    define INT_TYPE_64_IS_LONG
-#  endif
-# elif defined(_MSC_VER) || (defined(__BORLANDC__) && __BORLANDC__ >= 0x530) \
-                         || (defined(__WATCOMC__)  && __WATCOMC__  >= 1100)
-#  define UINT64_T unsigned __int64
-#  define FMT64 "I64"
-# elif defined(__GNUC__) || defined(TMW_ENABLE_INT64) \
-                         || defined(__LCC64__)
-#  define UINT64_T unsigned long long
-#  define FMT64 "ll"
-# endif
-#endif
-
-#if defined(_WIN64) || (defined(__APPLE__) && defined(__LP64__)) \
-                    || defined(__x86_64__) \
-                    || defined(__LP64__)
-#  define INT_TYPE_64_IS_SUPPORTED
-#endif
-
-#if defined(UINT64_T)
-# if defined(__GNUC__) && \
-    ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >=9)))
-  __extension__
-# endif
- typedef UINT64_T uint64_T;
-#endif
-
-/*===========================================================================*
- * Format string modifiers for using size_t variables in printf statements.  *
- *===========================================================================*/
-
-#ifndef FMT_SIZE_T
-#  if (defined( __GNUC__ ) || defined(_STDC_C99))&& !defined(__MINGW64__)
-#    define FMT_SIZE_T "z"
-#  elif defined (__WATCOMC__)
-#    define FMT_SIZE_T "l"
-#  elif defined (_WIN32 )
-#    define FMT_SIZE_T "I"
-#  else
-#    define FMT_SIZE_T "l"
-#  endif
-#endif
-
-#ifndef FMT_PTRDIFF_T
-#  if defined(__APPLE__)
-#    define FMT_PTRDIFF_T "l"
-#  elif defined( __GNUC__ ) || defined(_STDC_C99)
-#    define FMT_PTRDIFF_T "t"
-#  elif defined (__WATCOMC__)
-#    define FMT_PTRDIFF_T "l"
-#  elif defined (_WIN32 )
-#    define FMT_PTRDIFF_T "I"
-#  else
-#    define FMT_PTRDIFF_T "l"
-#  endif
-#endif
-
-/*===========================================================================*
- * General or logical data types where the word size is not guaranteed.      *
- *  real_T     - possible settings include real32_T or real64_T              *
- *  time_T     - possible settings include real32_T or real64_T              *
- *  boolean_T                                                                *
- *  char_T                                                                   *
- *  int_T                                                                    *
- *  uint_T                                                                   *
- *  byte_T                                                                   *
- *===========================================================================*/
-
-#ifndef NO_FLOATS
-
-#ifndef REAL_T
-# ifdef REAL64_T
-#  define REAL_T real64_T
-# else
-#  ifdef REAL32_T
-#   define REAL_T real32_T
-#  endif
-# endif
-#endif
-#ifdef REAL_T
- typedef REAL_T real_T;
-#endif
-
-#ifndef TIME_T
-# ifdef REAL_T
-#  define TIME_T real_T
-# endif
-#endif
-#ifdef TIME_T
- typedef TIME_T time_T;
-#endif
-
-#endif /* NO_FLOATS */
-
-#ifndef BOOLEAN_T
-# if defined(UINT8_T)
-#  define BOOLEAN_T UINT8_T
-# else
-#  define BOOLEAN_T unsigned int
-# endif
-#endif
-typedef BOOLEAN_T booleanT;
-
-
-#ifndef CHARACTER_T
-# define CHARACTER_T char
-#endif
-typedef CHARACTER_T char_T;
-
-
-#ifndef INTEGER_T
-# define INTEGER_T int
-#endif
-typedef INTEGER_T int_T;
-
-
-#ifndef UINTEGER_T
-# define UINTEGER_T unsigned
-#endif
-typedef UINTEGER_T uint_T;
-
-
-#ifndef BYTE_T
-# define BYTE_T unsigned char
-#endif
-typedef BYTE_T byte_T;
-
-
-/*===========================================================================*
- * Define Complex Structures                                                 *
- *===========================================================================*/
-#ifndef NO_FLOATS
-
-#ifndef CREAL32_T
-#  ifdef REAL32_T
-    typedef struct {
-      real32_T re, im;
-    } creal32_T;
-#    define CREAL32_T creal32_T
-#  endif
-#endif
-
-#ifndef CREAL64_T
-#  ifdef REAL64_T
-    typedef struct {
-      real64_T re, im;
-    } creal64_T;
-#    define CREAL64_T creal64_T
-#  endif
-#endif
-
-#ifndef CREAL_T
-#  ifdef REAL_T
-    typedef struct {
-      real_T re, im;
-    } creal_T;
-#    define CREAL_T creal_T
-#  endif
-#endif
-
-#endif /* NO_FLOATS */
-
-#ifndef CINT8_T
-#  ifdef INT8_T
-    typedef struct {
-      int8_T re, im;
-    } cint8_T;
-#    define CINT8_T cint8_T
-#  endif
-#endif
-
-#ifndef CUINT8_T
-#  ifdef UINT8_T
-    typedef struct {
-      uint8_T re, im;
-    } cuint8_T;
-#    define CUINT8_T cuint8_T
-#  endif
-#endif
-
-#ifndef CINT16_T
-#  ifdef INT16_T
-    typedef struct {
-      int16_T re, im;
-    } cint16_T;
-#    define CINT16_T cint16_T
-#  endif
-#endif
-
-#ifndef CUINT16_T
-#  ifdef UINT16_T
-    typedef struct {
-      uint16_T re, im;
-    } cuint16_T;
-#    define CUINT16_T cuint16_T
-#  endif
-#endif
-
-#ifndef CINT32_T
-#  ifdef INT32_T
-    typedef struct {
-      int32_T re, im;
-    } cint32_T;
-#    define CINT32_T cint32_T
-#  endif
-#endif
-
-#ifndef CUINT32_T
-#  ifdef UINT32_T
-    typedef struct {
-      uint32_T re, im;
-    } cuint32_T;
-#    define CUINT32_T cuint32_T
-#  endif
-#endif
-
-#ifndef CINT64_T
-#  ifdef INT64_T
-    typedef struct {
-      int64_T re, im;
-    } cint64_T;
-#    define CINT64_T cint64_T
-#  endif
-#endif
-
-#ifndef CUINT64_T
-#  ifdef UINT64_T
-    typedef struct {
-      uint64_T re, im;
-    } cuint64_T;
-#    define CUINT64_T cuint64_T
-#  endif
-#endif
-
-/*=======================================================================*
- * Min and Max:                                                          *
- *   int8_T, int16_T, int32_T     - signed 8, 16, or 32 bit integers     *
- *   uint8_T, uint16_T, uint32_T  - unsigned 8, 16, or 32 bit integers   *
- *=======================================================================*/
-
-#define  MAX_int8_T      ((int8_T)(127))            /* 127  */
-#define  MIN_int8_T      ((int8_T)(-128))           /* -128 */
-#define  MAX_uint8_T     ((uint8_T)(255))           /* 255  */
-#define  MIN_uint8_T     ((uint8_T)(0))
-                           
-#define  MAX_int16_T     ((int16_T)(32767))         /* 32767 */
-#define  MIN_int16_T     ((int16_T)(-32768))        /* -32768 */
-#define  MAX_uint16_T    ((uint16_T)(65535))        /* 65535 */
-#define  MIN_uint16_T    ((uint16_T)(0))
-                           
-#define  MAX_int32_T     ((int32_T)(2147483647))    /* 2147483647  */
-#define  MIN_int32_T     ((int32_T)(-2147483647-1)) /* -2147483648 */
-#define  MAX_uint32_T    ((uint32_T)(0xFFFFFFFFU))  /* 4294967295  */
-#define  MIN_uint32_T    ((uint32_T)(0))
-
-#if defined(_MSC_VER) || (defined(__BORLANDC__) && __BORLANDC__ >= 0x530) \
-                      || (defined(__WATCOMC__)  && __WATCOMC__  >= 1100) \
-                      || defined(__LCC64__)
-#  ifdef INT64_T
-#    define  MAX_int64_T     ((int64_T)(9223372036854775807LL))
-#    define  MIN_int64_T     ((int64_T)(-9223372036854775807LL-1LL))
-#  endif
-#  ifdef UINT64_T
-#    define  MAX_uint64_T    ((uint64_T)(0xFFFFFFFFFFFFFFFFULL))
-#    define  MIN_uint64_T    ((uint64_T)(0))
-#  endif
-#else
-#  ifdef INT64_T
-#    ifdef INT_TYPE_64_IS_LONG
-#      define  MAX_int64_T     ((int64_T)(9223372036854775807L))
-#      define  MIN_int64_T     ((int64_T)(-9223372036854775807L-1L))
-#    else
-#      define  MAX_int64_T     ((int64_T)(9223372036854775807LL))
-#      define  MIN_int64_T     ((int64_T)(-9223372036854775807LL-1LL))
-#    endif
-#  endif
-#  ifdef UINT64_T
-#    ifdef INT_TYPE_64_IS_LONG
-#      define  MAX_uint64_T    ((uint64_T)(0xFFFFFFFFFFFFFFFFUL))
-#      define  MIN_uint64_T    ((uint64_T)(0))
-#    else
-#      define  MAX_uint64_T    ((uint64_T)(0xFFFFFFFFFFFFFFFFULL))
-#      define  MIN_uint64_T    ((uint64_T)(0))
-#    endif
-#  endif
-#endif
-
-#ifdef _MSC_VER
-/* Conversion from unsigned __int64 to double is not implemented in windows
- * and results in a compile error, thus the value must first be cast to
- * signed __int64, and then to double.
- *
- * If the 64 bit int value is greater than 2^63-1, which is the signed int64 max,
- * the macro below provides a workaround for casting a uint64 value to a double
- * in windows.
- */
-#  define uint64_to_double(u) ( ((u) > _I64_MAX) ? \
-            (double)(__int64)((u) - _I64_MAX - 1) + (double)_I64_MAX + 1: \
-            (double)(__int64)(u) )
-
-/* The following inline function should only be used in the macro double_to_uint64,
- * as it only handles the specfic range of double between 2^63 and 2^64-1 */
-__forceinline
-uint64_T double_to_uint64_helper(double d) {
-  union double_to_uint64_union_type {
-    double dd;
-    uint64_T i64;
-  } di;
-  di.dd = d;
-  return (((di.i64 & 0x000fffffffffffff) | 0x0010000000000000) << 11);
-}
-
-/* The largest double value that can be cast to uint64 in windows is the
- * signed int64 max, which is 2^63-1. The macro below provides
- * a workaround for casting large double values to uint64 in windows.
- */
-/* The magic number 18446744073709551616.0 is 2^64 */
-/* The magic number 9223372036854775808.0 is 2^63 */
-#  define double_to_uint64(d) ( ((d) >= 18446744073709551616.0) ? \
-            0xffffffffffffffffULL : \
-            ((d) >= 0.0) ? \
-            ((d) >= 9223372036854775808.0) ? \
-            double_to_uint64_helper(d) : \
-            (unsigned __int64)(d) : \
-            0ULL )
-#else
-#  define uint64_to_double(u) ((double)(u))
-#  if defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__TICCSC__)
-/* double_to_uint64 defined only for MSVC and UNIX */
-#  else
-#  define double_to_uint64(d) ( ((d) >= 18446744073709551616.0) ? \
-            (unsigned long long) 0xffffffffffffffffULL : \
-            ((d) >= 0) ? (unsigned long long)(d) : (unsigned long long) 0 )
-#  endif
-#endif
-
-#if !defined(__cplusplus) && !defined(__bool_true_false_are_defined)
-
-#ifndef _bool_T
-#define _bool_T
-
-typedef bool bool;
-
-#ifndef false
-#define false (0)
-#endif
-#ifndef true 
-#define true (1)
-#endif
-
-#endif /* _bool_T */
-
-#endif /* !__cplusplus */
-
-/* 
- * This software assumes that the code is being compiled on a target using a 
- * 2's complement representation for signed integer values.
- */
-#if ((SCHAR_MIN + 1) != -SCHAR_MAX)
-#error "This code must be compiled using a 2's complement representation for signed integer values"
-#endif
-
-/*
- * Maximum length of a MATLAB identifier (function/variable/model)
- * including the null-termination character.
- */
-#define TMW_NAME_LENGTH_MAX 64
-
-/*
- * Maximum values for indices and dimensions
- */
-#include <stddef.h>
-
-#ifdef MX_COMPAT_32
-typedef int mwSize;
-typedef int mwIndex;
-typedef int mwSignedIndex;
-#else
-typedef size_t    mwSize;         /* unsigned pointer-width integer */
-typedef size_t    mwIndex;        /* unsigned pointer-width integer */
-typedef ptrdiff_t mwSignedIndex;  /* a signed pointer-width integer */
-#endif
-
-                                  /* for the individual dim */
-#ifndef SLSIZE_SLINDEX
-#define SLSIZE_SLINDEX
-typedef int SLIndex;
-typedef int SLSize;
-#endif
-
-/* for the total size */
-#define SLIndexType size_t
-#define INVALID_SIZET_VALUE   (std::numeric_limits<SLIndexType>::max())
-#define MAX_VALID_SIZET_VALUE   (std::numeric_limits<SLIndexType>::max() -1)
-
-
-#if (defined(_LP64) || defined(_WIN64)) && !defined(MX_COMPAT_32)
-/* Currently 2^48 based on hardware limitations */
-# define MWSIZE_MAX    281474976710655UL
-# define MWINDEX_MAX   281474976710655UL
-# define MWSINDEX_MAX  281474976710655L
-# define MWSINDEX_MIN -281474976710655L
-#else
-# define MWSIZE_MAX    2147483647UL
-# define MWINDEX_MAX   2147483647UL
-# define MWSINDEX_MAX  2147483647L
-# define MWSINDEX_MIN -2147483647L
-#endif
-#define MWSIZE_MIN    0UL
-#define MWINDEX_MIN   0UL
-
-/** UTF-16 character type */
-
-#if (defined(__cplusplus) && (__cplusplus >= 201103L)) || (defined(_HAS_CHAR16_T_LANGUAGE_SUPPORT) && _HAS_CHAR16_T_LANGUAGE_SUPPORT)
-typedef char16_t CHAR16_T;
-#define U16_STRING_LITERAL_PREFIX u
-#elif defined(_MSC_VER)
-typedef wchar_t CHAR16_T;
-#define U16_STRING_LITERAL_PREFIX L
-#else
-typedef UINT16_T CHAR16_T;
-#endif
-
-#endif  /* __TMWTYPES__ */
-
-#endif /* tmwtypes_h */

+ 0 - 116
MovAvgFilter/CMovAvgFilter.cpp

@@ -1,116 +0,0 @@
-//
-// File: CMovAvgFilter.cpp
-//
-// MATLAB Coder version            : 4.3
-// C/C++ source code generated on  : 12-Jan-2022 14:14:11
-//
-
-// Include Files
-#include "CMovAvgFilter.h"
-
-// Function Definitions
-
-//
-// Arguments    : void
-// Return Type  : void
-//
-CMovAvgFilter::~CMovAvgFilter()
-{
-  // (no terminate code required)
-}
-
-void CMovAvgFilter::SetPdoa1dEnable(bool bEnable)
-{
-	s_enabled_pdoa1d = bEnable;
-}
-
-bool CMovAvgFilter::GetPdoa1dEnable()
-{
-	return s_enabled_pdoa1d;
-}
-
-void CMovAvgFilter::SetPdoa2dEnable(bool bEnable)
-{
-	s_enabled_pdoa2d = bEnable;
-}
-
-bool CMovAvgFilter::GetPdoa2dEnable()
-{
-	return s_enabled_pdoa2d;
-}
-
-//
-// Arguments    : void
-// Return Type  : void
-//
-CMovAvgFilter::CMovAvgFilter()
-{
-  this->SD_.pd = &this->pd_;
-  this->firstRun_not_empty_init();
-  this->MovAvgFilter_init();
-}
-
-//
-// Arguments    : real_T x
-// Return Type  : real_T
-//
-real_T CMovAvgFilter::MovAvgFilter(real_T x)
-{
-  real_T avg;
-  int32_T m;
-  if (!this->pd_.firstRun_not_empty) {
-    this->pd_.xbuf.size[0] = 11;
-    for (m = 0; m < 11; m++) {
-      this->pd_.xbuf.data[m] = x;
-    }
-
-    this->pd_.prevAvg = x;
-    this->pd_.firstRun_not_empty = true;
-  }
-
-  for (m = 0; m < 10; m++) {
-    this->pd_.xbuf.data[m] = this->pd_.xbuf.data[m + 1];
-  }
-
-  this->pd_.xbuf.data[10] = x;
-  avg = this->pd_.prevAvg + (x - this->pd_.xbuf.data[0]) / 10.0;
-  this->pd_.prevAvg = avg;
-  return avg;
-}
-
-//
-// Arguments    : void
-// Return Type  : void
-//
-void CMovAvgFilter::MovAvgFilter_init()
-{
-  this->pd_.xbuf.size[0] = 0;
-}
-
-bool CMovAvgFilter::s_enabled_pdoa1d = false;
-
-bool CMovAvgFilter::s_enabled_pdoa2d = false;
-
-//
-// Arguments    : void
-// Return Type  : void
-//
-void CMovAvgFilter::firstRun_not_empty_init()
-{
-  this->pd_.firstRun_not_empty = false;
-}
-
-//
-// Arguments    : void
-// Return Type  : MovAvgFilterStackData *
-//
-MovAvgFilterStackData *CMovAvgFilter::getStackData()
-{
-  return &this->SD_;
-}
-
-//
-// File trailer for CMovAvgFilter.cpp
-//
-// [EOF]
-//

+ 0 - 43
MovAvgFilter/CMovAvgFilter.h

@@ -1,43 +0,0 @@
-//
-// File: CMovAvgFilter.h
-//
-// MATLAB Coder version            : 4.3
-// C/C++ source code generated on  : 12-Jan-2022 14:14:11
-//
-#ifndef CMOVAVGFILTER_H
-#define CMOVAVGFILTER_H
-
-// Include Files
-#include <cstddef>
-#include <cstdlib>
-#include "rtwtypes.h"
-#include "MovAvgFilter_types.h"
-
-// Type Definitions
-class CMovAvgFilter
-{
- public:
-  CMovAvgFilter();
-  ~CMovAvgFilter();
-  static void SetPdoa1dEnable(bool bEnable);
-  static bool GetPdoa1dEnable();
-  static void SetPdoa2dEnable(bool bEnable);
-  static bool GetPdoa2dEnable();
-  real_T MovAvgFilter(real_T x);
-  MovAvgFilterStackData *getStackData();
- private:
-  void firstRun_not_empty_init();
-  void MovAvgFilter_init();
-  MovAvgFilterPersistentData pd_;
-  MovAvgFilterStackData SD_;
-  static bool s_enabled_pdoa1d;
-  static bool s_enabled_pdoa2d;
-};
-
-#endif
-
-//
-// File trailer for CMovAvgFilter.h
-//
-// [EOF]
-//

+ 0 - 38
MovAvgFilter/MovAvgFilter_types.h

@@ -1,38 +0,0 @@
-//
-// File: MovAvgFilter_types.h
-//
-// MATLAB Coder version            : 4.3
-// C/C++ source code generated on  : 12-Jan-2022 14:14:11
-//
-#ifndef MOVAVGFILTER_TYPES_H
-#define MOVAVGFILTER_TYPES_H
-
-// Include Files
-#include "rtwtypes.h"
-
-// Type Definitions
-struct emxArray_real_T_11
-{
-  real_T data[11];
-  int32_T size[1];
-};
-
-struct MovAvgFilterPersistentData
-{
-  real_T prevAvg;
-  emxArray_real_T_11 xbuf;
-  bool firstRun_not_empty;
-};
-
-struct MovAvgFilterStackData
-{
-  MovAvgFilterPersistentData *pd;
-};
-
-#endif
-
-//
-// File trailer for MovAvgFilter_types.h
-//
-// [EOF]
-//

+ 0 - 43
MovAvgFilter/rtwtypes.h

@@ -1,43 +0,0 @@
-/*
- * File: rtwtypes.h
- *
- * MATLAB Coder version            : 4.3
- * C/C++ source code generated on  : 12-Jan-2022 14:14:11
- */
-
-#ifndef RTWTYPES_H
-#define RTWTYPES_H
-
-/*=======================================================================*
- * Fixed width word size data types:                                     *
- *   int64_T                      - signed 64 bit integers               *
- *   uint64_T                     - unsigned 64 bit integers             *
- *=======================================================================*/
-#if defined(__APPLE__)
-# ifndef INT64_T
-#  define INT64_T                      long
-#  define FMT64                        "l"
-#  if defined(__LP64__) && !defined(INT_TYPE_64_IS_LONG)
-#    define INT_TYPE_64_IS_LONG
-#  endif
-# endif
-#endif
-
-#if defined(__APPLE__)
-# ifndef UINT64_T
-#  define UINT64_T                     unsigned long
-#  define FMT64                        "l"
-#  if defined(__LP64__) && !defined(INT_TYPE_64_IS_LONG)
-#    define INT_TYPE_64_IS_LONG
-#  endif
-# endif
-#endif
-
-#include "tmwtypes.h"
-#endif
-
-/*
- * File trailer for rtwtypes.h
- *
- * [EOF]
- */

+ 0 - 848
MovAvgFilter/tmwtypes.h

@@ -1,848 +0,0 @@
-/*
- * Copyright 1984-2018 The MathWorks, Inc.
- */
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-#if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 3))
-# pragma once
-#endif
-
-#ifndef tmwtypes_h
-#define tmwtypes_h
-
-#ifndef __TMWTYPES__
-#define __TMWTYPES__
-/*
- * File    : tmwtypes.h
- * Abstract:
- *      Data types for use with MATLAB/SIMULINK and the Real-Time Workshop.
- *
- *      When compiling stand-alone model code, data types can be overridden
- *      via compiler switches.
- *
- *      Define NO_FLOATS to eliminate reference to real_T, etc.
- */
-
-#include <limits.h>
-
-/* __STDC_VERSION__ version check below means "check for a C99 compiler".
-
-   Visual Studio (checked on versions 2015 and 2017) does
-   not define __STDC_VERSION__, however  it has stdbool.h available,
-   thus a separate check for _MSC_VER below.
- */
-#if defined(__APPLE_CC__) \
-    || (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) \
-    || (defined(_MSC_VER) && (_MSC_VER >= 1900))
-#include <stdbool.h>
-#endif
-
-#define LOGICAL_IS_A_TYPE
-#define SPARSE_GENERALIZATION
-
-#ifdef NO_FLOATS
-# define double double_not_allowed
-# define float  float_not_allowed
-#endif /*NO_FLOATS*/
-
-#ifndef NO_FLOATS
-
-#ifndef __MWERKS__
-# ifdef __STDC__
-#  include <float.h>
-# else
-#  define FLT_MANT_DIG 24
-#  define DBL_MANT_DIG 53
-# endif
-#endif
-
-#endif /*NO_FLOATS*/
-
-/*
- *      The following data types cannot be overridden when building MEX files.
- */
-#ifdef MATLAB_MEX_FILE
-# undef CHARACTER_T
-# undef INTEGER_T
-# undef BOOLEAN_T
-# undef REAL_T
-# undef TIME_T
-#endif
-
-/*
- * The uchar_T, ushort_T and ulong_T types are needed for compilers which do 
- * not allow defines to be specified, at the command line, with spaces in them.
- */
-
-typedef unsigned char       uchar_T;
-typedef unsigned short      ushort_T;
-typedef unsigned long       ulong_T;
-
-#if (defined(_MSC_VER) && _MSC_VER >= 1500)      \
-    || defined(__x86_64__) || defined(__LP64__)  \
-    || defined(__LCC64__)
-    
-typedef unsigned long long  ulonglong_T;
-#endif
-
-
-
-/*=======================================================================*
- * Fixed width word size data types:                                     *
- *   int8_T, int16_T, int32_T     - signed 8, 16, or 32 bit integers     *
- *   uint8_T, uint16_T, uint32_T  - unsigned 8, 16, or 32 bit integers   *
- *   real32_T, real64_T           - 32 and 64 bit floating point numbers *
- *=======================================================================*/
-
-/* When used with Real Time Workshop generated code, this
- * header file can be used with a variety of compilers.
- *
- * The compiler could be for an 8 bit embedded processor that
- * only had 8 bits per integer and 16 bits per long.
- * In that example, a 32 bit integer size is not even available.
- * This header file should be robust to that.   
- *
- * For the case of an 8 bit processor, the preprocessor
- * may be limited to 16 bit math like its target.  That limitation 
- * would mean that 32 bit comparisons can't be done accurately.  
- * To increase robustness to this, comparisons are done against
- * smaller values first.  An inaccurate 32 bit comparison isn't
- * attempted if the 16 bit comparison has already succeeded.
- *
- * Limitations on preprocessor math can also be stricter than
- * for the target.  There are known cases where a compiler
- * targeting processors with 64 bit longs can't do accurate
- * preprocessor comparisons on more than 32 bits.  
- */
-
-/* Determine the number of bits for int, long, short, and char.
- * If one fails to be determined, set the number of bits to -1
- */
-
-#ifndef TMW_BITS_PER_INT
-# if   INT_MAX  == 0x7FL
-#  define TMW_BITS_PER_INT 8
-# elif INT_MAX  == 0x7FFFL
-#  define TMW_BITS_PER_INT 16
-# elif INT_MAX  == 0x7FFFFFFFL
-#  define TMW_BITS_PER_INT 32
-# else
-#  define TMW_BITS_PER_INT -1
-# endif
-#endif
-
-#ifndef TMW_BITS_PER_LONG
-# if   LONG_MAX  == 0x7FL
-#  define TMW_BITS_PER_LONG 8
-# elif LONG_MAX  == 0x7FFFL
-#  define TMW_BITS_PER_LONG 16
-# elif LONG_MAX  == 0x7FFFFFFFL
-#  define TMW_BITS_PER_LONG 32
-# else
-#  define TMW_BITS_PER_LONG -1
-# endif
-#endif
-
-#ifndef TMW_BITS_PER_SHRT
-# if   SHRT_MAX  == 0x7FL
-#  define TMW_BITS_PER_SHRT 8
-# elif SHRT_MAX  == 0x7FFFL
-#  define TMW_BITS_PER_SHRT 16
-# elif SHRT_MAX  == 0x7FFFFFFFL
-#  define TMW_BITS_PER_SHRT 32
-# else
-#  define TMW_BITS_PER_SHRT -1
-# endif
-#endif
-
-#ifndef TMW_BITS_PER_SCHAR
-# if   SCHAR_MAX  == 0x7FL
-#  define TMW_BITS_PER_SCHAR 8
-# elif SCHAR_MAX  == 0x7FFFL
-#  define TMW_BITS_PER_SCHAR 16
-# elif SCHAR_MAX  == 0x7FFFFFFFL
-#  define TMW_BITS_PER_SCHAR 32
-# else
-#  define TMW_BITS_PER_SCHAR -1
-# endif
-#endif
-
-#ifndef TMW_CHAR_SIGNED
-# if SCHAR_MAX == CHAR_MAX
-#  define TMW_CHAR_SIGNED 1
-# else
-#  define TMW_CHAR_SIGNED 0
-# endif
-#endif
-
-/* It is common for one or more of the integer types
- * to be the same size.  For example, on many embedded
- * processors, both shorts and ints are 16 bits.  On
- * processors used for workstations, it is quite common
- * for both int and long to be 32 bits.  
- *   When there is more than one choice for typdef'ing
- * a portable type like int16_T or uint32_T, in
- * concept, it should not matter which choice is made.
- * However, some style guides and some code checking
- * tools do identify and complain about seemingly
- * irrelevant differences.  For example, a code
- * checking tool may complain about an implicit
- * conversion from int to short even though both
- * are 16 bits.  To reduce these types of
- * complaints, it is best to make int the
- * preferred choice when more than one is available.
- */
-
-#ifndef INT8_T
-# if   TMW_BITS_PER_INT   == 8
-#  define  INT8_T int
-# elif TMW_BITS_PER_LONG  == 8
-#  define  INT8_T long
-# elif TMW_BITS_PER_SCHAR == 8
-#  define  INT8_T signed char
-# elif TMW_BITS_PER_SHRT  == 8
-#  define  INT8_T short
-# endif
-#endif
-#ifdef INT8_T
- typedef INT8_T int8_T;
-#endif
-
-#ifndef UINT8_T
-# if   TMW_BITS_PER_INT   == 8
-#  define  UINT8_T unsigned int
-# elif TMW_BITS_PER_LONG  == 8
-#  define  UINT8_T unsigned long
-# elif TMW_BITS_PER_SCHAR == 8
-#  define  UINT8_T unsigned char
-# elif TMW_BITS_PER_SHRT  == 8
-#  define  UINT8_T unsigned short
-# endif
-#endif
-#ifdef UINT8_T
- typedef UINT8_T uint8_T;
-#endif
-
-
-#ifndef INT16_T
-# if   TMW_BITS_PER_INT   == 16
-#  define  INT16_T int
-# elif TMW_BITS_PER_LONG  == 16
-#  define  INT16_T long
-# elif TMW_BITS_PER_SCHAR == 16
-#  define  INT16_T signed char
-# elif TMW_BITS_PER_SHRT  == 16
-#  define  INT16_T short
-# endif
-#endif
-#ifdef INT16_T
- typedef INT16_T int16_T;
-#endif
-
-
-#ifndef UINT16_T
-# if   TMW_BITS_PER_INT   == 16
-#  define  UINT16_T unsigned int
-# elif TMW_BITS_PER_LONG  == 16
-#  define  UINT16_T unsigned long
-# elif TMW_BITS_PER_SCHAR == 16
-#  define  UINT16_T unsigned char
-# elif TMW_BITS_PER_SHRT  == 16
-#  define  UINT16_T unsigned short
-# endif
-#endif
-#ifdef UINT16_T
- typedef UINT16_T uint16_T;
-#endif
-
-
-#ifndef INT32_T
-# if   TMW_BITS_PER_INT   == 32
-#  define  INT32_T int
-# elif TMW_BITS_PER_LONG  == 32
-#  define  INT32_T long
-# elif TMW_BITS_PER_SCHAR == 32
-#  define  INT32_T signed char
-# elif TMW_BITS_PER_SHRT  == 32
-#  define  INT32_T short
-# endif
-#endif
-#ifdef INT32_T
- typedef INT32_T int32_T;
-#endif
-
-
-#ifndef UINT32_T
-# if   TMW_BITS_PER_INT   == 32
-#  define  UINT32_T unsigned int
-# elif TMW_BITS_PER_LONG  == 32
-#  define  UINT32_T unsigned long
-# elif TMW_BITS_PER_SCHAR == 32
-#   define UINT32_T unsigned char
-# elif TMW_BITS_PER_SHRT  == 32
-#  define  UINT32_T unsigned short
-# endif
-#endif
-#ifdef UINT32_T
- typedef UINT32_T uint32_T;
-#endif
-
-/* The following is used to emulate smaller integer types when only
- * larger types are available.  For example, compilers for TI C3x/C4x DSPs 
- * define char and short to be 32 bits, so 8 and 16 bits are not directly
- * available.  This target is commonly used with RTW rapid prototyping.
- * Other DSPs define char to be 16 bits, so 8 bits is not directly 
- * available.
- */
-#ifndef INT8_T
-# ifdef INT16_T
-#  define INT8_T INT16_T
-   typedef INT8_T int8_T;
-# else
-#  ifdef INT32_T
-#   define INT8_T INT32_T
-    typedef INT8_T int8_T;
-#  endif
-# endif
-#endif
-
-#ifndef UINT8_T
-# ifdef UINT16_T
-#   define UINT8_T UINT16_T
-    typedef UINT8_T uint8_T;
-# else
-#  ifdef UINT32_T
-#   define UINT8_T UINT32_T
-    typedef UINT8_T uint8_T;
-#  endif
-# endif
-#endif
-
-#ifndef INT16_T
-# ifdef INT32_T
-#   define INT16_T INT32_T
-    typedef INT16_T int16_T;
-# endif
-#endif
-
-#ifndef UINT16_T
-# ifdef UINT32_T
-#   define UINT16_T UINT32_T
-    typedef UINT16_T uint16_T;
-# endif
-#endif
-
-
-#ifndef NO_FLOATS
-
-#ifndef REAL32_T
-# ifndef __MWERKS__
-#  if FLT_MANT_DIG >= 23
-#   define REAL32_T float
-#  endif
-# else
-#  define REAL32_T float
-# endif
-#endif
-#ifdef REAL32_T
- typedef REAL32_T real32_T;
-#endif
-
-
-#ifndef REAL64_T
-# ifndef __MWERKS__
-#  if DBL_MANT_DIG >= 52
-#   define REAL64_T double
-#  endif
-# else
-#  define REAL64_T double
-# endif
-#endif
-#ifdef REAL64_T
- typedef REAL64_T real64_T;
-#endif
-
-#endif /* NO_FLOATS*/
-
-/*=======================================================================*
- * Fixed width word size data types:                                     *
- *   int64_T                      - signed 64 bit integers               *
- *   uint64_T                     - unsigned 64 bit integers             *
- *=======================================================================*/
-
-
-
-#ifndef INT64_T
-# if defined(__APPLE__)
-#  define INT64_T long long
-#  define FMT64 "ll"
-#  if defined(__LP64__) && !defined(INT_TYPE_64_IS_LONG)
-#    define INT_TYPE_64_IS_LONG
-#  endif
-# elif (defined(__x86_64__) || defined(__LP64__))&& !defined(__MINGW64__)
-#  define INT64_T long
-#  define FMT64 "l"
-#  if !defined(INT_TYPE_64_IS_LONG)
-#    define INT_TYPE_64_IS_LONG
-#  endif
-# elif defined(_MSC_VER) || (defined(__BORLANDC__) && __BORLANDC__ >= 0x530) \
-                         || (defined(__WATCOMC__)  && __WATCOMC__  >= 1100)
-#  define INT64_T __int64
-#  define FMT64 "I64"
-# elif defined(__GNUC__) || defined(TMW_ENABLE_INT64) \
-                         || defined(__LCC64__)
-#  define INT64_T long long
-#  define FMT64 "ll"
-# endif
-#endif
-
-
-
-#if defined(INT64_T)
-# if defined(__GNUC__) && \
-    ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >=9)))
-  __extension__
-# endif
- typedef INT64_T int64_T;
-#endif
-
-
-
-#ifndef UINT64_T
-# if defined(__APPLE__)
-#  define UINT64_T unsigned long long
-#  define FMT64 "ll"
-#  if defined(__LP64__) && !defined(INT_TYPE_64_IS_LONG)
-#    define INT_TYPE_64_IS_LONG
-#  endif
-# elif (defined(__x86_64__) || defined(__LP64__))&& !defined(__MINGW64__)
-#  define UINT64_T unsigned long
-#  define FMT64 "l"
-#  if !defined(INT_TYPE_64_IS_LONG)
-#    define INT_TYPE_64_IS_LONG
-#  endif
-# elif defined(_MSC_VER) || (defined(__BORLANDC__) && __BORLANDC__ >= 0x530) \
-                         || (defined(__WATCOMC__)  && __WATCOMC__  >= 1100)
-#  define UINT64_T unsigned __int64
-#  define FMT64 "I64"
-# elif defined(__GNUC__) || defined(TMW_ENABLE_INT64) \
-                         || defined(__LCC64__)
-#  define UINT64_T unsigned long long
-#  define FMT64 "ll"
-# endif
-#endif
-
-#if defined(_WIN64) || (defined(__APPLE__) && defined(__LP64__)) \
-                    || defined(__x86_64__) \
-                    || defined(__LP64__)
-#  define INT_TYPE_64_IS_SUPPORTED
-#endif
-
-#if defined(UINT64_T)
-# if defined(__GNUC__) && \
-    ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >=9)))
-  __extension__
-# endif
- typedef UINT64_T uint64_T;
-#endif
-
-/*===========================================================================*
- * Format string modifiers for using size_t variables in printf statements.  *
- *===========================================================================*/
-
-#ifndef FMT_SIZE_T
-#  if (defined( __GNUC__ ) || defined(_STDC_C99))&& !defined(__MINGW64__)
-#    define FMT_SIZE_T "z"
-#  elif defined (__WATCOMC__)
-#    define FMT_SIZE_T "l"
-#  elif defined (_WIN32 )
-#    define FMT_SIZE_T "I"
-#  else
-#    define FMT_SIZE_T "l"
-#  endif
-#endif
-
-#ifndef FMT_PTRDIFF_T
-#  if defined(__APPLE__)
-#    define FMT_PTRDIFF_T "l"
-#  elif defined( __GNUC__ ) || defined(_STDC_C99)
-#    define FMT_PTRDIFF_T "t"
-#  elif defined (__WATCOMC__)
-#    define FMT_PTRDIFF_T "l"
-#  elif defined (_WIN32 )
-#    define FMT_PTRDIFF_T "I"
-#  else
-#    define FMT_PTRDIFF_T "l"
-#  endif
-#endif
-
-/*===========================================================================*
- * General or logical data types where the word size is not guaranteed.      *
- *  real_T     - possible settings include real32_T or real64_T              *
- *  time_T     - possible settings include real32_T or real64_T              *
- *  boolean_T                                                                *
- *  char_T                                                                   *
- *  int_T                                                                    *
- *  uint_T                                                                   *
- *  byte_T                                                                   *
- *===========================================================================*/
-
-#ifndef NO_FLOATS
-
-#ifndef REAL_T
-# ifdef REAL64_T
-#  define REAL_T real64_T
-# else
-#  ifdef REAL32_T
-#   define REAL_T real32_T
-#  endif
-# endif
-#endif
-#ifdef REAL_T
- typedef REAL_T real_T;
-#endif
-
-#ifndef TIME_T
-# ifdef REAL_T
-#  define TIME_T real_T
-# endif
-#endif
-#ifdef TIME_T
- typedef TIME_T time_T;
-#endif
-
-#endif /* NO_FLOATS */
-
-#ifndef BOOLEAN_T
-# if defined(UINT8_T)
-#  define BOOLEAN_T UINT8_T
-# else
-#  define BOOLEAN_T unsigned int
-# endif
-#endif
-
-
-#ifndef CHARACTER_T
-# define CHARACTER_T char
-#endif
-typedef CHARACTER_T char_T;
-
-
-#ifndef INTEGER_T
-# define INTEGER_T int
-#endif
-typedef INTEGER_T int_T;
-
-
-#ifndef UINTEGER_T
-# define UINTEGER_T unsigned
-#endif
-typedef UINTEGER_T uint_T;
-
-
-#ifndef BYTE_T
-# define BYTE_T unsigned char
-#endif
-typedef BYTE_T byte_T;
-
-
-/*===========================================================================*
- * Define Complex Structures                                                 *
- *===========================================================================*/
-#ifndef NO_FLOATS
-
-#ifndef CREAL32_T
-#  ifdef REAL32_T
-    typedef struct {
-      real32_T re, im;
-    } creal32_T;
-#    define CREAL32_T creal32_T
-#  endif
-#endif
-
-#ifndef CREAL64_T
-#  ifdef REAL64_T
-    typedef struct {
-      real64_T re, im;
-    } creal64_T;
-#    define CREAL64_T creal64_T
-#  endif
-#endif
-
-#ifndef CREAL_T
-#  ifdef REAL_T
-    typedef struct {
-      real_T re, im;
-    } creal_T;
-#    define CREAL_T creal_T
-#  endif
-#endif
-
-#endif /* NO_FLOATS */
-
-#ifndef CINT8_T
-#  ifdef INT8_T
-    typedef struct {
-      int8_T re, im;
-    } cint8_T;
-#    define CINT8_T cint8_T
-#  endif
-#endif
-
-#ifndef CUINT8_T
-#  ifdef UINT8_T
-    typedef struct {
-      uint8_T re, im;
-    } cuint8_T;
-#    define CUINT8_T cuint8_T
-#  endif
-#endif
-
-#ifndef CINT16_T
-#  ifdef INT16_T
-    typedef struct {
-      int16_T re, im;
-    } cint16_T;
-#    define CINT16_T cint16_T
-#  endif
-#endif
-
-#ifndef CUINT16_T
-#  ifdef UINT16_T
-    typedef struct {
-      uint16_T re, im;
-    } cuint16_T;
-#    define CUINT16_T cuint16_T
-#  endif
-#endif
-
-#ifndef CINT32_T
-#  ifdef INT32_T
-    typedef struct {
-      int32_T re, im;
-    } cint32_T;
-#    define CINT32_T cint32_T
-#  endif
-#endif
-
-#ifndef CUINT32_T
-#  ifdef UINT32_T
-    typedef struct {
-      uint32_T re, im;
-    } cuint32_T;
-#    define CUINT32_T cuint32_T
-#  endif
-#endif
-
-#ifndef CINT64_T
-#  ifdef INT64_T
-    typedef struct {
-      int64_T re, im;
-    } cint64_T;
-#    define CINT64_T cint64_T
-#  endif
-#endif
-
-#ifndef CUINT64_T
-#  ifdef UINT64_T
-    typedef struct {
-      uint64_T re, im;
-    } cuint64_T;
-#    define CUINT64_T cuint64_T
-#  endif
-#endif
-
-/*=======================================================================*
- * Min and Max:                                                          *
- *   int8_T, int16_T, int32_T     - signed 8, 16, or 32 bit integers     *
- *   uint8_T, uint16_T, uint32_T  - unsigned 8, 16, or 32 bit integers   *
- *=======================================================================*/
-
-#define  MAX_int8_T      ((int8_T)(127))            /* 127  */
-#define  MIN_int8_T      ((int8_T)(-128))           /* -128 */
-#define  MAX_uint8_T     ((uint8_T)(255))           /* 255  */
-#define  MIN_uint8_T     ((uint8_T)(0))
-                           
-#define  MAX_int16_T     ((int16_T)(32767))         /* 32767 */
-#define  MIN_int16_T     ((int16_T)(-32768))        /* -32768 */
-#define  MAX_uint16_T    ((uint16_T)(65535))        /* 65535 */
-#define  MIN_uint16_T    ((uint16_T)(0))
-                           
-#define  MAX_int32_T     ((int32_T)(2147483647))    /* 2147483647  */
-#define  MIN_int32_T     ((int32_T)(-2147483647-1)) /* -2147483648 */
-#define  MAX_uint32_T    ((uint32_T)(0xFFFFFFFFU))  /* 4294967295  */
-#define  MIN_uint32_T    ((uint32_T)(0))
-
-#if defined(_MSC_VER) || (defined(__BORLANDC__) && __BORLANDC__ >= 0x530) \
-                      || (defined(__WATCOMC__)  && __WATCOMC__  >= 1100) \
-                      || defined(__LCC64__)
-#  ifdef INT64_T
-#    define  MAX_int64_T     ((int64_T)(9223372036854775807LL))
-#    define  MIN_int64_T     ((int64_T)(-9223372036854775807LL-1LL))
-#  endif
-#  ifdef UINT64_T
-#    define  MAX_uint64_T    ((uint64_T)(0xFFFFFFFFFFFFFFFFULL))
-#    define  MIN_uint64_T    ((uint64_T)(0))
-#  endif
-#else
-#  ifdef INT64_T
-#    ifdef INT_TYPE_64_IS_LONG
-#      define  MAX_int64_T     ((int64_T)(9223372036854775807L))
-#      define  MIN_int64_T     ((int64_T)(-9223372036854775807L-1L))
-#    else
-#      define  MAX_int64_T     ((int64_T)(9223372036854775807LL))
-#      define  MIN_int64_T     ((int64_T)(-9223372036854775807LL-1LL))
-#    endif
-#  endif
-#  ifdef UINT64_T
-#    ifdef INT_TYPE_64_IS_LONG
-#      define  MAX_uint64_T    ((uint64_T)(0xFFFFFFFFFFFFFFFFUL))
-#      define  MIN_uint64_T    ((uint64_T)(0))
-#    else
-#      define  MAX_uint64_T    ((uint64_T)(0xFFFFFFFFFFFFFFFFULL))
-#      define  MIN_uint64_T    ((uint64_T)(0))
-#    endif
-#  endif
-#endif
-
-#ifdef _MSC_VER
-/* Conversion from unsigned __int64 to double is not implemented in windows
- * and results in a compile error, thus the value must first be cast to
- * signed __int64, and then to double.
- *
- * If the 64 bit int value is greater than 2^63-1, which is the signed int64 max,
- * the macro below provides a workaround for casting a uint64 value to a double
- * in windows.
- */
-#  define uint64_to_double(u) ( ((u) > _I64_MAX) ? \
-            (double)(__int64)((u) - _I64_MAX - 1) + (double)_I64_MAX + 1: \
-            (double)(__int64)(u) )
-
-/* The following inline function should only be used in the macro double_to_uint64,
- * as it only handles the specfic range of double between 2^63 and 2^64-1 */
-__forceinline
-uint64_T double_to_uint64_helper(double d) {
-  union double_to_uint64_union_type {
-    double dd;
-    uint64_T i64;
-  } di;
-  di.dd = d;
-  return (((di.i64 & 0x000fffffffffffff) | 0x0010000000000000) << 11);
-}
-
-/* The largest double value that can be cast to uint64 in windows is the
- * signed int64 max, which is 2^63-1. The macro below provides
- * a workaround for casting large double values to uint64 in windows.
- */
-/* The magic number 18446744073709551616.0 is 2^64 */
-/* The magic number 9223372036854775808.0 is 2^63 */
-#  define double_to_uint64(d) ( ((d) >= 18446744073709551616.0) ? \
-            0xffffffffffffffffULL : \
-            ((d) >= 0.0) ? \
-            ((d) >= 9223372036854775808.0) ? \
-            double_to_uint64_helper(d) : \
-            (unsigned __int64)(d) : \
-            0ULL )
-#else
-#  define uint64_to_double(u) ((double)(u))
-#  if defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__TICCSC__)
-/* double_to_uint64 defined only for MSVC and UNIX */
-#  else
-#  define double_to_uint64(d) ( ((d) >= 18446744073709551616.0) ? \
-            (unsigned long long) 0xffffffffffffffffULL : \
-            ((d) >= 0) ? (unsigned long long)(d) : (unsigned long long) 0 )
-#  endif
-#endif
-
-#if !defined(__cplusplus) && !defined(__bool_true_false_are_defined)
-
-#ifndef _bool_T
-#define _bool_T
-
-typedef bool bool;
-
-#ifndef false
-#define false (0)
-#endif
-#ifndef true 
-#define true (1)
-#endif
-
-#endif /* _bool_T */
-
-#endif /* !__cplusplus */
-
-/* 
- * This software assumes that the code is being compiled on a target using a 
- * 2's complement representation for signed integer values.
- */
-#if ((SCHAR_MIN + 1) != -SCHAR_MAX)
-#error "This code must be compiled using a 2's complement representation for signed integer values"
-#endif
-
-/*
- * Maximum length of a MATLAB identifier (function/variable/model)
- * including the null-termination character.
- */
-#define TMW_NAME_LENGTH_MAX 64
-
-/*
- * Maximum values for indices and dimensions
- */
-#include <stddef.h>
-
-#ifdef MX_COMPAT_32
-typedef int mwSize;
-typedef int mwIndex;
-typedef int mwSignedIndex;
-#else
-typedef size_t    mwSize;         /* unsigned pointer-width integer */
-typedef size_t    mwIndex;        /* unsigned pointer-width integer */
-typedef ptrdiff_t mwSignedIndex;  /* a signed pointer-width integer */
-#endif
-
-                                  /* for the individual dim */
-#ifndef SLSIZE_SLINDEX
-#define SLSIZE_SLINDEX
-typedef int SLIndex;
-typedef int SLSize;
-#endif
-
-/* for the total size */
-#define SLIndexType size_t
-#define INVALID_SIZET_VALUE   (std::numeric_limits<SLIndexType>::max())
-#define MAX_VALID_SIZET_VALUE   (std::numeric_limits<SLIndexType>::max() -1)
-
-
-#if (defined(_LP64) || defined(_WIN64)) && !defined(MX_COMPAT_32)
-/* Currently 2^48 based on hardware limitations */
-# define MWSIZE_MAX    281474976710655UL
-# define MWINDEX_MAX   281474976710655UL
-# define MWSINDEX_MAX  281474976710655L
-# define MWSINDEX_MIN -281474976710655L
-#else
-# define MWSIZE_MAX    2147483647UL
-# define MWINDEX_MAX   2147483647UL
-# define MWSINDEX_MAX  2147483647L
-# define MWSINDEX_MIN -2147483647L
-#endif
-#define MWSIZE_MIN    0UL
-#define MWINDEX_MIN   0UL
-
-/** UTF-16 character type */
-
-#if (defined(__cplusplus) && (__cplusplus >= 201103L)) || (defined(_HAS_CHAR16_T_LANGUAGE_SUPPORT) && _HAS_CHAR16_T_LANGUAGE_SUPPORT)
-typedef char16_t CHAR16_T;
-#define U16_STRING_LITERAL_PREFIX u
-#elif defined(_MSC_VER)
-typedef wchar_t CHAR16_T;
-#define U16_STRING_LITERAL_PREFIX L
-#else
-typedef UINT16_T CHAR16_T;
-#endif
-
-#endif  /* __TMWTYPES__ */
-
-#endif /* tmwtypes_h */

+ 16 - 0
card_base.cpp

@@ -135,6 +135,21 @@ void card_location_base::make_his_location(uint64_t t,const point & pt,bool bclo
 }
 
 //坐标点输入业务入口
+/*
+定位的逻辑处理
+车辆和人员都是走这个接口,然后分别进行处理。
+输入:
+vp 定位结果(硬件的原始位置数据)
+lm 定位消息缓存区,用于tof,pdoa 
+is_v_map 是否为车辆地图
+输出:
+point	m_v_point;			//车辆定位系统的定位结果
+定位结果相关的一些成员变量如:x、y
+姿态:m_stat
+人员定位结果(包含人员地图定位结果(x、y)和车辆地图定位结果m_v_point)发给WEB的server
+车辆将定位结果(车辆地图定位结果)和姿态发送给WEB的server
+Added by zengminguo
+*/
 void card_location_base::on_location(const std::vector<point>&vp, const std::vector<loc_message> &lm, bool is_v_map)
 {
 	m_isVehicleMap = false;
@@ -206,6 +221,7 @@ void card_location_base::on_location(const std::vector<point>&vp, const std::vec
 		log_info("[help-battery] card_id=%d, battery=%d, val=%d", m_id, m_battery_value, val);
 		do_status(val);
 
+		// 姿态判断
 		if (is_vehicle())
 		{
 			if (m_stat_last == ENUM_STATUS_BACK)

+ 2 - 2
card_base.h

@@ -6,8 +6,8 @@
 #include "point.h"
 #include "common.h"
 #include <boost/circular_buffer.hpp>
-#include "MovAvgFilter/CMovAvgFilter.h"
-#include "GaussianFilter/CGaussianFilter.h"
+#include "../algo/MovAvgFilter/CMovAvgFilter.h"
+#include "../algo/GaussianFilter/CGaussianFilter.h"
 
 struct task;
 template<typename T> struct zloop;

+ 4 - 0
websocket/wsTimerThread.cpp

@@ -87,6 +87,10 @@ namespace sys
 		    return;
         __CardPosList.copy( CardPosList );
      
+		// 发送卡的坐标等信息给WEB。人的数据和车的数据是合在一起的
+		// 分为两块数据,一块是车辆地图的数据,一块是人员地图的数据,合在一起发给web端,用不同
+		// 的字段进行区分。
+		// Added by zengminguo 20220424
         std::string jsCardPos = __jsBuilder.BuildCardPos(CardPosList);
 
         if(jsCardPos == ""){