Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hi Pete,

I am building an analogue flap gauge and have run into a problem.

In a 767, at Flap 1, the Trailing Edge of the flaps do not move, only the Leading Edge.

The trouble comes in that the flap pos reading that FSUIPC is returning seems to indicate the position of the TE flaps only, not the LE, so I can not tell if my flaps have readed Flaps 1 or not.

I could watch the handle position and simulate the transition time, but I would rather reflect the true A/C flap positions.

I see there are two sets of values in the gauges.h, 2a98 and 2aa8, do you know if they return different values?

Cheers!

Stuart.

Posted

I see there are two sets of values in the gauges.h, 2a98 and 2aa8, do you know if they return different values?

Sorry, I really don't know. I only provide a window onto what's available. Try using the Monitoring facilities in FSUIPC (see the Logging page) and watching what they do. But I don't think they have worked since FS2002. If you do find out, please let me know and I'll add more data to the Programmer's Guide.

I notice that FS2004 has added two new gauge variables: TRAILING_EDGE_FLAPS0_LEFT_ANGLE

TRAILING_EDGE_FLAPS0_RIGHT_ANGLE

so I could try to locate those and map them for 2A98 and 2AA8, assuming they don't work as they are ...

I can't see any reference anywhere at all to Leading Edge flaps. Additionally there seems to be no way to define these in the AIRCRAFT AIR or CFG files, so I can only assume these are only simulated visually on your aircraft and in fact do nothing to the flight.

I don't actually have a 767 for FS2004 so I am unble to check this for you. But from everything I can locate to do with FS's handling of flaps internally, for performance all it seems to care about is a flap position "name" and the corresponding effects on performance and limiting speeds. It doesn't appear to distinguish else.

Regards,

Pete

Posted

Hi Pete,

The default 777 (in fs2002 at least) has the same behavour. The leading edge flaps is defined by the aircraft.cfg as:

From the fs2002 default 777:

[flaps.2] //Inboard Leading Edge Slats

type = 2 // 1 - tail, 2 - lead

span-outboard = 0.5 // 0.0 .. 1.0

extending-time = 4 // seconds

flaps-position.0 = 0 // degrees

flaps-position.1 = 0.5 // degrees

flaps-position.2 = 0.5 // degrees

I tried to monitor those (2a98, 2aa8) locations, they always returned 0's, but I thought the locations might have been overridden by the 224 bytes used by 2910, hot joystick buttons.

Posted

The default 777 (in fs2002 at least) has the same behavour. The leading edge flaps is defined by the aircraft.cfg as:

Oh, right. Yes, I've found the part of the Aircraft Container SDK which allows the definition of (any?) numbers of flap sets. And I've tried it with the 777 in both FS2002 and FS2004. You are right.

Odd then that there's no gauge tokens defined for anything but "Left Flaps" and "Right Flaps". I wonder how the panels manage to show these things correctly?

I've just found these variables in FS2002's SIM1.DLL

TRAILING EDGE FLAPS0 LEFT PERCENT

TRAILING EDGE FLAPS0 RIGHT PERCENT

TRAILING EDGE FLAPS1 LEFT PERCENT

TRAILING EDGE FLAPS1 RIGHT PERCENT

LEADING EDGE FLAPS0 LEFT PERCENT

LEADING EDGE FLAPS0 RIGHT PERCENT

LEADING EDGE FLAPS1 LEFT PERCENT

LEADING EDGE FLAPS1 RIGHT PERCENT

TRAILING EDGE FLAPS0 LEFT ANGLE

TRAILING EDGE FLAPS0 RIGHT ANGLE

TRAILING EDGE FLAPS1 LEFT ANGLE

TRAILING EDGE FLAPS1 RIGHT ANGLE

LEADING EDGE FLAPS0 LEFT ANGLE

LEADING EDGE FLAPS0 RIGHT ANGLE

LEADING EDGE FLAPS1 LEFT ANGLE

LEADING EDGE FLAPS1 RIGHT ANGLE

and there are similar ones in FS2004. I can try to map these into FSUIPC's address space and see what they provide. I assume the 0 and 1 sets are inboard and outboard? If not, what?

