/*
 * File: SocParameter.c
 *
 * Code generated for Simulink model 'BSER_BattSocCalc'.
 *
 * Model version                  : 'M1.5.6'
 * Simulink Coder version         : 8.13 (R2017b) 24-Jul-2017
 * C/C++ source code generated on : Mon Aug 16 10:09:47 2021
 *
 * Target selection: ert.tlc
 * Embedded hardware selection: Infineon->TriCore
 * Code generation objectives:
 *    1. MISRA C:2012 guidelines
 *    2. Execution efficiency
 * Validation result: Not run
 */

#include "rtwtypes.h"
#include "BSER_BattSocCalc_types.h"

/* Exported data definition */
#define ASW1_OEM_START_SEC_DEFAULT_CALIB_UNSPECIFIED
#include "Asw1_OEM_MemMap.h"

/* Definition for custom storage class: Const */
const volatile boolean_T BCMR_bChrgFulVldFlg_C = 1;
const volatile real32_T BESR_iOcvRevThres_C = 0.1F;
const volatile real32_T BESR_numSocSaveFlgStep_C = 75.0F;
const volatile real32_T BESR_numSocSaveStep_C = 3.0F;
const volatile real32_T BSER_LowSocCorCurrThres1_C = 10.0F;
const volatile real32_T BSER_LowSocCorLowCellVoltThres1_C = 1.5F;
const volatile real32_T BSER_LowSocCorMinSOC1_C = 0.0F;
const volatile real32_T BSER_PackSocCorMaxSOC_C = 90.0F;
const volatile real32_T BSER_PackSocCorMinSOC_C = 10.0F;
const volatile real32_T BSER_RealSocZeroTemp_C = -50.0F;
const volatile uint32_T BSER_SOCOdoTableOdo_C[10] = { 0U, 1U, 12U, 15U, 20U, 25U,
  30U, 35U, 40U, 45U } ;

const volatile real32_T BSER_SOCOdoTableSOC_C[10] = { 97.0F, 97.0F, 97.0F, 97.0F,
  97.0F, 97.0F, 97.0F, 97.0F, 97.0F, 97.0F } ;

const volatile real32_T BSER_SocCorMinValue_C = 1.1F;
const volatile real32_T BSER_ahBattCap_C = 154.0F;
const volatile boolean_T BSER_bBattCapVldFlg_C = 1;
const volatile boolean_T BSER_bSocResetCmd_C = 0;
const volatile real32_T BSER_cSocAhFulHldThres_C = 1.0F;
const volatile real32_T BSER_cntSocBmsStsDel_C = 1500.0F;
const volatile uint8_T BSER_cntSocStbNum_C = 5U;
const volatile real32_T BSER_facColmB_C = 1.0F;
const volatile real32_T BSER_iRunIniCurrThres_C = 2.0F;
const volatile real32_T BSER_iSocCurrEff_C = 0.1F;
const volatile real32_T BSER_iSocHoldCurrThres_C = 0.1F;
const volatile uint32_T BSER_numRunCorrHit_C = 90000U;
const volatile real32_T BSER_numSocCorHighCellVoltThres_C = 4.5F;
const volatile real32_T BSER_numSocCorLowCellVoltThres_C = 2.0F;
const volatile real32_T BSER_rChgDsplSocFast_C = 2.0F;
const volatile real32_T BSER_rChgDsplSocSlow_C = 0.5F;
const volatile real32_T BSER_rDisChDsplSocFast_C = 2.0F;
const volatile real32_T BSER_rDisChDsplSocSlow_C = 0.5F;
const volatile real32_T BSER_rDsplSocDiffAllowThres_C = 0.5F;
const volatile real32_T BSER_rDsplSocFilter_C = 0.01F;
const volatile real32_T BSER_rDsplSocNrm_C = 1.031F;
const volatile real32_T BSER_rDsplSocRSoc_A[17] = { 0.0F, 5.0F, 10.0F, 11.0F,
  14.0F, 16.0F, 20.0F, 23.0F, 30.0F, 40.0F, 50.0F, 60.0F, 70.0F, 80.0F, 90.0F,
  97.0F, 100.0F } ;

const volatile real32_T BSER_rDsplSocRSoc_MAP[119] = { 0.0F, 0.0F, 0.0F, 0.0F,
  0.0F, 0.0F, 1.3823427F, 5.22458887F, 14.1898308F, 26.9973183F, 39.8048058F,
  52.6122932F, 65.4197845F, 78.227272F, 91.0347595F, 100.0F, 100.0F, 0.0F, 0.0F,
  0.0F, 0.0F, 0.0F, 1.35873437F, 6.22990799F, 9.88328838F, 18.4078426F,
  30.5857754F, 42.76371F, 54.9416428F, 67.1195755F, 79.2975159F, 91.4754486F,
  100.0F, 100.0F, 0.0F, 0.0F, 0.0F, 1.04589045F, 4.49777794F, 6.7990365F,
  11.4015532F, 14.8534403F, 22.9078445F, 34.414135F, 45.9204292F, 57.4267197F,
  68.9330139F, 80.4393F, 91.9455948F, 100.0F, 100.0F, 0.0F, 0.0F, 2.58168793F,
  3.70143867F, 7.06069088F, 9.30019188F, 13.7791948F, 17.1384468F, 24.9767017F,
  36.1742096F, 47.3717155F, 58.5692253F, 69.7667313F, 80.964241F, 92.1617432F,
  100.0F, 100.0F, 0.0F, 0.0F, 5.90427685F, 6.98583698F, 10.2305174F, 12.3936377F,
  16.7198772F, 19.9645576F, 27.5354786F, 38.351078F, 49.1666794F, 59.9822769F,
  70.7978821F, 81.6134796F, 92.4290771F, 100.0F, 100.0F, 0.0F, 5.15463924F,
  10.3092785F, 11.3402061F, 14.4329901F, 16.4948444F, 20.618557F, 23.71134F,
  30.9278355F, 41.237114F, 51.5463905F, 61.8556709F, 72.1649475F, 82.4742279F,
  92.7835083F, 100.0F, 100.0F, 0.0F, 5.15463924F, 10.3092785F, 11.3402061F,
  14.4329901F, 16.4948444F, 20.618557F, 23.71134F, 30.9278355F, 41.237114F,
  51.5463905F, 61.8556709F, 72.1649475F, 82.4742279F, 92.7835083F, 100.0F,
  100.0F } ;  /* dspl_SOC mapping with real_SOC */

