Board index FlightGear Development AI Traffic

Unable to generate AI traffic on NZAR

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

Unable to generate AI traffic on NZAR

Postby aranzuglia » Sun Oct 22, 2017 11:08 pm

Hi there,

I've been trying several ways to make general aviation AI traffic work in NZ Ardmore airport. I was able to make it work only once:
I saw the plane taking off and landing about 10 minutes later, and it showed on the map as well. But after that time it never showed up again.

Is there something wrong with the following file? It should be generating a new flight every 10 minutes.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>

<trafficlist>

  <!-- Only one aircraft -->

  <aircraft>
    <model>Aircraft/c172/ph-gys.xml</model>
    <airline>AAC</airline>
    <home-port>NZAR</home-port>
    <required-aircraft>ZK-JRA-NZAR</required-aircraft>
    <actype>C172S</actype>
    <offset>5.4</offset>
    <radius>6</radius>
    <flighttype>ga</flighttype>
    <performance-class>light_aircraft</performance-class>
    <registration>ZK-JRA</registration>
    <heavy>false</heavy>
  </aircraft>

  <!-- One flight every 10 minutes -->

  <flight>
    <callsign>ZK-JRA</callsign>
    <required-aircraft>ZK-JRA-NZAR</required-aircraft>
    <fltrules>VFR</fltrules>
    <departure>
      <port>NZAR</port>
      <time>00:00:00</time>
    </departure>
    <cruise-alt>11</cruise-alt>
    <arrival>
      <port>NZAR</port>
      <time>00:15:00</time>
    </arrival>
    <repeat>1Hr</repeat>
  </flight>

  <flight>
    <callsign>ZK-JRA</callsign>
    <required-aircraft>ZK-JRA-NZAR</required-aircraft>
    <fltrules>VFR</fltrules>
    <departure>
      <port>NZAR</port>
      <time>00:10:00</time>
    </departure>
    <cruise-alt>11</cruise-alt>
    <arrival>
      <port>NZAR</port>
      <time>00:25:00</time>
    </arrival>
    <repeat>1Hr</repeat>
  </flight>

  <flight>
    <callsign>ZK-JRA</callsign>
    <required-aircraft>ZK-JRA-NZAR</required-aircraft>
    <fltrules>VFR</fltrules>
    <departure>
      <port>NZAR</port>
      <time>00:20:00</time>
    </departure>
    <cruise-alt>11</cruise-alt>
    <arrival>
      <port>NZAR</port>
      <time>00:35:00</time>
    </arrival>
    <repeat>1Hr</repeat>
  </flight>

  <flight>
    <callsign>ZK-JRA</callsign>
    <required-aircraft>ZK-JRA-NZAR</required-aircraft>
    <fltrules>VFR</fltrules>
    <departure>
      <port>NZAR</port>
      <time>00:30:00</time>
    </departure>
    <cruise-alt>11</cruise-alt>
    <arrival>
      <port>NZAR</port>
      <time>00:45:00</time>
    </arrival>
    <repeat>1Hr</repeat>
  </flight>

  <flight>
    <callsign>ZK-JRA</callsign>
    <required-aircraft>ZK-JRA-NZAR</required-aircraft>
    <fltrules>VFR</fltrules>
    <departure>
      <port>NZAR</port>
      <time>00:40:00</time>
    </departure>
    <cruise-alt>11</cruise-alt>
    <arrival>
      <port>NZAR</port>
      <time>00:55:00</time>
    </arrival>
    <repeat>1Hr</repeat>
  </flight>

  <flight>
    <callsign>ZK-JRA</callsign>
    <required-aircraft>ZK-JRA-NZAR</required-aircraft>
    <fltrules>VFR</fltrules>
    <departure>
      <port>NZAR</port>
      <time>00:50:00</time>
    </departure>
    <cruise-alt>11</cruise-alt>
    <arrival>
      <port>NZAR</port>
      <time>01:05:00</time>
    </arrival>
    <repeat>1Hr</repeat>
  </flight>

</trafficlist>


Command line being used (there is only one XML file within Traffic folder):
Code: Select all
fgfs --log-class=ai --log-level=bulk --airport=NZAR --enable-ai-models --enable-ai-traffic


Relevant log output:
Code: Select all
loading scenario 'nimitz_demo'
AIBase: Loaded model Models/Geometry/Nimitz/nimitz.xml
attached scenario Nimitz
AIBase: Loaded model Models/Geometry/Nimitz/eisenhower.xml
attached scenario Eisenhower
Submodels: Loading AI submodels
Submodels: Loading sub submodels
parsing traffic in:Path "/usr/share/games/flightgear/AI/Traffic/N"
Adding flight: ZK-JRA VFR NZAR NZAR 11 00:00:00 00:15:00 1Hr ZK-JRA-NZAR
Adding flight: ZK-JRA VFR NZAR NZAR 11 00:10:00 00:25:00 1Hr ZK-JRA-NZAR
Adding flight: ZK-JRA VFR NZAR NZAR 11 00:20:00 00:35:00 1Hr ZK-JRA-NZAR
Adding flight: ZK-JRA VFR NZAR NZAR 11 00:30:00 00:45:00 1Hr ZK-JRA-NZAR
Adding flight: ZK-JRA VFR NZAR NZAR 11 00:40:00 00:55:00 1Hr ZK-JRA-NZAR
Adding flight: ZK-JRA VFR NZAR NZAR 11 00:50:00 01:05:00 1Hr ZK-JRA-NZAR
parsing traffic schedules took:0msec
finishing AI-Traffic init
AI-Traffic: schedule aircraft missing performance data:C172S
Scheduling Flights for : Aircraft/c172/ph-gys.xml ZK-JRA NZAR
  Flight ZK-JRA:  NZAR:  Sun Oct 22 22:10:00 2017: "NZAR":  Sun Oct 22 22:25:00 2017:
 Done
Traffic manager: ZK-JRA is scheduled for a flight from NZAR to NZAR. Current distance to user: 0.212781
Traffic manager: Creating AIModel from:NZAR-NZAR.xml
Route from NZAR to NZAR. Set leg to : 1 ZK-JRA
Gate doesn't seem to have routes associated with it.


The flight seems to be properly planned, always to the next rounded 10 minute flight.

Any clue?

Thanks
aranzuglia
 
Posts: 2
Joined: Fri Oct 13, 2017 6:51 am

Re: Unable to generate AI traffic on NZAR

Postby wkitty42 » Mon Oct 23, 2017 2:04 am

the first thing i see is duplicate call signs in the same time period... look at the first two entries...
Code: Select all
 departure   arrival
 00:00:00    00:15:00
 00:10:00    00:25:00

the first one is still in the air when the second one should be generated... duplicate call signs in the same period are bad juju...
"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: 9162
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 22.04

Re: Unable to generate AI traffic on NZAR

Postby BecOzIcan » Mon Oct 23, 2017 3:10 am

I never seen a traffic file where origin and destination are the same. I am not sure Flight Manager is designed for that unrealistic scenario. Workaround would be to set a shuttle service between NZAR and maybe NZAA with flights leaving each airport every 10 minutes but you will need more than one aircraft to handle that.
Current Projects: AI Traffic, Models & Liveries
User avatar
BecOzIcan
 
Posts: 1302
Joined: Tue Oct 04, 2011 11:43 pm
Location: Sydney, NSW, Australia
Version: 2020.4.0
OS: Win10

Re: Unable to generate AI traffic on NZAR

Postby gooneybird » Mon Oct 23, 2017 10:13 am

BecOzIcan wrote in Mon Oct 23, 2017 3:10 am:I never seen a traffic file where origin and destination are the same.

It's been used in FG for several years and useful for creating local GA traffic, check out "data\AI\Traffic\misc\WooningAviation.xml", I use the same method for my test traffic.

