Board index FlightGear Development AI Traffic

AI beacon animation/activity

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

AI beacon animation/activity

Postby jtprophet » Thu Aug 06, 2020 5:45 pm

I'm trying to determine how the xml code works in determining when the navigation lights get turned off. It appears to me that after the plane acquires a transponder id for departure clearance the lights turn on; the plane continues the animation until it lands at which point this value turns to "0" and the lights turn off based on the code below? Is this correct? If so is it possible to continue the lights until the plane stops at the gate and shuts down?

Code: Select all
<animation>
    <name>BeaconGrouped</name>
    <object-name>beacon-top</object-name>
    <object-name>beacon-bottom</object-name>
  </animation>
  <!-- Show Static Lights & Beacons when aircraft is moving -->
  <animation>
    <type>select</type>
    <object-name>StaticGrouped</object-name>
    <object-name>BeaconGrouped</object-name>
    <nopreview />
    <condition>
      <greater-than>
        <property>transponder-id</property>
        <value type="string">0</value>
      </greater-than>
    </condition>
  </animation>
jtprophet
 
Posts: 205
Joined: Mon Apr 04, 2016 3:21 pm
Callsign: DAL1464

Re: AI beacon animation/activity

Postby wlbragg » Thu Aug 06, 2020 6:55 pm

You might be able to condition it to also include speed. When does the transponder switch get thrown upon landing?
Last edited by wlbragg on Thu Aug 06, 2020 9:15 pm, edited 1 time in total.
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 beacon animation/activity

Postby wkitty42 » Thu Aug 06, 2020 8:26 pm

@jtprophet, it is supposed to do like you describe but there is some problems updating the craft properties in the property tree... ideally, when "valid" goes false but other will also be reset but there is no code for this... something else that happens is that the record never updates to the new airports and times when it is reused... we're lucky that what we have works as well as it does but it could certainly use some love (that i cannot yet provide myself)...
"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 beacon animation/activity

Postby jtprophet » Thu Aug 06, 2020 9:01 pm

Yeah I was afraid of that, I am certainly limited to understanding the xml side and that does it for me; appreciate the responses. ; )

John
jtprophet
 
Posts: 205
Joined: Mon Apr 04, 2016 3:21 pm
Callsign: DAL1464

Re: AI beacon animation/activity

Postby stuart » Thu Aug 06, 2020 10:11 pm

I’ve been working on some core AI code that sets various light properties based on the actual flight phase when the AI flight plan is built.

I’ve still got a little debugging to do, but once it complete we won’t need workarounds like this any more.
G-MWLX
User avatar
stuart
Moderator
 
Posts: 1629
Joined: Wed Nov 29, 2006 10:56 am
Location: Edinburgh
Callsign: G-MWLX

Re: AI beacon animation/activity

Postby wkitty42 » Fri Aug 07, 2020 11:50 pm

this sounds cool!

i've got a lot of additional and changed debug logging in several areas of the AI code... it is interesting to see the flow of a craft but there are still some things i need to better understand... like getting data out of a (sub?)object within a craft object...

i'm trying to find where the property tree can be updated... like when the flightplan changes for a craft record... the callsign will change but the airports and times stay the same as the previous record... then there's the code also adds a new type=AI (IIRC) to the craft record each time it is reused... i'm not sure what this is used for since each type of "player" is in its own branch so MP is one place and AI in another... unless i'm really not remembering it properly right now... anyway, i don't see any reason for multiples of this type, either... maybe only so as to be able to count stats on how often a record is reused but...
"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 beacon animation/activity

Postby jtprophet » Sat Aug 08, 2020 6:45 pm

Yes I agree wkitty42 (add to dictionary)...lol :) this sim really is impressive with the graphic settings cranked up and with the visuals of the ai acting like the real world counterparts and the continued interest and exploration I certainly am looking forward to seeing what can be accomplished.

John
jtprophet
 
Posts: 205
Joined: Mon Apr 04, 2016 3:21 pm
Callsign: DAL1464


Return to AI Traffic

Who is online

Users browsing this forum: No registered users and 1 guest