const volatile real32_T BSER_rInitDSocDiffThres_C = 20.0F;
const volatile real32_T BSER_rInitRSocDiffThres_C = 8.0F;
const volatile real32_T BSER_rRSocLowLimit_C = 0.0F;
const volatile real32_T BSER_rSocOCV_MAP[112] = { 0.0F, 0.03F, 0.05F, 0.1F,
  0.15F, 0.2F, 0.3F, 0.4F, 0.5F, 0.6F, 0.7F, 0.8F, 0.9F, 0.95F, 0.97F, 1.0F,
  0.0F, 0.03F, 0.05F, 0.1F, 0.15F, 0.2F, 0.3F, 0.4F, 0.5F, 0.6F, 0.7F, 0.8F,
  0.9F, 0.95F, 0.97F, 1.0F, 0.0F, 0.03F, 0.05F, 0.1F, 0.15F, 0.2F, 0.3F, 0.4F,
  0.5F, 0.6F, 0.7F, 0.8F, 0.9F, 0.95F, 0.97F, 1.0F, 0.0F, 0.03F, 0.05F, 0.1F,
  0.15F, 0.2F, 0.3F, 0.4F, 0.5F, 0.6F, 0.7F, 0.8F, 0.9F, 0.95F, 0.97F, 1.0F,
  0.0F, 0.03F, 0.05F, 0.1F, 0.15F, 0.2F, 0.3F, 0.4F, 0.5F, 0.6F, 0.7F, 0.8F,
  0.9F, 0.95F, 0.97F, 1.0F, 0.0F, 0.03F, 0.05F, 0.1F, 0.15F, 0.2F, 0.3F, 0.4F,
  0.5F, 0.6F, 0.7F, 0.8F, 0.9F, 0.95F, 0.97F, 1.0F, 0.0F, 0.03F, 0.05F, 0.1F,
  0.15F, 0.2F, 0.3F, 0.4F, 0.5F, 0.6F, 0.7F, 0.8F, 0.9F, 0.95F, 0.97F, 1.0F } ;/* soc mapping with OCV & temprature */

const volatile real32_T BSER_tBattDsplSocTemp_A[7] = { -30.0F, -20.0F, -10.0F,
  0.0F, 10.0F, 25.0F, 45.0F } ;

const volatile real32_T BSER_tSocOCVTemp_A[7] = { -30.0F, -20.0F, -10.0F, 0.0F,
  10.0F, 25.0F, 45.0F } ;

const volatile real32_T BSER_tiDsplSocStoptimeThres_C = 10080.0F;
const volatile real32_T BSER_tiFullChgtFusf_C = 0.1F;
const volatile real32_T BSER_tiInputFualtFusf_C = 0.2F;
const volatile real32_T BSER_tiLowSOCCor1_C = 6.0F;
const volatile real32_T BSER_tiSocRunT_C = 20.0F;
const volatile real32_T BSER_tiSocStep_C = 0.02F;
const volatile real32_T BSER_tiStoptimeThres_C = 30.0F;
const volatile real32_T BSER_uMinCellVoltTemp[10] = { -30.0F, -20.0F, -10.0F,
  0.0F, 10.0F, 20.0F, 30.0F, 40.0F, 50.0F, 60.0F } ;

const volatile real32_T BSER_uSOCOneVolt_MAP[10] = { 3.3F, 3.3F, 3.3F, 3.3F,
  3.3F, 3.3F, 3.3F, 3.3F, 3.3F, 3.3F } ;

const volatile real32_T BSER_uSOCZeorVolt_MAP[10] = { 2.9F, 2.9F, 3.0F, 3.0F,
  3.1F, 3.2F, 3.2F, 3.2F, 3.2F, 3.2F } ;

const volatile real32_T BSER_uSocOCV_A[16] = { 3.344F, 3.354F, 3.461F, 3.503F,
  3.553F, 3.59F, 3.626F, 3.655F, 3.7F, 3.797F, 3.895F, 4.003F, 4.126F, 4.192F,
  4.224F, 4.273F } ;  /* SOV-OCV mapping with OCV points */

const volatile boolean_T BSPR_bCellVoltVldFlg_C = 1;
const volatile boolean_T BSPR_bCurrVldFlg_C = 1;
const volatile boolean_T DSMR_bFaultRankVldFlg_C = 1;

#define ASW1_OEM_STOP_SEC_DEFAULT_CALIB_UNSPECIFIED
#include "Asw1_OEM_MemMap.h"

/*
 * File trailer for generated code.
 *
 * [EOF]
 */
