Jump to content
The simFlight Network Forums

Autopilot feedback control facility


Recommended Posts

Hello,

I reinstalled FSX and the latest FSUIPC4 onto my new PC. I added Debug=Please in the fsuipc.cfg set 32 in the logging extras section, when i go to assign my buttons to Fsuipc speed hold off and Fsuipc speed hold on, those are not shown in my choices. It worked on my last set-up just fine. My new system uses Vista Premium Home 32, FSX thru SP2, and my old set-up was WINXP and FS9/FSX.

Thanks,

Rob

Link to comment
Share on other sites

Hello,

I reinstalled FSX and the latest FSUIPC4 onto my new PC. I added Debug=Please in the fsuipc.cfg set 32 in the logging extras section, when i go to assign my buttons to Fsuipc speed hold off and Fsuipc speed hold on, those are not shown in my choices. It worked on my last set-up just fine. My new system uses Vista Premium Home 32, FSX thru SP2, and my old set-up was WINXP and FS9/FSX.

Can you give me details of the references you are using, please? As far as I remember these there was a temporary testing facility I added for this, for Enrico Schiratti, when he was thinking of implementing a new autopilot, but I don't recall releasing them generally nor maintaining them through to FSUIPC4. I wasn't aware anyone was using them.

Incidentally, please never just say "latest FSUIPC4". That's meaningless -- I've had cases where folks have said that and it turned out they were using a year-old version. they'd not seen an pdate on whatever site they went to, and they never referred to the "supported versions" announcement in this Forum. Please ALWAYS quote the actual Version number. It is easy enough to find, after all, being displayed in the Options, logged in the logs, etc.

Pete

Link to comment
Share on other sites

I have 4.28 which i downloaded last week and installed. I found the document with all the info located in your SDK files i downloaded. Here is the info found in that file,

"FSUIPC Autopilot feedback control facility

==========================================

This is preliminary and rudimentary documentation only. Please feel

free to ask questions.

Offsets 0700 - 0717 = Pitch control by elevator and/or elevator trim

Offsets 0718 - 072f = Bank control by aileron

Offsets 0730 - 0747 = KIAS/GS control by throttle(s)

Offsets 0748 - 075F = Mach control by throttle(s)

The latter two are mutually exclusive -- if both are enabled only KIAS

operates, the other is switched off.

Each of these blocks of 24 bytes are used as follows:

0-7 Double target pitch or bank, in degrees, speed in knots or Mach

8 Switch to enable the control loop.

This is 0 for "off", non-zero for "on". FSUIPC reduces this by 1 every 50-55

mSecs, so your program needs to write FF here at intervals not exceeding 14

seconds -- do it every 5 at least, for safety. This mechanism is to prevent

the user losing control if your program crashes or terminates without

clearing this down.

9 Flags:

2^0 = 1 No trim-out. This is only applicable to pitch control,

By default FSUIPC will control the pitch using the elevator, but then, when

very close (less divergence than your original minimum), it will trim out

the elevator divergence. This is more or less what a pilot would do and seems

to be the way the real aircraft work too, as far as we've determined.

However, if you do not want this transfer of offset to the trim, set this

flag.

2^1 = 1 Trim only: again, this is only applicable to pitch control.

Normally FSUIPC will control the pitch by elevator adjustments. If this flag

is set it will use the trim only.

Note that the flags are independent -- even if the trim is used for control,

any user-set or remaining deviation on the elevator can also be trimmed out

when the pitch is closely achieved.

2^2 = 1 Speed and Mach control only: use EPR for engine limits instead

of N1% (see below).

2^3 = 1 Speed control only: use ground speed, not indicated air speed

10-19 Factors used in the feedback loop calculations.

These are 5 16-bit values, as follows:

10-11 value L

= unsigned low difference, in

degrees/knots/machhundredths * 256

128 == 0.5 degrees default for pitch and bank

51 == 0.2 knots for speed

10 == 0.0004 mach (.04 1/100ths)

