Closed GoogleCodeExporter closed 8 years ago
It seems much faster at rendering on my phone. I am doing some additional
filtering to smooth the compass data, you can turn that off and see if it helps.
In the class LowPassFilter there is an ALPHA variable. If you make that value
closer to 1 it should do less smoothing.
You could also trying not using the smoothing at all, in class SensorsActivity:
Change:
if (evt.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {
smooth = LowPassFilter.filter(evt.values, grav);
grav[0] = smooth[0];
grav[1] = smooth[1];
grav[2] = smooth[2];
} else if (evt.sensor.getType() == Sensor.TYPE_MAGNETIC_FIELD) {
smooth = LowPassFilter.filter(evt.values, mag);
mag[0] = smooth[0];
mag[1] = smooth[1];
mag[2] = smooth[2];
}
To:
if (evt.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {
//smooth = LowPassFilter.filter(evt.values, grav);
grav[0] = evt[0];
grav[1] = evt[1];
grav[2] = evt[2];
} else if (evt.sensor.getType() == Sensor.TYPE_MAGNETIC_FIELD) {
//smooth = LowPassFilter.filter(evt.values, mag);
mag[0] = evt[0];
mag[1] = evt[1];
mag[2] = evt[2];
}
Original comment by phishman3579@gmail.com
on 17 Jan 2012 at 11:18
Original comment by phishman3579@gmail.com
on 17 Jan 2012 at 11:19
You can also try disabling collision detection:
In class AugmentedReality, set the variable useCollisionDetection to false.
Original comment by phishman3579@gmail.com
on 17 Jan 2012 at 11:26
They didn't work quite but changing this line
sensorMgr.registerListener(this, sensorGrav, SensorManager.SENSOR_DELAY_NORMAL);
sensorMgr.registerListener(this, sensorMag, SensorManager.SENSOR_DELAY_NORMAL);
to
sensorMgr.registerListener(this, sensorGrav, SensorManager.SENSOR_DELAY_UI);
sensorMgr.registerListener(this, sensorMag, SensorManager.SENSOR_DELAY_UI);
worked.
Thanks for this project by the way, its really cool.
Original comment by Cagkan0C...@gmail.com
on 21 Jan 2012 at 7:32
Yea, That's another good option to speed things up. I am guessing I don't see
the same problems because my processor is a bit quicker.
Original comment by phishman3579@gmail.com
on 21 Jan 2012 at 9:10
Original issue reported on code.google.com by
Cagkan0C...@gmail.com
on 16 Jan 2012 at 11:39