Board index FlightGear Development AI Traffic

AI Traffic Controller  Topic is solved

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

AI Traffic Controller  

Postby portreekid » Thu Feb 11, 2021 7:18 am

I found a fishy code and I would like some user feedback. Has anyone observed AI aircraft starting up if the time isn’t system time. The ground controller would use system time to determine if an aircraft should start up.
portreekid
 
Posts: 651
Joined: Tue Jan 14, 2014 4:36 pm
Location: Leipzig
Callsign: PORTREE
Version: 2020.2.1
OS: Windows 10

Re: AI Traffic Controller

Postby BecOzIcan » Thu Feb 11, 2021 1:47 pm

portreekid wrote in Thu Feb 11, 2021 7:18 am:AI aircraft starting up if the time isn’t system time.


What do you mean by 'system time' though ?

Just did a quick test with AI scheduled departure time 05h00 UTC.
From DOH Airport (UTC+3)
With my machine sitting in SYD (UTC +10)
On a Nightly build from last week running on Win10
Simulation starting time "Morning"

Real and UTC time values in properties / sim / time are correct.

AI Aircraft 'woke up' as expected at 05h00 Flightgear UTC Time to signal 'Ready to taxi'.
Cleared to Taxi by Ground ATC 3 minutes later.

Have not modified or forced the time settings toggle (simulation rate or Time Warp) which you can normally play with to trigger forced startup.

Image

Let me know of any other scenario you need checked/tested.

Cheers
Ian
Last edited by BecOzIcan on Fri Feb 12, 2021 7:12 am, edited 1 time in total.
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: AI Traffic Controller

Postby portreekid » Thu Feb 11, 2021 4:13 pm

BecOzIcan wrote in Thu Feb 11, 2021 1:47 pm:
portreekid wrote in Thu Feb 11, 2021 7:18 am:AI aircraft starting up if the time isn’t system time.


What do you mean by 'system time' though ?

Actual Unix time. So if I start sim at 8:00 for "Afternoon". I had the impression the Startup Controller thought it was 8:00.
BecOzIcan wrote in Thu Feb 11, 2021 1:47 pm:
portreekid wrote in Thu Feb 11, 2021 7:18 am:AI aircraft starting up if the time isn’t system time.

Have not modified or forced the time settings toggle (simulation rate or Time Warp) which you can normally play with to trigger forced startup.


That means my hunch was not 100% correct. Puzzling

Don't worry when I have learned more, test cases will be requested. Yesterday I succeeded to have a moving AI Aircraft in 2 second test transitioning through all legs.
portreekid
 
Posts: 651
Joined: Tue Jan 14, 2014 4:36 pm
Location: Leipzig
Callsign: PORTREE
Version: 2020.2.1
OS: Windows 10

Re: AI Traffic Controller

Postby zakalawe » Thu Feb 11, 2021 10:36 pm

Haha, turns out five years ago I did go through and convert everything to use simulator time (which is what get_time_params()->get_cur_time() returns, despite the name). Fingers crossed I got them all...
zakalawe
 
Posts: 1259
Joined: Sat Jul 19, 2008 5:48 pm
Location: Edinburgh, Scotland
Callsign: G-ZKLW
Version: next
OS: Mac

Re: AI Traffic Controller

Postby portreekid » Thu Feb 11, 2021 11:03 pm

Good then it must be how the test code sets the clock
portreekid
 
Posts: 651
Joined: Tue Jan 14, 2014 4:36 pm
Location: Leipzig
Callsign: PORTREE
Version: 2020.2.1
OS: Windows 10

Re: AI Traffic Controller

Postby portreekid » Wed Feb 17, 2021 10:00 am

It was how the test sets the clock. So now I have code that can schedule a flight and run the AI code in 2 seconds real time and output a kml.

Image
portreekid
 
Posts: 651
Joined: Tue Jan 14, 2014 4:36 pm
Location: Leipzig
Callsign: PORTREE
Version: 2020.2.1
OS: Windows 10

Re: AI Traffic Controller

Postby zakalawe » Thu Feb 18, 2021 11:51 am

Lovely! Please send a MR whenever you like, since this will help with debugging/testing a bunch of stuff.

I'm almost afraid to ask, does the KML output, etc also work for ground movements? Since that almost seems to be a more buggy area than the in-air movements.
zakalawe
 
Posts: 1259
Joined: Sat Jul 19, 2008 5:48 pm
Location: Edinburgh, Scotland
Callsign: G-ZKLW
Version: next
OS: Mac

Re: AI Traffic Controller

Postby zakalawe » Thu Feb 18, 2021 11:53 am

I'm also afraid to ask what flight-plan you were flying, in that screenshot .... depart EGPH, fly direct to EGPG, get drunk over central Glasgow, divert to EGPK with malfunctioning heading hold, then make the largest ever arc to reach EGPG again? :D :D
zakalawe
 
Posts: 1259
Joined: Sat Jul 19, 2008 5:48 pm
Location: Edinburgh, Scotland
Callsign: G-ZKLW
Version: next
OS: Mac

Re: AI Traffic Controller

Postby portreekid » Thu Feb 18, 2021 3:47 pm

Yes the kml is complete. I can't fly leg 9 aka runway -> parking yet because the trafficmanager looks up the next flight and segfaults because it's 0. The weirdness is that the time is too long and the flight needs to waste time. At least that's the idea atm. Tonight I'll push the WIP. So watch https://sourceforge.net/u/portree_kid/f ... next/tree/
portreekid
 
Posts: 651
Joined: Tue Jan 14, 2014 4:36 pm
Location: Leipzig
Callsign: PORTREE
Version: 2020.2.1
OS: Windows 10


Return to AI Traffic

Who is online

Users browsing this forum: No registered users and 4 guests