Comments (9)
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.
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.
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.
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.
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.
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.
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.
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 supportSensor.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.
Implemented in the latest version (1.9.0b).
from stardroid.
Related Issues (20)
- K2 comet
- 1.10.1-RC1 displays labels upside-down on screen
- Flickering calibration screen
- Smoothing when gyro is enabled
- ui交互界面什么时候能更新啊
- App DPI too high HOT 1
- Feature: Iss tracking.
- Comet C/2022 E3 ZTF HOT 2
- [suggestion] Fixing version name
- Is this project still maintianed? HOT 3
- Material You 3
- Add camera underlay.
- Add Comet Nishimura & Extra Question HOT 3
- Thank you!
- Feature: Setting to remove stars/planets that are not visible to the naked eye
- Sky map 1.10.1 rc1 unable to decode your location perhaps your network isn't available HOT 1
- Please put font size in settings. HOT 2
- F-droid appears to have missed the latest update HOT 6
- Sky Map isn't responding: Close app, Wait HOT 4
- Upcoming recurrent nova of T Corona Borealus - please add star to map
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stardroid.