FGWalk is currently being developed as a simple on page launcher for the Flight Gear Flight simulation program.
Features:
Quicker launching of Flight Gear - from one screen
Quicker selection of aircraft and - airport from one screen
Open source: written in Python - easy to develop
This program is supplied with the source code for editing - or example adding more aircraft to the aircraft list, or adding more airports. This has to be done manually at the moment.
Version 25M8 is currenntly being developed and is expected to be launched this week.
Installation: (Provisional)
Download the zip files to your computer
Uncompress the files into your documents or user folder
Right click the fg25m8.py file and create a shortcut to the desktop
Doubleclick the link to launch the application.
To add aircraft to the list, edit the list:
aircraftlist=["c172p", "dhc2W","j3cub", "Dragonfly", "b1900d", "777-200ER" "SenecaII"]
To add airports, edit the airport list.
airportlist=["KHAF","KOAK", "KSFO","KHRV"]
Link on desktop with a standard icon, double click this icon...
..to launch fgwalk. This is the screen at the moment.
Updated 17 July 2020
Current Version 25 is hosted on Source Forge
Code hosted on Source Forge Version 25 . Unformatted :
There is a known error in this code: print lb.curselection() should be print(lb.curselection()), from Tkinter import *
###################################################
from Tkinter import *
import os
os.nice(5)
# Sept 18, 2011 Version fgwalk25M
## To do:
# Default deslect season
# Make sure the command gets printed in the text box
# Add to the aircraft list ( all default aircraft and Pix)
# Add to the airport list - OK
# Default Airport as KHAF - OK
# Create and test installer, launcher, publish with details
# Clean up the code
# Next Version : aircraft critical speeds, Runway length
##
# Working Version !!!!
# Deceided to implemtn these in version 0.2
# Select airport
# Select Plane
#User Select Selectlist --timeofday=value Specify a time of day. dawn, dusk, noon, midnight.
#User Select Checkbox --turbulence 0.1
#User Select Checkbox --season=winter (defualt is summer)
#Group graphics
#User Select Checkbox --fog-disable / --fog-fastest / --fog-nicest
#User Select Checkbox --disable-clouds / --enable clouds
#User Select Checkbox --disable-textures / -- enable textures
#User Select Checkbox --shading-flat (default smooth?)
# User Select Checkbox 3d Clouds
#User Select Checkbox Autocoordination Checkbox
# Main window
win = Tk()
win.geometry("640x480+100+100")
aircraftlist=["c172p", "dhc2W","j3cub", "Dragonfly", "b1900d", "777-200ER" "SenecaII"]
airportlist=["KHAF","KOAK", "KSFO","KHRV"]
## Incorporating latest info on LableFrames as given in python forum
##
#Variables
autocoordvar=IntVar()
a=IntVar()
CheckVar1=StringVar()
cloudvar=StringVar()
turbvar=StringVar()
texturevar=StringVar()
shadingvar=StringVar()
autocoordvar=StringVar()
daytimevar=StringVar()
seasonvar=StringVar()
fogvar=StringVar()
v = StringVar()
fgcommand = StringVar()
aircraftvariable = StringVar()
# Base frame or top frame
top_frame1 = Frame(win)
#Put top frame in grid of win, that is, the parent frame, in row1 col1 (not 0 0)
top_frame1.grid(row=1, column=1)
#Images of Aircraft
imgpath1 = "111.gif/"
photo1 = PhotoImage(file=imgpath1)
imgpath2 = "3.gif/"
photo2 = PhotoImage(file=imgpath2)
imgpath3 = "4.gif/"
photo3 = PhotoImage(file=imgpath3)
#Create a lableFrame inside the top frame 1 for aircraft
labelframe1 = LabelFrame(top_frame1, text="Choose Aircraft")
#put this lable frame in the grid of top frame
labelframe1.grid(row=1, column=0, padx=16, pady=5)
#Create a lableFrame inside the top frame 1 for airport
labelframe2 = LabelFrame(top_frame1, text="Choose Airport")
#put this lable frame in the grid of top frame
labelframe2.grid(row=1, column=1, padx=16, pady=5)
#Create a lableFrame inside the top frame 1 for airport
labelframe3 = LabelFrame(top_frame1, text="Weather")
#put this lable frame in the grid of top frame
labelframe3.grid(row=2, column=0, padx=16, pady=5, columnspan = 2)
#Create a lableFrame inside the top frame 1 fgraphcis
labelframe4 = LabelFrame(top_frame1, text="Graphic Settings")
#put this lable frame in the grid of top frame
labelframe4.grid(row=3, column=0, padx=16, pady=5, columnspan = 4)
#Create a lableFrame inside the top frame 1 fgraphcis
labelframe5 = LabelFrame(top_frame1, text="Autocoordination")
#put this lable frame in the grid of top frame
labelframe5.grid(row=4, column=0, padx=16, pady=5)
#Create a lableFrame inside the top frame 1 fgraphcis
labelframe6 = LabelFrame(top_frame1, text="Execution")
#put this lable frame in the grid of top frame
labelframe6.grid(row=5, column=0, padx=16, pady=5, columnspan = 6)
# Aircraft Images labels
ImageL1 = Label(labelframe1, image=photo1)
ImageL1.photo = photo1
# Add image to grid. Only one image is needed, it changes according to selected item
ImageL1.grid(row=0, column=0, padx=16, pady=5)
# Define Listbox for aircraft
lb = Listbox(labelframe1, height=7, exportselection=0)
lb.insert(END, "Cessna172")
lb.insert(END,"Beaver (Wheels)")
lb.insert(END,"Piper Cub")
lb.insert(END,"Moyes Dragonfly")
lb.insert(END,"Beech 1900D")
lb.insert(END,"Boeing 777-200ER")
lb.insert(END,"Piper Seneca II")
lb.selection_set(first=0)
#
# Define Listbox for Airport
AirportList = Listbox(labelframe2, height=4, exportselection=0)
AirportList.insert(END,"KHAF")
AirportList.insert(END,"KSFO")
AirportList.insert(END,"KOAK")
AirportList.insert(END,"KHRV")
AirportList.selection_set(first=0)
#Weather Selection
CHK_season = Checkbutton(labelframe3, text = "Winter Season", variable =CheckVar1, onvalue = " --season=winter ", offvalue = " ", font=("Helvetica", 11))
CHK_season.deselect()
CHK_turbulence = Checkbutton(labelframe3, text = "Turbulence", variable =turbvar, onvalue = "--turbulence=0.4", offvalue = " ", font=("Helvetica", 11))
CHK_turbulence.select()
CHK_clouds = Checkbutton(labelframe4, text = "Clouds On", variable =cloudvar, onvalue = "", offvalue = " --disable-clouds ", font=("Helvetica", 11))
CHK_clouds.select()
CHK_textures = Checkbutton(labelframe4, text = "Textures on", variable =texturevar, onvalue = "", offvalue = " --disable-textures ", font=("Helvetica", 11))
CHK_textures.select()
CHK_noontime = Checkbutton(labelframe4, text = "Noon Time", variable =daytimevar, onvalue = " --timeofday=noon ", offvalue = " ", font=("Helvetica", 11))
CHK_noontime.select()
CHK_autocoord = Checkbutton(labelframe5, text = "Auto coordination", variable =autocoordvar, onvalue = " --enable-auto-coordination", offvalue = " ", font=("Helvetica", 11))
CHK_autocoord.select()
CHK_fog = Checkbutton(labelframe4, text = "Fog (fastest)", variable =fogvar, onvalue = " --fog-fastest ", offvalue = " --fog-disable ", font=("Helvetica", 11))
CHK_fog .select()
#Define OK Button
b1 = Button(labelframe6 , text="OK")
###
text = Text(labelframe6, height =4, width =54)
text.grid(row=0, column=0, padx=16, pady=5)
b1.grid(row=0, column=3, padx=16, pady=5)
lb.grid(row=0, column=1, padx=16, pady=5)
AirportList.grid(row=1, column=2, padx=16, pady=5)
# Weather
CHK_season.grid(row=1, column=0, padx=16, pady=5)
CHK_turbulence.grid(row=1, column=1, padx=16, pady=5)
CHK_clouds.grid(row=1, column=1, padx=16, pady=5)
CHK_textures.grid(row=1, column=2, padx=16, pady=5)
CHK_noontime.grid(row=1, column=3, padx=16, pady=5)
CHK_clouds.grid(row=1, column=4, padx=16, pady=5)
CHK_autocoord.grid(row=1, column=5, padx=16, pady=5)
CHK_fog.grid(row=1, column=2, padx=16, pady=5)
# Event for changing image when a itme in the list box is selected
def get_list(event):
# Diagnostics
lb.curselection()
print lb.curselection()
# Read the cursor selection value into a string for parsing
seltext = lb.curselection()
# use the zeroth position from the string
print(seltext[0])
if (seltext[0]) == "0":
ImageL1.configure(image = photo1)
if (seltext[0]) == "1":
ImageL1.configure(image = photo2)
if (seltext[0]) == "2":
ImageL1.configure(image = photo3)
# List box lb is being bound to an event get_list
lb.bind('<ButtonRelease-1>', get_list)
#Main button and actions that are triggered
def but1() :
print("button 1 pressed")
print(lb.curselection())
print(AirportList.curselection())
# Check variable access
print(CheckVar1.get())
seltext1 = lb.curselection()
a =int(seltext1[0])
seltext2 = AirportList.curselection()
b =int(seltext2[0])
# put this into press button event
#span = "--timeofday=value --season=winter --fog-disable --disable-clouds --disable-textures --shading-flat "
fgcommand="fgfs --aircraft="
fgcommand = fgcommand + aircraftlist[a]
fgcommand = fgcommand +" --airport="
fgcommand = fgcommand + airportlist[b]
fgcommand = fgcommand + CheckVar1.get()
fgcommand = fgcommand + daytimevar.get()
fgcommand = fgcommand + turbvar.get()
fgcommand = fgcommand + cloudvar.get()
fgcommand = fgcommand + seasonvar.get()
fgcommand = fgcommand + texturevar.get()
fgcommand = fgcommand + fogvar.get()
fgcommand = fgcommand + autocoordvar.get()
text.insert(INSERT, fgcommand)
print(fgcommand)
os.system(fgcommand)
#Configure GUI button to code that runs as but1()
b1.configure(command=but1)
win.mainloop()
###################################################