GithubHelp home page GithubHelp logo

Comments (9)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
I agree. :-)

I think the first step is to switch the code to use the new sensor API instead 
of using the raw sensor values. We should be able to get the roll, pitch, and 
yaw directly from the API. Then using the gyro should be much easier.

The filtering is a whole other issue. :-) We did a lot of experiments back in 
the day and tried multiple filters. The filter we are currently using was the 
best at the time, but I think its a bit too jittery on modern devices. I'm 
pretty sure that I can dig up the other filtering code to try again. It was way 
less jittery, but a lot slower. The right answer might be to add a setting 
somewhere where the user can adjust the sensitivity. I don't want to overwhelm 
the users, though.

Original comment by [email protected] on 24 Jan 2012 at 12:34

from stardroid.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
There are kalman filters for Gyro+Accelerometer+Magnetometer as far as I know 
but..   somebody rather knowledgeable would be needed to get on board for this.

Memsense Kalman Filter (no source though)
http://www.memsense.com/index.php/Product-Pages/kalman-filter-library.html

Original comment by [email protected] on 24 Jan 2012 at 1:30

from stardroid.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
ICS already implements a Kalman Filter if an Gyro-Sensor is available. At least 
on the Nexus S. Just use Sensor.TYPE_ROTATION_VECTOR.

Original comment by [email protected] on 23 May 2012 at 4:02

from stardroid.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
Hey all, I'm learning android development and decided it would be fun to try to 
hack in gyroscope support to SkyMap. I decided to ultimately use the 
ROTATION_VECTOR sensor, which should implement a fused 
accelerometer/magnetometer/gyroscope on ICS and later (though I think it might 
be manufacturer-specific). Testing it on my samsung jellybean phone it works 
really well though, with a fast, smooth response.

There's a new option in preferences to switch between it and the original 
sensor, and it should fall back to the original sensors when ROTATION_VECTOR is 
not available (pre-gingerbread).

Patch is attached. You can download the debug-signed apk at 
http://nullidea.org/Stardroid-debug.apk (you'll have to uninstall the old 
SkyMap first) -- enjoy!

Original comment by [email protected] on 6 May 2013 at 1:13

Attachments:

from stardroid.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
Ugh... except in my apk, all the stars and constellations are mislabeled. Is 
there something wrong with the published code?

Original comment by [email protected] on 6 May 2013 at 6:54

from stardroid.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
Oh lol apparently the star database uses hard-coded offsets into the string 
resource or something. So when I added a new string it offset everything by 
one. Here's a new patch that puts the new string at the end so you don't have 
to re-compile the star binary files (which I haven't really figured out how to 
do). I also uploaded the fixed apk to the URL above.

Original comment by [email protected] on 6 May 2013 at 7:19

Attachments:

from stardroid.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
Tested the patch on an older Huawei phone (2.3.X), after some testing it seems 
to marginally improve things. Much more important though is to set sensor speed 
to fast.

On a moto-g the "fused" option is unavailable.

Original comment by [email protected] on 12 Jan 2014 at 11:40

from stardroid.

barbeau avatar barbeau commented on June 28, 2024

FWIW, here's what I consider to be a fairly solid implementation of the ROTATION_VECTOR sensor licensed under Apache 2.0 - full disclosure, I implemented it.

The onSensorChanged() method:
https://github.com/barbeau/gpstest/blob/master/GPSTest/src/main/java/com/android/gpstest/GpsTestActivity.java#L561

Here's the initial setup in onResume():
https://github.com/barbeau/gpstest/blob/master/GPSTest/src/main/java/com/android/gpstest/GpsTestActivity.java#L229

...and teardown in onPause():
https://github.com/barbeau/gpstest/blob/master/GPSTest/src/main/java/com/android/gpstest/GpsTestActivity.java#L264

It supports:

  • Back to API level 8 (Froyo) - uses Sensor.TYPE_ORIENTATION on devices that don't support Sensor.TYPE_ROTATION_VECTOR
  • Orientation changes - remaps the coordinate system accordingly
  • Correction for magnetic north
  • A workaround for a Samsung-specific bug that causes a crash on certain Samsung devices (see barbeau/gpstest#39 for details)

from stardroid.

jaydeetay avatar jaydeetay commented on June 28, 2024

Implemented in the latest version (1.9.0b).

from stardroid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.