-
Notifications
You must be signed in to change notification settings - Fork 2
P Flightsim
http://ardupilot-mega.googlecode.com/svn/ArduPilotMegaImages/planner7.PNG
The Mission Planner can also send data from your APM board to a flight simulator program, emulating the inputs you would give with a mouse or joystick. This allows you to very accurately simulate UAV missions on the ground, so you can test waypoints and configuration settings without risking your aircraft.
Full instructions for such "hardware-in-the-loop" (HIL) simulations are here, but these are the basics for using the Mission Planner as a Com bridge between the board and sim.
The Mission Planner supports two Flight Simulator programs, XPlane and FlightGear. Choose which one you'll be using.
If you're using Xplane, you'll need to change some APM configuration settings. Edit your APM_Config.h file to include these lines (temporarily comment out any other GCS or GPS lines you already have):
#define ENABLE_HIL ENABLED
#define GCS_PROTOCOL GCS_PROTOCOL_XPLANE
#define GCS_PORT 0
#define GPS_PROTOCOL GPS_PROTOCOL_IMU
#define AIRSPEED_CRUISE 25 // or whatever works best for your Xplane selection
#define AIRSPEED_SENSOR ENABLED
Start the Flight Simulator and make any changes in its settings as required in the full instructions linked above. When selecting an aircraft in Xplane, we recommend the RC plane that comes with Xplane (called the PT-60):
http://ardupilot-mega.googlecode.com/svn/ArduPilotMegaImages/pt60.PNG
Now press Connect. Assuming your RC transmitter and receiver are on and connected to your APM board, you should be able to control the flight sim aircraft with your RC transmitter. If any of the controls are reversed, click on the appropriate reverse check box in the Mission Planner dialog box.
You should be able to test all your APM modes, including Stabilize, RTL and Auto modes using this utility.