This is my first post to diydrones.com.
I think that it would be very nice to use same ArduPilot software in real life and with simulator.
So, according this blog post http://diydrones.com/profiles/blogs/the-ardupilot-fg-control-for
I have modified ArduPilot so it can be used with Flight Gear Simulator.
Download:
http://www.rytkonen.org/ardupilot/ArduPilot_2_6_2_flightgear.zip.
http://www.rytkonen.org/ardupilot/ArduPilot_2_7_beta3_flightgear.zip
Here are some instructions, how I got everything work with Windows.
Hardware
- You only need to connect power source and FTDI cable to ArduPilot.
- Simulator does not work with shields and GPS installed. So remove them from ArduPilot.
- Install code to ArduPilot with Arduino IDE
Installing FlightGear in Windows
- Download and Install FlightGear Simulator
Create batch file
run.bat
cd C:\PROGRA~1\FlightGear\BIN\win32
SET FG_HOME=c:/PROGRA~1/FlightGear
SET FG_ROOT=c:/PROGRA~1/FlightGear/data
SET FG_SCENERY=C:/PROGRA~1/FlightGear/data/Scenery;C:/PROGRA~1/FlightGear/scenery;C:/PROGRA~1/FlightGear/terrasync;c:/terrasync
fgfs.exe --aircraft=c172p-2dpanel --control=mouse --disable-intro-music --disable-random-objects --prop:/sim/rendering/random-vegetation=false --disable-ai-models --geometry=800x600 --bpp=32 --timeofday=noon --native-fdm=socket,out,10,127.0.0.1,5500,udp --native-ctrls=socket,in,10,127.0.0.1,5600,udp --native-ctrls=socket,out,10,127.0.0.1,5700,udp --fg-root=C:/PROGRA~1/FlightGear/data --altitude=9999 --atlas=socket,out,5,localhost,5505,udp
ArduFGcontrol
- Download ArduFGcontrol from here
- Edit settings file as described in Readme.txt
Upload Waypoints to ArduPilot
- Download a sample mission file for the ArduFGControl from here (Mission.zip)
- Install waypoints to ArduPilot with ConfigTool. Download it from http://code.google.com/p/ardupilot/downloads/list
Ready for Takeoff
- Start ArduFGcontrol
- Start FlightGear by running BAT you just created
If you want install RC plane model to Flight Gear, you can download from here. Save unzipped files to Aircrafts-folder.
Comments
Couldn't run batch file with FG 2.0.0
http://www.rytkonen.org/ardupilot/ArduPilot_2_7_beta3_flightgear.zip