kamikaze wrote in Tue Nov 07, 2017 5:45 pm:Is there any way to inject my own Python code so I could try to write a spectator mode to spectate on any flying jet or move around the map freely?
First of all, you can get the position/orientation of any aircraft using the multiplayer protocol or other networking options.
However, that doesn't give you anything that you can "render" - because you also need the corresponding 3D world data, e.g. stuff like the surrounding scenery/weather and the actual 3D model and the state of everything else that may be situation-specific (instrument readings, weather settings, radio settings, other traffic etc).
Which is to say, it is really only feasible to create such a feature using the fgfs binary itself.
Like Stuart said, this information, and even the feature you are asking for, is readily available in the form of various hooks that can be used, including a scripting language called "Nasal".
That being said, if you really need to use Python to do the corresponding coding, your best bet might be Torsten's mongoose/Phi work, and getting an image stream out of FlightGear for a set of configurable settings.
If however, the whole thing is really about _any_ "flying jet", it is also worth noting that not even the MP environment is self-contained in that sense, i.e. a fgms server may be mirroring/relaying flight data from another fgms server. And under such circumstances, you may still want to use a local fgfs instance to create the corresponding scenery/aircraft view and render that.