[WIP] [MOD] Sensor accuracy improvement - Samsung Galaxy Nexus

Hey everybody. I'm working on a pretty big app the requires very accurate measurements from the accelerometers. As we all know those thing have noise like mad. So I decided to do some experiments and I'd like your feedback.
Experiment setup:
Record sensor event into a custom buffer while to phone is at rest and then moving it up and down a few time, left and right, back and forth. (In this case I used MPL linear acceleration and and Inverted the measurements based on the rotation matrix sensor to get directional linear acceleration vectors not affected by orienatation).
My results had shown that at rest, my phone was accelerating between -0.5m/s^2 and .5m/s^2 WHILE AT REST.
I took these data point which were samples at about 100Hz and upsampled the data to 44100Hz using linear interpolation because I'm a lazy bum. When I'm finished collecting data I then write it out to three files which represent the data from the X, Y, and Z axes. The format I used for writing the data was as 32-bit floats (big endian). I wrote all of this in java BTW.
Next I imported this data into Audacity to get a visual representation of the data. Using audacity also gives me some tools to reduce the noise.
This is a sample of the data I worked with unfiltered (the at rest data is in circle in red and the up-down motion is circled by yellow):
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I then got the noise profile of the at rest segment and used it as a noise-gate and got the following result:
That looks a lot smoother and also that little blip on the left is the acceleration caused by my finger leaving the screen after starting the app (I think). It appears that the accelerometers are still just as sensitive, but not as noisy.
So with this, method I have two options, since this algorithm is open source and originally written in C++ I can implement in the kernel as a new Virtual sensor in libsensors.so. I think this would not be nearly as heavy on the CPU. Dince the algorithm is really just a few FFT operations. Or I can port the algorithm to java that way there is no need to screw around with the kernel.
Comments, thoughts, suggestion, critiques, complaints?

That's amazing. I'd like to see this implemented.
Sent from my Galaxy Nexus using xda app-developers app

autoreiv said:
That's amazing. I'd like to see this implemented.
Sent from my Galaxy Nexus using xda app-developers app
Click to expand...
Click to collapse
I just finished implementing the algorithm in java. I have a feeling it will be somewhat frustrating when I run the code. There were a few hacks I had to do just to get the java code to compile. I wanted to do the quick and dirty, so I pretty much just ported the algorithm as best as I could. The original algorithm called for a CharBuffer which in c++ is char *variableName, since I'm working with floats I'm converting it to a floatBuffer. Also they use their own custom implementation of FFTs so I have no clue how jTransform will handle it. Finally every method seems to be static so from a data comparison perspective, I have a feeling that this is going to cause all sorts of weirdness. Hopefully I'll have some result data posted around 4PM EDT. This time is very tentative since I have to prep for a HUGE meeting for work.

Update delayed
Hey everyone just wanna let you know that the algorithm is doing something but not what I expected and I have a meeting to go to so I'll try to give you all a more thorough update tonight.

Kind of found the issue
I kind of found the issue with my unexpected result, when I exported the noise clip it appears it wrote it as little endian floats, I'll try to resolve this and hopefully post some results (again). I have a better feeling about this algorithm than I initially had

Where I'm at in my progress
As I'm waiting for my code to compile (code not related to this project). I'd thought I'd show you some of my latest results.
This is a garbage result. It appears that something goofy is going on when I'm writing out the data (which is interpolated as the data is being written). This is certainly showing the noise cancellation doing something though.

Willing to see it!
Sent from my Galaxy Nexus using Tapatalk 4 Beta

Related

[APP] Straits Times Mobile (Singapore Broadsheet) 02-06-2010 V0.694

