Board index FlightGear Development AI Traffic

AI Traffic

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

Re: AI Traffic

Postby TheEagle » Tue Sep 06, 2022 3:40 pm

The Cessna 172P will never take off by itself - it's simply not implemented in FG. But other aircraft around you will, with the command line I posted. If you could describe precisely what you need, maybe we can help you in getting it done in a different way ! :)
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3414
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04

Re: AI Traffic

Postby wkitty42 » Tue Sep 06, 2022 4:14 pm

wuyzanLl wrote in Tue Sep 06, 2022 3:19 pm:I did what you said, but the Cessna 172p just moved very slowly and didn't take off or taxi. What is wrong with it, I am confused.

the 172p is your craft... you have to fly it... this is why i suggested to use the UFO since it does not have a cockpit and you can easily move it to where you want to be able to just watch the AI craft moving about... you still have to use the throttle and yoke keys to move the UFO but you can also completely stop it in mid-air and turn it to look at whatever you want to see...
"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: 9148
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: AI Traffic

Postby wlbragg » Tue Sep 06, 2022 4:39 pm

I did what you said, but the Cessna 172p just moved very slowly and didn't take off or taxi. What is wrong with it, I am confused.
As described above, I want to see the animation of the Aircraft taking off and landing by themselves in FlightGear.
So I'm expecting to get some aerodynamics data when the Aircraft is flying. It is possible, right?


If I am understanding you correctly, yes, it is possible, but not without writing some code, (programming). I don't think anyone has created anything like what your asking for, It doesn't exist yet. The closest thing I know to what you want still requires you to fly the aircraft.

Does anyone know if there is any "off the shelf" code or addon that allows you to track flight data of the aircraft your flying? If so one could get close to what is being asked for here by using that and an aircraft with a very robust route manager and ap, yes?
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: AI Traffic

Postby TheEagle » Tue Sep 06, 2022 4:47 pm

All relevant data like altitude, speed, and attitude are in /ai/models/aircraft[n] - but no aerodynamic data, since that is never produced.
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3414
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04

Re: AI Traffic

Postby wuyzanLl » Wed Sep 07, 2022 3:40 am

wlbragg wrote in Tue Sep 06, 2022 4:39 pm:
I did what you said, but the Cessna 172p just moved very slowly and didn't take off or taxi. What is wrong with it, I am confused.
As described above, I want to see the animation of the Aircraft taking off and landing by themselves in FlightGear.
So I'm expecting to get some aerodynamics data when the Aircraft is flying. It is possible, right?


If I am understanding you correctly, yes, it is possible, but not without writing some code, (programming). I don't think anyone has created anything like what your asking for, It doesn't exist yet. The closest thing I know to what you want still requires you to fly the aircraft.

Does anyone know if there is any "off the shelf" code or addon that allows you to track flight data of the aircraft your flying? If so one could get close to what is being asked for here by using that and an aircraft with a very robust route manager and ap, yes?


Yes, I will track flight data of the aircraft which is land and takeoff by themselves with the Unpack net_ctrl Packer from FlightGear block in MATLAB/Simulink.
But why I want have the the aircraft which is land and takeoff by themselves?Just because I'm not flying the plane properly, like taxi and apporach.

Thanks
wuyzanLl
 
Posts: 12
Joined: Tue Sep 06, 2022 3:52 am

Re: AI Traffic

Postby wuyzanLl » Wed Sep 07, 2022 8:23 am

TheEagle wrote in Tue Sep 06, 2022 3:40 pm:The Cessna 172P will never take off by itself - it's simply not implemented in FG. But other aircraft around you will, with the command line I posted. If you could describe precisely what you need, maybe we can help you in getting it done in a different way ! :)


I replaced c172p with A320-111,is it possible?
I will track flight data of the aircraft which is land and takeoff by themselves with the Unpack net_ctrl Packer from FlightGear block in MATLAB/Simulink.
wuyzanLl
 
Posts: 12
Joined: Tue Sep 06, 2022 3:52 am

Re: AI Traffic

Postby wkitty42 » Wed Sep 07, 2022 10:45 am

wuyzanLl wrote in Wed Sep 07, 2022 8:23 am:
TheEagle wrote in Tue Sep 06, 2022 3:40 pm:The Cessna 172P will never take off by itself - it's simply not implemented in FG. But other aircraft around you will, with the command line I posted. If you could describe precisely what you need, maybe we can help you in getting it done in a different way ! :)


I replaced c172p with A320-111,is it possible?

no... you are mixing up several things...
1. you will always have a craft that *you must control*.
2. AI craft are autonomous and operate completely independent.

wuyzanLl wrote in Wed Sep 07, 2022 8:23 am:I will track flight data of the aircraft which is land and takeoff by themselves with the Unpack net_ctrl Packer from FlightGear block in MATLAB/Simulink.

what, exactly, are you trying to do??
"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: 9148
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: AI Traffic

Postby wuyzanLl » Wed Sep 07, 2022 10:52 am

I replaced c172p with A320-111,is it possible?[/quote]
no... you are mixing up several things...
1. you will always have a craft that *you must control*.
2. AI craft are autonomous and operate completely independent.


Sorry, The second is what I want.
I want to see the animation of the AI Aircraft taking off and landing automatically in FlightGear.
And I will track flight data of the aircraft with the Unpack net_ctrl Packer from FlightGear block in MATLAB/Simulink.
The MTALAB/Simulink and FlightGear can be co-simulated, the demo of HL20 is the best evidence.
wuyzanLl
 
Posts: 12
Joined: Tue Sep 06, 2022 3:52 am

Re: AI Traffic

