Sign in to follow this  
jcomm

Proof of concept - new datarefs...

Recommended Posts

Tonight I played a bit with the Carenado PA34 ( Seneca ) already upgraded to version 3.0, and Dan's new approach to the "torque bug".

 

The section used in his prop models is in the Seneca, but commented because it's a counter-rotating twin, so, I used Plane-Maker to make

it a CW for both props, edited the LUA script used in the new Carenados and played for a while with Dan's approach and different values for

the roll and yaw moments.

 

Overall the results were rather satisfactory, although probably not the best for the Seneca, but at least now I have the proof that indeed, using this

"forces" we can fine tune prop effects.

 

I think Laminar should probably in one of the next updates to X-Plane 10, apply this datarefs to the default, or some of the default props, and show

users what they actually allow for.

 

We're in the good way!

 

And a big thank you to Dan for having made it available!

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

I'm initially mainly concerned about future-proofing the v3-line of Carenado/Alabeo updates, and getting the old "prop_dir" paradigm eliminated from the equation, in case a future version of X-Plane really does break this hack.

 

As such, I have honestly not spent much time exploring everything you could possibly do with this.  But the concepts of how to multiply the force values by different parameters are quite simple, and they're pretty much there in the script.  Now there's no limits to what can be done with this.  

 

I don't think Laminar will do much showcasing of what these forces allow for... I think it's a matter of authors and tweaks seeing the possibilities of what you can do, simply by determining which forces get added to or subtracted from which axis or plane when, and to what measure.... and that's simply coming up with good formulas, and tapping into variables that make sense.

 

May the force(s) be with you.

Share this post


Link to post
Share on other sites

I'm initially many concerned about future-proofing the v3-line of Carenado/Alabeo updates, and getting the old "prop_dir" paradigm eliminated from the equation, in case a future version of X-Plane really does break this hack.

 

As such, I have honestly not spent much time exploring everything you could possibly do with this.  But the concepts of how to multiply the force values by different parameters are quite simple, and they're pretty much there in the script.  Now there's no limits to what can be done with this.  

 

I don't think Laminar will do much showcasing of what these forces allow for... I think it's a matter of authors and tweaks seeing the possibilities of what you can do, simply by determining which forces get added to or subtracted from which axis or plane when, and to what measure.... and that's simply coming up with good formulas, and tapping into variables that make sense.

 

May the force(s) be with you.

 

A couple of question for you Danklaue. Have you look into adding spriraling slip stream using the new datarefs ?

 

Second question; I download the C185 update yesterday and now the plane wants to roll to the right instead of the left ? Last time I checked torque should make the plane roll to the left. Am I missing something ?

Share this post


Link to post
Share on other sites

Tonight I played a bit with the Carenado PA34 ( Seneca ) already upgraded to version 3.0, and Dan's new approach to the "torque bug".

 

The section used in his prop models is in the Seneca, but commented because it's a counter-rotating twin, so, I used Plane-Maker to make

it a CW for both props, edited the LUA script used in the new Carenados and played for a while with Dan's approach and different values for

the roll and yaw moments.

 

Overall the results were rather satisfactory, although probably not the best for the Seneca, but at least now I have the proof that indeed, using this

"forces" we can fine tune prop effects.

 

I think Laminar should probably in one of the next updates to X-Plane 10, apply this datarefs to the default, or some of the default props, and show

users what they actually allow for.

 

We're in the good way!

 

And a big thank you to Dan for having made it available!

Why is torque a bug ? I think the bug is that there is no spiraling slip stream to yaw the aircraft on climb out and turns. I did an experiment the last time I went flying. I let go of the yolk on climb out for a few seconds and the plane started rolling to the left. That was a Cessna 172N.  I think Dan is making the Carenado planes even more unrealistic with his torque fix. The Carenado C185F and C172RG are now rolling to the right, which is totally wrong.

Share this post


Link to post
Share on other sites

