Skip to content
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

PFD improvements #302

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

PFD improvements #302

wants to merge 1 commit into from

Conversation

pasniak
Copy link
Contributor

@pasniak pasniak commented Jun 9, 2017

before adding Stratux AHRS support.

  • format MH/CRS 000 - add external inclinometer support (Stratux AHRS) - pressure alt - support speeds>500 and variable tape width - show destination - traffic - use mag sensor preference (for phones with good gyros) - shade plane symbol - use LTGRAY for scales (tapes/compass) - vary alt tape and compass numbers size - on compass add airplane symbol, 45deg edge marks, 10deg compass marks, current ground track diamond - less heavy CDI dots

On a phone: http://i.imgur.com/J2rWr5a.png
On a tablet: http://i.imgur.com/lnhgh1b.png

…rt (Stratux AHRS) - pressure alt - support speeds>500 and variable tape width - show destination - traffic - use mag sensor preference (for phones with good gyros) - shade plane symbol - use LTGRAY for scales (tapes/compass) - vary alt tape and compass numbers size - on compass add airplane symbol, 45deg edge marks, 10deg compass marks, current ground track diamond - less heavy CDI dots
@apps4av
Copy link
Owner

apps4av commented Jun 9, 2017 via email

@pasniak
Copy link
Contributor Author

pasniak commented Jun 9, 2017

Actually, for the changes above you do not need anything, maybe an Android device with a properly working gyro. I discovered my Huawei Honor device has a good magnetometer and gyro, which is why I added a preference to get yaw (and I show separate ground track).

To hook up an AHRS from Stratux you need Stratux version: 1.3b2 as documented in https://www.reddit.com/r/stratux/comments/6agj06/v13b1_sensor_ahrs_beta . I got http://a.co/cf5RWcO and it worked (except the magnetometer seems work in progress) after I made bunch of changes to avarehelper and small changes to avare. I am planning to create https://github.com/pasniak/avare/tree/ahrs branch for that very soon. Hooking the usual way via avarehelper (listening UDP) works fine but pressure alt is part of Stratux webservice. I would prefer to hook ws: but need to finish coding to test perf. Your opinion here is very welcome.

End goal of this is to be able to hang Avare with PFD screen which shows AHRS from Stratux and destination synced by WiFi from my tablet (ummm, that is not working well yet...). Then I will add airports on horizon in PFD :)

@apps4av
Copy link
Owner

apps4av commented Jun 12, 2017

This code looks OK to me.
Have you tested it in an actual airplane with old devices? Talking about adding AHRS from stratux with Chris. I had bad experience with getting gyros from inside devices because sometimes people use old devices with bad gyros, then they trash the app for wrong attitude indications. If it works with stratux only and works well then thats an acceptable solution.

@pasniak
Copy link
Contributor Author

pasniak commented Jun 15, 2017

I ground tested on Moto G and the refresh rates are good. I used to test Nexus '13 but it died. Given usage is limited I think we could treat PFD as 'experimental' feature. Maybe even show a 'Experimental' warning? Stratux crowd is happy and I know a guy with Stratus who is also happy with his FF PFD. Re: testing - I am waiting for Stratux AHRS dev to be in better shape, dev is still going on.

I've just pushed https://github.com/pasniak/avare/tree/ahrs which has Preferences choice of using internal Gyros (off), external Stratus gyro (via UDF & helper - requires https://github.com/pasniak/avarehelper/tree/ahrs) and Stratux websockets, and shows AHRS source. Maybe a separate PFD Preferences category is needed?

We could also whitelist against models. The best list I found today is https://stackoverflow.com/questions/4347143/which-android-phones-out-there-do-have-a-gyroscope. It also seems Marshmallow supports sensor quality level (https://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_HIFI_SENSORS). I only have Lollipop on Honor (HUAWEI Honor X2 GEM-703L) so cannot test.

@apps4av
Copy link
Owner

apps4av commented Jun 19, 2017 via email

@apps4av
Copy link
Owner

apps4av commented Jun 19, 2017 via email

@pasniak
Copy link
Contributor Author

pasniak commented Jun 20, 2017

I found it by searching 0x4c in Stratux codebase. https://github.com/cyoung/stratux/search?utf8=%E2%9C%93&q=0x4c&type=

Here's one of my older avarehelper shelves:

add_AHRS_message.zip

@apps4av
Copy link
Owner

apps4av commented Jun 21, 2017 via email

@pasniak
Copy link
Contributor Author

pasniak commented Jun 21, 2017

It will take a bit of time... my dev rig crashed and I did not shelve the working code. I can only start recovery work from tomorrow on. I recall fix was not too difficult.

@apps4av
Copy link
Owner

apps4av commented Jun 21, 2017 via email

@pasniak
Copy link
Contributor Author

pasniak commented Jun 22, 2017

My changes are on https://github.com/pasniak/avarehelper/tree/ahrs

It's not very complicated. Given Stratux AHRS seems to work (per reddit discussions) with all other EFBs the protocol (UDP) seems fine. Implementing it in avarehelper would give us a shot at supporting Stratus which, I understand, also has AHRS.

@cyoung
Copy link
Contributor

cyoung commented Jun 22, 2017

If this is startux specific then stratux should provide the code for it.
Its a waste of time to reverse engineer it.

It's all in the repo, there's nothing on a stratux install that isn't on either the stock Raspbian image or the GitHub repo.

@Qhergt
Copy link

Qhergt commented Oct 10, 2017

I'm trying to find just the PFD codes and run it as a separate app. Where would I find them?

@pasniak
Copy link
Contributor Author

pasniak commented Nov 1, 2017

@Qhergt : GUI is in app/src/main/java/com/ds/avare/PfdActivity.java, My last 3 commits will give you an idea on where things are.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants