-
Notifications
You must be signed in to change notification settings - Fork 555
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compass calibration #1147
Compass calibration #1147
Conversation
c3acbf6
to
f787050
Compare
Calibration is working on the Desktop app, bellow is a system output converging to good offsets in less than 50 samples. It'm still working on getting the libraries to compile with the Android Project, but I expect to have this done by the end of the day.
|
I just hit a bottleneck, the 65k method limit on the dalvik VM. Here is the error message
So I found the root of the problem, after reading this post. By running this script with master, we can get which libraries are creating too many methods. The culprit is google-play-services accounting for ~38k methods, droidplanner and it's internal libraries account for 4k methods. Here is a summarized output of the script:
I wish we could just ignore this PR, but we are going to reach the limit again in a very short future. And the calibration method included here is impressive ( I'll post a video very soon, but it only runs on the desktop droidplanner). @DroidPlanner/dev @geeksville @ne0fhyk Anybody knows a way out of this problem? Here are the possible solutions I see:
|
I'll do some more investigation as time permits, but I vote for stripping out unused packages in the google play services library. https://gist.github.com/dmarcato/d7c91b94214acd936e42 |
How often does calibration have to be performed? If not very often, perhaps calibration should be an external app (and calibration added to the user's checklist as a reminder). Can the software call an external app, and then return when the external app is closed? |
Sure, it can, but will there be any issues sharing the MAVLink connection On Wed, Oct 8, 2014 at 5:47 PM, Thalek [email protected] wrote:
|
Here are the results of trying the algorithm with DroidPlanner, and using the algorithm on MP.
|
Here is a quick demo of the desktop app generating the calibration parameters: https://www.youtube.com/watch?v=3EYVZ1QbleI |
@arthurbenemann @kellyschrock there's several gradle scripts that allow to strip the methods count automatically at build time: https://gist.github.com/dmarcato/d7c91b94214acd936e42. The official google solution is to separate the app in multiple dex file. That method can't automatically be used in Eclipse, and requires a separate build step. |
@ne0fhyk Could you setup the graddle build for this branch? |
86b4251
to
24cd3bb
Compare
@arthurbenemann UI issues have been fixed. A couple of items remained before completion of this PR:
|
…meters for the magnetometer
744992f
to
3e21491
Compare
ab01ae2
to
08c6dc5
Compare
9a467c7
to
7c4f9bb
Compare
Conflicts: Android/res/drawable/button_green.xml AndroidLib/res/drawable/button_green.xml AndroidLib/res/drawable/button_green_drawable.xml Desktop/src/org/droidplanner/desktop/location/FakeLocation.java
|
fb873a6
to
489e6c2
Compare
|
I'm merging this so it doesn't diverge too much from master, and for us to start testing. The fitness function may need some improvement before releasing it publicly. |
Starting to implement compass calibration. This is a WIP