- windows 10
- FlightGear 2020.3.6
- python 3.8.3
- pandas 0.23.4
- numpy 1.14.2
- tensorflow 1.12.0
- geographiclib 1.49
-
Install Anaconda in your compute, you can get it here. you need a python3 version.
-
add
path\of\your\Anaconda\
andpath\of\you\Anaconda\Scripts
to your system environment -
run the following command in your Windows PowerShell:
conda install numpy conda install pandas conda install tensorflow pip install geographiclib
-
Install FlightGear on your computer, you can get it here
-
copy
config/fgudp.xml
into folderFG_ROOT/data/Protocol
.FG_ROOT
is the folder where you install FG -
start flight gear and add below command line option into the blank white box in the tail of flightgear setting page. after this , press the
fly
button to begin your fly.--allow-nasal-from-sockets --telnet=5555 --httpd=5500 --generic=socket,in,10,127.0.0.1,5701,udp,fgudp --generic=socket,out,10,127.0.0.1,5700,udp,fgudp
-
To begin communicate with flightgear using python. just run the
python example.py
-
[tips] next time you only need to start flightgear and do step 7. you don't need to do step 1-6 again
train.py
data_analysis.py
data analysisDRL
RL modelDQN
ActorCritic
DDPG
fgmodule
Communication and Control Modulefgudp.py
main module of flightgear communicationfgcmd.py
remote control, reset and other functionsfgenv.py
scaffold
data
we will save all the fly log in folderdata/flylog
. their named by the time when the log created.
takeoff
cruise
-
telnet help this is very important for using telnet, please read carefully
-
quick replay Load Flight Recorder Tape (Shift-F1) load a pre-recorded flight to play back. Save Flight Recorder Tape (Shift-F2) saves the current flight to play back later. we can also use (Ctrl-R) to make a quick replay
-
some important props
/sim/model/autostart #autostart /controls/gear/brake-parking /sim/crashed #whether crashed