12-13 value H

= unsigned high difference,

in degrees/knots/machhundredths * 256

2560 == 10.0 degrees default for pitch and bank

7680 == 30 knots for speed

1792 == 0.07 mach ( 7 1/100ths)

14-15 value R

= signed max rate of change to attempt,

in degrees/knots/machhundredths * 256 per sec

307 == 1.2 degrees per sec default for pitch and bank

589 == 2.3 knots per sec default for speed

256 == 0.01 mach per sec (1 1/100th)

(The sign allows reversal if needed)

16-17 value Fh

= signed high fiddle factor, scalar * 256

25600 = 100 default for pitch and bank

7600 = 29.7 default for speed and mach

17-18 value Fl

= signed low fiddle factor, scalar * 256

12800 = 50 default for pitch and bank

3600 = 14.8 default for speed and mach

Note that you can change these at any time, but the change does not become

effective until you next enable the feedback control after it has been turned

off (and seen to be turned off). This is because FSUIPC builds a lookup table

from these values, it doesn't use them directly.

New values will also be applied after FS has been paused, put into slew mode,

or entered menus or modal dialogues. This is because all the feedback

operations are suspended during these times (to prevent absurd runaway

changes) and this is effectively achieved in the same way as you turning the

operations off and on again.

20-21 Parameter 1:

22-23 Parameter 2

The use of these depends on the control:

For pitch and bank, Parameter 1 is the maximum change to the FS control in any

one "tick". Default is 512 (out of the range of -16383 to +16383 provided by

the control). The pitch and bank loops operate at FS's tick rate of 18/sec

(approx), so this limits the change to 9216/sec.

For pitch only, parameter 2 is the amount of trim to transfer per tick when

"trimming out", unless this is prohibited by the option flag 2^0. By default

this is 32 -- i.e. 576 per second. This will help applications in achieving

realistic trim wheel movements -- I suspect there's a limit to how fast they