Hi to All and specifically to Singaporeans,
Do you live in Singapore and are quite peeved that you cant read straits times in your Windows Mobile handset?
Well this is the app for you. With UI similar to metro, it allows you to read full articles without the need to visit Straits Times' website on your phone.
Now with offline reading capabilities for your transit needs!
The app needs CF3.5 and is created with the help of the excellent sliderlist by Obelix_A
Current Features
- read full articles available from StraitsTimes.com Free
- view pictures and captions related to the articles
- change font size for articles
- offline syncing
- low-bandwidth mode (by displaying images only when articles are read)
- auto updater
Planned Features
- reading of articles from a specific date
- bookmarking articles
Known Bugs/Issues
- application is known to crash for Omnia2 and OmniaPro devices, upon a selection of a section
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
download fromhttp://appslah.com/stmobile.cab Version 0.694
i would appreciate feedback and feature-requests.
Your last picture posted here has a grammatical error - 'has been', not 'has be'.
Tried this app. Very smooth.. in fact, a bit too sensitive.. When i scrolled, I keep opened links accidentally.
A ligther background or something more 'relax' would be nice I think. This is a bit too 'dark' to my liking.
hey bro, i tried looking hard, couldnt find the gramatical error.... i might be going blind
as for the over sensitivity, rest assured i would be passing the feedback to obelix, the creator of the slider control; which is used in this app. I have to give him credit for making this awesome control that cuts the development by almost half when designing the UI portion
Would take that as a feature request and put it into my tast list for the next few releases
once again thanks for not only using the app, but providing feedback for it too. There is no point in people just using app without telling us, the developers, what they really want to see. Its after all you the users who end up using it on a daily basis. So thank you!
on a side note, got a nice email from microsoft this morning
Hi
Just wonder - would you consider making this reads the other Singapore e-news intead of just ST? While it's nice to have one app for one news site, I really don't like the idea of filling my screen with few icons for different newspaper.
Just a thought. Of cos', it would have to be a different names then. Ha..
But this programme so far running very smoothly and scrolling is good too. Well done!
hmm, it would increase the complexity of the app, introducing the possibilities of having more bugs. I would avoid that.
moreover i have done up the CNA app as well as the backend of Today app as well... just a matter of time before they become general release items as well
http://www.mobinauts.com/topic/110817-local-app-channel-news-asia/
It seems very cool...but I would like to have this for other newspaper...
the straits time with Windows Phone 7 theme. Nice touch
Definitely gonna try this out. Great development.
looks great! will try it out now
sw33t
This is great, though wishing there are others like CNA or Newpaper
Also I'm getting this error on my HD2 once in a while after I quit or while using the app (can't take a screenshot for some odd reason)...but other than that, it's working fine. And I notice a 2 second lag when I scroll it way way up or down (till the icons are gone) before they appear again but meh, I could still live with it
Code:
STmobile.exe
ObjectDisposedException
at
System.Windows.Forms.Control.InvokeHelper(Delegate method, Boolean fSynchronous, Object[] rgobjArgs)
at
STmobile.settingsFile.updateSyncState()
bloodychaos said:
This is great, though wishing there are others like CNA or Newpaper
Also I'm getting this error on my HD2 once in a while after I quit or while using the app (can't take a screenshot for some odd reason)...but other than that, it's working fine. And I notice a 2 second lag when I scroll it way way up or down (till the icons are gone) before they appear again but meh, I could still live with it
Code:
STmobile.exe
ObjectDisposedException
at
System.Windows.Forms.Control.InvokeHelper(Delegate method, Boolean fSynchronous, Object[] rgobjArgs)
at
STmobile.settingsFile.updateSyncState()
Click to expand...
Click to collapse
thanks for the bug report. i will fix this before the next release.
as for the CNA app, already done it. a few selected users are now testing it... would be available soon: http://www.mobinauts.com/topic/110817-local-app-channel-news-asia
here is another app i did initially: 4D and Toto http://spoolsmobile.appslah.com/
initally planned to do TNP as well, but i soon found out that TNP is slightly harder and they lack online content.
are there any alternatives for things like Australian or UK news? it looks amazing!
tzuyang said:
are there any alternatives for things like Australian or UK news? it looks amazing!
Click to expand...
Click to collapse
i wouldnt mind allowing for that, but right now am on a mission to get more apps for the local(sg) front first. kinda stacked up till aug
Awesome! Would be gr8 if you can make one for STOMP news cauz the current one isnt great at all.

[GAME] Teeter

