Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hey guys,

i am in the works of programming an ACARS for a virtual airline to track/log flights and events during the flights. As know from software like "Pegasus" i want to log flaps event like "Flaps set to position 4".
For this i thought about the following logic:
Getting the number of flap increments of the aicraft using:

dataset.add('flapsAvail', 0x3BFA, fsuipc.Type.Int16)

(Which returns for the Toliss A339 and the FlightFactor 757 a value of 2047 -> So 9 Flaps Positions)

And use the flap raw position in percent:

dataset.add('flapsPosition', 0xBE0, fsuipc.Type.Int32)

But the problem is, that for the toliss A339 it returns 75% for Flaps 3 AND Flaps Full, as i suspect it only detects the leading (SLATS) and not the trailing edge flaps.

 

I am at the moment at the end of my ideas on how Pegasus could have came up with a solution but does anybody has a different approach to the problem? The Script shall be able do handle P3D, XP11/12 and MSFS dynamically.

Thanks for your input in advance!

Posted

XP and MSFS/P3D report flaps completely differently. XP is "percentage of full flaps" so the last detent is 100%, and flaps up is 0%. You need to create something custom for each aircraft to map the percentage to a flaps setting.

Cheers

Posted

Hello Luke,

 

Thanks for your quick reply. Yes, i am currently only trying it for XP. But the current problem is that the 0xBE0 does detect 75% for the Toliss A339 for flaps full and also 75% for Flaps 3. So it seems to be the incorrect offset to detect the trailing edge flaps. 

Pegasus does not have custom mappings for each addon at it is also a flexible way. I do not need to now the exact detent like F15 in a 757 or F3 in an A3XX. I just need to know that the flaps is in a detent, to mark it in the log as "Flaps set to Detent X". 

Posted
18 hours ago, Benl112 said:

Getting the number of flap increments of the aicraft using:

dataset.add('flapsAvail', 0x3BFA, fsuipc.Type.Int16)

(Which returns for the Toliss A339 and the FlightFactor 757 a value of 2047 -> So 9 Flaps Positions)

You could also try offset 0x3BF8 which holds the FLAPS NUM HANDLE POSITIONS simvar, and maybe 0x0BFC (FLAPS HANDLE INDEX) for the current position,

18 hours ago, Benl112 said:

But the problem is, that for the toliss A339 it returns 75% for Flaps 3 AND Flaps Full, as i suspect it only detects the leading (SLATS) and not the trailing edge flaps.

Offsets 0x0BE0 and 0x0BE4 are the trailing edge flaps. There are separate offsets for leading/trailing (see 0x30E0-0x30FE),  but you can't really use these values to determine the flaps detent: It doesn’t correspond to the equally spaced notches used for the control lever.

You could also try offset 0x0BDC (FLAPS HANDLE PERCENT): 

Flaps control, 0=up, 16383=full. The “notches” for different aircraft are spaced equally across this range: calculate the increment by 16383/(number of positions-1), ignoring fractions. See also offset 3BFA below.

 

 

Posted
22 hours ago, John Dowson said:

You could also try offset 0x3BF8 which holds the FLAPS NUM HANDLE POSITIONS simvar, and maybe 0x0BFC (FLAPS HANDLE INDEX) for the current position,

Offsets 0x0BE0 and 0x0BE4 are the trailing edge flaps. There are separate offsets for leading/trailing (see 0x30E0-0x30FE),  but you can't really use these values to determine the flaps detent: It doesn’t correspond to the equally spaced notches used for the control lever.

You could also try offset 0x0BDC (FLAPS HANDLE PERCENT): 

Flaps control, 0=up, 16383=full. The “notches” for different aircraft are spaced equally across this range: calculate the increment by 16383/(number of positions-1), ignoring fractions. See also offset 3BFA below.

 

 

Thank you @John Dowson for your reply! I switched to the flap handle recognition and wrote a custom logic to detect the detents, thank you!
Now i have new problems with the sim version and fsuipc/xpuipc version decoding, but i will get to it 🙂
I know we are in a different topic, but there is no version number reserved for xplane in 0x3308, because only XPUIPC is compatibly with XP, correct?

 

Posted
14 minutes ago, Benl112 said:

Now i have new problems with the sim version and fsuipc/xpuipc version decoding, but i will get to it 🙂
I know we are in a different topic, but there is no version number reserved for xplane in 0x3308, because only XPUIPC is compatibly with XP, correct?

I don't know if XPUIPC writes the version number to offset 0x3308 or what that version number is if it does - try logging it. You could also check offset 0x3304 (FSUIPC version number) or 0x3124 (FS version).

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.