CTS-SAT-1-OBC-Firmware
Loading...
Searching...
No Matches
eps_calculations.h File Reference
#include "eps_drivers/eps_types.h"
#include <stdint.h>
Include dependency graph for eps_calculations.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

float EPS_convert_battery_voltage_to_percent (EPS_battery_pack_datatype_eng_t battery)
 Calculate the current EPS battery voltage from a PBU telemetry struct.
 
int32_t EPS_calculate_total_fault_count (EPS_struct_pdu_overcurrent_fault_state_t *fault_state)
 Sum the total fault count for all channels.
 

Function Documentation

◆ EPS_calculate_total_fault_count()

int32_t EPS_calculate_total_fault_count ( EPS_struct_pdu_overcurrent_fault_state_t * fault_state)

Sum the total fault count for all channels.

Parameters
fault_stateA pointer to the fault state struct.
Returns
The summed fault count for all channels.
Here is the caller graph for this function:

◆ EPS_convert_battery_voltage_to_percent()

float EPS_convert_battery_voltage_to_percent ( EPS_battery_pack_datatype_eng_t battery)

Calculate the current EPS battery voltage from a PBU telemetry struct.

Parameters
batteryTelemetry struct
Returns
Battery percentage, as a float. Nominally, the battery percentage is between 0 and 100. However, the battery percentage can exceed 100% if the battery voltage is above the maximum voltage, and can be less than 0% if the battery voltage is below the minimum voltage.
Here is the caller graph for this function: