# Determining an aproximate position through triangulation

Disclaimer: I'm relatively new to electronics (although not to programming) so please excuse my ignorance.

I have an outdoor area 100m*50m in size. The biggest obstacle is this area is a structure that can be described as a 10m*10m*6m cube; and there are also several trees, bushes, (wire) fences and low (0.5m) walls. I want to determine the 2D position of a device within this area with relatively good accuracy (a 0.5m approximation would be ideal). It can take up to several seconds (it's not going to be in a loop), but it has to work at any time of the day.

Therefore, I think my best chance is to use RF to triangulate the position of the device by having several beacons broadcast a key (which the device would answer to, therefore enabling the beacons to calculate the distance by measuring the time taken). If you have a better idea on how to achieve my goal, please post it.

Since I've never worked with RF before, I don't know how to build the devices. My budget is limited and the device must be as small as possible. I have at my disposal Arduinos, ATtiny's and a Raspberry Pi.

What approach should I take to build the devices? Adapted consumer modules? Custom electronics? Some Arduino shield bought of element14?

Summary:

• The system will operate in an outdoor area (100m*50m) with some obstacles.

• The system has to be relatively cheap to build, because my budget is limited.

• The device being tracked has to be as small as possible (smaller than a PC mouse, for comparison).

• The system doesn't have to be too accurate (0.5m accuracy would be ideal).

• The system doesn't have to be too fast (The process can take up to several seconds).

• The system can use as many beacons as necessary, and it only has to determine the 2D position of the device being tracked (no height).

• This is quite a complex problem using RF because measuring the time of flight of the signals needs extreme timing accuracy. I haven't used one myself yet but for 0.5m type accuracy UBlox have released the following that might save you a lot of grief: u-blox.com/en/precise-point-positioning-ppp.html Jul 28, 2015 at 11:41
• @PeterJ It is true that the time of flight is almost 0. However, the more beacons I use, and the more times I make the measurement, the more precise my measurement will on average be. I've also corrected my post: 0.5m is the ideal scenario, a multi-metre precision is acceptable. Jul 28, 2015 at 12:51
• "Since I've never worked with RF before, I don't know how to build the devices.": this is a major limitation of the project. If you have plenty of space for fixed stations with rotating antennae, you could try HFDF. Jul 28, 2015 at 13:01
• This reminded me of the Cambridge Active "Bat" Badge system, and while looking for it I found this rather comprehensive literature review: csd.uoc.gr/~hy439/papers/gu2009pdf.pdf Jul 28, 2015 at 13:05
• @peterj PPP takes an hour to reach that sort of accuracy. But there are RTK GPS kits that use two receivers to achieve cm-level position. Jul 28, 2015 at 17:54

It seems like there should be an easy answer to this problem, but it is actually hard to find a system that will give 0.5 meter positioning accuracy and be cheap.

## GPS RTK

If you don't care about cheap, then you could use a GPS RTK system to get ~10cm level accuracy with a single base station. Here is the cheapest set I've ever seen...

http://store.swiftnav.com/

It includes the base and a single rover for about $1000. I got one from the Kickstarter campaign and was never able to get it working well enough to actually use. Presumably by now tit should work out of the box for that price. ## GPS SBAS Depending on where you live, you might be able to use a SBAS module on the rover to get sub-meter accuracy. Here is an example of a module that costs about$100...

http://www.u-blox.com/en/gps-modules/neo-6p/neo-7p.html

This would take a lot of time to get working and I have not seen a cheap work-out-of-the-box SBAS solution.

This is an Atmel chip that is cheap ($3 in quantity and$5 for 1) that has built-in distance measurement functionality. In theory, you should be able to built a board for $10 that could be either a base or a rover. With enough bases, you should in theory be able to cover any size field and get sub-meter accuracy. Unfortunately, in practice the outdoor results are not great. It would take a lot of work to get a system capable of generating a reliable fix with 0.5 meter accuracy with these chips. You can read some of my test results here... http://wp.josh.com/2013/05/23/first-look-at-distance-measurement-using-the-at86rf233-chip/ ## New DecaWave ScenSor DWM1000 Module This is a very exciting development that only became available in the past few months. Here is the product page on DigiKey... http://www.digikey.com/en/product-highlight/d/decawave/scensor-dwm1000-module These modules cost$32 each for 1, or $20 each for 1,500. They claim to be able to range with an accuracy of 10cm over 300 meters indoors. No claims are made for outdoors, but hopefully results would at least be within 50% of the indoor performance, which would make this a fantastic option. There is currently a KickStarter to sell an Arduino shield based on this module... https://www.kickstarter.com/projects/pozyx/pozyx-accurate-indoor-positioning-for-arduino ...but for that leadtime and price I think it would make sense to just buy the modules and figure out how to connect them yourself. I've read the datasheets and it looks pretty straightforward - you should be able to power the module and connect to any SPI capable computer (Arduino & RaspPi included) with$1 in parts and a little soldering.

I hopefully will be getting some of these soon and will report back on how they work outdoors in practice. I have high hopes that they would be perfect for your application.

## Optical Glyph Recognition

I've never done this, but I think in theory you could put QR codes all around so that there was at least one visible and decode-able from anyplace inside the range.

Then you could use a Raspberry Pi camera to look around and something like OpenCV to locate the visible QR codes in the environment. Once you knew which QR code you were looking at and where is was relative to your field of view, you could computer your location.

This option is especially nice because there there is no RF involved and the QR codes are essentially free (cost of a piece of paper and maybe some lamination).

## Spinning Lasers!

I've never actually done this, but in theory you you should be able to get a cheap spinning construction laser and mount it on your rover. Then you'd set up a bunch of static laser detectors around your field. Each detector would have a very cheap radio to beep back to the rover whenever it saw the laser swipe past. By listening to the delay between the beeps, you could very accurately determine both your position and heading.

There was a company selling a system like this (but expensive) about 15 years ago, but they went out of business.

Alternately you could use retro reflectors around the field and have a single detector on the the rover. This would be cheaper and not need any RF, but would likely have shorter range and more complex maths.