Board index FlightGear Development New features

AI contrails

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

AI contrails

Postby V12 » Sun Apr 21, 2019 11:29 am

Is possible to add contrails for AI aircrafts ? Internal boolean property /environment/contrail for contrails generation exists...
Fly high, fly fast - fly Concorde !
V12
 
Posts: 2757
Joined: Thu Jan 12, 2017 5:27 pm
Location: LZIB
Callsign: BAWV12

Re: AI contrails

Postby wkitty42 » Mon Apr 22, 2019 12:18 am

possibly but i suspect it would have to be done in each AI craft in the same way that the beacon lights are now being added... not sure how the craft would know when to emit the contrails, though... might want to ask over in the sub where they are working on the AI...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: AI contrails

Postby wlbragg » Mon Apr 22, 2019 12:59 am

not sure how the craft would know when to emit the contrails, though... might want to ask over in the sub where they are working on the AI...


I haven't looked at the AI model code in awhile, but I don't see why you couldn't add a nasal block to the XML file same as you do to a regular aircraft and run the contrail code same as a regular aircraft.

If not that simple, the a nasal file in fgdata nasal that scans the AI property tree and picks out the AI aircraft that you want to apply contrails to, and whatever supporting code needed to do that.

Sounds like a fun project.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7586
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: AI contrails

Postby V12 » Mon Apr 22, 2019 5:44 am

IMHO, it should work based on altitude, this value is known and probably used for gear visibility. I don't know how can AI use property tree, so simply alt model should be enough. Only one particle emiter, particle size calculated from aircraft category for smal visual difference between Citation X and Jumbos.
Fly high, fly fast - fly Concorde !
V12
 
Posts: 2757
Joined: Thu Jan 12, 2017 5:27 pm
Location: LZIB
Callsign: BAWV12

Re: AI contrails

Postby Thorsten » Mon Apr 22, 2019 7:11 am

Only one particle emiter, particle size calculated from aircraft category for smal visual difference between Citation X and Jumbos.


... and then enjoy the collapse of your framerate when you have a few AI planes in view...
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: AI contrails

Postby V12 » Mon Apr 22, 2019 9:31 am

OK, what is better solution ? Volcanoes with extreme dense smog doesn't affect fps.
Fly high, fly fast - fly Concorde !
V12
 
Posts: 2757
Joined: Thu Jan 12, 2017 5:27 pm
Location: LZIB
Callsign: BAWV12

Re: AI contrails

Postby Thorsten » Mon Apr 22, 2019 9:46 am

It's generally number of particle that counts - a volcano has huge particles, but certainly not many. The geometry of a contrail is forcing you to emit many more.

I don't think there is a good solution for contrails available - which is why it's not widely done.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: AI contrails

Postby Gijs » Mon Apr 22, 2019 10:30 am

There used to be some method involving submodels: http://wiki.flightgear.org/Howto:Add_co ... _Contrails
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9544
Joined: Tue Jul 03, 2007 3:55 pm
Location: Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: AI contrails

Postby wkitty42 » Mon Apr 22, 2019 3:52 pm

FWIW: i mentioned that it may be possible... the AI lights have gone through several formats before settling on the current method... i've asked over there in that subforum about the possibility of contrails... A craft use the property tree like any other craft... they are just much more simplistic ;)
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: AI contrails

Postby WoodSTokk » Mon Apr 22, 2019 6:16 pm

V12 wrote in Mon Apr 22, 2019 5:44 am:IMHO, it should work based on altitude, this value is known and probably used for gear visibility.

Contrails have nothing to do with altitude. The factors for building contrails are pressure, temperature and relative humidity.
This means, the sim must know all of that factors on every location of every AI to calculate if this AI produce now contrails or not.
If yes, it must calculate how strong they are and how long should they stay visible.
WoodSTokk
 
Posts: 1077
Joined: Tue Oct 17, 2017 3:30 pm
Location: Milky Way/Sol/Earth/Europe
Callsign: SX-W57
IRC name: WoodSTokk
Version: 2020.4.0
OS: Debian Bullseye

