47 lines
1.0 KiB
C++
47 lines
1.0 KiB
C++
#include "PressureCalculator.h"
|
|
#include <string>
|
|
|
|
void PressureCalculator::update() {
|
|
double c2 = average.getAverage() * cachedConstante2;
|
|
double c1 = cachedConstante1 * (cachedTemperature - cachedSP - c2);
|
|
double uncapedPressure = cachedMinimalPressure + c1;
|
|
|
|
if (c2 != 0) {
|
|
}
|
|
}
|
|
|
|
void PressureCalculator::updateSP(float value) {
|
|
cachedSP = value;
|
|
update();
|
|
}
|
|
|
|
void PressureCalculator::updateTemperature(float value) {
|
|
cachedTemperature = value;
|
|
update();
|
|
}
|
|
|
|
void PressureCalculator::updatePower(float value) {
|
|
cachedPower = value;
|
|
update();
|
|
}
|
|
|
|
void PressureCalculator::updateMinimalPressure(float value) {
|
|
cachedMinimalPressure = value;
|
|
update();
|
|
}
|
|
|
|
void PressureCalculator::updateMaximalPressure(float value) {
|
|
cachedMaximalPressure = value;
|
|
update();
|
|
}
|
|
|
|
void PressureCalculator::updateConstante1(float value) {
|
|
cachedConstante1 = value;
|
|
update();
|
|
}
|
|
|
|
void PressureCalculator::updateConstante2(float value) {
|
|
cachedConstante2 = value;
|
|
update();
|
|
}
|