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 » Fri Apr 05, 2019 12:20 am

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 Fri Apr 05, 2019 12:27 am, edited 1 time in total.
User avatar
Maerchenprinz
 
Posts: 306
Joined: Thu Mar 15, 2007 6:24 pm
Location: Bochum, it's better, much better than you think!
Callsign: Adrian

Re: JSBsim icing

Postby Octal450 » Fri Apr 05, 2019 12:23 am

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
Skillset: JSBsim Flight Dynamics, Systems, Canvas, Autoflight/Control, Instrumentation, Animations
Aircraft: A320-family, MD-11, MD-80, Contribs in a few others

Octal450's GitHub|Launcher Catalog
|Airbus Dev Discord|Octal450 Hangar Dev Discord
User avatar
Octal450
 
Posts: 5601
Joined: Tue Oct 06, 2015 1:51 pm
Location: Huntsville, AL
Callsign: WTF411
Version: next
OS: Windows 11

Re: JSBsim icing

Postby wlbragg » Fri Apr 05, 2019 12:52 am

Have you identified the JSBSim functions you need to change?
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7609
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: JSBsim icing

Postby Alant » Fri Apr 05, 2019 12:58 am

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: 1223
Joined: Wed Jun 23, 2010 6:58 am
Location: Portugal
Callsign: Tarnish99
Version: latest Git
OS: Windows 10/11

Re: JSBsim icing

Postby Maerchenprinz » Fri Apr 05, 2019 1: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: 306
Joined: Thu Mar 15, 2007 6:24 pm
Location: Bochum, it's better, much better than you think!
Callsign: Adrian

Re: JSBsim icing

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

Hi Adrian
Your response confuses me. Did one of us answer your question?
J
Skillset: JSBsim Flight Dynamics, Systems, Canvas, Autoflight/Control, Instrumentation, Animations
Aircraft: A320-family, MD-11, MD-80, Contribs in a few others

Octal450's GitHub|Launcher Catalog
|Airbus Dev Discord|Octal450 Hangar Dev Discord
User avatar
Octal450
 
Posts: 5601
Joined: Tue Oct 06, 2015 1:51 pm
Location: Huntsville, AL
Callsign: WTF411
Version: next
OS: Windows 11

Re: JSBsim icing

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

Hi!

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

Re: JSBsim icing

Postby Thorsten » Fri Apr 05, 2019 6: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: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: JSBsim icing

Postby Maerchenprinz » Fri Apr 05, 2019 8: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: 306
Joined: Thu Mar 15, 2007 6: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