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:

1) 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).

2) 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.

3) 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.

4) 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.

Views: 2973

Comment by Jhon on January 6, 2009 at 2:42pm
point 3 is correct?

Once it's stable, try turning on the Co-Pilot and then turning the plane using just the elevator. ¿?

shouldn't be...
Once it's stable, try turning on the Co-Pilot and then turning the plane using just the rudder. ?

3D Robotics
Comment by Chris Anderson on January 6, 2009 at 2:45pm
Yes! Whoops ;-) Now fixed....
Comment by Jhon on January 6, 2009 at 8:15pm
when you said "If you just want to have ArduPilot RTL, then ensure that all the waypoints are zero"

means that?

//Number of waypoints defined
#define waypoints 0

or means there should not be any declared waypoint in th mission_sertup ?

3D Robotics
Comment by Chris Anderson on January 6, 2009 at 8:42pm
@Jhon: Good catch. That's an outdated reference. We now have a Boolean variable RTL. If you set it to true you don't have to bother changing the waypoints--it will just return to launch and ignore the waypoints beyond [0,0]. I'll fix the instructions.
Comment by Reto on January 14, 2009 at 12:37pm
ArduPilot's description states that the number of waypoints to be loaded is limited by the internal memory. How much memory is there available, and corresponding to how many waypoints? A follow-up question would be if there would be a way to extend the memory limitation, for example with a minimalistic SD Card reader like the microSD Transflash Breakout Board? Wouldn't such card reader be a nice solution to upload a new mission into ArduPilot instead of connecting ArduPilot to the computer (with 2-3 cards, we could leave the laptop at home for a few missions)? Finally, since I am new on the DIYdrones, I hope my comment is not posted at the wrong place.
Comment by Michal B on January 14, 2009 at 12:48pm
There's some 3000 bytes left, and each waypoint consumes 12 bytes, so you can have about 250 waypoints.
The amount of free memory left for data will vary as code is developed, optimized, or new features added.
Yes, this would be cool to have SD card reader, but some hardware guy could tell us if this is possible.

3D Robotics
Comment by Chris Anderson on January 14, 2009 at 1:05pm
SD card input/datalogging is something we're planning for ArduPilot pro. The single Atmega168 in ArduPilot doesn't have enough processing power to datalog on a SD card while doing all the other stuff, and adding a SD card reader just for waypoints seems like overkill. On ArduPilot Pro, however, we're considering adding a third Atmega just to datalog so that will be able to handle a lot of i/o function.
Comment by borneobear on January 15, 2009 at 5:52pm
Has anyone tried the ArduPilot for Altitude hold on RC Helis? Alt Hold via GPS sounds very promising.
Comment by Pokoleo on January 29, 2009 at 6:29pm
It seems that someone wrote a script to get latitude and longitude from here:

http://www.gorissen.info/Pierre/maps/googleMapLocation.php?lat=40.143050&lon=-102.128906

I hope that this will make programming your GPS much easier
-Pokoleo
Comment by Saiful Azuwan on January 29, 2009 at 7:44pm
Thank you Pokoleo... Mush easier then google maps

Comment

You need to be a member of DIY Drones to add comments!

Join DIY Drones

Groups

Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service