Outils pour utilisateurs

Outils du site


issue90:jeux_ubuntu2

Ceci est une ancienne révision du document !


Last month, I reviewed X-Plane 10; this month, I thought I’d show how to extend X-Plane using Python and several other scripts.

Before doing anything else, you’ll need to install Python. I would recommend installing the package named ‘python’ via your package manager (or a terminal), but be sure to install some version of Python 2.7. As of writing, I have 2.7.5-5ubuntu3 listed in my package manager.

Python Interface

The Python Interface is written by Sandy Barbour and is available from http://www.xpluginsdk.org/python_interface_latest_downloads.htm.

What you’ll download is a ZIP file which should be unarchived to your X-Plane plugins folder. I have X-Plane via Steam, so I unarchived the ZIP file to /home/ronnie/.local/share/Steam/SteamApps/common/X-Plane 10/Resources/plugins. You may need to show hidden folders to see the .local folder. Your desktop window manager should have an option under View for this. So, if you go into your plugins folder, you should see a folder called PythonInterface.

On loading X-Plane, you should now see Python Interface mentioned in the Plugins menu at the top of the screen.

Flight Planner

I’m a complete beginner at X-Plane and flight simulations, so I like to see my position, in real-time, on a map. The site X-Plane Flight Planner is completely free, and excellent for this. It’s at http://xplane.anzui.de:3000/flight-planner. Let’s install their Python script to use X-Plane outputs to plot our location, in real-time, on a Google Maps style map.

The site gives good information on installing the script (https://github.com/der-On/X-Plane-Flight-Planner/wiki/Quickstart-Guide), but here’s the basics.

Download the Python file from https://github.com/der-On/X-Plane-Flight-Planner/raw/master/python_interface/PI_flight_planner.py and save/copy it to Plugins > PythonScripts (shown bottom left). If you don’t have a PythonScripts folder, then you’ll need to make one. In that same folder, save/copy the file https://github.com/der-On/X-Plane-Flight-Planner/raw/master/python_interface/flight_planner_server.sh and https://github.com/der-On/X-Plane-Flight-Planner/raw/master/python_interface/flight_planner_server.py.

Now, open a terminal and cd into your PythonScripts folder. Once in there, do:

./flight_planner_server.sh

Now start X-Plane. Once X-Plane has gone through some of its loading, you’ll see it start to send info in your terminal.

To stop the server you can run the file https://github.com/der-On/X-Plane-Flight-Planner/raw/master/python_interface/flight_planner_server_stop.sh (again from your PythonScripts folder), but I usually just stop the server by pressing CTRL+C in the terminal.

Shown below left I am in X-Plane, parked up at Glasgow Airport (EGPH).

Below right is the X-Plane Flight Planner site (the pink plane beside the big yellow one is me).

If I was to move off from there (in X-Plane) and taxi to the runway, you’d see it in real-time in the Flight Planner site.

Be sure to click the + symbol and check the ‘follow’ box – so that it centers your plane on the screen.

Now that you’ve got Python Interface installed, and you know how to install a Python script, I highly recommend (if your machine can handle it) installing the Fly With Lua plugin (http://forums.x-plane.org/index.php?app=downloads&showfile=17468) which extends the scripting abilities of X-Plane. With it installed, you should install Real Terra Haze (http://forums.x-plane.org/index.php?app=downloads&showfile=22387). It will give you fantastic atmospheric effects (shown in the screen capture below). Fly With Lua goes into your Plugins folder, and Real Terra Haze goes inside the Fly With Lua folder.

If there’s interest in more X-Plane, then next month I’ll discuss using the X-Plane Flight Planner site to plan your route; and then how to enter it into your flight management computer (FMC).

issue90/jeux_ubuntu2.1420210028.txt.gz · Dernière modification : 2015/01/02 15:47 de andre_domenech