ArduPilot has two modes: programmed waypoints and return-to-launch (RTL). In the first one, you enter in GPS Latitude and Longitude coordinates of your waypoints into the code with the Arduino IDE. In the second, you don't enter in any waypoints and the aircraft just returns to the Lat/Lon it was at when you first powered on the board (at your launch location).
I fyou're using ArudPilot 2.1 or above, you can set it up with a desktop utility, as described here
. If you're using 1.0 to 2.0.1, you need to do it by hand. Here's the process:
Go into Google Maps, satellite view, and right click on the location you want to be your waypoint. Select "Center map here", then click on the "link" icon in the top right corner. You'll see a URL come up, which contains your Lat and Lon. Copy each one and past them the "wp-lat" and "wp_lon" declaration for that waypoint in the Mission Setup tab of the ArduPilot code. Continue until you've got all the waypoints. Add as many waypoints as you want, but remember to set the "waypoints" definition in the first tab to the number of waypoints you're using. [Again, this will all get easier and more intuitive in the next version of the code]
The altitude is relative to the initial launch position, not above sea level. So if your airfield is 500 meters above sea level and you enter "500" as the waypoint altitude, the plane will fly at 1,000 meters above sea level (but just 500 meters above you).
If you just want to have ArduPilot Return To Launch, then go to the first tab in the code and look for "#define RTL 0". This is the RTL flag. Set it to 1 if you want the plane to just RTL, or 0 if you want it to follow the waypoints in the Mission Setup tab.
Once you've got the waypoints and settings the way you want them, upload the code to the board. Unplug the GPS module if it was connected, plug in the FTDI cable and click on the upload to I/O board icon on the Arduino IDE. Once it's uploaded, you can reconnect the GPS module.
Now it's time to set up your FMA Co-Pilot. Follow the setup instructions that came with it. At the airfield, calibrated it and fly a bit to get a feel for how much gain to give it (using your proportional control on the transmitter). Once it's stable, try turning on the Co-Pilot and then turning the plane using just the rudder. It should "skid" around turns with a bit of rocking as the Co-Pilot tries to keep the wings level as the rudder yaws the plane. What you're doing is manually testing what the ArduPilot will do under autonomous control.
Once that is set up, it's time to try an autonomous flight. Take off manually, and get to the altitude you want to run the course at. Turn on the FMA co-pilot and ensure that it's working. Now flip the ArduPilot control switch (your channel 5 or 6 toggle, depending on how you've set it up.) The aircraft should navigate to the first waypoint.
If anything seems to be going wrong, remember that you can always override the the FMA Co-Pilot with your aileron and elevator sticks. Even if ArduPilot has done something very wrong with the rudder and throttle, you should be above to regain control and bring the aircraft back to you. Once the aircraft is back in control, turn the autopilot off and you will regain control of the rudder and throttle so you can land and diagnose the problem.