Use kalman filter
This commit is contained in:
parent
2b00a4314b
commit
f546316b32
1 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue