first commit
This commit is contained in:
31
cm_heatsink_emulator.c
Normal file
31
cm_heatsink_emulator.c
Normal file
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* cm_heatsink_emulator.c
|
||||
*
|
||||
* Created on: 14 Oct 2025
|
||||
* Author: Christian L. V. Madsen (OZ1CM)
|
||||
*/
|
||||
#include "cm_heatsink_emulator.h"
|
||||
#include "math.h"
|
||||
|
||||
#define EULER_NUM 2.7182818284590452353602
|
||||
|
||||
static float deltaTempElement(cm_heatsink_thermalElement_t *element, float temperature, float power){
|
||||
|
||||
return temperature + (power * element->thermal_resistance);
|
||||
|
||||
}
|
||||
|
||||
float cm_heatsinkEmul_getRespon(cm_heatsinkEmul_t *inst, float dt){
|
||||
|
||||
float t = 0.0;
|
||||
|
||||
for(int i = inst->thermalElements_len; i > 0; i--){
|
||||
|
||||
|
||||
}
|
||||
|
||||
inst->heatsinkTemperature = inst->heatsinkTemperature + (1.0 / inst->thermal_capacity) * (pj5_ThermEmul_Heatsink_RespVal(inst) - inst->heatsinkTemperature) * dt;
|
||||
|
||||
return v_prev;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user