really spin. Certainly the PFC motorised trim wheel will be regulated (but I

don't know its speed yet).

For speed and mach control, Parameter 1 gives the maximum engine setting and

Parameter 2 gives the minimum. This, by default, is the N1% value, in exactly

the same units as provided by FSUIPC (e.g. offset 0898 for Engine 1). For

props this will relate to the RPM of course. The defaults are 90% (value

14745) and 20% (3276) respectively.

If you want the limits in terms of EPR, set the flag 2^2 and replace these

limits by ones in the same units as the FSUIPC supplied EPR (e.g. offset 08BC

for engine 1). Note that FS does not provide EPR for props nor for all jets.

FSUIPC controls each engine separately within the same limits, but using the

same throttle changes for each, calculated in the same way. It only operates

throttles for engines which exist and which are flagged as "combusting"

(e.g. FSUIPC offset 0894 for Engine 1).

Note that changes to the target, the switch, the flags, and Parameters 1

and 2, can be made at any time and are effective immediately, unlike the

factors themselves. The feedback loop is roughly 18 times per second for

all controls.

The actual target rates are calculated from the difference in target value and

current value, using rates of change, and using the variables detailed above.

The pitch and bank system seems to work quite well. There are frequent little

trim changes, but maybe these are realistic (time to watch some cockpit videos

I think! ).

The speed control needs tuning -- especially the Mach one which is way out at

present. The "fiddle factors" are just my "guesses" and need refining. The

mach minimum and maximum and the max rate are also my initial guesses.

My testing facilities are still in place, so you can play with those. To use

them, do this:

1. Edit the FSUIPC.INI file, adding "Debug=Please" into the [General] section.

2. Load up FS, go to the FSUIPC Logging page and enter "32" into the Extras

logging edit box.

3. Now go to the Keys or Buttons page. You can assign key presses or buttons

to the following extra controls now made available:

Fsuipc bank hold off

Fsuipc bank hold on

Fsuipc bank hold set

Fsuipc bank hold toggle

Fsuipc mach hold off

Fsuipc mach hold on

Fsuipc mach hold set

Fsuipc mach hold toggle

Fsuipc pitch hold off

Fsuipc pitch hold on

Fsuipc pitch hold set

Fsuipc pitch hold toggle

Fsuipc speed hold off

Fsuipc speed hold on

Fsuipc speed hold set

Fsuipc speed hold toggle

These should be self-explanatory. For the "Set" ones, put the value to

be set as the parameter -- only whole numbers, but okay for testing

(degrees, knots, or 100 x mach). For the "on" and "toggle" controls the

current pitch/bank.speed or mach becomes the target to maintain.

When this test option is enabled the timeout (switch decreasing by 1 each

tick) does not apply, for obvious reasons.

Have fun and let me know how you get on!

=========================================

Pete Dowson, February 2005

=========================================

Link to comment
Share on other sites

I have 4.28 which i downloaded last week and installed. I found the document with all the info located in your SDK files i downloaded. Here is the info found in that file

Just the reference would have done, you know! :shock:

Phew! That's really old stuff. Over three years since I did that, not touched it since.

The bit that says "My testing facilities are still in place" was true then. Sorry, obviously I forgot to remove that. The testing facilities were only intended to be in place for a limited time, basically till I'd finished testing, maybe a wee time after. And this was on FSUIPC3 only. The testing facilities were there for testing, I naturally didn't expect folks to actually USE them for real, even then only to evaluate the facilities to see if they looked worth using for their programmed autopilots. I doubt they've ever been tested in FSUIPC4 as I don't know anyone who ever used them (till now, it seems).

Checking my code I see this facility is still enabled in FSUIPC 3.81, but I'm not sure that it has ever been in FSUIPC4. Did you use it in FSX, and if so in which FSUIPC version? More to the point, did it still work?

How and why are you using them? I can probably re-enable the testing facility, but if there's a genuine real use for the added controls as they stand I should be considering enabling them by default, not via a Debugging Test facility -- or at minimum by something sensible like "EnableAddedHoldControls=Yes" in the INI.

Regards

Pete

Link to comment
Share on other sites

I was using it to control the airspeed on my 727 since dreamfleet didn't have it in their plane and the 727sim i am modeling has AutoThrottle. In FSX, i thought i was using it to control the Captain Sim 727 throttle as well but i could be wrong. I do know it worked great in FS9 so it would be great to have it available in FSUIPC4 :wink: I have no autothrottle now in FSX in my 727.

Thanks,

Rob

Link to comment
Share on other sites

I was using it to control the airspeed on my 727 since dreamfleet didn't have it in their plane and the 727sim i am modeling has AutoThrottle. In FSX, i thought i was using it to control the Captain Sim 727 throttle as well but i could be wrong. I do know it worked great in FS9 so it would be great to have it available in FSUIPC4 :wink: I have no autothrottle now in FSX in my 727.

I know the pitch and bank holds worked pretty well, but i never did get the speed control workiing that well -- it always seemed to hunt too much on the aircraft I tried it on. Some of the parameters need adjusting to suit each aircraft, separately.

Why doesn't Deamfleet's 727 have autothrottle? Weren't those models so equipped?

I'll look at possibly re-instating the options, but maybe in a different form. watch for a future increment in the Announcements above. You'll need to test it out in FSUIPC4 as I doubt it has ever been used.

Regards

Pete

Link to comment
Share on other sites

It worked very well at holding speed on the DF727. They didn't model the later 727-222's or the converted -100 which is what i am building. I got lucky and got a real 727 TQ with the AT option! I appreciate you adding it back in and i will test and advise how it goes. I may even add the moving thottles as well.

Thanks,

Rob

Link to comment
Share on other sites

  • 3 weeks later...

I am using FSX with SP 1. I have updated to FSUIPC 4.297.

I take off and get to a desired alt and level off. I then set 0x0718 (Target Bank) to 15.0 deg. I then set 0x0720 (Enable/Disable) to 0xFF. Nothing happens. I can do this with fs9 and FSUIPC 3.81. One difference that I see is that offset 0x0720 decrements by one automatically in fs9 so I keep writing 0xFF to it every so often. In fsx I write 1 to it and it stays at 1. I have verified that offset 0x0726 (Bank Rate) is set to 1280.

Any ideas on what I am doing wrong???

Link to comment
Share on other sites

I take off and get to a desired alt and level off. I then set 0x0718 (Target Bank) to 15.0 deg. I then set 0x0720 (Enable/Disable) to 0xFF. Nothing happens. I can do this with fs9 and FSUIPC 3.81. One difference that I see is that offset 0x0720 decrements by one automatically in fs9 so I keep writing 0xFF to it every so often. In fsx I write 1 to it and it stays at 1.

The difference between the two is simply that you have no updated your FSUIPC3 version to the same level as your FSUIPC4 version, as the feedback facilities were added as general FSUIPC-added controls to both recently, as you would notice if you read the release notes.

Any ideas on what I am doing wrong???

No idea at all I'm afraid. These were experimental untested facilities which i only released generally because i was told they worked. Please refer to the reports earlier in this thread. Unfortunately, even after I "fixed" the problem reported earlier I've had no feedback at all from "737nut".

You will note that I said "You'll need to test it out in FSUIPC4 as I doubt it has ever been used." I've actually never been in a position to even look at them in FSX. To verify that it isn't something in your code, can you try the FSUIPC controls instead?

Regards

Pete

Link to comment
Share on other sites

I take off and get to a desired alt and level off. I then set 0x0718 (Target Bank) to 15.0 deg. I then set 0x0720 (Enable/Disable) to 0xFF. Nothing happens. I can do this with fs9 and FSUIPC 3.81.

OkayI found the problem. In fact the internal table for the feedback functions got screwed up a little when I re-coded it for FSX, and of course I'd not gotten around to testing it in FSX yet. It looks like only the pitch feedback part would have had any chance of working.

I'll fix the tables in the next increment -- watch out for 4.298 or later in the FSX Downloads announcement above.

I can't guarantee that the facility will work well in FSX. The various parameters and timings will probably need adjusting. However, please do feedback any results you do get.

Regards

Pete

Link to comment
Share on other sites

My dilema.... I am trying to interface our (L-3 Communications) glass cockpit to fsx to show integrated autopilot functionality for COPA (Cirrus Owners and Pilots Association) which I have to leave for in two days. Is there any way I could get a fix before the next update?

Any help would be much appreicated.

Thanks.

Link to comment
Share on other sites

Is there any way I could get a fix before the next update?

Your request is illogical! How can I provide an update before the next update? That would be the next update! That's what "next" means! The one which comes next!

I am working on fixing it now. When it is done it will be compiled and supplied as the next update! They aren't scheduled like trains, I provide them when something significant is changed. This is a change, I am working on it at the moment. Answering daft messages slows it down, of course ...

I don't see how you can rely on it, however, as it won't necessarily be working 'properly' -- i.e. actually stabilly controlling the aircraft. That may need some adjustments, and for that I would need feedback.

Pete

Link to comment
Share on other sites

watch out for 4.298 or later in the FSX Downloads announcement above.

4.298 is available now. I've checked the default feedback settings here and so far they seem to work about as well as it did in FS2004 -- i.e. not bad for pitch and bank, a little unstable for speed and mach. And the 90% N1 limit default for jets seems to be too severe a restriction on FSX compared to FS2004. Maybe a higher default is needed? Is FSX underpowered compared to FS2004?

Pete

Link to comment
Share on other sites

Thanks! I will give it a try.

I am unable to enage vertical speed hold (offset 0x07EC) in fsx. I use fsx to engage the autopilot which goes into pitch roll hold. Then I engage heading mode. Then I engage VS Mode. You can't just engage VS mode through fsx. If I try to do this through my program everything works up to engaging VS hold. I see that a 1 gets written to the correct spot but VS mode doesn't get engaged.

Have you ever heard of anyone having problems with this behavoir?

Link to comment
Share on other sites

I see that a 1 gets written to the correct spot but VS mode doesn't get engaged.

Have you ever heard of anyone having problems with this behavoir?

I didn't think V/S hold ever worked on its own in any version of FS. You set a target altitude for altitude hold, then adjust the V/S you require, and FS tries to hold to that V/S until acquiring the altitude. I think if you don't have an altitude set then the V/S won't hold in any case.

Pete

Link to comment
Share on other sites

  • 1 year later...

Hi Pete,

I just tested the fsuipc speed hold function using FSX and Captain Sim 727, works great but it needs to go a little higher on the N1. Is there an .ini setting that wiould give me more N1/power to hold speed? Sorry for the long delay in testing. Life duties called.

Thanks,

Rob

Link to comment
Share on other sites

I just tested the fsuipc speed hold function using FSX and Captain Sim 727, works great

Really? That's a surprise -- the pitch and bank controls worked well last time i looked, but I gave up on the speed control. Just couldn't stop the oscillations.

but it needs to go a little higher on the N1. Is there an .ini setting that wiould give me more N1/power to hold speed?

There's no "INI" parameters for any of those functions. It's all via parameters in offsets. You'd either need to write an application to interface to FSUIPC tomodify the offsets, or possibly a Lua plug-in. At the very easiest it might be a matter of an FSUIPC "offset" control to change a parameter, but I've a feeling that's not on.

I really don't remember much of this in any case. Do you have the documentation? It was never openly published as far as I recall, and it was a long time ago I messed with it. If you don't have the internal details I'll try to find you a copy, as a start.

Regards

Pete

Link to comment
Share on other sites

Pete,

This is a quote from you a few post back in this thread,

And the 90% N1 limit default for jets seems to be too severe a restriction on FSX compared to FS2004. Maybe a higher default is needed? Is FSX underpowered compared to FS2004?

You hit the nail on the head about the 90% limit being to low. The 727 i fly needs about 97% to maintain a good climb.

Link to comment
Share on other sites

This is a quote from you a few post back in this thread

Blimey, I only just noticed. This thread started years ago! And it has the documentation included. I'll have ot print that out as i don't seem to be able to find my copy! ;-)

And the 90% N1 limit default for jets seems to be too severe a restriction on FSX compared to FS2004. Maybe a higher default is needed? Is FSX underpowered compared to FS2004?

You hit the nail on the head about the 90% limit being to low. The 727 i fly needs about 97% to maintain a good climb.

Okay. Is that a default in my settings, or in the aircraft's CFG or AIR files? Can you point to where you read that, please? I'm a bit lost here. (Old age and memory -- they don't mix!)

I'd be delighted to change a default built into FSUIPC4 if a new value (compared to FSUIPC3?) is better, but i need help in getting back into this particular area, please. Sorry.

Regards

Pete

Link to comment
Share on other sites

Pete,

I'm not sure where it is but i'll try and find something. I was going off the presumption that where you stated 90% didnt seem high enough and seeing as how when i engage fsuipc speed hold function the max N1 i see is 90%. I was assuming it was internal to fsuipc? sorry

Link to comment
Share on other sites

Pete,

I'm not sure where it is but i'll try and find something. I was going off the presumption that where you stated 90% didnt seem high enough and seeing as how when i engage fsuipc speed hold function the max N1 i see is 90%. I was assuming it was internal to fsuipc? sorry

Well, yes, it would be internal, but only the default settings. The parameters used are customisable via the documented offsets. Of course I can change the defaults if there are better ones. Can you point me to where I said what you say I said, please? I'm still a bit confused on this. It is an area I haven't worked on for years.

Regards

Pete

Link to comment
Share on other sites

Pete,

Sorry if i confused you. Certainly not my intentions but understandable as i pulled this post up from the dead. :)

On page one of this thread you stated there were internal feedback tables for the FSUIPC AP functions. You mentioned some timing and coding issues converting to FSX. Then later in the thread you mentioned that 90% N1 (an apparent max limit set in the internal table?) was not enough to climb in the jet and wondered if FSX was underpowering the aircraft.

Based on those staements i assumed that there was a parameter with-in FSUIPC that i could change to set the max value that FSUIPC would use to hold my set airspeed. The stock planes and my CS727 will go over 100% no problem but only the FSUIPC speed hold seems limited to the aforementioned 90% N1 max setting. I hope that helps you some?

Thanks for your time and this great product!

Rob

Link to comment
Share on other sites

On page one of this thread you stated there were internal feedback tables for the FSUIPC AP functions.

Yes, those are the ones which are accessed via FSUIPC offsets so that third party applications can "tune" the operation for different aircraft.

You mentioned some timing and coding issues converting to FSX. Then later in the thread you mentioned that 90% N1 (an apparent max limit set in the internal table?) was not enough to climb in the jet and wondered if FSX was underpowering the aircraft.

Okay. I was probably hoping someone would experiment with different values, and maybe come back with different defaults which would work much better out of the box? Not that the speed control ever worked well for me even in FS9.

Based on those staements i assumed that there was a parameter with-in FSUIPC that i could change to set the max value that FSUIPC would use to hold my set airspeed. The stock planes and my CS727 will go over 100% no problem but only the FSUIPC speed hold seems limited to the aforementioned 90% N1 max setting. I hope that helps you some?