Everyone loves Teeter right? I'm sure there'll be lots of shoddy ports for WP7 on launch, so I decided to do it right and first
Obviously, I'm pretty sure the name is trademarked, so will have to be changed before release...
Here's some screenshots of my progress so far :
UI
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Engine
(Cant post images or real links as I'm a new user )
I'm looking for designers to come up with a possible alternate style, to diferentiate from the original teeter slightly. Maybe themed worlds?
I'm open to ideas
I edited your post to add images
Nice work!
I edited your post to add images
Click to expand...
Click to collapse
Excellent! Thanks for doing that, I'll be doing some more work tonight, possibly even a sample xap file
xanderkaiber said:
Excellent! Thanks for doing that, I'll be doing some more work tonight, possibly even a sample xap file
Click to expand...
Click to collapse
I wrote an article about this, which should give you some support for your app and maybe a few people who will be willing to help with designs...
Will come out at 3 pm EST today.
thats great news Guess that gives me more motivation to finish it then
And how about a real Metro UI skin? I guess it will look great!
A metro UI skin is a great idea, just not sure about how to pull it off well, will give it a try though
xanderkaiber said:
A metro UI skin is a great idea, just not sure about how to pull it off well, will give it a try though
Click to expand...
Click to collapse
Make everything a blue block? I joke, of course Very nice work, looking forward to see how this comes along, as this is by far my favorite Windows Mobile game.
Nice job, OP! I wouldn't be surprised if HTC have already made a port, but this is still very cool.
My only comment is the 3D view looks a bit strange. There is no real depth, just the 2D Window rotating in 3D space. Look on youtube for "labyrinth 3D".
Keep up the great work!
There is no real depth, just the 2D Window rotating in 3D space. Look on youtube for "labyrinth 3D".
Click to expand...
Click to collapse
I forgot to mention, that view is just for the emulator, as I cant really pick up my monitor and tilt it around
As soon as I get a real device to test on, I'll move everything over to the real G-Sensor, and lose the pseudo 3d kinda thing
ALLTHOUGH
I could easily make the 3D view better and have this as an alternate to using the G-Sensor, perhaps as an option from the menu? All input is helpful at this stage
Also, anyone who wants to follow my dev work, my twitter is @lordadamwalker.
Not much stuff about this project yet, but I only started yesterday morning, so It'll be there. Best way to keep updated
I would like a natural Port of the Game most.
Please add a Missionselector after one managed the final level.
If you make a Metro SKin please make it alternative, some people dont like it all the time.
Also I think Stability and low latenzity is more importent the difficult View, you should set your priorities according to that.
looking fwd to see how this game turns out...
AgentBignose said:
I would like a natural Port of the Game most.
Please add a Missionselector after one managed the final level.
If you make a Metro SKin please make it alternative, some people dont like it all the time.
Also I think Stability and low latenzity is more importent the difficult View, you should set your priorities according to that.
Click to expand...
Click to collapse
A direct port is where I'm starting certainly, any extra features I can add when I finish the engine completely.
There will be a level selector for completed levels.
And there will definitely be a choice of skin to suit all tastes
Performance and reliability are my key focus, so rest assured the engine will be well tested and tuned
Not one to double post, but I now have access to a Windows Phone 7 device, so I should be able to make some real progress. Updates coming very soon
well?
Where is the port?
You might have better luck finding the OP on twitter. He hasn't logged into XDA since May last year.
https://twitter.com/#!/lordadamwalker

Stock calculator bug???

I've just tried out the "scientific" (i.e. landscape) layout of Galaxy Note 8.0's stock calculator - and it seems that it outrageously mishandles trigonometric functions !
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Just a reminder that
sin(n*pi)=0
cos(n*pi)=1
tan(n*pi)=0
tan(pi/2) is undetermined
tan(pi/4)=1
tan(pi/3)=sqrt(3)=1.73...
So this begs the question, "WTF???!!!"
Don't forget that those values are only true when your angles are in RAD. All calculators are in DEG by default and that is why you get those "wrong" values (which aren't wrong since they are correct in DEG mode)
Hope you figure out how to change it to RAD I'd help with that but I only get my Note Monday/Tuesday
Sent from my XT925 using xda app-developers app
Thanks, man, I haven't even thought about that!..
Having the arguments of trigonometric functions in radians is virtually always the default, though!.. At least for a "scientific" version of a calculator. They should at least give some indication that it's in degrees... I don't think you can change it to radians, by the way.
And why have the Pi constant, then? The only use for it that I can think of is within trigonometric functions. Well, and calculating the circumference of circles.
Spartanus said:
And why have the Pi constant, then?
Click to expand...
Click to collapse
Maybe it's because Pi is a constant?
Spartanus said:
Thanks, man, I haven't even thought about that!..
Having the arguments of trigonometric functions in radians is virtually always the default, though!.. At least for a "scientific" version of a calculator. They should at least give some indication that it's in degrees... I don't think you can change it to radians, by the way.
And why have the Pi constant, then? The only use for it that I can think of is within trigonometric functions. Well, and calculating the circumference of circles.
Click to expand...
Click to collapse
Pi is a constant yeah and I think its used for stuff other than trig I just can't think of anything my school mode is off lol my phone's calc is in RAD for those functions but I've also had to use the same functions in DEG previously so there is use for both. In physics (mechanics) we mostly used DEG for these!
I read around you can download a calculator from the Play Store which allows you to go from RAD to DEG and vice-versa but can't remember the name sorry
Sent from my XT925 using xda app-developers app
saloums7 said:
Pi is a constant yeah and I think its used for stuff other than trig I just can't think of anything my school mode is off lol
Click to expand...
Click to collapse
Well, I know Pi is used for other stuff, I have a PhD in mathematics.
What I meant was that among the functions included in Samsung stock calculator's landscape mode trigonometric functions are the only ones that can make any sensible use of Pi. The only other use I can think of (within this calculator) is, like I said, using Pi to calculate circumferences and areas of circles.
And I understand that one can dowload other calculator apps - but this doesn't change the fact that, to me, this behavior of the stock calculator is weird.
Spartanus said:
Well, I know Pi is used for other stuff, I have a PhD in mathematics.
What I meant was that among the functions included in Samsung stock calculator's landscape mode trigonometric functions are the only ones that can make any sensible use of Pi. The only other use I can think of (within this calculator) is, like I said, using Pi to calculate circumferences and areas of circles.
And I understand that one can dowload other calculator apps - but this doesn't change the fact that, to me, this behavior of the stock calculator is weird.
Click to expand...
Click to collapse
Cool! (PhD) I'm still in college
and yeah the stock phone/tablet calculators on Android from what I've seen are pretty basic making them useless at times
Sent from my XT925 using xda app-developers app