Postby TheEagle » Wed Sep 07, 2022 11:27 am

Okay, then start FG as follows:
Code: Select all
fgfs --enable-ai-aircraft --enable-ai-models --aircraft=ufo --airport=BIKF --runway=10

Then wait 10 minutes and you should see AI aircraft taxiing, taking off and landing. Then you need to point your tracking software to any of the /ai/models/aircraft nodes - how that is done with your specific software I don't know.
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3414
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04

Re: AI Traffic

Postby polly » Wed Sep 07, 2022 1:38 pm

"What we have got is failure to communicate"

AI aircraft models do not generate aero data.

Flightgear fully simulates only the aircraft model you, the user, are flying. Aero calculations are made only for that aircraft model.

The 'AI' models are, as wkitty says, nore like peices of moving scenery: their appearance on the screen changes ( attitude, gear, flaps, etc ) according to approximate characteristics for the type of model in question.

AI aircraft models can follow flightplans based upon actual timetables, they can be seen departing and arriving at airports.
AI models may also be controlled by scenario files that consist of position, speed, altitude specifications. A scenario file can be written to cause an AI aircraft model to
take off, circle, land, continually but you will only be able to see position, speed, altitude, there's no aero data available for any 'AI' aircraft model.

The primary aircraft model, the one that the user 'flies', will likely have an autopilot and route manager facility that allows for creating or uploading a route. Also, for the main aircraft, you can genertate a csv file during flight that will record
any properties as the plane flies, you need to create a secification for the data points you wish to record.

The route manager does not handle takeoff and landing. It's possible you can declare waypoints so that the model points in the proper direction for takeoff and landing but our autopilots generally don't manage the rudder ( takeoff ) and manual throttle, at least, would be needed for landing.

If you need the aero data that Flightgear calculates then AI models cannot help you,
find an aircraft model that rolls more or less straight down the runwat ( single turbine ? ) . Create a route manager file that includes one waypoint about 1 mile down the extended departure runway, one beyond the lanfing runway, together with wayoints in between as needed. Set up your csv file logging and then work the rudder/throttle until the autpilot can take over.

HTH !!
User avatar
polly
 
Posts: 957
Joined: Thu Nov 04, 2010 3:45 pm

Re: AI Traffic

Postby TheEagle » Wed Sep 07, 2022 2:13 pm

In fact, the autopilot can control the rudder - you just need to enable auto-coordination, then the aileron output of the AP will also drive the rudder. As for throttle managing, the route manager allows you to specify a desired speed for each waypoint AFAIK.
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3414
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04

Re: AI Traffic

Postby polly » Wed Sep 07, 2022 2:18 pm

More good news !
User avatar
polly
 
Posts: 957
Joined: Thu Nov 04, 2010 3:45 pm

Re: AI Traffic

Postby wuyzanLl » Thu Sep 08, 2022 2:28 am

polly wrote in Wed Sep 07, 2022 1:38 pm:
AI aircraft models can follow flightplans based upon actual timetables, they can be seen departing and arriving at airports.
AI models may also be controlled by scenario files that consist of position, speed, altitude specifications. A scenario file can be written to cause an AI aircraft model to
take off, circle, land, continually but you will only be able to see position, speed, altitude, there's no aero data available for any 'AI' aircraft model.



Yes, you are right. The Internal Properties Browser contains only position, speed and altitude, but I really want to get more the surface-position.
And the surface-position, gear and engine data is only about the aircraft I control. The MATLAB/Simulink and FlightGear can be co-simulated, so I can get the image of data.

Sorry....I have any question, how to generate a csv file during flight that will record any properties as the aircraft flies, you need to create a secification for the data points you wish to record.

Thanks very much.
wuyzanLl
 
Posts: 12
Joined: Tue Sep 06, 2022 3:52 am

Re: AI Traffic

Postby wuyzanLl » Thu Sep 08, 2022 2:30 am

TheEagle wrote in Wed Sep 07, 2022 2:13 pm:In fact, the autopilot can control the rudder - you just need to enable auto-coordination, then the aileron output of the AP will also drive the rudder. As for throttle managing, the route manager allows you to specify a desired speed for each waypoint AFAIK.


If I want to enable auto-coordination, I am suppoesd to wrtie some code in command line like below.

Code (): Select all
--enable-auto-coordination


Right? Thanks
wuyzanLl
 
Posts: 12
Joined: Tue Sep 06, 2022 3:52 am

Re: AI Traffic

Postby wkitty42 » Thu Sep 08, 2022 9:46 am

wuyzanLl wrote in Thu Sep 08, 2022 2:28 am:
polly wrote in Wed Sep 07, 2022 1:38 pm:AI aircraft models can follow flightplans based upon actual timetables, they can be seen departing and arriving at airports.
AI models may also be controlled by scenario files that consist of position, speed, altitude specifications. A scenario file can be written to cause an AI aircraft model to
take off, circle, land, continually but you will only be able to see position, speed, altitude, there's no aero data available for any 'AI' aircraft model.


Yes, you are right. The Internal Properties Browser contains only position, speed and altitude, but I really want to get more the surface-position.

you will not get that from the AI craft because it simply does not exist... the AI model is placed in 3D space at point X,Y,Z with orientation A,B,C at time point J... at time point J+1, the AI model is placed at another point X,Y,Z in 3D space with orientation A,B,C...

wuyzanLl wrote in Thu Sep 08, 2022 2:28 am:And the surface-position, gear and engine data is only about the aircraft I control.

correct... you can only get data about the full craft you control yourself...
"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: 9148
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

PreviousNext

Return to AI Traffic

Who is online

Users browsing this forum: No registered users and 6 guests