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 10: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 !
User avatar
V12
 
Posts: 1611
Joined: Thu Jan 12, 2017 4:27 pm
Location: LZIB
Callsign: BAWV12

Re: AI contrails

Postby wkitty42 » Sun Apr 21, 2019 11:18 pm

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: 5775
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: AI contrails

Postby wlbragg » Sun Apr 21, 2019 11:59 pm

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(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 4991
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480

Re: AI contrails

Postby V12 » Mon Apr 22, 2019 4: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 !
User avatar
V12
 
Posts: 1611
Joined: Thu Jan 12, 2017 4:27 pm
Location: LZIB
Callsign: BAWV12

Re: AI contrails

Postby Thorsten » Mon Apr 22, 2019 6: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: 11212
Joined: Mon Nov 02, 2009 8:33 am

Re: AI contrails

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

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

Re: AI contrails

Postby Thorsten » Mon Apr 22, 2019 8: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: 11212
Joined: Mon Nov 02, 2009 8:33 am

Re: AI contrails

Postby Gijs » Mon Apr 22, 2019 9: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: 9385
Joined: Tue Jul 03, 2007 2:55 pm
Location: Amsterdam/Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: AI contrails

Postby wkitty42 » Mon Apr 22, 2019 2: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: 5775
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: AI contrails

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

V12 wrote in Mon Apr 22, 2019 4: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: 350
Joined: Tue Oct 17, 2017 2:30 pm
Location: Milky Way/Sol/Earth/Europe
Callsign: OE-WST
IRC name: WoodSTokk
Version: 2018.3.1
OS: Debian Buster/Sid

Re: AI contrails

Postby V12 » Mon Apr 22, 2019 7: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 !
User avatar
V12
 
Posts: 1611
Joined: Thu Jan 12, 2017 4:27 pm
Location: LZIB
Callsign: BAWV12

Re: AI contrails

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

Regarding the formation of contrails:

WoodSTokk wrote in Mon Apr 22, 2019 5: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)
Johan G
Moderator
 
Posts: 5546
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 3.0.0
OS: Windows 7, 32 bit

Re: AI contrails

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

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

WoodSTokk wrote in Mon Apr 22, 2019 5: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: 350
Joined: Tue Oct 17, 2017 2:30 pm
Location: Milky Way/Sol/Earth/Europe
Callsign: OE-WST
IRC name: WoodSTokk
Version: 2018.3.1
OS: Debian Buster/Sid

Re: AI contrails

Postby Johan G » Fri Apr 26, 2019 11:04 am

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)
Johan G
Moderator
 
Posts: 5546
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 3.0.0
OS: Windows 7, 32 bit

Re: AI contrails

Postby V12 » Fri Apr 26, 2019 11:36 am

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 !
User avatar
V12
 
Posts: 1611
Joined: Thu Jan 12, 2017 4:27 pm
Location: LZIB
Callsign: BAWV12

Next

Return to New features

Who is online

Users browsing this forum: No registered users and 1 guest