aranzuglia wrote in Sun Oct 22, 2017 11:08 pm:Hi there,

I've been trying several ways to make general aviation AI traffic work in NZ Ardmore airport.

Relevant log output:
Code: Select all

Gate doesn't seem to have routes associated with it.


Looks like you do not have a complete ground network, without a complete working groundnet you will probably see an AI aircraft take off when you start FG but no others. If you wait long enough the aircraft will return but then be killed with the same error.
My Github repository (mostly AI stuff) https://github.com/gooneybird47
User avatar
gooneybird
 
Posts: 3046
Joined: Sat May 31, 2008 2:57 pm

Re: Unable to generate AI traffic on NZAR

Postby BecOzIcan » Mon Oct 23, 2017 12:16 pm

gooneybird wrote in Mon Oct 23, 2017 10:13 am:It's been used in FG for several years and useful for creating local GA traffic, check out "data\AI\Traffic\misc\WooningAviation.xml", I use the same method for my test traffic.


Awesome ! Thanks for that G !

Do you reckon the repeat at 1Hr could also create trouble ? I only ever saw 24Hr used and I am wondering how FG understands a repeat of 60 minutes with a set departing time, does it creates 24 flights per day ?

Code: Select all
  <flight>
    <callsign>ZK-JRA</callsign>
    <required-aircraft>ZK-JRA-NZAR</required-aircraft>
    <fltrules>VFR</fltrules>
    <departure>
      <port>NZAR</port>
      <time>00:50:00</time>
    </departure>
    <cruise-alt>11</cruise-alt>
    <arrival>
      <port>NZAR</port>
      <time>01:05:00</time>
    </arrival>
    <repeat>1Hr</repeat>
  </flight>


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

Re: Unable to generate AI traffic on NZAR

Postby gooneybird » Mon Oct 23, 2017 12:52 pm

Yes, but you have to be careful with flight duration, if it's to short the aircraft will not travel far before it is removed and placed on approach.

I use 2 hour repeat but have one aircraft do 2 flights (1 each hour) of 45 minutes duration and that usually means approximately 15 min. on ground between each flight.
https://forum.flightgear.org/viewtopic.php?f=23&t=32683&p=318026&hilit=test+traffic#p318023
My Github repository (mostly AI stuff) https://github.com/gooneybird47
User avatar
gooneybird
 
Posts: 3046
Joined: Sat May 31, 2008 2:57 pm

Re: Unable to generate AI traffic on NZAR

Postby aranzuglia » Tue Oct 24, 2017 9:15 am

Everything is much more stable when using NZAA for departure and arrival. Certainly, there is something wrong in NZAR with:
Code: Select all
Gate doesn't seem to have routes associated with it.


Can you point me in the right direction to fix it? TaxiDraw, WorldEditor, or this approach?
http://wiki.flightgear.org/index.php?ti ... k_and_easy

Should there be a parking.xml file under $FG_ROOT/AI/Airports/NZAR? The one for NZAA contains nodes and arc that might provide the ground network for AI.

Thanks
aranzuglia
 
Posts: 2
Joined: Fri Oct 13, 2017 6:51 am

Re: Unable to generate AI traffic on NZAR

Postby gooneybird » Wed Oct 25, 2017 8:29 pm

There is a NZAR groundnet in "data\Scenery\Airports" and "TerraSync\Airports" but they are incomplete, that is why you are getting the errors.

The only way to create an error free groundnet is to use Taxidraw following the instructions in the Ground networks section here: http://wiki.flightgear.org/Interactive_traffic

There are several topics on this forum concerning Taxidraw It is worth reading through a few to understand some of the problems using it.
My Github repository (mostly AI stuff) https://github.com/gooneybird47
User avatar
gooneybird
 
Posts: 3046
Joined: Sat May 31, 2008 2:57 pm


Return to AI Traffic

Who is online

Users browsing this forum: No registered users and 5 guests