auto-sync
This commit is contained in:
parent
847c5dddee
commit
f634de6231
|
@ -2,6 +2,19 @@
|
||||||
* @file accel_enrichment.cpp
|
* @file accel_enrichment.cpp
|
||||||
* @brief Acceleration enrichment calculator
|
* @brief Acceleration enrichment calculator
|
||||||
*
|
*
|
||||||
|
* In this file we have three strategies for acceleration/deceleration fuel correction
|
||||||
|
*
|
||||||
|
* 1) MAP rate-of-change correction
|
||||||
|
* 2) TPS rate-of-change correction
|
||||||
|
* 3) fuel film/wal wetting correction
|
||||||
|
* AWC Added to Wall Coefficient, %
|
||||||
|
* AWA Added to Wall Amount
|
||||||
|
* SOC Sucked Off wall Coefficient, %
|
||||||
|
* SOA Sucked Off wall amount
|
||||||
|
* WF current on-Wall Fuel amount
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* http://rusefi.com/wiki/index.php?title=Manual:Software:Fuel_Control
|
||||||
* @date Apr 21, 2014
|
* @date Apr 21, 2014
|
||||||
* @author Dmitry Sidin
|
* @author Dmitry Sidin
|
||||||
* @author Andrey Belomutskiy, (c) 2012-2015
|
* @author Andrey Belomutskiy, (c) 2012-2015
|
||||||
|
@ -19,6 +32,23 @@ EXTERN_ENGINE
|
||||||
|
|
||||||
static Logging *logger;
|
static Logging *logger;
|
||||||
|
|
||||||
|
WallFuel::WallFuel() {
|
||||||
|
wallFuel = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
floatms_t WallFuel::adjust(floatms_t target DECLARE_ENGINE_PARAMETER_S) {
|
||||||
|
float suckedOffCoef = 0;
|
||||||
|
float addedToWallCoef = 0;
|
||||||
|
|
||||||
|
floatms_t suckedOffWallsAmount = wallFuel * suckedOffCoef;
|
||||||
|
|
||||||
|
floatms_t result = (target - suckedOffWallsAmount) / (1 - addedToWallCoef);
|
||||||
|
|
||||||
|
float addedToWallsAmount = result * addedToWallCoef;
|
||||||
|
wallFuel = wallFuel + addedToWallsAmount - suckedOffWallsAmount;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
float AccelEnrichmemnt::getDelta() {
|
float AccelEnrichmemnt::getDelta() {
|
||||||
return cb.maxValue(cb.getSize());
|
return cb.maxValue(cb.getSize());
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,8 +13,9 @@
|
||||||
#include "engine_configuration.h"
|
#include "engine_configuration.h"
|
||||||
#include "cyclic_buffer.h"
|
#include "cyclic_buffer.h"
|
||||||
|
|
||||||
//#define MAX_ACCEL_ARRAY_SIZE 64
|
/**
|
||||||
|
* this object is used for MAP rate-of-change and TPS rate-of-change corrections
|
||||||
|
*/
|
||||||
class AccelEnrichmemnt {
|
class AccelEnrichmemnt {
|
||||||
public:
|
public:
|
||||||
AccelEnrichmemnt();
|
AccelEnrichmemnt();
|
||||||
|
@ -33,6 +34,17 @@ private:
|
||||||
void onNewValue(float currentValue DECLARE_ENGINE_PARAMETER_S);
|
void onNewValue(float currentValue DECLARE_ENGINE_PARAMETER_S);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class WallFuel {
|
||||||
|
WallFuel();
|
||||||
|
floatms_t adjust(floatms_t target DECLARE_ENGINE_PARAMETER_S);
|
||||||
|
|
||||||
|
private:
|
||||||
|
/**
|
||||||
|
* Amount of fuel on the wall, in injector open time scale
|
||||||
|
*/
|
||||||
|
floatms_t wallFuel;
|
||||||
|
};
|
||||||
|
|
||||||
void initAccelEnrichment(Logging *sharedLogger);
|
void initAccelEnrichment(Logging *sharedLogger);
|
||||||
float getAccelEnrichment(void);
|
float getAccelEnrichment(void);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue