Jump to content
The simFlight Network Forums

Recommended Posts

Posted (edited)

*** Moved from User Contributions sub-forum to FSUIPC7 support sub-forum ***

Hello!

I,m trying to make a small checklist program for MSFS 2020 using FSUIPC with Python. I have a small bit of test code just to see if it will work, and when I run the output data from the sim is off.

Python Test Code:
---------------------------
from fsuipc import FSUIPC


with FSUIPC() as fsuipc:
    prepared = fsuipc.prepare_data([
        (0x02BC, "l"),             # Airspeed Indicated
        (0x31E4, "l"),             # Radio Altitude
        (0x0020, "l")              # Altitude
    ], True)

    while True:
        AI, RA, ALT = prepared.read()

        print(f"Airspeed Indicated: {AI}")
        print(f"Radio Altitude: {RA}")
        print(f"Altitude: {ALT}")

        input("Press ENTER to read again")

-----------------------------

The data I get back, just sitting on the runway with parking brakes on is the following.

Airspeed Indicated: 1190
Radio Altitude: 17179936437
Altitude: 6150855250518568484
Press ENTER to read again

-----------------------------

I was if anyone has any experience in this area. I'm so new with FSUIPC, I'm just trying to find out where to start. I have python down fairly well, I just need the right data.

One more last question... 

Can FSUIPC determine what type of a COM1 frequency it is tuned to? Like 127.30 is Approach and 128.25 is a Center frequency.

Thanks!

~~~ Bill

Edited by John Dowson
Moved to FSUIPC7 support forum
Posted

Sorry, but I cannot really help you with python as I am not familiar with this language or the SDK. However, you can also use FSUIPC to log those offsets to check the values, although they certainly don't look correct, although I do not know why.

3 hours ago, willyj9939 said:

Can FSUIPC determine what type of a COM1 frequency it is tuned to? Like 127.30 is Approach and 128.25 is a Center frequency.

Yes, but you have to request this.  This information is held in the indexed simvar COM ACTIVE FREQ TYPE. To read this simvar, you need to add it to a free/spare FSUIPC offset first, using the facilities provided. See the section Adding Simulator variables (simvars) to FSUIPC offsets in the Advanced User guide.

John

Posted
2 minutes ago, willyj9939 said:

Thank you, John, for your reply.

I have moved your post to the FSUIPC7 support sub-forum, where it belongs. Please take care to post in the correct forum for support. You posted in the User Contributions sub-forum, which is, as the name suggests, for User Contributions only, and it does say NOT for support requests.

John

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.