Here's the settings to make a 6-position switch for autopilots.
tl;dr: Create two 3-point curves with the specified points. Mix onto channel 5 switches C and D using those curves.
The mounting tabs were designed to fit on a Gaui 330x frame. I used micro servo mounting screws to screw the shell together. I made a cutout for the "ABC" status LEDs but I missed the "TX/RX" LEDs. I might incorporate it in the next iteration.
IF YOUR APM IS ON AN AIRCRAFT, DISCONNECT THE AIRCRAFT BATTERIES OR REMOVE THE PROPS!
No kidding, the props can spin up unexpectedly and send you to the hospital for stitches!
Run Arduino and configure the environment
Run the Arduino program. Restart it if it was already running so that it can see the APM USB connection.
Set the CPU type: Tools / Board / Arduino Mega 2560 (AtMega 1280 for APM1)
Set the APM serial port: Tools / Serial Port / /dev/tty.*usb* The name will vary, look for tty and usb.
Set the sketchbook location: Arduino / Preferences... / Sketchbook Location
Set it to the unzipped directory; In my case: /Users/mh/apm/ArduPlane-2.34
Quit Arduino and Restart.
Double check that the above three settings are still good.
Compile (Verify) the ArduPlane software
File / Open... and navigate to /Users/mh/apm/ArduPlane-2.34/ArduPlane
Open ArduPlane.pde. This will give you a window with several files opened in tabs.
Click the Verify button.
After a while, you should get a message like "Binary sketch size: 157,232 bytes (of a 258,048 byte maximum)"
Upload to APM
Click the Upload button.
You should see the APM serial light blink furiously
You should get the message "*******"
Working on the Arducopter software
note: There's some unorthogonality with the downloaded Arducopter zip file. There's no intermediate directory with a version number.
Grab the newest copy of ArduCopter from the ArduCopter repository. I grabbed version 2.5.5.
Unzip ArduCopter-2.5.5.zip in some scratch directory. This will give you two directories, Arducopter and libraries. libraries is identical to the ArduPlane version, so you can ignore it.
Delete the directory ArduPlane-2.34/ArduCopter
Copy ArduCopter to ArduPlane-2.34.
You should see the directory ArduPlane-2.34/ArduCopter.
In Arduino, open the file ArduPlane-2.34/ArduCopter/ArduCopter.pde.
Compile and Upload as described above!
Working with git
The Arduplane projects are hosted on Google Code. Get a Google account if you don't have one.
You don't need to grab ArduCopter separately. It will be in the ArduCopter directory as described above. If you do grab it, it will have a single file pointing you to the ArduPlane repository.
Using command line tools
There are notes in README.txt
tl;dr: cd ArduPlane; make configure; edit ../config.mk; make; make upload
I had to edit the following entry in libraries/AP_Common/Arduino.mk to add the -C parameter.
This looks like a pretty nifty thing to do, courtesy of the ever-awesome HappyKillmore. Basically it swaps out the pitch trim pot with a six-position switch that maps to the six APM control modes. It's based on an original idea by Max Levine. Video here. Ready-made unit here, and here for kit that needs some soldering.
After getting the HobbyKing MicroQuad put together rather nicely, I was having a lot of problems with one of the motors running erratically. I thought it might be a problem with the motor or ESC, but Andreas suggested swapping out the KKBoard and seeing if that would help.
We swapped in his APM2, and it flew rather nicely, modulo some PID tuning to get rid of the shakes.
Impressively, the APM2 is almost the same dimensions as the KKBoard. As far as I know, this is the smallest quad that's run with the APM2, but I'm happy to receive any corrections.
I'm rather encouraged, it will be a lot of fun having a tiny platform that I can fly indoors!
KML export seems to add some spurious locations pointing to an incorrect location.
If you look at the attached google earth screenshot, you can see there appears to be some spurious points in the data path. The points all go to my house, where I generated the file. Perhaps APM has set that as the new HOME location and some of the logfile points are relative to HOME?
What a great day! Launched the Hawk Sky with APM and took it into both stabilized and fly-by-wire-a modes. Flew like a dream in both. The FBW mode is surreal... no matter how you jerk the stick around, the APM controls the plane smoothly. I used all the default PID values.
I'm rather ecstatic... there's been a lot of work and study to get to this point and to see it go so smoothly has been very gratifying. Thanks to all who have helped me get this far!
Here's a quickie minimally edited video. The hatcam ran out of battery before I got to FBWA mode, so I'll add that later. I think the FBW mode might be ideal for FPV and AP, since it looks so smooth (at least from the ground).
This video is from a couple of days later. Winds were high, gusting to 20mph, and the plane flew so smoothly in fly-by-wire mode. I forgot the hat-cam, but grabbed the video with my iphone. Just the fact that the wind could be blowing so hard and I could fly one-handed while working the phone impressed me!
Hooray, got all the control surface issues figured out. Here's a video of how things should look, and a few pointers.
In manual mode, do any reversing necessary on the radio. APM just passes the signal through in this mode, so reversing via the software won't do anything.
Be sure you're not backwards on how ailerons move. See this page for full details.
Test in three modes: manual, stabilized, and fly-by-wire A.
In stabilized and FBWA, rudder will be mixed in with the ailerons. Be sure pushing the aileron stick left produces left rudder.