kalebke / gyroscopeexplorer Goto Github PK
View Code? Open in Web Editor NEWAndroid application example of implementing a gyroscope.
License: Apache License 2.0
Android application example of implementing a gyroscope.
License: Apache License 2.0
Would you be open to making this an app that makes your phone into a ruler?
The app would know what size dimensions the phone is, and calculate the rotations the phone makes.
It might be a little off, but it would do very good for sizing in clothes. For example, the neck size is generally allows for about 1/2 inch off.
java.lang.NullPointerException:
at com.kircherelectronics.gyroscopeexplorer.datalogger.CsvDataLogger.setHeaders (CsvDataLogger.java:67)
at com.kircherelectronics.gyroscopeexplorer.datalogger.DataLoggerManager.startDataLog (DataLoggerManager.java:87)
at com.kircherelectronics.gyroscopeexplorer.activity.GyroscopeActivity.startDataLog (GyroscopeActivity.java:332)
at com.kircherelectronics.gyroscopeexplorer.activity.GyroscopeActivity.access$100 (GyroscopeActivity.java:59)
at com.kircherelectronics.gyroscopeexplorer.activity.GyroscopeActivity$1.onClick (GyroscopeActivity.java:254)
at android.view.View.performClick (View.java:5655)
at android.view.View$PerformClick.run (View.java:22461)
at android.os.Handler.handleCallback (Handler.java:751)
at android.os.Handler.dispatchMessage (Handler.java:95)
at android.os.Looper.loop (Looper.java:154)
at android.app.ActivityThread.main (ActivityThread.java:6232)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:776)
Hello
I am trying to add the option of offsetting gauge view ("offset").
i.e: If I tilt the phone around the X axis by angle theta, I want this position to be considered as like there is no tilt at all- defined as the "offset" point (angle around X axis is zero, and also angle zero aroung Y and Z axes), and all the following rotations around the x, y, z axes will be in relative to my "offset" point.
I have struggled with that for a while, so I will appreciate if you will be able to help me.
Thanks.
Hi. I see you changed/added the project license. The files in the project still have the old license text. Are these files still,
/*
Or under the Apache License.
Regards. And Good work, thanks.
I've been trying sensor-fusion for the past couple of days -- I made a very simple implementation based on Paul Lawitski's complimentary filter. All works great when the device is flat.
As soon as I bring the device upright, roll values go for a toss; the problem is the call to calculateAccMagOrientation()
which internally calls getRotationMatrix()
and getOrientation()
. The rotation matrix returned is in the NEG axes (North, East, Ground). These align when the device is flat, but change when device is made upright. This results in bizarre roll and yaw values. A quick fix is to use SensorManager.remapCoordinateSystem()
, but this is outright hacky.
Paul L.'s code suffers the same problem. All's great when flat, but the roll&yaw values mess up when device is straight. I haven't been able to explore your code entirely, but does your app not suffer the same issue as it is based off of Paul L.'s code?
Hello sir, I want ask.. why I opened in simulator, the system can work but when I opened it in virtual device, the system crash when I click the button start log. Can you help me sir? Please.... Thankyou
java.lang.IllegalArgumentException:
at android.graphics.Bitmap.checkPixelsAccess (Bitmap.java:2047)
at android.graphics.Bitmap.setPixels (Bitmap.java:2124)
at com.kircherelectronics.gyroscopeexplorer.gauge.GaugeRotation.drawFace (GaugeRotation.java:244)
at com.kircherelectronics.gyroscopeexplorer.gauge.GaugeRotation.onDraw (GaugeRotation.java:306)
Please add licence to readme file
java.lang.ClassCastException:
at android.app.SharedPreferencesImpl.getFloat (SharedPreferencesImpl.java:256)
at com.kircherelectronics.gyroscopeexplorer.activity.GyroscopeActivity.getPrefMeanFilterTimeConstant (GyroscopeActivity.java:228)
at com.kircherelectronics.gyroscopeexplorer.activity.GyroscopeActivity.readPrefs (GyroscopeActivity.java:311)
at com.kircherelectronics.gyroscopeexplorer.activity.GyroscopeActivity.onResume (GyroscopeActivity.java:149)
at android.app.Instrumentation.callActivityOnResume (Instrumentation.java:1269)
at android.app.Activity.performResume (Activity.java:6796)
at android.app.ActivityThread.performResumeActivity (ActivityThread.java:3485)
I use the GyroscopeOrientation to filter sensor for VR rotation,most time it works perfect well.but sometimes(eg.when device is quick move or rotation,or not move at all),the values of getOrientation() is in disorder,this result my VR content rotate strangely. I tested this project's apk,it have the same trouble,if i move quickly the x angle range is very big. My math is terrible,could you give me some advices how to fix it or avoid it ? Thank you sir ,it 's so clever of you to do so hard algorithm.
Hello
Is this api a gyro compass, meaning identity quaternion is orientated at north?
Now I have a requirement,
The gyroscope horizontally on the desktop automatically calibrates,after the transfer of data to calibrate my application?
Hi all,
Thanks for your good example.
But when I launch this application on two different devices, the axis are inverted...
Any idea?
java.lang.NullPointerException:
at com.kircherelectronics.gyroscopeexplorer.activity.GyroscopeActivity.updateText (GyroscopeActivity.java:342)
at com.kircherelectronics.gyroscopeexplorer.activity.GyroscopeActivity.access$300 (GyroscopeActivity.java:59)
at com.kircherelectronics.gyroscopeexplorer.activity.GyroscopeActivity$2.run (GyroscopeActivity.java:300)
at android.os.Handler.handleCallback (Handler.java:751)
at android.os.Handler.dispatchMessage (Handler.java:95)
at android.os.Looper.loop (Looper.java:154)
at android.app.ActivityThread.main (ActivityThread.java:6232)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:776)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.