Jump to content
The simFlight Network Forums

Looking for a trick


Recommended Posts

Hello,

One of my favoriths is still the SD YAK-40, but I have a small problem with it, it has continuous setting of flaps, but only 0°, 20° and full flaps are used, so I made some button programming :

21=W0BE0<9365 CR(F+0,10)(F-0,31)0,4,K118,8 ; F7 (Flaps down)

22=W0BE0>9364 CU(F+0,10)(F-0,31)0,4,C1003,31 ; set flag 31 at 20° Flaps

23=W0BE0>9364 CP(F+0,10)(F+0,31)0,4,K119,8 ; Flap at 20°, do F8 (Full Flaps)

24=CP(F+0,10)0,5,K116,8 ; F5 (Flaps up)

25=CP(F+0,10)0,5,C1004,31 ; Reset flag 31

As long as the flaps are < 20° and I push button 4 the flaps are going to 20°. If I release the button 4 at 20° the flag 31 is set. Next when I push button 4 again, the flaps are going to full. When I push button 5, the flaps are going up and the flag is reset. This works nicely but with one annoyance: I have to push button 4 until they come at 20° and they are going slooow. Does somebody know a trick so I have only to "pulse" the button 4 ?

Thanks in advance,

Hugo

Link to comment
Share on other sites

One of my favoriths is still the SD YAK-40, but I have a small problem with it, it has continuous setting of flaps, but only 0°, 20° and full flaps are used, so I made some button programming :

Instead of using key presses, which translate into FS contorls, why not assign to the controls themselves? That would be much more effiicent and less likely to error.

For precise setting as well as using Flaps Inc/Dec, (F7/F6) and Flaps up/Full (F5/F8), consider using Flaps Set with the parameter giving the position (full = 16383, up = 0, seems you found the interim at 9635? Though the control value for that might be 8192 if its notched.

I don't really understand why you need to have the Flaps Inc (you call Flaps down) repeating. I assume the 0, 20 and full positions aren't notched (detentes), so the flaps stop anywhere? If so then certainly Flaps Set with 0, 9635(or 8192 maybe) and 16383 would be much easier to do and avoid doing repeats or testing offset 0BE0. This would also solve your annoyance.

Pete

Link to comment
Share on other sites

Hi Pete,

Indeed the flaps haven't detentes, like on the real one the flaps can by set to any angle.

I changed the "Key buttons" to controlls, which are working well. The rows below are working but with the "old annoyance". You wonder why the value must be 9635: it is because at that moment the "technician or KGB-man?" says "Flaps set 20", he doesn't at lower values.

21=W0BE0<9365 CR(F+0,10)(F-0,31)0,4,C65758,0 ; Flaps incr

22=W0BE0>9364 CU(F+0,10)(F-0,31)0,4,C1003,31 ; set flag 31 at 20° Flaps

23=CP(F+0,10)(F+0,31)0,4,C65603,0 ; Flap at 20°, do Full Flaps

24=CP(F+0,10)0,5,C65595,0 ; Flaps UP

25=CP(F+0,10)0,5,C1004,31 ; Reset flag 31

Because I found this not working on the Suprunov YAK-40

21=CP(F+0,10)0,4,C65698,9365 ; set flaps 20? is not working (with this airplane?)

22=W0BE0>9364 CP(F+0,10)(F-0,31)0,4,C1003,31 ; set flag 31 at 20° Flaps, would work when the previous row would work.

23=CP(F+0,10)(F+0,31)0,4,C65698,16383 ; does not "Full Flaps" but "Flaps Up" (with this airplane?)

The last row does the same as:

3=CP(F+0,10)(F+0,31)0,4,C65698,0 ; which works...

Thank your for your quick answer so early after returning from vacation...

Hugo

Link to comment
Share on other sites

Indeed the flaps haven't detentes, like on the real one the flaps can by set to any angle.

I changed the "Key buttons" to controlls, which are working well. The rows below are working but with the "old annoyance". You wonder why the value must be 9635: it is because at that moment the "technician or KGB-man?" says "Flaps set 20", he doesn't at lower values

In that case the "old annoyance" should vanish if you used the Flaps Set control with appropriate parameters as I suggested.

Because I found this not working on the Suprunov YAK-40

21=CP(F+10)0.4,C65698,9365 ; set flaps 20? is not working (with this airplane?)

The syntax is wrong. Try

21=CP(F+0,10)0,4,C65698,9365 ; not commas, not points, and (F+0,10)

Do the flaps move at all? If so, where to? Don't forget the offset 0BE0 read-out (from which you derived the 9635) does not correspond to the control values you need to send -- the read-out is related to the angle, I think, whilst the control relates to lever positions. See where the flaps go to and adjust accordingly. Try 8192 for example.

If it doesn't move at all with values other than 16383 and 0 then the implementer of the aircraft has evidently done some very strange programming and is avoiding the FS methods altogether.

You would need to check Flag 0,31 was not set in any case:

21=CP(F+0,10)(F-0,31)0,4,C65698,9365

22=W0BE0>9364 CU(F+0,10)(F-0,31)0,4,C1003,31 ; set flag 31 at 20° Flaps, would work when the previous row would work.

Best to do this instead:

22=CP(F+0,10)(F-0,31)0,4,C1003,31

23=CP(F+0,10)(F+0,31)0,4,C65698,16383 ; does not "Full Flaps" but "Flaps Up" (with this airplane?)

The last row does the same as:

3=CP(F+0,10)(F+0,31)0,4,C65698,0 ; which works...

Both values 0 and 16383 do the same thing? That's very weird! I am very confused by the implementation. Does the author have any explanation?

Regards

Pete

Link to comment
Share on other sites

Hello Pete,

Well, the errors in the instructions were typo's and not actual copies from thr FCUIPC.ini.

I found a parameter in the SD YAK-40 inifile "Flaps step 0.2". So I thought 100 steps are needed to get 20, and I programmed the Set Flaps with "100". Thre was no movement. So I changed the value in the YAK-40 inifile to "Flaps step 20.0" and bingo! I can now use the Flaps Inc instruction to go to 20°.

The final instruction sequence is now :

21=CP(F+0,10)(F-0,31)0,4,C65758,0 ; Flaps incr

22=CU(F+0,10)(F-0,31)0,4,C1003,31 ; Set flag 31

23=W0BE0>8192 CP(F+0,10)(F+0,31)0,4,C65603,0 ; Flap at 20, do "Full Flaps"

24=CP(F+0,10)0,5,C65595,0 ; Flaps up

25=CP(F+0,10)0,5,C1004,31 ; Reset flag 31

I can't ask Mr. Suprunov for some explanaition. He was for years a pilot of a YAK-40 and had an A-rating for Airbus. He died this year in Moscow in the night of 25 april. Why the "Set Flap" to a value is not working will stay a mistery...

Hugo

Hugo

Link to comment
Share on other sites

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.