Use kalman filter

This commit is contained in:
Victor Shcherb 2013-04-22 01:26:36 +02:00
parent 2b00a4314b
commit f546316b32

View file

@ -60,13 +60,13 @@ public class OsmAndLocationProvider implements SensorEventListener {
private final boolean USE_KALMAN_FILTER = false;
private final float KALMAN_COEFFICIENT = 0.02f;
private final boolean USE_KALMAN_FILTER = true;
private final float KALMAN_COEFFICIENT = 0.015f;
float avgValSin = 0;
float avgValCos = 0;
private float[] previousCompassValuesA = new float[40];
private float[] previousCompassValuesB = new float[40];
private float[] previousCompassValuesA = new float[65];
private float[] previousCompassValuesB = new float[65];
private int previousCompassIndA = 0;
private int previousCompassIndB = 0;