The new datarefs in v10.30 are simply X, Y, Z force applications or X, Y, Z axis torque applications.  Spiralling slip stream in X-Plane is modelled using a lot more complex algorithms and goes down into the basic Blade Element Theory-based interaction, which can be partially seen by enabling physics visualizations.  The best you can do with these new datarefs is create additional forces on the plane that will interact with the existing forces calculated by X-plane's source code.

 

So for example, if there's an exaggerated effect that's caused by slip stream, (that is, the spiralling air coming from the propeller ends up hitting the vertical stabilizer, pushing it out to one side)... that's an effect that, AT BEST, you could try countering with the new datarefs, by applying a roughly opposing force to the plane than the one caused by slip stream.  

 

Of course, you could always go further, if that's not accurate enough for you: you could research and identify flight envelopes where the current slipstream modelling is exaggerated or under-estimated, and then you could proceed to coming up with formulas that would "correct" (or rather, add a counter-force to the plane in order to mitigate the exaggerated or under-estimated slipstream modelling effect) in every possible circumstance, as a way to improve what you think is currently wrong with X-Plane's way of modelling it.  But no, you cannot take the current way that Slipstream is modelled in X-plane, and 'tweak' it, using these formulas.

 

Torque is an easier example to understand. The previous fix that were used in Carenado planes was simply a dataref that essentially was supposed to determine the direction the prop spins in... but it was a "floating point" dataref, meaning, you could enter a fraction, and it would then proceed to calculating various effects produced by a rotating prop by multiplying it by that fraction. This was nothing more than exploiting a "bug" in X-Plane, and was the closest an author could come to having any sort of influence on any of the aerodynamic and physical prop effects modelled by Laminar.  But this solution is not future proof, nor is it really a true solution.

 

Now, with the new datarefs, what we can do is apply an opposing force to the force generated by Laminar's proprietary and hidden torque (and various other effects) modelling. And that's pretty much all we can do, unless we "reverse-engineer" all the algorithmic interactions and formulas that Laminar has used to bring us these effects cumulatively, by entering precise formulas that counter the exact formulas included in the sim (essentially overriding all of them), and come up with a way to not only cancel all these effects out, but then adding the effects back individually, the way we see fit.

 

Now Laminar has simply given us force datarefs that we can apply to the airframe, in order to try to tweak away behaviour that we don't like about the plane.  The potential for introducing new and more complex issues is huge, and so, I would think that this whole thing has to be approached with some caution, because in a valiant attempt to make something better, you can end up making it much worse, and add layers upon layers of complexity that could potentially just add to the confusion, and produce undesired results in many other areas.

 

 

