16 lines
411 B
C
16 lines
411 B
C
#ifndef INC_SOC_ESTIMATION_H
|
|
#define INC_SOC_ESTIMATION_H
|
|
|
|
#include <stdint.h>
|
|
|
|
#define SOCE_SHUNT_CURRENT_OFF_THRESH 20 /* mA */
|
|
#define CELL_VOLTAGE_CONVERSION_FACTOR (5.0f / 65535) /* V/quantum */
|
|
#define BATTERY_CAPACITY (N_CELLS_PARALLEL * 2.5f * 3600) /* As */
|
|
|
|
extern uint8_t current_soc;
|
|
|
|
void estimate_soc();
|
|
float calculate_soc_for_ocv(float ocv);
|
|
|
|
#endif // INC_SOC_ESTIMATION_H
|