This is an update from the original blog post in October 2011:

I've updated the Ardustation 2  source code to allow compilation with Arduino 1.0 Relax and the latest libraries for ACM 2.5.3 and APM 2.3.0. This update also includes a modification of parameter names for PID editing that match ACM and APM. The updated version is 2.0.12.

The download zip file also includes the libraries used to verify compilation of the software. The software has been lightly tested with ACM and 2.5.3 and has not been tested with APM 2.3.0.  If you find any issues feel free to comment here or post an issue at the Ardustation 2 Google 

The software is available here:


Download 2.0.12 for ACM 2.5.3 or APM 2.3.0 - compile with Arduino 1.0 Relax

Download 2.0.11 for ACM 2.0.48 or APM 2.24 - compile with Arduino 0022 Relax

Heino R. Pull

The original 10/2011 info follows:

With the help of Jeff E and Hai Tran, I've updated the Ardustation 2 Antenna tracker code to support the detection of the UAV platform from the Mavlink heartbeat. Parameter download and editing is automatically configured for ArduPilot 2.24 or ArduCopter 2.0.48 when Mavlink connects. The key parameters available for editing is modifiable in the source code with the  PID gains set as the default for both platforms. A number of bug fixes have been made to previous versions of Ardustation 2 including a more standard Mavlink interface for the latest libraries distributed with APM 2.24 and ACM 2.0.48. 


This version has been ground tested with APM 2.24 and ACM 2.0.48 with parameter editing, but testing is still needed to verify that the appropriate parameters are changed correctly. Please be cautious if you try this software out and verify the parameter changes with the Mission Planner.  I don't have a fixed wing setup to test APM in the air, but I plan to test ACM 2.0.48 while tuning my loiter values on my quad this week. I've included the libraries used to compile the code in the zip file.

A video describing the original antenna tracking functionality is available here: Original Ardustation 2 Antenna Tracker Post and Video

The updated code is available here: Ardustation 2 ACM/APM Version 2.0.11


This software is based on Phillip Anthony Smith's Mavlink Ardustation. Thanks also to Jeff E and Hai Tran for their code additions and suggestions.

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones


  • by "this setup" in the above post I mean the ground station mavlink setup

  • What about sending the gps position info down on one of the audio channels for the video feed.  Several other trackers do this.  If you stream the position from the APM at a reasonable bit rate you should be able to pick that up on the ground.  Then you don't need a second XBee.  The problem with using XBees is the range without having a directional antenna. 

    My ideal setup would be a diversity receiver for the video signal that was split between a directional antenna and an omni as well as a directional antenna that was connected to the groundstation that is also on the slew of the antenna tracker.  If I were to use this setup I would have to add a third directional antenna for the second xbee and hope I don't loose signal when i fly over the ground station.

    The advantage of using the audio signal with the diversity directional/omni setup is that you can get good receiver coverage when the directional signal has problems because the aircraft is in the very near vicinity of  the tracker.  If you use this setup, the exact home position also becomes less important because the wide-angle/omi antenna will cover you at closer ranges.  It is risky to do anything else because you could fly through your transmitters ability at close range and then loose the gps feed and thus the tracking... then its easy to crash and burn.

    I also like the setup where you have groundstation and video on the same tracking slew because then if you do loose the signals (just track the time between recieved packets from the groundstation), you can program your drone to automatically fly to a position say 200 feet above your home so your tracker will pick it up again.  I would also like to program in a soft deck altitude so reduce my risk of crashing.

  • Willem,

    The Ardustation has a specific connector for the Xbee radio and I don't have a 3DR so I'm guessing a bit.  The ground 3DR uses USB and that isn't compatible with the Ardustation unless the serial transmit and receive lines are broken out from the board.  The Ardustation wants to see a radio with a transmit, receive, and gnd signal and normally powers the Xbee with 3.2 volts. I'm not sure what the power requirements are for 3DR and if the air 3DR could be used with another air 3DR. There is a header on the Ardustation with transmit/receive and gnd and in theory that could hook up to another radio from the Xbee.  It would be best to ask in the 3DR forum where the experts on this product can answer questions with respect to the Ardustation compatibility. 


  • Would this work with the 3DR radios?


  • Hi Dirk,

    I've always been interested in implementing a cheap DGPS solution for increased accuracy and pursued using Garmin OEM GPS  modules which had access to the raw GPS data for backing out pseudorange errors.  The problem with using cheap modules such as the MTK is that in reality there positions reported from a cold or warm start is suprinsingly different given that the modules are at the same location. If you try it you'll find that the best fix for poor positioning is really letting the module see a good constellation of satellites in the sky with ideal geometry and some time to get a good fix. Doing DGPS with cheap modules at the cooked lat/lon outputs just doesn't work.  The other issue is that the Ardustation only has one serial port and is limited on memory. If the Ardustation was based on a beefier Atmel processor, it would be trivial to add.  Several people are working on revised Ardustations of that sort.

    Here are some links on issues with "poor man differential GPS"




  • I was thinking about the pointing and position errors... do you think it would help to add a gps unit to the ground station?  This would really help eliminate the drift when the units are close.  This is essentially differential gps.  The assumption is that both gps units see the same satellites and the same atmospheric/timing errors that cause position error.  I don't know if it is possible to do this with the ground station, but it could be a good feature.

  • Hello Robert,

    In the default configuration of multiple ground Xbees the Xbee receiving data will not transmit the received data to an Xbee that is not receiving data due to range from the aircraft Xbee. There are advanced configurations on the Xbees (mesh) that I really haven't looked at that might do it but I'm not really certain.  

  • Very interesting discussion everyone! I have been working on a 2 patch (video & telemetry) system for a long-range glider. I am working on the tracking system now and I am looking at different configurations. Ideally, I would like to connect the ArduStation to my netbook via USB. But as I understand Heino's remarks a 3 Xbee system is the best solution. I do have one question about this setup though.

    I plan to use a patch to follow a plane that will be at long range. While the patch will be able to follow it, the Xbee feeding telemetry to my Mission Planner will not. Is it possible for the patch connected Xbee to 'share/relay' its information with the computer connected Xbee? If so, I wonder the lobes on the patch are sufficient to maintain a good connection.

  • Thanks. It's working great.I will try leaving the home position alone but if I have trouble I will set it each time. Tonight I'm going to put a laser on it to see how well it's tracking.

  • If I understand your question correctly, both Arducopter and Arduplane use Mavlink for the datalink and it is a bidirectional protocol. This complicates sharing an XBEE connected both to a PC and an Ardustation at the same time.  The serial interface has a transmit wire coming from both the Ardustation and the PC and the software on both can transmit at any time (such as start/stop feed, or upload parameters) and the Ardustation and PC don't know of the existence of the other. Normally sharing the transmit line requires some handshaking between the 2 transmitters and that wouldn't exist.

    What I do is to use 2 XBEEs at the same time on the ground.  One for the Ardustation and one for the PC. The XBEE in the aircraft can talk to both XBEES on the ground and data transmitted to the aircraft is coordinated by the way the XBEEs create transmit packets.  It works pretty well for me but you have to buy 1 extra XBEE.

This reply was deleted.