# Spatial tracking between two UAVs

I have two Unmanned Aerial Vehicles (planes) which work well. They can fly to various waypoints automatically using GPS.

Now I would like them to fly together in formation. I would like them to fly side-by-side fairly close. This is too close to reliably use GPS to guarantee that they keep the correct relative positions safely, and so I am looking for another way.

Somehow the UAVs need to be able to measure their position and orientation in space relative to the other one. How can I do this? Is there some kind of sensor which can do this? It would need to have the following properties:

• 6 axes (position and orientation)
• Range 0m - 5m, (from between plane centres, but planes won't actually ever touch wingtips)
• Works in day or night and all weather conditions
• Light weight (This is for 1.5m wingspan RC planes, so max extra weight of about 100g)
• Probably need about 50Hz - 100Hz refresh rate, but might get away with less, using the IMU to fill in the gaps

## 6 Answers

How close together? If they use the same make and model GPS unit, you MIGHT be able to use the relative positions calculated via GPS. A lot of the sources of GPS error would be the same for both vehicles in that case (e.g., atmospherics, any built-in GPS filtering). Each vehicle could broadcast it's state vector to the other one.

It is possible that two independent GPS units might be accurate enough (as ViennaMike suggests) if both are sufficiently similar, get a lock from the same location, follow roughly the same paths (so the accumulated differential GPS errors are roughly the same) and are re-synchronised at regular intervals.

This might be significantly assisted though if you also had some sort of proximity measure between the two devices.

Start them off a fixed distance from each other, sync both their differential GPS locks & calibrate the proximity thresholds (starting distance, too close threshold and too far threshold). You can then use the proximity sensor distance to say if the gps locks are drifting too much (they are getting closer than they should be or further apart).

One option which I believe could provide both rough proximity information and data communication between the two UAVs would be Bluetooth. Once the two devices are paired, you may be able to get both intra-device communication and rough proximity information from one pair of radios.

Searching on Bluetooth Proximity led me to see the use of RSSI (Received Signal Strength Indicator) as a measure of proximity and thus onto Bluetooth Indoor Positioning using RSSI and Least Square Estimation # which may be able to give you some interesting ideas for this.

# Stack Exchange thinks that the original link http://202.175.25.24/papers/2010/fcc2010yapeng.pdf is invalid, so won't let me use it as a link, so I have used the google wrapped link.

• Apparently IP based links are unreliable, but you can put them in a code block, so you don't have to use the #. Alternatively, are we allowed to host the document somewhere else? – Rocketmagnet Nov 7 '12 at 13:35

How close together is important. I saw the range of 0-5m, but if you're suggesting that they might touch, or just barely not touch, then you're going to have difficulties. Lightweight is also a vague term which will need to be defined better in order to adequately answer your question. Still, there are some things to keep in mind:

• Augmented GPS can get you sub-inch accuracy. This will likely involve an extra antenna, so space and weight might be a concern. You also have to make sure you don't lose GPS accuracy at the wrong time, which I've seen with some systems.
• As geez suggests, IMU is very useful for the 6-DOF tracking.
• You almost certainly know this, but 3D movement makes this a tricky problem. Avoiding collisions is relatively easy, but ensuring the proper formation between the two means sensing the other vehicle will require a wide range of detection.
• A sensor such as MS's Kinect will get you some around .6m to 3m 3D sensing, but in a relatively narrow cone, so you'd need several to cover the all around the planes. Also, they're not all that fast and will have trouble in difficult weather. Most weather, really. I don't know of any variants that are outdoor rated, especially in cold/damp (condensation on a lens would kill that sensor).
• Which also brings me to another question: speed. Planes are all reasonably fast, but there's glider fast and there's supersonic jet fast and all ranges in between. Refresh rate vs. distance between UAVs will be a very important consideration. Is 30-60hz enough time for your UAVs to correct when they're a few meters apart, or do they need something close to 100hz?
• If 30-60Hz is enough, you could potentially mark your UAVs with a distinctive pattern and use optics to detect that pattern and, combined with GPS etc, use that for close-range stuff. The problem with straight image detection is that it's computationally intensive and sometimes tricky to do, especially depending on your math skills. You'd have to have a way to keep the lens clear of condensation, like the Kinect, but I don't believe that's an intractable problem in this case, because you have a lot of options on cameras. Not saying it'd be easy, but easier than with a Kinect-style sensor.
• XBee is cool, but it's all packet based, so there's a maximum refresh rate on transmitting between units. You'd probably need some tolerance on lost packets, as well.

So, no sure answers yet, but possibly with some domain narrowing we could help you more. Size, weight, minimum distance, and maximum speed limits will all wildly affect what solution you might go with.

UPDATE based on additional information:

Hmmm. I don't think there's an ideal solution. An array of ultrasonics could get you collision avoidance, but there's no high-refresh rate 3D sensor that I know of that could make a bubble around your plane in the 0-5m range. If you were scaling up, you could use something like a Velodyne laser to do something like the equivalent, but environmental conditions would make that less than ideal without work on the software end.

Think hard about tolerances. Is it vital they be able to fly within X cm of wingtip to wingtip? Do they need to be coplanar, or would it be okay if one were, for example, +/- a meter above the other as long as they don't collide? You might also see if you have options on the navigational smarts of the planes, so that, as long as they're following their flight plans within tolerance, they are quiet, but if they are blown off course (or whatever), then they send out an alert to the other UAVs with what they know to be wrong. A differential system might be enough, though I imagine the test cycle for that will be exciting.

Also, do a check on Augmented GPS systems to see if someone makes a lightweight version. Most of the ones I've seen are for agricultural use, so they're more keen to make it ideal for putting on a tractor, but it's worth checking.

• Thanks for the answer. I have added some spec to my question. – Rocketmagnet Nov 7 '12 at 22:21
• Mounting something like a Kinect probably means too much weight, especially as it needs some kind of PC powerful enough to process the data. Camera based solutions also may not work because I can't guarantee visual clarity. Might be dark, foggy, cloudy, smokey, etc. – Rocketmagnet Nov 7 '12 at 22:25
• I have added some additional thoughts to my comment based on your new info. – Brian J. Geiger Nov 8 '12 at 15:38

6-DOF is kind of difficult.. You could do vision but that is hard to implement robustly. You say the UAVs are localizing themselves using GPS; are you using an IMU+Kalman filtering as well? For proximity detection you could try infrared/ultrasonic sensors, e.g. https://www.sparkfun.com/products/242. You could combine this with the Kalman filter to get a relative position estimate and get orientation from the Kalman filter directly.

Although I reckon if you are using GPS+IMU+Kalman then broadcasting the estimated state to each other (XBee?) would probably suffice, given that the GPS units are calibrated similarly. You could easily calculate the relative orientation by subtracting their orientation in the inertial frame.

Depending on how much you wanted to play with the GPS signals, you could use some form of differential GPS to calculate their relative positions way more precisely than using the WGS84 outputs would give you. Basically this would remove most of the inaccuracies coming from atmospheric effects and ephemeris errors.

The exact precision would depend on the receivers and algorithms used, especially whether you would also use carrier phase differencing. ... but my wild guess is you could get to 1 or 2 meters precision.

You could use the gps system for long-range co-ordination, an altimeter for height, and ultra-sonic sensors for close-range co-ordination. When the planes get in to close proximity the ultrasonic sensors would work for collision prevention. The only extra weight would be ultrasonic sensors, and an altimeter.