Board index FlightGear Support

Text-Based Line Launcher for Flight Gear (FGTL)

All general support: help on flying, installation, hardware, getting online etc. There are lots of users and developers to help you out.
Forum rules
In order to help you, we need to know a lot of information. Make sure to include answers to at least the following questions in your initial post.

- what OS (Windows Xp/Vista, Mac etc.) are you running?
- what FlightGear version do you use?
- what graphics card do you have?
- does the problem occur with any aircraft, at any airport?
- where did you download your aircraft/scenery from?
- is there any output printed to the console (black window)?
- copy&paste your commandline (tick the "Show commandline box on the last page of FGRun or the "Others" section on the Mac launcher).

Please report any bugs not specific to an aircraft on the issue tracker.
To run FlightGear on old computers with bad OpenGL support, please take a look at this wiki article.

Note: If you did not get a reponse, even after 7 days, you may want to check out the FlightGear mailing lists to ask your question there.

Text-Based Line Launcher for Flight Gear (FGTL)

Postby openflight » Thu Jul 16, 2020 1:47 am

While continuing to develop' my FGWALK launcher in Python, I came up with test based launcher that is useful for me at least.

I call it Flight Gear Text Launcher (FGTL)

I post it here, if anyone wants to use it go ahead, GPL and all that sort of thing. Useful or 'Trivial'?

Instructions: Install Python 2.7 or above, edit the fgl.txt file which contains the launch commands. Then run the program type in the number to select your choice.

Save this text to a file called fgl.txt and edit as required:

Code: Select all
fgfs --airport=PHTO   --aircraft=c172pN1234  --disable-random-objects  --enable-auto-coordination --geometry=800x600 --timeofday=noon
fgfs --airport=PHNL   --aircraft=ufo    --enable-horizon-effect   --disable-ai-models --geometry=800x600 --timeofday=noon 
fgfs --airport=PHNL  --aircraft=ch750stol      --enable-auto-coordination   --enable-horizon-effect   --disable-ai-models --geometry=800x600 --timeofday=noon 
fgfs --airport=PHNL  --aircraft=ufo    --enable-auto-coordination   --enable-horizon-effect   --disable-ai-models --geometry=800x600 --timeofday=noon
fgfs --airport=PHNL   --aircraft=ufo    --enable-auto-coordination   --enable-horizon-effect   --disable-ai-models --geometry=800x600 --timeofday=noon
fgfs --airport=PHNL  --aircraft=ufo    --enable-auto-coordination   --enable-horizon-effect   --disable-ai-models --geometry=800x600 --timeofday=noon


CODE:

Code: Select all
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os

AircraftList = open('fgl.txt', 'r')
aircraftline = AircraftList.readlines()


i=1
for item in aircraftline:
   #print(item)
   print(str(i) + " " + item)
   i=i+1
   
number_1 = int(input("Choose startup string for FLight Gear "))

os.system(aircraftline[number_1-1])
openflight
 
Posts: 480
Joined: Fri Sep 16, 2011 11:14 am
Version: 1 2 2018
OS: Linux Mint 19.3

Re: Text-Based Line Launcher for Flight Gear (FGTL)

Postby openflight » Thu Jul 16, 2020 1:56 am

I should add it works in Mint 16.03 and Python 3.6, for the Flight Gear 2018 version.
openflight
 
Posts: 480
Joined: Fri Sep 16, 2011 11:14 am
Version: 1 2 2018
OS: Linux Mint 19.3

Re: Text-Based Line Launcher for Flight Gear (FGTL)

Postby openflight » Mon Jul 20, 2020 12:27 pm

I am using the FGTL version 1.0 for FG 1.0 running in WINE. The batch file takes time for the first load, but runs fast after that.

Code: Select all
:MENU
ECHO OFF
ECHO.
ECHO ...............................................
ECHO PRESS 1, 2 OR 3 to select your task, or 4 to EXIT.
ECHO ...............................................
ECHO.
ECHO 1 - Cessna 172P N 1234 from parking area, Autocoordination
ECHO 2 - UFO Object Placement Tool from Parking Area
ECHO 3 - Piper PA-28 from parking area, Autocoordination
ECHO 4 - EXIT
ECHO.

CD \
C:
cd Program Files
Cd FlightGear
Cd bin
cd win32


SET /P M=bla bla bla bla
IF %M%==1 GOTO c172pN1234
IF %M%==2 GOTO UFO
IF %M%==3 GOTO PA28-161
IF %M%==4 GOTO EOF

:c172pN1234
fgfs.exe --aircraft=c172pN1234 --lon=-122.495823 --lat=37.513869 --fg-root="c:\Program Files\FlightGear\data" --fg-scenery="c:\Program Files\FlightGear\data\Scenery;c:\Program Files\FlightGear\Scenery" --enable-auto-coordination  --timeofday=noon
pause
GOTO MENU

:UFO
fgfs.exe --aircraft=ufo --lon=-122.495823 --lat=37.513869 --fg-root="c:\Program Files\FlightGear\data" --fg-scenery="c:\Program Files\FlightGear\data\Scenery;c:\Program Files\FlightGear\Scenery" --enable-auto-coordination  --timeofday=noon
pause
GOTO MENU

:PA28-161
fgfs.exe --aircraft=pa28-161 --lon=-122.495823 --lat=37.513869 --fg-root="c:\Program Files\FlightGear\data" --fg-scenery="c:\Program Files\FlightGear\data\Scenery;c:\Program Files\FlightGear\Scenery" --enable-auto-coordination  --timeofday=noon
pause
GOTO MENU


pause




openflight
 
Posts: 480
Joined: Fri Sep 16, 2011 11:14 am
Version: 1 2 2018
OS: Linux Mint 19.3

Re: Text-Based Line Launcher for Flight Gear (FGTL)

Postby openflight » Mon Jul 20, 2020 12:43 pm

Output:

Z:\home\starlight7>:MENU

Z:\home\starlight7>ECHO OFF

...............................................
PRESS 1, 2 OR 3 to select your task, or 4 to EXIT.
...............................................

1 - Cessna 172P N 1234 from parking area, Autocoordination
2 - UFO Object Placement Tool from Parking Area
3 - Piper PA-28 from parking area, Autocoordination
4 - EXIT

bla bla bla bla
openflight
 
Posts: 480
Joined: Fri Sep 16, 2011 11:14 am
Version: 1 2 2018
OS: Linux Mint 19.3


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest