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

Feature Request: Autopilot screen changes to plane automatically. #20

Open
Revel8804 opened this issue Jan 6, 2021 · 5 comments
Open

Comments

@Revel8804
Copy link

I like what you did with the A320 autopilot.

I can work on this too!

I have had the same idea rolling in the back of my head. To do the same, but for all planes.

Then the page can pull the variable (don't remember name right now. Not home) for the plane and automatically load that planes autopilot.

@mracko
Copy link
Owner

mracko commented Jan 8, 2021

Looking forward to your solution. The default AP works pretty much on every plane except a the A320 so the current radio button switch works pretty good, so far at least. We just have to be very careful as to not read too many simconnect variables because then the latency gets too high. I'm planning on adding additional buttons for flaps, gear, spoilers, etc so we will be pushing the system to the edge.

There is one performance tweak that you could hopefully solve. Have a look at this code:

ui_friendly_dictionary["COM1_STANDBY"] = round(await aq.get("COM_STANDBY_FREQUENCY:1"),3)
ui_friendly_dictionary["COM1_ACTIVE"] = round(await aq.get("COM_ACTIVE_FREQUENCY:1"),3)
ui_friendly_dictionary["COM1_TRANSMIT"] = await aq.get("COM_TRANSMIT:1")
ui_friendly_dictionary["COM2_STANDBY"] = round(await aq.get("COM_STANDBY_FREQUENCY:2"),3)
ui_friendly_dictionary["COM2_ACTIVE"] = round(await aq.get("COM_ACTIVE_FREQUENCY:2"),3)
ui_friendly_dictionary["COM2_TRANSMIT"] = await aq.get("COM_TRANSMIT:2")

Instead of 6 var requests, this could be reduced to just 3 if we'd properly use var indexing. We could also use this for NAV active, stand-by and OBS. This issue was already mentioned here (odwdinc#67), but I didn't look into it very much, so I'm not sure how to implement it correctly. Do you think you could do it?

@Revel8804
Copy link
Author

I have not forgotten about the var indexing. I just dont have much time on the weekends. So i try to do the smaller things then,

@Revel8804
Copy link
Author

So a great example of needing this. On 747 the normal AP controls and the a320 AP do not work.
This may be a thing for airliners only though.

@Revel8804
Copy link
Author

ok if you take a look at my fork. https://github.com/Revel8804/MSFS-Mobile-Companion-App
glass_server.py starting at line 218
getsimdata.js starting at line 678

this is as far as i got so far.

the console print works perfect. so that way i am only playing with three variables.
I have not looked how it is going to work with your functions yet.

@mracko
Copy link
Owner

mracko commented Jan 17, 2021

Thanks! I'll check your fork next week. I've been really busy lately and didn't have much time for this app. The only thing I did was a prototype of a split-screen mode for monitors/tablets in landscape mode. This means that you'll be able to have the map always visible on the left side of the screen.

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

No branches or pull requests

2 participants