I'm not sure. I assume you've not, therefore, tried increasing it via the relevant offset(s)?

Or are you saying that, notwithstanding the offset value adjustments you can make, there's some limit I'm applying which you can't change? If so, then it seems like I'll need to search the thread to see what you are talking about. Sorry, I thought you'd found it so could quote it or point me to it.

Regards

Pete

Link to comment
Share on other sites

Sorry if i confused you.

Okay, I had time this morning to read through the whole thread to work out what you were talking about.

I assume that this is the part relevant to your question:

For speed and mach control, Parameter 1 gives the maximum engine setting and

Parameter 2 gives the minimum. This, by default, is the N1% value, in exactly

the same units as provided by FSUIPC (e.g. offset 0898 for Engine 1). For

props this will relate to the RPM of course. The defaults are 90% (value

14745) and 20% (3276) respectively.

Now I know it looks like I could, if warranted, increase the default for the maximum N1% value from the 90% it states here, but if I did do so I'd be worried that some other users could just possibly be relying on this being defaulting at 90% (After all, perhaps 90% is okay for some aircraft but not others? This is precisely why they are only default values and not fixed).

Even if you are not writing a program to modify the values, and only using the built-in test controls offered by FSUIPC for assignment to buttons or keys, you could add, to that button or keypress programming, an "Offset Word Set" control to write the increased value you require to the relevant offset. Since the maximum N1% goes into Parameter 1, bytes 20-21 of the speed control block starting at offset 0730, the WORD offset to be changed is 0730 + 14 (hex for decimal 20). i.e. 0744.

So, use "Offset Word Set" with offset x0744 and the parameter set to, say, 97% of the N1 max of 16384: in other words 15892 (or x3E14).

Noting this statement in the document:

Note that changes to the target, the switch, the flags, and Parameters 1

and 2, can be made at any time and are effective immediately, unlike the

factors themselves.

you could experiment with smaller or larger values, "on the fly", to find your ideal value.

Try it and please let me know how you get on.

Regards

Pete

Link to comment
Share on other sites

  • 3 months later...

Myself and a programmer are looking into this feedback control facility to try to determine if it will be a viable doorway into creating a system where the KIAS or mach value placed will cause the nose to pitch up or down to maintain that reference value. Are you familiar if this facility has been used for that purpose before.

Example, 250 KIAS is entered in the SPD reference window and instead of the thrust increasing/decreasing to maintain that value, the nose pitches to maintain that referenced speed? This is done on many aircraft that do not feature an auto throttle system.

thanks,

Eric

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.