Board index FlightGear Development Aircraft Flight dynamics model

JSBsim icing

Good sims require good FDMs (the "thing" that makes an aircraft behave like an aircraft).

JSBsim icing

Postby Maerchenprinz » Thu Apr 04, 2019 11:20 pm

Hi!

I'm having a nasal script which calculates icing/de-icing and throws out a decent number between -1 and +1 to tell of conditions (+1 severe and -1 melting) . At the moment, the output only affects visual (window icing) and pitot/static stuff.
Now, I want to implement effects of icing on wings/props.
I'm pretty lost when it comes to how to change jsbsim values at runtime.
Is there an example in fgaddon aircraft or elsewhere? Or do you have a hint how to do this? Even workarounds ( cheats :D ) would help!
Basically, how to change jsbsim properties at runtime...

Ciao,

Adrian
Last edited by Maerchenprinz on Thu Apr 04, 2019 11:27 pm, edited 1 time in total.
User avatar
Maerchenprinz
 
Posts: 168
Joined: Thu Mar 15, 2007 5:24 pm
Location: Bochum, it's better, much better than you think!
Callsign: Adrian

Re: JSBsim icing

Postby Octal450 » Thu Apr 04, 2019 11:23 pm

Hey Adrian,
If you want to tune the effect, instead of using a <value>, assign a dummy <property>tuning</property> or something, once you get a value you like, simply replace that with a <value> of the same number.

If you mean reloading the XML itself, the only way I have gotten that to work is to Reset the sim.

Kind Regards,
Josh
Octal450
 
Posts: 4397
Joined: Tue Oct 06, 2015 12:51 pm

Re: JSBsim icing

Postby wlbragg » Thu Apr 04, 2019 11:52 pm

Have you identified the JSBSim functions you need to change?
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4889
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: JSBsim icing

Postby Alant » Thu Apr 04, 2019 11:58 pm

Yes, this is possible.
I assume that you want to change lift drag pitch moment when the wings are iced, and that you gave data for these changes.
Please confirm and I will respond how I added similar Flightgear properties (in my case engine RPM to blown flap aero effects) to to my FDM.
Alan
,
Alant
 
Posts: 912
Joined: Wed Jun 23, 2010 5:58 am
Location: Portugal
Callsign: Tarnish99
Version: from Git
OS: Windows 10

Re: JSBsim icing

Postby Maerchenprinz » Fri Apr 05, 2019 12:37 am

Hi wibragg, It0uchpods et al.!

I've noticed that I'm not able to explain what I try to explain, and so that you are not able to try to explain to me either...
Digital natives (smart people :!: ) vs. old (trying to get along) :D
So, let's close this topic. Thank you! - Though I'll learn (I'm 42 now!).

Ciao,
Adrian
User avatar
Maerchenprinz
 
Posts: 168
Joined: Thu Mar 15, 2007 5:24 pm
Location: Bochum, it's better, much better than you think!
Callsign: Adrian

Re: JSBsim icing

Postby Octal450 » Fri Apr 05, 2019 1:16 am

Hi Adrian
Your response confuses me. Did one of us answer your question?
J
Octal450
 
Posts: 4397
Joined: Tue Oct 06, 2015 12:51 pm

Re: JSBsim icing

Postby Maerchenprinz » Fri Apr 05, 2019 1:25 am

Hi!

No, that what exactly was I was trying to explain! Proof given! :D
Mea culpa!
User avatar
Maerchenprinz
 
Posts: 168
Joined: Thu Mar 15, 2007 5:24 pm
Location: Bochum, it's better, much better than you think!
Callsign: Adrian

Re: JSBsim icing

Postby Thorsten » Fri Apr 05, 2019 5:54 am

Is there an example in fgaddon aircraft or elsewhere?


The rockets have pretty drastic changes of the FDM runtime. Also, there's a limited damage simulation done in the Shuttle where aerodynamic deteriorates when the airframe is damaged.

It's conceptually easy to do - say there's a place where you sum drag:

Code: Select all


<fcs_function name="aero/drag-sum>
<function>
  <sum>
    <property>aero/drag-contribution1</property>
    <property>aero/drag-contribution2</property>
    <property>aero/drag-contribution3</property>
     <product>
       <property>aero/my-current-icing-level</property>
       <value>5.0</value>
    </product>
 </sum>
</function>
</fcs_function>



That adds an extra drag contribution of 5 times my-current-icing-level dependent on however you set that parameter runtime.

***

I suppose the point of confusion might be that the icing change needs to be coded into the JSBSim aero definition - basically there needs to be a prepared slot in the JSBSim code for everything you want to insert from Nasal (or any external source). You can not take an existing JSBSim model and access it via Nasal runtime and make modifications.

Which is to say - each aircraft needs to be prepared individually for icing, there's no way to implement this globally.
Thorsten
 
Posts: 10984
Joined: Mon Nov 02, 2009 8:33 am

Re: JSBsim icing

Postby Maerchenprinz » Fri Apr 05, 2019 7:14 pm

Thanks, Thorsten,, that was exactly what I was looking for!
Unfortunaty, that will mean that I will continue to ask strange questions in strange english in the believe that somewhere there is a recipient...

Happy to be not a Hemingway :wink: and Ciao,

Adrian

EDIT: Ouch, sorry for that last sentence, I even think slower than I type (no emoticon suitable here)
User avatar
Maerchenprinz
 
Posts: 168
Joined: Thu Mar 15, 2007 5:24 pm
Location: Bochum, it's better, much better than you think!
Callsign: Adrian


Return to Flight dynamics model

Who is online

Users browsing this forum: No registered users and 1 guest