Seeing as there is no way to completely re-model the entire torque, prop wash, slip stream, P-Factor, and other physical phenomenon without first nullifying what Laminar has already done (without even knowing exactly which formulas Laminar used, so it'd be reverse-engineering guesswork, at best), it is very likely that we'll see a compounding of effects here in the end... and that will give rise to what you're commenting on in the second question: flight envelopes where the compensation efforts become OVERcompensation, or undercompensation. 

 

Whereas before, we were able to give the plane's wings or ailerons or rudder a slightly offset "neutral" point, which would effectively cancel out torque in some flight regimes, which, in other circumstances, would completely fail to accomplish this task, or even produce completely undesired effects, we'll end up seeing something quite similar even now, that we've been given extra datarefs for added control.

 

Now we have forces that can be applied to the airframe to counter undesired or exaggerated tendencies, but depending on which flight regime you're in, your "corrections" may again be overpowered by undesired effects you were trying to eliminate in the first place. You could then introduce more complex formulas and variables, trying to account for all circumstances that would need to be corrected, or you could just settle for a fix that, given the circumstances, is going to provide the least distracting experience for the most end users... and most important of all, be future proof, at least to some extent.

 

Now, for a first crack at publishing planes using these new datarefs, I've gone with the approach of not overdoing it in terms of complexity. I've only sought to counter one or two effects, using only one variable.  This is very likely to result in overcompensation in certain flight regimes, and undercompensation in others... and that is to be expected. But you can easily go in and tweak it, so that the behaviour is more to your liking. You can add more variables, so that for instance, depending on airspeed, the intensity of the torque correction increases or decreases.

 

The MAIN goal for the v3 updates was, to not hit a point in the future where an X-Plane update breaks all the planes we've published so far... the main goal (at least initially) was NOT to have an effective re-write of the entire torque, slipstream, p-factor, asymmetrical lift, and various other effects already provided by X-Plane... rather, simply to gain some level of control over this area of the flight model.

 

But with the newer v3 models, you have the added benefit of being able to play around with this yourself now, instead of simply engaging in endless pointless discussions about how inaccurately it's modelled.  Now you can actually let your idea of how it should behave free rein, and see if you can come up with something better than Laminar... or me.

 

 

 

Strider1, the 172 RG has not yet gotten the v3 treatment... and the C185 is additionally problematic due to the taildragger-inherent effects during take-off especially, which I was mostly focusing on mitigating.  That the effect may be exaggerated in other flight regimes is quite likely.

Share this post


Link to post
Share on other sites

@strider: Of course it is not the "torque bug", hence the quotes around this designation on my OP :-), but it was how it became identified during the last years when people started complaining about it's effects :-)

 

Andy has wrote an excellent post here, you most probably already read. Give it a read in case you didn't - it's "all" there :-)

 

@dan:  Dan, I can only take my hat off to you for the guts to start using it, just like other features in your line of EXCELLENT GA add-ons for X-Plane. You are in the right way, your code is, as usual, very well written and clear ( this is my computer science, theory of languages and compiler writing teaching vein working :-) ). 

 

As you pointed out there is a myriad of possibilities working with those "forces" and "moments" ( and I quote them because a force and a moment should all have a plausible origin, and certainly not a magic touch :-), but that's the way we got it to work ....)

 

In the Seneca, I played with your approach and tried to use values that better suited my intents. The outcome was very positive, and I got really enthusiastic about it :-)

 

Of course it come to my mind that now we can model even more effects. I really don't know about the detail with wich slipstream calculations are being done in XP10, but I would like to know, for instance, if it models the wash and associated increased lift and associated induced drag over the downwind lift generation surfaces of a single prop aircraft when taking off under strong crosswind pushing the propwash downwind over those surfaces, and somehow creating compensating forces against the weathervaning tendencies, as modeled in DCS World, although presently not correctly modeled IMHO...

 

One thing I did with the yaw factor was using a negative value for it instead of the positive one, in order to get a bigger asymmetric propwash effect. While this worked for the Seneca, it may well be completely wrong for a taildragger... I believe a detailed work will be required for each aircraft, as opposed to the easier "prop" dataref scaling that was being used as the previous fix :-/

Share this post


Link to post
Share on other sites

The main thing I wanted to clarify about the "NEW DATAREFS" is that they do NOT provide a simple handle to turn up or down certain discrete effects modelled in X-Plane, such as P-factor, torque, slipstream, etc.  These datarefs are NOT a panacea for all issues torque-related.  

 

Judging by comments like those that Strider made above, it seems that the expectation now is, that these new datarefs allow you to turn down what you don't like and leave alone or turn up what you consider under-implemented, and this is NOT the case.  My main point is, don't expect too much from these new datarefs to begin with, and if you DO have expectations, I'd suggest it's time to get your own hands dirty and play around with formulas and algorithms that YOU think would yield results you'd expect for a given plane... as opposed to telling Laminar or Carenado or me that we've got it all wrong.  Don't like it?  Tweak it!

 

Again: AUTHORS DO NOT HAVE FULL CONTROL over the whole range of prop-related effects, not even with these new datarefs.  Not even close.  All we have is a way of applying counter-forces according to a patchwork of guesstimates, which may work well in some flight envelopes, and totally fall apart in others, since they're being compounded and interfered with by X-Plane's internal calculations, to which we have no access or handles.

 

jcomm, your questions about slipstream are questions that, I'm afraid, will remain largely unanswered, unless Laminar chooses to divulge the exact algorithms and formulas they use.  And the short of it is, unless we actually have access to those, all we'll ever be doing is creating more complexity by adding counter-forces to the stuff we're guessing is happening under the hood in Laminar's code.

 

I can say this much, though: if you take the torque of the engine and apply it as a torque to the plane's roll axis in the opposite direction, it seems to pretty well cancel out the engine torque, leaving you with one less variable.  But that's the EASY variable... the harder ones are all those subtle ones you guys seem to keep filling forum posts with, and those are, at the very least, PARTIALLY pushed through the core Blade Element paradigm, which would be nearly impossible to dissect and create individual and accurate counter-forces for.

Share this post


Link to post
Share on other sites

Dan,

 

I understand your concerns, and what you wrote pretty much summarizes the situation developers will have to face, yet, I still think we're in the good way, and the approach you followed looks as the most bullet-proof that comes to my mind right now - it was ingenious! 

 

I wasn't aware of the way this datarefs can be easily ( additively ) composed with the default values calculated by X-Plane's fancy BET flight dynamics model, so, assuming it already takes into account ( which indeed it does ) things like AoA on prop effects, net propwash vector, etc... this is probably the best, cleaner, easier way of fine tuning prop effects for each model, without interfering with X-Plane's internal calculations.

 

When I first read about these new datarefs I built in my mind a completely different sketch :-)  I was already dreaming of being able to pick points in the aircraft where the forces could be applied, varying the effects based on propwash speed, sideslip and AoA, etc... A myriad of things that, as you pointed out, are already done inside of X-Plane's FDM, and mostly well done already.

 

I picked your code for the C185, adapted it for a non counter rotating version of the excellent Carenado Pa34 Seneca and after playing with it for a while I found the outcome very plausible! I'm overall satisfied with this approach, certainly more than I was to be forced to use Artificial Stability or the "prop" dataref scaling...

 

So, again, congratulations for the approach you followed!!!

 

I would like to know if, apart from the Seneca and the C185, there are already other aircraft with this fix?

Share this post


Link to post
Share on other sites

No, so far, the C185 is the only one to "officially" have this fix... and I added that one last-last minute, literally.  The Seneca II has this, but commented out, due to the fact that counterrotating props cancel each other out, hence, no real need to mess with additional forces.

 

But I will need to go back to the older planes, once I'm through with all the other v3 updates, and put this fix in them, because currently the pre-C185 planes still have the "sim/aircraft/prop/acf_prop_dir[n]" method... which is not future-proof. (I'll use this opportunity to also modernize the scroll wheel system, to be more like the PiperSport).

 

 

 

As I re-read my post(s) above, I had an idea.  Say in future versions of X-plane, the "sim/aircraft/prop/acf_prop_dir[n]" dataref becomes an integer, as opposed to a floating point. (I think that's the "fix" Laminar would actually implement, to prevent authors from using this hack again).  I actually think setting "sim/aircraft/prop/acf_prop_dir[n]" to 0 would eliminate all of the effects relating to prop wash, P-factor, asymmetrical lift, etc. (If a value of -1 vs. a value of +1 results in a prop going from spinning CCW to spinning CW, it should stand to reason that all the effects relating to prop direction should be cancelled out if the value is at 0... the only value left should be thrust, although I'm not 100% sure about that).  

 

Now, aside from having to re-do the prop visualizations, this setting would potentially offer a completely blank slate for those who wish to completely re-write all the effects relating to propeller physics.  (In my long post above, I argued the case that, before proceeding to playing around with one's own algorithms for torque, p-factor, slip stream, etc. it would be necessary, yet exceedingly difficult to completely eliminate all the effects already done with X-Plane's FDM by applying a patchwork of guesstimated counter-forces.  Setting "sim/aircraft/prop/acf_prop_dir[n]" to 0 could serve as sort of a "Override ALL Prop-related dynamics, because I want to write my own algorithms for these.")  

 

I'm just not sure if doing this would also be affected by future updates of X-plane. As far as I understood it, the use of FRACTIONS in his dataref is subject to update issues, but I'm sure we'll still have the ability to set the value to AT LEAST -1, 0, or +1... unless Laminar makes that dataref read-only in the future.

Share this post


Link to post
Share on other sites

Then Dan, make sure you email Austin or Ben with this suggestion, which appears very good to me, although I guess leaving to the user all of those calculations would be rather complex :-)

 

BTW, I would also like to tell you that I had the chance to feel, by myself, that indeed not always this new datarefs will be a panacea for all unwanted effects...

 

I spent a few more time trying to tweak the default C400 and the C90 using your code. Well, it's really not always that linear. The C400 for instance is a very weird beast :-/  She certainly calculates it's L, and N in such a way that my additive values weren't able to clear roll due to torque properly, and I got a very irritating ball drift to the left :-(

 

A true PITA!

 

I'd call it PITARefs :-)

Share this post


Link to post
Share on other sites

Well,

 

invested a few more hours in tweaking the default prop aircraft in XP10.31, as well as some other of my preferred freewares.

 

Overall I can say I am just fine with this new approach. Actually, together with X-Plane's smoothness, particularly evident in the latest patches, and added by the remarkable SkyMxx Pro, an add-on I believe should be considered mandatory, as well as my new C185F and v1.1 of the 748i Cargo, I am just waiting, calmly, for a good weather injector.

 

On my return from a few days away I'll probably revisit EFASS...

 

Ah! I couldn't forget SimHeaven + World2XP scenery and a couple of high quality freeware airports. By far my best civil flightsim experience ever, specially when flying under adverse weather conditions.  

 

Fine tuned through these new datarefs, prop aircraft, and all aircraft as a matter of fact, can now be made to perform a lot closer to their RW counterparts. If all of the airdata / airfoils / blueprints aren't  available, and the result Plane-Maker gives is still departing from reality in terms of how the aircraft behaves under some situations, the L, N and M associated variables can be directly fine tuned and adapted to RW perfromances!

 

For me there's that additional advantage of X-Plane 10 also being used together with PSX to provide visuals for that 744 sim - a true Whow! specially with SkyMaxx painting the weather. Running both on the same machine, my old ( from 2011 ) i5 2500, gives me high performance, even under the most adverse weather scenarios.

 

I was very positively surprised with the new version of the 748i though. Hand-flying is a must! The aircraft flight dynamics feel just great. Did a few circuits around LPPT, under bad weather.

 

Well, this is definitely a good return, even if it started only as a useful scenery generator for PSX... And guys, although the remarks by Dan and others are valid, these new datarefs can really do wonders! I am using an adapted version of Dan's Carenado fixes for the torque effects, and look forward for some time to write my own lua scripts probably trying a few more variables for fine tuning, but honestly I find Dan's approach the simplest and most efficient way that I was able to think about so far.

 

Well, let's wait for whatever comes next in XP's World ;-)

Share this post


Link to post
Share on other sites

I'm quite happy to see that you've found your way back to us JC :wink:, I agree, Dan is propelling (pun intended) X-Plane to new heights. Have you looked at the vFlyte Air Piper? One of the nicest little GA aircraft around and the price is right. I crashed and burned it yesterday while attempting to land at Troyes in 48 knot crosswinds :lol:. In normal situations, it flies great. I'd be interested in some feedback if you ever decide to pick it up.

 

cheers,

Share this post


Link to post
Share on other sites

Michel, yes I have a couple of VFlyte's add-ons, both very good, and I consider the Piper as well!

 

Thx!

Share this post


Link to post
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
Sign in to follow this