Re: AI contrails

Postby V12 » Mon Apr 22, 2019 8:23 pm

I know that. I want some very simple model without any complicated calculation. If AI aircrafts using property tree, it should use property /environment/contrail.
Fly high, fly fast - fly Concorde !
V12
 
Posts: 2757
Joined: Thu Jan 12, 2017 5:27 pm
Location: LZIB
Callsign: BAWV12

Re: AI contrails

Postby Johan G » Tue Apr 23, 2019 3:53 pm

Regarding the formation of contrails:

WoodSTokk wrote in Mon Apr 22, 2019 6:16 pm:Contrails have nothing to do with altitude. The factors for building contrails are pressure, temperature and relative humidity.

Pressure and temperature are quite altitude dependent.[1] :wink:

By doing a Google search for "formation of condensation trails" I found the paper [2]. Which one could probably be boiled down to that all that is needed is an altitude span, a QNH span and a relative humidity span. When those coincides the conditions are met and contrails would form.

[1] One can to a large extent approximate the atmosphere as a line representing the standard atmosphere on diagram with pressure on the vertical axis and temperature on the horizontal axis, sliding within another diagram with altitude on the vertical axis and +/- temperature on the horizontal axis. Depending on airport temperature and/or pressure (reduced to sea level values) one would slide the inner diagram around. For example would QNH 930 hPa move the inner diagram down from 1013 to 930 hPa at sea level, and ISA+25 degrees Celsius move the inner diagram right 25 degrees Celsius. This is basically a part of the calculations the classic flight computer/whiz wheel/E-6B does for you when converting between indicated and true airspeeds and altitudes.

[2] H. Appleman, The Formation of Exhaust Condensation Trails by Jet Aircraft, American Meteorological Society Bulletin, Vol. 34, No. 1, January, 1953 (not behind a paywall, click the pdf tab. :D ). See figure 4 on page 19 and description on page 19 and 20.
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: AI contrails

Postby WoodSTokk » Wed Apr 24, 2019 1:01 am

Johan G wrote in Tue Apr 23, 2019 3:53 pm:Regarding the formation of contrails:

WoodSTokk wrote in Mon Apr 22, 2019 6:16 pm:Contrails have nothing to do with altitude. The factors for building contrails are pressure, temperature and relative humidity.

Pressure and temperature are quite altitude dependent.[1] :wink:

By doing a Google search for "formation of condensation trails" I found the paper [2]. Which one could probably be boiled down to that all that is needed is an altitude span, a QNH span and a relative humidity span. When those coincides the conditions are met and contrails would form.


Environment pressure, temperature and relative humidity is only one part of the calculation.
The other part is pressure and temperature of the exhaust air and thats values that differ from engine to engine.
Thanks for that paper. Will have a look if i found enough spare time.
WoodSTokk
 
Posts: 1077
Joined: Tue Oct 17, 2017 3:30 pm
Location: Milky Way/Sol/Earth/Europe
Callsign: SX-W57
IRC name: WoodSTokk
Version: 2020.4.0
OS: Debian Bullseye

Re: AI contrails

Postby Johan G » Fri Apr 26, 2019 12:04 pm

Ah. Good point. Particle size too, now when I think of it.

A couple of years ago I saw another good paper,* but now I can not find any copy of it not behind a paywall. *sigh*

*See this way too short summary.
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: AI contrails

Postby V12 » Fri Apr 26, 2019 12:36 pm

For Concorde I'm using property /environment/contrail, result is boolean, all calculations with altitude, humidity, temperature etc. are done internaly by FG. Practically, I seen contrails=TRUE from FL250 to FL510. Usually from FL250 to FL350, in higher FL very rarely.
Fly high, fly fast - fly Concorde !
V12
 
Posts: 2757
Joined: Thu Jan 12, 2017 5:27 pm
Location: LZIB
Callsign: BAWV12

Next

Return to New features

Who is online

Users browsing this forum: No registered users and 2 guests