auto-sync
This commit is contained in:
parent
77a85e8166
commit
4f54f21725
|
@ -156,10 +156,10 @@ public enum FuelAutoTune implements FuelAutoLogic {
|
|||
// if (isLogEnabled())
|
||||
// log("r=" + r + "/c=" + c + ": tmp=" + tmp);
|
||||
|
||||
kgbcSQ[dataPoint.PRESS_RT_32()][dataPoint.RPM_RT_32()] += tmp * tmp;
|
||||
// kgbcSQ[dataPoint.PRESS_RT_32()][dataPoint.RPM_RT_32()] += tmp * tmp; todo: what is this deviation called?
|
||||
kgbcSQ[dataPoint.PRESS_RT_32()][dataPoint.RPM_RT_32()] += Math.abs(tmp); // todo: what is this deviation called?
|
||||
}
|
||||
}
|
||||
|
||||
private static double smooth(double kgbcSQsum, double ksq, double ke, double kg, float[][] kgbcRES) {
|
||||
double e;
|
||||
double g;
|
||||
|
|
|
@ -21,8 +21,9 @@ public class FuelAutoTune2Test {
|
|||
dataPoints.add(stDataOnline.valueOf(13, 1200, 80));
|
||||
|
||||
{
|
||||
System.out.println("Running with one datapoint");
|
||||
Result r = FuelAutoTune2.INSTANCE.process(false, dataPoints, 0.1, 13, createVeTable());
|
||||
printNotDefault(r.getKgbcRES(), 1);
|
||||
FuelAutoTuneTest.printNotDefault(r.getKgbcRES(), 1);
|
||||
}
|
||||
|
||||
dataPoints.add(stDataOnline.valueOf(13, 1200, 80));
|
||||
|
@ -34,16 +35,18 @@ public class FuelAutoTune2Test {
|
|||
dataPoints.add(stDataOnline.valueOf(16, 1500 + i, 90));
|
||||
|
||||
{
|
||||
System.out.println("Running with more datapoints");
|
||||
Result r = FuelAutoTune2.INSTANCE.process(false, dataPoints, 0.01, 13, createVeTable());
|
||||
printNotDefault(r.getKgbcRES(), 1);
|
||||
FuelAutoTuneTest.printNotDefault(r.getKgbcRES(), 1);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 2000; i++)
|
||||
dataPoints.add(stDataOnline.valueOf(15, 1500 + i, 90));
|
||||
|
||||
{
|
||||
System.out.println("Running with more datapoints");
|
||||
Result r = FuelAutoTune2.INSTANCE.process(false, dataPoints, 0.01, 13, createVeTable());
|
||||
printNotDefault(r.getKgbcRES(), 1);
|
||||
FuelAutoTuneTest.printNotDefault(r.getKgbcRES(), 1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -51,22 +54,6 @@ public class FuelAutoTune2Test {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* this method prints all values which do not equal default value
|
||||
*/
|
||||
private static void printNotDefault(float[][] array, double defaultValue) {
|
||||
for (int i = 0; i < array.length; i++) {
|
||||
printNotDefault(array[i], i, defaultValue);
|
||||
}
|
||||
}
|
||||
|
||||
private static void printNotDefault(float[] array, int index, double defaultValue) {
|
||||
for (int i = 0; i < array.length; i++) {
|
||||
if (array[i] != defaultValue)
|
||||
System.out.println("Found value: " + index + " " + i + ": " + array[i]);
|
||||
}
|
||||
}
|
||||
|
||||
private static float[][] createVeTable() {
|
||||
float kgbcINIT[][] = new float[Fields.FUEL_LOAD_COUNT][Fields.FUEL_RPM_COUNT];
|
||||
for (int engineLoadIndex = 0; engineLoadIndex < Fields.FUEL_LOAD_COUNT; engineLoadIndex++) {
|
||||
|
|
|
@ -54,7 +54,7 @@ public class FuelAutoTuneTest {
|
|||
/**
|
||||
* this method prints all values which do not equal default value
|
||||
*/
|
||||
private static void printNotDefault(float[][] array, double defaultValue) {
|
||||
static void printNotDefault(float[][] array, double defaultValue) {
|
||||
for (int i = 0; i < array.length; i++) {
|
||||
printNotDefault(array[i], i, defaultValue);
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ public class FuelAutoTuneTest {
|
|||
private static void printNotDefault(float[] array, int index, double defaultValue) {
|
||||
for (int i = 0; i < array.length; i++) {
|
||||
if (array[i] != defaultValue)
|
||||
System.out.println("Found value: " + index + " " + i + ": " + array[i]);
|
||||
System.out.println("Found value: x=" + index + " y=" + i + ": " + array[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue