Board index FlightGear Development AI Traffic

AI Aircraft beacon

Intelligent, computer controlled vehicles that drive/fly over the planet!

Re: AI Aircraft beacon

Postby BecOzIcan » Tue Nov 14, 2017 11:48 pm

jtprophet wrote in Tue Nov 14, 2017 5:25 pm:Yeah I would like to add to the praises guys thank-you so much for the time dedication to making this sim so much more enjoyable.

Thanks John but you should take credit too as you are the one who came up with the idea/request to get beacons on AI models (which started the entire lighting development)

jtprophet wrote in Tue Nov 14, 2017 5:25 pm: I wanted to also comment here if I may that I started out in the 747 at KPWM airport and noticed how the static ai looked so real did this enhancement come with the newer version of FG?

Not sure about static models.
Changes to AI Models shown on this thread are merged as I go so are part of any current (Nightly build) and future (official releases) versions of FG

Cheers
Ian
Current Projects: AI Traffic, Models & Liveries
User avatar
BecOzIcan
 
Posts: 977
Joined: Tue Oct 04, 2011 10:43 pm
Location: Sydney, NSW, Australia
Version: 2.12
OS: Win10

Re: AI Aircraft beacon

Postby wkitty42 » Wed Nov 15, 2017 3:28 pm

FWIW: i also asked about having lights on the AI craft not long after i joined the forum... at that time, i was told that it was tried but proved to be too resource hungry... it may have been the implementation at that time that was hungry... i dunno... then some time, a year or more, after i first inquired, there was another inquiry, i don't recall if it was mine or someone else's, possibly jtprophet's, about maybe trying the AI craft lighting again and here we are with something that works ;)
"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: 4881
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: AI Aircraft beacon

Postby jtprophet » Mon Nov 20, 2017 1:27 pm

Wkitty42 its worth plenty...you know how the old saying goes the the sqeakier the wheel the more its chances of being relived with a shot of oil.

And I would categorize this as a successful group collaborative effort among all that would like to see these new additions added; and based on the fact that you guys in here have lives and responsibilities just as we all do; I am most appreciative of any forward progress of any facets of this awesome free open-sourced sim that I look forward to seeing grow into the future.

The beauty of all this is the basis and the fact that there is a lot of talent and qualified and intelligent individuals centered around this sim that are truly flight sim fanatics and what they see and develop is always a euphoric addition to an already perfect package for me.

John
John
jtprophet
 
Posts: 100
Joined: Mon Apr 04, 2016 2:21 pm

Re: AI Aircraft beacon

Postby BecOzIcan » Mon Dec 04, 2017 10:46 am

LightMap and Navigation Lights added to A330-200

Image

Cheers
Ian
Current Projects: AI Traffic, Models & Liveries
User avatar
BecOzIcan
 
Posts: 977
Joined: Tue Oct 04, 2011 10:43 pm
Location: Sydney, NSW, Australia
Version: 2.12
OS: Win10

Re: AI Aircraft beacon

Postby BecOzIcan » Mon Dec 04, 2017 10:51 am

## B E W A R E ##

I just noticed Navigation Lights (Beacons, Strobes, Static R G W on Whintips and Tail) disappear in Full Night. (Still work from Down to Evening.

After playing with my Animations, I realised DIST-SCALE is the culprit (Lights appear normally when not re scaled base on user distance). Not sure if this is a bug with the animation of some kind of weird logic around the object not being drawn.

In any case, be aware some AI aircraft may come out of nowhere if you are flying at night ... Lightmap (Tail and windows) still work perfectly but are of lower intensity.

Cheers
Ian
Current Projects: AI Traffic, Models & Liveries
User avatar
BecOzIcan
 
Posts: 977
Joined: Tue Oct 04, 2011 10:43 pm
Location: Sydney, NSW, Australia
Version: 2.12
OS: Win10

Re: AI Aircraft beacon

Postby wkitty42 » Mon Dec 04, 2017 3:21 pm

yeah, i don't know why a hard coded distance thing is needed... the LOD that displays the craft should be fine... hard coding some distance thing thwarts the LOD code... i've posted about it affecting buildings at one of the default airports we had... everything at the airport was being properly displayed except for a few buildings... they would pop into view at (eg) 4nm out and disappear as soon as you backed up past that 4nm mark... it was confirmed that it was code in the buildings' xml files that was causing that... i don't know of that code was ever removed, though... i've seen similar in other static objects as well...

with that said, it is possible that old unsupported filghtgears may need such code but the newer ones today should with the good LOD code that is in place... kinda goes in hand with some lights being images textured onto a billboard type stuff instead of using procedural lights which look like real lights...

in any case, i'm happy with what i've seen of the AI craft with their lights... it really adds to the realism and certainly looks better in the dark when you know they are out there but can't see them unless you use the infrared ALS filter ;)
"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: 4881
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: AI Aircraft beacon

Postby BecOzIcan » Tue Dec 05, 2017 9:36 am

A330-300 now equipped

Image
Current Projects: AI Traffic, Models & Liveries
User avatar
BecOzIcan
 
Posts: 977
Joined: Tue Oct 04, 2011 10:43 pm
Location: Sydney, NSW, Australia
Version: 2.12
OS: Win10

Re: AI Aircraft beacon

Postby BecOzIcan » Fri Dec 08, 2017 3:11 pm

A340 series done; all Heavy AI aircrafts now have LightMaps and Navigation beacons.

A320s and 737s will be done early next year.

Cheers
Ian

Image
Current Projects: AI Traffic, Models & Liveries
User avatar
BecOzIcan
 
Posts: 977
Joined: Tue Oct 04, 2011 10:43 pm
Location: Sydney, NSW, Australia
Version: 2.12
OS: Win10

Re: AI Aircraft beacon

Postby wkitty42 » Sun Jul 22, 2018 9:23 pm

as some of you know, i've been playing with some GA AI craft and a fictitious airline at KRDU... i have 10 craft (at the moment) and i'm playing with this light code... it is surprisingly simple to add to a craft... that's a GoodJob!<tm>... just copy one folder, add a block of code to one xml, and edit another xml... pretty simple...

so i'm starting with the pa28 first... i copied the file and block from the 787 and then edited the "B777" bits to "pa28"... it worked! the really funny thing is the lights are still placed as for the 787 :lol: :lol:
i'm trying to figure out how i can determine, by looking at files and not having to mess with blender, what the offsets and x,y,z coords are supposed to be... i don't want to take the chance that i mess something up in the models...

so my first step has been to set the offsets to 1 to get them closer to the craft... then i can hopefully figure out the other three numbers... does anyone have any helpful hints?
"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: 4881
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: AI Aircraft beacon

Postby BecOzIcan » Mon Jul 23, 2018 1:19 am

If you are using my code (AI 77L, 77W). Lights objects are grouped in single dedicated and shared .ac model. All light objects are positioned at center of model (x=0,y=0,z=0)

I then use a translate function in each aircraft's lightnav xml to reposition them based on each particular aircraft's characteristic, using the translate function

There is obviously a trick

I get XYZ from AC3D (I guess you can do the same with Blender) as the coordinates at which the Light should be positioned in the aircraft model

BUT Translate actually creates a vector between [0.0.0] and [x.y.z.] and then uses <offset-m></offset-m> to indicate the distance in meters at which the light should be placed, along this vector, staring from 0. That is x.y.z without the actual distance is useless

AC3D gives me automatically the distance between 0.0.0 and x.y.z. by clicking on both points but worse case I guess you could calculate it from http://www.meracalculator.com/math/dist ... ints(3-dim).php


In the most simple case the distance between [0.0.0] and [x.y.z.] is the one you use for the offset (then the light appears exactly at x.y.z.
BUT
In the case of strobes, I use the same x.y.z. than for NavLights Red/Green (which are positioned in the same spot) and simply add an extra 10 centimeters to the offset so the Strobes are shown slightly away from the navlight without having to re extract a new x.y.z.


Code: Select all
    <type>translate</type>
    <object-name>Left_Wing_Static_Red</object-name>
    <offset-m>35.25</offset-m>
    <axis>
      <x> 11.6649</x>
      <y> -32.4</y>
      <z> 7.69404</z>
    </axis>


As usual, I hope it makes sense and help

Cheers
Ian
Current Projects: AI Traffic, Models & Liveries
User avatar
BecOzIcan
 
Posts: 977
Joined: Tue Oct 04, 2011 10:43 pm
Location: Sydney, NSW, Australia
Version: 2.12
OS: Win10

Re: AI Aircraft beacon

Postby wkitty42 » Mon Jul 23, 2018 6:03 pm

thanks, ian! that does help explain it a bit more... i'll have to try to read up on that translate part...

what i ended up doing was to use the c182's method where each light is a separate model in separate ac files... that made it easy for me to get the model names... i didn't know how to find them before... now i know i can grep "name" from the ac files and see them... the question then is what did the modeler intend (see below for an example)...

then with each model being defined in its own xml and pointing to its own effect file, i was able to make a lot of headway... positioning was easier as the models originate at 0,0,0 and then there's offsets x-m, y-m, and z-m... once i found a page on the wiki that gave me those directions, it was a cinch to move the lights into position...

the only thing i ran into is the strobes, once i got them positioned where i could see them, would not blink when pointed to your strobe trigger in /sim/models... yeah, i'm mixing your method with the procedural lights ;) the strobes do work when i point them to the beacon trigger which has worked from the beginning...

i have more work to do there, though, because that's timing AFAIK and not really 0 to 1 but yeah, it kinda is... true, false, true, false, 0, 1, 0, 1... it seems to work for the intensity in the procedural eff code... it may be a timing issue, though... strobes are fast on/off with a almost 2 second delay between... once i can get the strobes working with the strobe timer, then i can work on what i suggested way back in the topic about having a property that gets set when certain conditions are met and that property will then trigger the effect to be used...

i'll have a couple of these trigger properties... off the top of my head, when the record goes valid and the squawk is assigned, i'll turn on the beacons... then when we start to move, the unblinking solid red and green nav lights will be turned on... they'll stay on until the record goes invalid and/or the squawk code changes... when taking off, the strobes will be turned on... i think that's the right order, isn't it?

when landing, it'll just be a matter of watching the speed... below a certain speed (say 20kts), the strobes get turned off and then later the navs and finally the beacons... all of this will have to have additional properties and code to watch things so we're not turning off the lights when we're stopped waiting on clearance to continue taxiing or to take off... i'm not worrying about any cockpit and cabin lighting right now... that's too close to 3D modeling with the light maps and stuff ;)


the example of what did the modeler intend... here's the objects in the pa28's ac file...

name "Fuselage.001"
name "LandingGearGroup"
name "NoseStrutLinkMount"
name "NoseOleoLinkMount"
name "LightsGroup"
name "RightNavLight"
name "StrobeOff"
name "LeftNavLight"
name "TailNavLight"
name "Beacon"
name "LandingLightBulb"
name "Spinner"
name "prop"
name "propdisc"

so they're kinda easy enough to figure out but when one it just getting started at this depth, it is harder than one might think... sure, RightNavLight, LeftNavLight, TailNavLight, Beacon and LandlightBulb are easy enough to figure out but StrobeOff? LightsGroup? hunh? at the time i was digging, it was getting late and i was tired but now, with the progress i made as described above, i might be able to actually use those objects in the pa28 and still be able to use the procedural lights on them... for one thing, i won't have to worry about placing them on/near the model ;) i might actually play with that, today :mrgreen:
"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: 4881
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: AI Aircraft beacon

Postby WoodSTokk » Mon Jul 23, 2018 10:05 pm

wkitty42 wrote in Mon Jul 23, 2018 6:03 pm:i'll have a couple of these trigger properties... off the top of my head, when the record goes valid and the squawk is assigned, i'll turn on the beacons... then when we start to move, the unblinking solid red and green nav lights will be turned on... they'll stay on until the record goes invalid and/or the squawk code changes... when taking off, the strobes will be turned on... i think that's the right order, isn't it?

when landing, it'll just be a matter of watching the speed... below a certain speed (say 20kts), the strobes get turned off and then later the navs and finally the beacons... all of this will have to have additional properties and code to watch things so we're not turning off the lights when we're stopped waiting on clearance to continue taxiing or to take off... i'm not worrying about any cockpit and cabin lighting right now... that's too close to 3D modeling with the light maps and stuff ;)


The first lights are the beacons. They was introduced that other pilots see where other plains are. The position lights (or NAV lights) are steady and a airport have also many steady lights. A blinking light will be faster noticed in the sea of steady lights. As the time comes with turbo jets (and jets are very loud but you can't see moving parts from behind until you look into but then its to late), the ground crew wasn't able to determine what airplain has the engine runing and that is dagerous. Therefore, many pilots have turned on the beacon as long as at least one engine is running. Thats a great help for the ground crew.
Since there days, it is a good practice that the beacon is turned on before the first engine starts and turned off after the last engine stoped (also with propeller).

The position (or navigation) lights (red left, green right, white tail) should be turned on before the aircraft is moving (out of the parking spot) and remain on until the aircraft reaches the final parking spot (at the destination).

More and more lights are on the airports and the beacon are sunk under the ocean of lights. In this time, the strobe was introduced for dangerous situation.
A dangerous situation is every time on the runway (takeoff and landing) and in the air environment around the airport (traffic). Basically the areas where the tower is responsible. This means, turn the strobe on before you roll over the holding point to the runway and turn it off after leaving the runway and has passed the holding line. In air, the strobes should be on as long as you in the air space where the tower is responsible. Normaly up to the transition altitude.
Also on descending, turn the strobes on if you reach the transition altitude.

IDK if you can set trigger for all the situation above, but it should be near these situations.
WoodSTokk
 
Posts: 112
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 Aircraft beacon

Postby gooneybird » Tue Jul 24, 2018 2:55 pm

wkitty42 wrote in Mon Jul 23, 2018 6:03 pm:

the example of what did the modeler intend... here's the objects in the pa28's ac file...
:


The AI Pa28 is a cut down version of helijah's Pa28, I can let you have Blender file of the AI version if it'll make things easier.
I know I had several problems with it but can't remember exactly what they were now, I do know If I was to do it now I would start from scratch, it would be much easier.
Currently running 2018.1 but if it doesn't stop crashing I'm taking up tiddlywinks!
User avatar
gooneybird
 
Posts: 2924
Joined: Sat May 31, 2008 1:57 pm
Location: Essex, UK
Callsign: G-OONY
Version: 2018.1
OS: win 7 64

Re: AI Aircraft beacon

Postby wkitty42 » Tue Jul 24, 2018 3:00 pm

@WoodSTokk: thanks! that helps a lot...

@gooneybird: i think i'm ok with the ac file... i'm not sure yet...

i'm going to start another topic because i want to try to figure out how to use the objects already available in the pa-28's model file and i'd like to get some assistance and hopefully gain some knowledge...

the new topic is here: animating AI PA-28 lights
"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: 4881
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Previous

Return to AI Traffic

Who is online

Users browsing this forum: No registered users and 2 guests