davegledhill Posted May 23 Report Share Posted May 23 I’m hoping an FSUIPC guru can assist on a very specific programming question. I operate the Tornado F3 Mission Simulator as a community project at a local museum. The cockpit is the decommissioned F3 simulator used in RAF service. It runs on PCs operating Win 10, P3D and Oculus Rift VR headsets. The simulation is the Just Flight Tornado F3. The PC interface is a Thrustmaster Warthog stick and throttle. FSUIPC is a current, registered copy of V6. I have recently been gifted a custom-built wing sweep lever and am trying to program it to operate with the slider on the Thrustmaster throttle quadrant, to provide wing sweep commands. In normal operation, the flaps and wings operate on the same (flaps) command in the sequence: flaps down, flaps mid, flaps up 25 wing, flaps up 45 wing, flaps up 67 wing. The reverse applies. The commands are set using the flap lever on the quadrant and Flaps incr, flaps decr commands in FSUIPC. FSUIPC calibration senses the slider and shows 8 flap detents for the F3 simulation. Whilst I have the wings moving broadly as the real jet would do, there are anomalies in the interim, 45 wing position. In 45 wing position, when sweeping the wings back, there is additional flap/lever movement in the VC before the wings go to 67. Coming back through 45 wing, the flaps go down. These are not evident simply using the flap lever. In trying to assign the flaps axis to the slider I used the following FSUIPC procedure/settings: Select axis assignment Set minimum change. Press Delta. Move a little. Press Delta again. Current value 64. Send to FS as normal axis Tick box and choose Flaps set Set up (using the new wing sweep lever attached to the slider): Range 1 from 12415 to 15199 with up checked Select Flaps 1 parameter 1 Select flaps Decr parameter 0 Range 2 from -3116 to 3008 with up and down checked Select Flaps Decr parameter 0 Range 3 from -15998 to -12432 with up and down checked Select Flaps Decr parameter 1 It would be good to have the FSUIPC commands reflect the normal sequence without the erroneous flap command in 45 wing. Can anyone offer advice to tweak the settings? Link to comment Share on other sites More sharing options...
John Dowson Posted May 23 Report Share Posted May 23 Can you please attach your FSUIPC6.log file so that I can see your assignments. Are you calibrating with detents, or sending those Flaps Decr and Flaps 1 (not sure what the first extension would be in this aircraft) commands on entering/leaving an axis range? If so, I don't understand why you would want to do this if you have also assigned the axis itself to the Flaps Set control. And the Flaps Incr/Decr events/controls do not take a parameter. If not calibrating with detents, maybe try this - see page 45 of the User Guide. Best to do this with the axis assigned using Send direct to FSUIPC calibration, but can use Send to FS as normal axis if this gives issues. Link to comment Share on other sites More sharing options...
davegledhill Posted May 24 Author Report Share Posted May 24 Hi John. Thanks for your help. Most grateful. To explain why I am trying to do this, we are striving for the best implimentation for the flap and wing sweep which is as realistic as possible. We have a variety of visitors ranging from young children to former Tornado F3 aircrew such as myself. In the real aircraft the flap functions were selected using the flap lever whereas the wings were swept using the manual wing sweep lever. Each were seperate functions. Although the simulator is a real cockpit, I cannot use the real controls as the sim was gutted when decommissioned. As an alternative, I fit the Thrustmaster Warthog stick and throttle which closely simulate the original hardware. I use the Tornado F3 simulation designed by Just Flight. When the programmer set up the flap and wing sweep functions, he elected to have them both operated by the flap selector but in sequence. In normal operation they cycle through the settings as I described in my first post. One direction on the flap lever uses Flaps Incr, the other is Flaps Decr. That function still works. As mentioned, a colleague has produced a new wing sweep lever - an addition to the Thrustmaster throttle box - that sits over the slider and uses that function. What I am trying to do is use the flaps lever to bring the flaps up and down but switch to the wing sweep lever in sequence to sweep the wings: Flap lever for Flaps down to Flaps Mid to Flaps up. Switch to Slider for wings to 45 to 67 to 45 to 25. Back to Flap lever for Flaps Mid and Flaps Down. Using that concept I managed to set 3 axis ranges on the slider which moved the wings from 25 to 45 to 67 and back through 45 to 25 (fully forward), albeit with anomalies. I am not hung up on a specific method, just one which will use the existing detents that the programmer included. If I can get this to work, the simulator will be hugely more realistic. Thanks for the pointer to the relevant section in the user guide. I will study that closely. I have attached the log. FSUIPC6.1.log Link to comment Share on other sites More sharing options...
davegledhill Posted May 24 Author Report Share Posted May 24 This is the simulator Facebook page as a picture can be worth a thousand words: https://www.facebook.com/f3simulator Link to comment Share on other sites More sharing options...
John Dowson Posted May 24 Report Share Posted May 24 I am sorry but I need to see your FSUIPC6.ini file to see your settings, not your FSUIPC6.log file. Please attach this. 2 hours ago, davegledhill said: In the real aircraft the flap functions were selected using the flap lever whereas the wings were swept using the manual wing sweep lever. Each were seperate functions. Maybe in the real aircraft, but how does this work in the sim? I presume you are using the flap controls for the flaps (flaps set, flaps incr/decr), but what controls/events are used to control the wing sweep? 2 hours ago, davegledhill said: When the programmer set up the flap and wing sweep functions, he elected to have them both operated by the flap selector but in sequence. In normal operation they cycle through the settings as I described in my first post. One direction on the flap lever uses Flaps Incr, the other is Flaps Decr. That function still works. As mentioned, a colleague has produced a new wing sweep lever - an addition to the Thrustmaster throttle box - that sits over the slider and uses that function. What I am trying to do is use the flaps lever to bring the flaps up and down but switch to the wing sweep lever in sequence to sweep the wings: Ok. So you want one hardware axis to control one section of the sim's flaps axis (to control flaps), and another hardware axis to control another section of the flaps axis. So, the full range of your hardware flaps axis (-16384 - + 16383) will control the flaps section of the sims flaps axis (-16328 to x), and the full range of your wing sweep axis (again -16384 to +16383) will control the wing sweep range of the sim's flaps axis (x to 16383)? 2 hours ago, davegledhill said: In normal operation they cycle through the settings as I described in my first post. One direction on the flap lever uses Flaps Incr, the other is Flaps Decr. That function still works. And that will also cycle through the wing sweep positions, no? 2 hours ago, davegledhill said: What I am trying to do is use the flaps lever to bring the flaps up and down but switch to the wing sweep lever in sequence to sweep the wings: Ok. But the flaps could be in any position when you use the wing sweep lever, no? If so, would this not cause a strange jump if using the wing sweep lever, say, when the flaps were stowed? 2 hours ago, davegledhill said: Using that concept I managed to set 3 axis ranges on the slider which moved the wings from 25 to 45 to 67 and back through 45 to 25 (fully forward), albeit with anomalies. Rather than using axis ranges, try assigning to the Flaps Set control, and then scale the axis assignment to the range to the wing sweep range, using FSUIPC's axis scaling functionality - see section Additional parameters to scale input axis values on page 43 of the Advanced User guide. If you want the wing sweep lever to control the range 12000 to 16383, try adding a scaling factor of *0.134,+14195. If the wing sweep range is before or after the 12000 mark, adjust as needed. It should also be possible using axis ranges, but I think you would need to use the Flaps Set control to set the flap positions to the correct wing sweep setting for each range, and not use the in/dec or other controls. 1 hour ago, davegledhill said: This is the simulator Facebook page as a picture can be worth a thousand words: https://www.facebook.com/f3simulator Sorry, can't see that as I am not on Facebook. John Link to comment Share on other sites More sharing options...
davegledhill Posted May 25 Author Report Share Posted May 25 Thanks again for your help John. I’ve attached the FSUIPC.ini To answer your questions: At present in the sim, the flap control lever moves the flaps then the wings in sequence using flaps incr/decr commands. I have those set in P3D. I do indeed want to use the flap lever to operate the flaps and the slider axis to control the wings. The slider takes over from the flap lever at the appropriate moment in the sequence. In normal operation, from flaps down, selecting flap lever forward, brings the flaps from down to mid, to up (in 25 wing) to 45 wing (flaps up) to 67 wing (flaps up). The reverse applies. The flaps should always be up when I start to use the wing sweep lever. One of the anomalies with the existing axis program is that coming back from 67 to 45, the flaps deploy. I assume I have introduced an erroneous value somewhere. I’m not smart enough to understand how the simulation designer has implemented the flaps/wings function. Logically, as the flap movement and wing movements are not linear, rather they move to set positions. He implemented a series of detents. Looking at Section 6 of the FSUIPC joystick calibration, the Just Flight Tornado F3 shows 8 detents. I can only identify 5: Detent 1, flaps down, wings 25 Detent 2, flaps mid, wings 25 Detent 3, flaps up, wings 25 Detent 4, flaps up, wings 45 Detent 5, flaps up, wings 67 Checking another thread, it seems that flap detents are determined using 16383/x=7+1=8. Thanks for the pointer to “Additional parameters to scale input” section. I’ll play around with that option and see what it gives me. No problem with the link. It has a short video of the present operation in the virtual cockpit. Once again most helpful thanks. FSUIPC6.ini Link to comment Share on other sites More sharing options...
John Dowson Posted May 25 Report Share Posted May 25 Your ini file is confusing me more... You only have ome assignment, and that is to the S axis of your HOTAS throttle. Is that the sweep lever? I thought this was a separate device.. The flaps settings make no sense: Quote 0=2S,64,F,65698,0,0,0 -{ TO SIM: FLAPS_SET }- 1=2S,U,12415,15199,65597,1 -{ TO SIM: FLAPS_SETEntering=FLAPS_1 }- 2=2S,B,-3116,3008,65759,0 -{ Entering=FLAPS_DECR }- 3=2S,B,-15966,-12432,65759,1 -{ Entering=FLAPS_DECR }- First, determine what the flap position values of the flap detents are. To do this, activate logging for Axis Events and send these to the console window. then move the flaps lever in the VC and take a note of the parameter for the Flaps Set event, or note the event being used. Then assign that lever by removing the assignment to the axis itself (you can select '(unused)'), and then set three ranges for your axis, and on entering/leaving set the values determined for the last three detents using the Flaps Set control, or use the controls logged for each detent. Link to comment Share on other sites More sharing options...
davegledhill Posted May 30 Author Report Share Posted May 30 Thanks John, I'll try that today. Link to comment Share on other sites More sharing options...
davegledhill Posted June 5 Author Report Share Posted June 5 I've made progress. I've managed to get a 90% solution although I still have an anomaly that I need to fix. The Just Flight folks who wrote the F3 program explained that the wings function is implimented by using variables. By programming two mouse macros that replicate the click function on the wing sweep lever in the virtual cockpit, and then programming three ranges in FSUIPC, I have the wings moving from 25 to 45 to 67 and back. There anomaly is that on some cycles (not all), the lever merely moves fractionally and doesn't move back from the 25 position to 45. This is not evident cycling back through 45 to 25. A little more effort to clear the anomaly and I have a workable solution. What an amazing program FSUIPC is! Link to comment Share on other sites More sharing options...
John Dowson Posted June 5 Report Share Posted June 5 1 hour ago, davegledhill said: By programming two mouse macros that replicate the click function on the wing sweep lever in the virtual cockpit, and then programming three ranges in FSUIPC, I have the wings moving from 25 to 45 to 67 and back. There anomaly is that on some cycles (not all), the lever merely moves fractionally and doesn't move back from the 25 position to 45. This is not evident cycling back through 45 to 25. A little more effort to clear the anomaly and I have a workable solution. Can you show me your FSUIPC7.ini file please, and also a log file showing your issue and I can take a look. Activate logging for Events and Axiis Controls. Its a good idea to keep the logging console window open and note the timestamp (in the log - first number) of when you get your issue. John Link to comment Share on other sites More sharing options...
davegledhill Posted June 6 Author Report Share Posted June 6 These are the FSUIPC 6 files John. FSUIPC6.1.log FSUIPC6.ini Link to comment Share on other sites More sharing options...
John Dowson Posted June 6 Report Share Posted June 6 I do not understand the following: 1. why do you have FLAPS_DET, FLAPS_DETENT_SET and FLAPS_UP assigned to ranges on your flaps axis? I would have though just assigning your your flaps axis to FLAPS_SET would be sufficient. 2. why are you also assigning to FLAPS_SET & FLAPS_UP in your wing sweep axis? I thought the wing sweep would be independent of the flaps 3. the ranges on your sweep controls look very strange, as well as the entering/leaving assignments, especially this one on the minimum axis value: 5=2S,B,-16384,-16384,65595,0,M3:1,0 -{ Entering=FLAPS_UP, Leaving=Macro F3_Sweep_Decr: F3_Wing_Decr }- On 6/5/2024 at 9:55 AM, davegledhill said: The Just Flight folks who wrote the F3 program explained that the wings function is implimented by using variables. Ok, that's interesting - could I see this explanation please? What type of variables? Can you not use these variables rather than mouse macros? Could you possibly attach a screenshot of the wing sweep and flap controls so I can see how these operate? Thanks, John Link to comment Share on other sites More sharing options...
davegledhill Posted June 7 Author Report Share Posted June 7 To be honest John, I have tried numerous combinations of the flap commands and, so far, this is the only one that has worked. Below, I’ve attached the relevant description of how the wing sweep is coded. The flaps increase/decrease commands move one wing sweep position at a time. When the wings are moving, the flaps are up. As Just Flight explained, they did this with variables. This is done in the virtual cockpit either with a flap command or a mouse click on the wing sweep lever. In coming up with this program I had tried flap commands with no success so switched to mouse macros. My logic was to program the axis range after finding an initial start point giving 25 wing, an intermediate range of positive axis value to prompt a shift to 45, the "flaps up" command for the extremity of the range (67 wing), a negative axis value to prompt a shift back to 45 and back to the 25 wing start position- 5 ranges. It didn’t work. I got to the 3 range setting I posted by trial and error. It gives what I want but not consistently. I’m sure there is a way to use the variables but I’m not smart enough to find it yet. I've attached screenshots showing the Thrustmaster throttle box (installed alongside the real hardware in the simulator. The slider (wing sweep) and flap lever are marked. I've also attached a shot of the virtual cockpit levers which replicate the real aircraft. I'm most grateful for your help and patience. The sweep position lever in the cockpit is triggering the following variables – “L:sweep_VC_LC,number” & “L:sweep_VC_RC,number”. As in LC = left click (decrease position) and RC = right click (increase position). Those vars get set to 1 in order to trigger code in the F3 gauge that handles the position of the lever as well and setting the flap position. It then gets set back to 0 when the action in done.So, setting L:sweep_VC_RC,number to 1 will cause the sweep lever to animate forward one notch and the level of sweep to change. It then goes back to 0. Setting it back to 1 will then cause the level to animate forward another notch etc. Setting L:sweep_VC_LC,number to 1 would then decrease the sweep lever animation. Link to comment Share on other sites More sharing options...
John Dowson Posted June 7 Report Share Posted June 7 Are not the flaps and wing sweep controls independent then? Can you try assigning your flaps lever to just the flaps set control, and remove the events sent on ranges. you can maybe also try to calibrate your flaps to the detents, as shown in the user guide. Doing this, is this not sufficient for the flaps lever control? For the wing sweep, assign the axis to (unused) and define 3 ranges (for the 3 positions), lets call them 1, 2 and 3. For range 1, you need to send the F3_Sweep_Decr macro when entering the range in Down. For range 2, you need to send the F3_Sweep_Incr macro when entering the range in Up. and the F3_Sweep_Decr macro when entering the range in Down For range 3, you need to send the F3_Sweep_Incr macro when entering the range in in Up Can you try this please and let me know how that goes. Link to comment Share on other sites More sharing options...
davegledhill Posted June 7 Author Report Share Posted June 7 Set Range 1 +16383 to +15600 Range 2 +2000 to -2300 Range 3 -15600 to -16383 That gives 25 to 45 to 25 to 45 to 25 so no 67 wing position. I set up and down checked in Range 2 Link to comment Share on other sites More sharing options...
John Dowson Posted June 7 Report Share Posted June 7 Just now, davegledhill said: Set Range 1 +16383 to +15600 Range 2 +2000 to -2300 Range 3 -15600 to -16383 That gives 25 to 45 to 25 to 45 to 25 so no 67 wing position. Then use four ranges...no matter how many ranges, the procedure, irrelevant of the control, is the same: - for the first range, you would assign to a decrement control when entering the range in Down - for the last range, you would assign to an increment control when entering the range in Up - for all other ranges, you would assign to an increment control when entering the range in Up, and a decrement control when entering the range in Down Think about it! Link to comment Share on other sites More sharing options...
davegledhill Posted June 7 Author Report Share Posted June 7 Tried that but still random movement. Playing some more. Link to comment Share on other sites More sharing options...
John Dowson Posted June 7 Report Share Posted June 7 1 minute ago, davegledhill said: Tried that but still random movement. But why? Note that you are using ranges in the reverse way than me - your range 1 is the top range, and is equivalent to my last range, and your range 3 is the bottom range (unless your axis is reversed, in which case you should reverse it anyway....). So check you are sending the correct incr/decr on up/down control respectively, depending on if it the start or end the range... I'm not sure what the issue is if the flaps and wing sweep really are two separate controls. This was/is confusing as your were talking about flaps events to control the sweep earlier, but then reported that they were controlled via lvars (or by using mouse macros). If they really are distinct controls, what I said earlier should work, although not having the aircraft I cannot check and verify here. I have asked Just Flight for a press-copy/developers license to investigate this. If I get one, I can take a look in more detail. Otherwise, I am not sure there is much more to add to what I have already said. John Link to comment Share on other sites More sharing options...
davegledhill Posted June 7 Author Report Share Posted June 7 John it's worked, although the increase decrease commands are not quite logical! I now have smooth cycling and no glitches. I set the interim ranges just off 0 in the logical sense. What worked: Unused in FSUIPC Calibration Range 1 14647 to 16383 Down checked. F3_Sweep_Decr . Range 2 512 to 3168 Down checked. F3_Sweep_Incr . Range 3 -16384 to -15677 Down checked. F3_Sweep_Incr . Range 4 -3759 to -1510 Up checked. F3_Sweep_Decr . Range 5 13759 to 16383 Up checked. F3_Sweep_Incr . Thank you so much for your patience and help. I'm most grateful. Incredible support! Link to comment Share on other sites More sharing options...
John Dowson Posted June 7 Report Share Posted June 7 (edited) 21 minutes ago, davegledhill said: John it's worked, although the increase decrease commands are not quite logical! I now have smooth cycling and no glitches. I set the interim ranges just off 0 in the logical sense. What worked: Unused in FSUIPC Calibration Range 1 14647 to 16383 Down checked. F3_Sweep_Decr . Range 2 512 to 3168 Down checked. F3_Sweep_Incr . Range 3 -16384 to -15677 Down checked. F3_Sweep_Incr . Range 4 -3759 to -1510 Up checked. F3_Sweep_Decr . Range 5 13759 to 16383 Up checked. F3_Sweep_Incr . These ranges sound very weird...for example, for range 1, how can you enter in down from a 16383 value? And also your ranges 1 and 5 overlap. Maybe your axis is reversed? i.e. bottom position positive, top position negative. For such axis, then the opposite of what I said applies about the top / bottom ranges. As I said, your top/bottom ranges only need to send one control (incr or decr) when entering either up or down, all other ranges need a control sent on both up and down.... Anyway, glad its now working. I have also just got a license through for this aircraft from Just Flight, so I can install and take a look in more detail, but this will have to be at the weekend. John Edited June 7 by John Dowson correction Link to comment Share on other sites More sharing options...
John Dowson Posted June 7 Report Share Posted June 7 Quote all other ranges need a control sent on both up and down.... That is not quite correct. What I mean is that for the intermediate positions, you need to define the same range twice, once with Up and the increment control, and another time with Down and the decrement control. So you need 6 ranges - one each for the top/bottom (one with Up,/increment, the other with Down/decrement), and two each for the two intermediate positions, one with Up/increment and the other with Down/decrement. Link to comment Share on other sites More sharing options...
davegledhill Posted June 7 Author Report Share Posted June 7 I'll certainly take another look. Just delighted it's working so huge thanks. Link to comment Share on other sites More sharing options...
John Dowson Posted June 17 Report Share Posted June 17 Sorry for the delay. I have checked this here now and can see the problems you are having. I have found the best way to assign the flaps and wing sweep to different axes is as follows: 1. For the flaps, define four ranges for the axis for the 3 distinct positions (the axis itself is unused) - you need the same two ranges for the central position as you are assigning different controls to the Up and Down. My axis is reversed (i.e. shows 16383 at minimum position and -16384 at maximum rather than the other way around) and so my Up/Down assignments will also be reversed compared to normal axis (that goes from -16384 to +16383). I have created 3 ranges: +9000 to +16383: send Flaps Decr when entering from Up (sets Flaps 0 from flaps 4680)) -3500 to +3500: send Flaps Decr when entering from Up (sets Flaps 4680 coming from 9360) -3500 t0 +3500: send Flaps Incr when entering from Down (sets flaps 4680 coming from flaps 0) -16384 to -9000: send Flaps Incr when entering from Down (sets flaps 9360 coming from flaps 4680) These are my resulting ini assignments: Quote 7=TR,256,D,26,0,0,0,*-1 -{ DIRECT: (Unused) }- 8=TR,U,9000,16383,65759,1 -{ DIRECT: (Unused)Entering=FLAPS_DECR }- 9=TR,D,-3500,3500,65758,1 -{ Entering=FLAPS_INCR }- 10=TR,U,-3500,3500,65759,1 -{ Entering=FLAPS_DECR }- 11=TR,D,-16384,-9000,65758,0 -{ Entering=FLAPS_INCR }- 2. Similarly, for the wing sweep you also need to set 4 ranges and assign similarly to the flaps axis but use the wing swee up/down mouse macros: Quote 12=TV,256,D,26,0,0,0 -{ DIRECT: (Unused) }- 13=TV,U,9000,16383,M6:4,0 -{ DIRECT: (Unused)Entering=Macro F3Tornedo: WingSweepDown }- 14=TV,U,-3500,3500,M6:4,0 -{ Entering=Macro F3Tornedo: WingSweepDown }- 15=TV,D,-3500,3500,M6:3,0 -{ Entering=Macro F3Tornedo: WingSweepUp }- 16=TV,D,-16384,-9000,M6:3,0 -{ Entering=Macro F3Tornedo: WingSweepUp }- This seems to work pretty well mostly. However, you do get issues if you move the wing sweep axis when the flaps axis is not in the correct position and vica versa, moving the flaps axis when the wing sweep axis is not in the correct position. There is not much you can do about this with these assignments - you could maybe use lua to prevent such issues, but I think there would always be issues if/when your hardware levers mismatch the positions of the levers in the VC. Of course, it is not possible to do this (i.e. move the wing sweep lever when the flaps lever is not in the correct position, and vica-versa) in the VC, but there is nothing to stop you doing this with your own levers, and if you do then this is when mismatch problems can occur. Cheers, John Link to comment Share on other sites More sharing options...
davegledhill Posted June 22 Author Report Share Posted June 22 Apologies John but only just seen this. Thanks for your help. With your guidance I now have a unique addition to the simulator. I programmed the cockpit yesterday and it’s working great. Thanks again Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now