Jump to content
The simFlight Network Forums

Determining InGame vs Main Menu, Max Landing Weight, Requesting SimVars


MrChocolateBear
 Share

Recommended Posts

I recently picked up FSUIPC7 for a project I have involving MSFS, so apologies if my questions seem basic, but I've done my best to search these forums, read through the provided documentation, and build on top of what's provided in Paul's C# template and demos:

What is the best way to determine when the user is actually in game (not the main menu)? I realize  0x3365 is not available, so I've tried to tap into other values to determine when the game is running vs the main menu, but have not be able to find any good method. Do others have an effective strategy for dealing with this?

Is there any way of determining what the max landing weight of an aircraft is? I do not see a value for it, so I suspect there is not a method using FSUIPC, but I just wanted to make sure I'm not overlooking anything.

In the OffsetStatus sheet there is section that says " The following simvars are available but currently not requested: ". If there are simVars I'd like added, what is the method for requesting that / handling it on my own? Specifically, I'm interested in FLAP SPEED EXCEEDED, GEAR SPEED EXCEEDED, MAX RATED ENGINE RPM.

Thank you for the time and support! I've really enjoyed my experience working with FSUIPC thus far!

Link to comment
Share on other sites

20 minutes ago, MrChocolateBear said:

What is the best way to determine when the user is actually in game (not the main menu)?

Its not possible to do this reliably at the moment unfortunately. We are awaiting SDK updates to do this reliably.

21 minutes ago, MrChocolateBear said:

Is there any way of determining what the max landing weight of an aircraft is?

Not sure about "landing" weight. There is a sim variable for Max Gross Weight if thats what you are looking for, which is in offset 0x1334.

25 minutes ago, MrChocolateBear said:

If there are simVars I'd like added, what is the method for requesting that / handling it on my own? Specifically, I'm interested in FLAP SPEED EXCEEDED, GEAR SPEED EXCEEDED, MAX RATED ENGINE RPM.

I'll look into adding these to the offset area. I'll let you know when done.

John

Link to comment
Share on other sites

On 10/2/2020 at 6:51 PM, John Dowson said:
On 10/2/2020 at 6:24 PM, MrChocolateBear said:

What is the best way to determine when the user is actually in game (not the main menu)?

Its not possible to do this reliably at the moment unfortunately. We are awaiting SDK updates to do this reliably.

Thomas has pointed out that you can determine the menu/in-game status by looking at the Filename events. I'll look into this today and see if I can get offset 0x3365 correctly reflecting this status.

12 hours ago, MrChocolateBear said:

I have a follow-up question regarding which variables are used to determine when a stall has occurred - would that be comparing ZERO LIFT ALPHA to INCIDENCE ALPHA or handled some other way?

You could check the stall warning flag at offset 0x036C.

Link to comment
Share on other sites

On 10/2/2020 at 6:24 PM, MrChocolateBear said:

What is the best way to determine when the user is actually in game (not the main menu)?

Can you try the attached version, in which offset 0x3365 should contain 1 when in the menus and 0 when in game. You may also want to read in conjunction with offset 0x0264, the pause indicator. I say this as the in-menu flag gets reset as soon as you go into the game, but this takes quite a while (up to a minute) and the sim is set to a pause state just before the in-menu flag is cleared and then unpaused when the 'READY TO FLY' state is reached.

FSUIPC7.exe

Link to comment
Share on other sites

On 10/2/2020 at 6:24 PM, MrChocolateBear said:

Specifically, I'm interested in FLAP SPEED EXCEEDED, GEAR SPEED EXCEEDED, MAX RATED ENGINE RPM.

I have added these in the attached version
    0x0B4E 1 Byte    FLAP SPEED EXCEEDED
    0x0B4F 1-Byte    GEAR SPEED EXCEEDED
    0x0C0C 4-Byte (integer) MAX RATED ENGINE RPM

I've only checked these in the C172 at the moment, and the MAX RATED ENGINE RPM seems to come through ok (2700) but I havn't seen the flap/gear speed exceeded flags changed, so not sure if these are currently working.

FSUIPC7.exe

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • 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.