Hey everybody, me and my friend Chester would like to share our implementation of loading a waypoint into the ArduPilot in air. We use XBee radios, NewSoftSerial, and our own GCS written in Java (using Andrew Rapp's xbee-api) to do this. Our GCS was originally designed to facilitate a collision avoidance system for multiple UAVs (this is part of a research project at Auburn University), but we've added a small GUI to allow the user to type in their own waypoint to push to the plane.
In the ArduPilot code, we added a function to poll the XBee for a waypoint packet (we give it a data type of GCS_packet_t) in the 3 1/3 Hz loop. The XBee's TX pin is hooked up to analog4 (one of the few pins we found was not in use) via NewSoftSerial and runs at 57600 baud. If it has a valid packet, it replaces the ArduPilot's next waypoint value with the one from the packet. After it hits this new waypoint, it loads the old next waypoint back in from EEPROM and continues on its original path.
We tested this in our setup with a Multiplex EasyStar, an ATmega328-based ArduPilot running 2.6.2 modified with our code (compiled in Arduino 0018), and an EM406 GPS also at 57600 baud. We are ArduPilot newbies ourselves, but we think everything worked to our expectations.
Our code is available at this github: http://github.com/wjwwood/au-proteus. In the ArduPilot_2_6/ folder, you can find our modified ArduPilot code, along with an extensive guide (XBee_Guide.txt) written by Chester on where the changes are and the rationale behind them. In the xbee-api/ folder, you can find a Readme for the GCS code (XBeeGCS_README.txt).
While we'll be leaving our research program in a few days and not be able to work directly with the planes at Auburn anymore, we'd be glad to hear your comments on this work. Cheers!