[APP][Alpha2][Jan 09 2015] Wear GPS

Out of curiosity I quickly put together Wear GPS test app.
It uses build-in GPS only! (Doesn't matter if you connected or disconnected)
Huge thanks to satstat [email protected] https://github.com/mvglasow/satstat for the implementation of SNR and Gps position views.
Install it on your phone and it will sync mobile app. Phone app is solely for installation/uninstallation.
Please let me know how your gps behaves. Mine is really strange - sometimes will fix quickly at home and sometimes outside just jumps between 11/20 to 0/20 to 4/20 to 12/20 withing 5 secs
I guess this attributes to zigzaging track.
Operation - Scroll face right to get into Sat positions view and then left to get back, Long press to exit.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
(Lat lon erased from picture.)
P.S. DOP/HDOP and VDOP are not populated right now.
Changelog:
0.2 Added reset and request AGPS, tho have no idea if it works w/o direct internet connection, also added simple status screen by request
0.1 Initial release
Cool! nice app!
BTW, speaking of jumps, look at the graphs for pace I got with "my tracks" during my last test. As you can see there are a lot of times when the gps signal is lost. This does not happen when I use my tracks in my nexus 5.
This is cool. maybe you could give Runtastic and Endomodo some tips. I haven't found a running app that works with the native GPS yet, they all seem to only work if the phone is tethered to the watch during a run.
didnt find a fitting thread but you look like haveing a plan bout gps...
Im more paranoid user and was wondering, if I turn the gps of my phone, does this also entirely disable the gps module of my smartwatch?
And if the answer is "no" how can this total disable of gps be acchieved?
It looks to work fine on my SWR50.
What I'm missing is a page with ALTITUDE, BEARING, DOP, SATS written in BIG, since on the 1st screen is VERY very difficult to read while you are moving (too small text).
Can you?
=
freewing70 said:
It looks to work fine on my SWR50.
What I'm missing is a page with ALTITUDE, BEARING, DOP, SATS written in BIG, since on the 1st screen is VERY very difficult to read while you are moving (too small text).
Can you?
=
Click to expand...
Click to collapse
Well, I can, but would I?
No promise, but will see what can be done in a limited time.
XorZone said:
Well, I can, but would I?
No promise, but will see what can be done in a limited time.
Click to expand...
Click to collapse
Eheheheheheh!!
I feel optimistic.
freewing70 said:
Eheheheheheh!!
I feel optimistic.
Click to expand...
Click to collapse
OK, finally got some time to get it working, will upload new version tomorrow.
XorZone said:
OK, finally got some time to get it working, will upload new version tomorrow.
Click to expand...
Click to collapse
Thankyou so much!
freewing said:
Thankyou so much!
Click to expand...
Click to collapse
Please test and let me know, I had little time to test.
OK; the file should be this one
http://forum.xda-developers.com/attachment.php?attachmentid=3105978&d=1420791626
FANTASTIC: great job.
Maybe fonts size could be even bigger in page 3.
Thanks a lot: bravo!
great app!
font sice could be a littel bit greater, and is it show the satellites number?
the app itself works like a charm, except if i do a screenshot at the android wear manager, the app closes - but that happens with ervery app if i try to make a screenshot.
my swr50 has no hopping at all, just the altitude is too high (approx. 40 meters), but that is even the case if i open the developer menue.
Altitude is what GPS reports, but it is not reliable at low altitudes, better on a plane.
With app closure it is wear 5.0 feature I believe, but I plan to implement persistent notification in app closure. Once i find some free time - I'll do it...
Bumping an old thread, but still relevant at least ; loaded it on to my new SW3, and seems to work great. Only complaint of course is can't do the swipe to close; not the end of the world, but would be a good future improvement.
Still, thanks for the work!
When a 0.3 release?
Here's another GPS software from GhostRacer developer:
https://play.google.com/store/apps/...d=com.bravetheskies.gpstest&rdot=1&feature=md
It's very intgeresting.

[Workaround] Fix noise reduction and oversharpening without root or bootloader unlock

After being bored for quite some time i found a way to bypass the horrible noise reduction and oversharpening via an external app without voiding the warranty in any way, but this results in a quite raw looking image being in jpeg, so you need to apply your own noise reduction via photoshop or any else method.
Using FreeDcam app from the play store
Set the main camera api to camera1
Jpeg quality - 100
CustomMatrix - imx362
And on the right side of the menu
Wavelet Denoise - Denoise-off
Zero shutter lag - on
You can also change anything if u swipe up from below except the iso, because u change the iso from the left iso button, i recommend setting sharpness the prism to 0-10
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Moto camera
FreeDcam
Moto camera
FreeDcam
Moto camera
FreeDcam
Idk this app sucks too much battery. Maybe because of processing images.
pradsngh523 said:
Idk this app sucks too much battery. Maybe because of processing images.
Click to expand...
Click to collapse
well its kinda obvious the app is in a bad state, its quite unstable and sucking battery doesnt really suprise me.
TheIronLefty said:
well its kinda obvious the app is in a bad state, its quite unstable and sucking battery doesnt really suprise me.
Click to expand...
Click to collapse
Well i figured out i was pushing it too hard with hdr scene mode and forgot to change api to camera1
Working like a charm now .
Thanks buddy. Also try moving this thread to "Apps Themes and Mods" section
Thanks for this workaround - it really makes a difference especially for us without the time to root the phone.
Is there a way to make FreeDcam app to make a shutter noise so that we know we actually took a picture? Right now there's no indication and I have to go to the gallery to make sure.
I applaud the effort to find another workaround!
This is interesting to me, however I must admit- those images have a lot of ugly artifacts that are now baked in. Yes, it appears to be getting around the NR smoothed look, but it looks like it is doing so by adding a layer of grain before the jpeg compression. Without the camera2 api, I'm not sure it is possible for an application to actually access the raw frame buffer before the chromatix, etc, libs get involved. My first hunch in that this look is artificially created by the app after the camera routine has done its processing.
In other words, it looks almost like grain is being added to give the illusion of details in much of the same way we can get details in lower color spaces via dithering. Even relatively well exposed parts of the frame that shouldn't have noise have noise. And then some heavy jpeg compression on top of it, so removing it in post with Photoshop/LR/etc is going to eat a lot of detail- arguably at least as much if not more than you were getting with moto cam. Have you tried to clean any up in post and compared them side by side with moto cam?
Interestingly, if you enable the camera2 API, there is a version of FreeDcam that can record actual sensor RAW from the G5+, and one of the only apps that can properly. But once you are doing that you are better off with any of the various Google Cam versions floating around for 32-bit Nougat. Root access isn't necessary, however in order to enable the camera2 api, you need to be able to change a line in build.prop. At the very least, you need to unlock the bootloader so that you can change a system file. You can remain stock and unrooted though. I know, not for everyone, but I recommend it if image quality is important to you.
I still think you need to enable camera2 at a minimum to get better image quality, if not just replacing chromatix libs. But this is an interesting find.

Categories

Resources