Alternatively, I could try to interfere with the value going to offsets 0BE0 and 0BE4 -- "correct" them according to these other values. Though I'm really not sure how I should combine them all. Currently the offsets 0BE0 and 0BE4 are actually two of the very few still in GLOBALS.DLL and still updated directly by FS, no FSUIPC involvement.

This is applicable to FS2002 as well, so how come the first request comes two years late? Very strange.

I tried to monitor those (2a98, 2aa8) locations, they always returned 0's, but I thought the locations might have been overridden by the 224 bytes used by 2910, hot joystick buttons.

No! Check your arithmetic :) 2910 + E0 (=decimal 224) gets you to 29F0. I don't do silly things like that, honestly. :D

Regards,

Pete

Posted

Odd then that there's no gauge tokens defined for anything but "Left Flaps" and "Right Flaps". I wonder how the panels manage to show these things correctly?

My guess would be by using timings. :) Thats how I did it in the meantime. Ie, it takes 2.5 seconds to go from Flap 0 to Flap 1, etc etc.

I've just found these variables in FS2002's SIM1.DLL

TRAILING EDGE FLAPS0 LEFT PERCENT

TRAILING EDGE FLAPS0 RIGHT PERCENT

TRAILING EDGE FLAPS1 LEFT PERCENT

TRAILING EDGE FLAPS1 RIGHT PERCENT

LEADING EDGE FLAPS0 LEFT PERCENT

LEADING EDGE FLAPS0 RIGHT PERCENT

LEADING EDGE FLAPS1 LEFT PERCENT

LEADING EDGE FLAPS1 RIGHT PERCENT

TRAILING EDGE FLAPS0 LEFT ANGLE

TRAILING EDGE FLAPS0 RIGHT ANGLE

TRAILING EDGE FLAPS1 LEFT ANGLE

TRAILING EDGE FLAPS1 RIGHT ANGLE

LEADING EDGE FLAPS0 LEFT ANGLE

LEADING EDGE FLAPS0 RIGHT ANGLE

LEADING EDGE FLAPS1 LEFT ANGLE

LEADING EDGE FLAPS1 RIGHT ANGLE

and there are similar ones in FS2004. I can try to map these into FSUIPC's address space and see what they provide. I assume the 0 and 1 sets are inboard and outboard? If not, what?

Yes, I would also presume that the 0 and 1 and inboard and outboard.

Alternatively, I could try to interfere with the value going to offsets 0BE0 and 0BE4 -- "correct" them according to these other values. Though I'm really not sure how I should combine them all. Currently the offsets 0BE0 and 0BE4 are actually two of the very few still in GLOBALS.DLL and still updated directly by FS, no FSUIPC involvement.

Hmm, this might be a bad move, I can not think how the current offsets could be corrected without possibly breaking them for other apps (if that is a consideration). The only way i can think of combining them is to do what I started to do, and read the current aircraft.cfg setting to get the resulting flap setting from each detent, and then reporting the flap pos as a detent as opposed to a single angle?

I think it would be much easier to just make each flap variable available, and leave stitching them together as an excercise for the reader? :)

This is applicable to FS2002 as well, so how come the first request comes two years late? Very strange.

It is possible that most people assumed as we first did, that flaps detent 1, ie flaps 1, should result in 1 degree of flaps and the 0 in the cfg file was a error.

It wasn't until I happened to be zoomed in on an outside view that I noticed the leading edge graphic moving and decided to investigate further.

I tried to monitor those (2a98, 2aa8) locations, they always returned 0's, but I thought the locations might have been overridden by the 224 bytes used by 2910, hot joystick buttons.

No! Check your arithmetic :) 2910 + E0 (=decimal 224) gets you to 29F0. I don't do silly things like that, honestly. :D

Doh. My bad, sorry. :) I did monitor them and they did stay 0. :)

Many thanks for your time and investigations, I apprecate it. :)

Posted
I think it would be much easier to just make each flap variable available, and leave stitching them together as an excercise for the reader? :)

Okay. I'll find some unused space and map these -- FS2002 and FS2004 only. If I need to access them procedurally (which is normal when I can't locate their storage allocations efficiently or reliably) they won't be updated on every frame, but I presume pretty much any fraction of a second delay won't matter roo much?

I'll email you a Beta to check when I do it. Won't be today though, but probably some time this week.

Regards,

Pete

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.