# Real time location sensor for following a kite in the air

In search of a new project I decided I want to build a kite which I can fly using my computer. For this I need a couple of things: a kite, an electro motor to steer the kite, and also a way for the computer to see where the kite is located in the sky at any given moment.

This last thing is what I wonder about. It means I need a sensor on the kite which can register "where" the kite is at any given moment. "Where" is defined here as a 2 dimensional context (I keep the rope length constant). The location should not be seen from the sky, but from the base of the kite its rope (i.e. the person flying it), which rules out GPS. It means I need something like a kinect sensor, but it should be able to register the object (kite) at a distance of up to a 100 meters or so. If needed I can of course attach a small "following device" to the kite.

I searched around a bit and I find technologies like Infra Red, Ultrasound, RFID. Does anybody know what kind of technology I need to use to be able to track a fast moving object in the sky in real time? There is of course a line of sight, so IR or Ultrasound could be possible, but then there is also a rope in the air (the one attached to the kite), which might confuse things.

Please note: it's a home pet project, so buying industry grade equipment is out of the question. It should be reasonably simple (consumer) hardware. If it can be taken from old home appliances that would be even better.. :)

[EDIT] In the meantime, i've found the OpenCV software (Open source computer vision), with which you can follow differently coloured blobs (a kite). Furthermore, it has python bindings (my favorite programming language). So this would already be a very cheap option (just need a webcam). It would create a problem with cloudy weather though, so if there is an option with a little device I can attach to the kite and which can follow the kite through the clouds, that would be a better option..

• The vision approach will work unless there's cloud at ground level, which is pretty rare. You could probably improve it by doing it in the IR spectrum and putting an IR LED on the kite, although then you risk problems in direct sunlight. I'd also consider the possibility of a strain gauge on the kite string; might be useful to your flying algorithm. – pjc50 Mar 15 '13 at 10:28
• Size and shape and the distance of kite from the ground are the parameters that can effect Computer vision. Yes sun light will effect but In Computer vision such problems are called placement problems. But at least you can give it a try. As you mentioned it is not possible for you to buy INDUSTRIAL grade equipments it clearly means that you cannot make industrial grade solution. :-) Go for openCV then it will totally be up to you how efficient you can program and to what and to where compromise with accuracy – Abdul Rehman Mar 15 '13 at 11:32
• By the way, I like the idea of project +1 for that ;) – Abdul Rehman Mar 15 '13 at 11:33
• Just out of curiosity, how well do you think you could fly a kite with your eyes closed? – Rocketmagnet Mar 15 '13 at 12:08
• Also, you might consider asking this question on the Robotics Stackexchange. – Rocketmagnet Mar 15 '13 at 12:20

There are a few ways you might get feedback from the kite, without using vision.

1) GPS. Don't rule this out simply because the kite's base might be in a different location each time you use it. To counter this, you simply need a GPS receiver on both the kite and the base. Take both readings, and convert them into Cartesian coordinates. The difference between these coordinates is the offset of the kite from the base. Note that while GPS offers fairly low accuracy, its resolution is better than its accuracy. The kite and the base will both have the same position error, and so the kite's location relative to the base can be (reasonably) accurately calculated.

2) IMU. A 9-axis Inertial Measurement Unit, will help. There are some pretty small, lightweight parts available, like the MPU-9150 from Invensense. If you use a Kalman Filter to combine the GPS reading with the IMU reading, you can hugely increase your position resolution.

(Sorry, that's a similar part, but the same size)

3) Load cells. The reason I asked how easily you could fly a kite with your eyes shut, is because this will give you some idea of how useful the information from Load Cells will be. Perhaps you wouldn't be able to fly the kite brilliantly, but I bet you could keep it in the air. Each kite string will need a 3-axis force measurement so that you know the exact force and angle of each string. Arrange the three load cells like this:

Each one has a string coming perpendicularly out of the top, in the direction of the load cell's maximum sensitivity. Tie the three strings together, and to the main kite string. The sum of the three measured force vectors will be the tension and direction of that kite string. Make sure that the angle between the strings is greater than the maximum angle of the kite string, otherwise one of the three strings may go slack, making for a false measurement.

4) Pressure. I'm sure you could learn a lot by measuring the air pressure at several points on the kite's inside surface. There are some tiny lightweight barometric sensors available, like the BMP085.

It's even available from Sparkfun on a breakout board. These sensors will also help you to measure the kite's altitude (if they're out of the wind), and you can even use them to measure the windspeed if you place two inside a pitot tube.

Four sensors and three Pitot tubes, plus one sensor on the ground, will give you wind speed and direction, and altitude.

• Wow! Thanks for all these ideas!! Just some remarks (1) I like the GPS-idea, but I wonder whether it is "real-time" enough. I need to make steering decisions based on the location and if there is a second or more lag on the info, the steering will be pretty sloppy (at least my phone always takes some time before it knows where I am). (2) That is simply brilliant! I want to order a Raspberry Pi to build into the kite and an IMU would be perfect to hook it up to. I found one made for the Raspi here. – kramer65 Mar 18 '13 at 9:23
• (3) Although I think it is quite clever thinking, I think this is not my preferred way. In addition to the fact that a longer line makes for less detailed output, the most important reason is that in the future I want to make the line go out and in using a motor as well. For this reason I don't want to attach anything on the line. (4) I didn't know you could use air pressure to measure the altitude of the so well. I will be looking into this in the future (and probably hook them up to my Raspi as wel). Thanks for all the ideas! I wish you a beautiful day! – kramer65 Mar 18 '13 at 9:28
• @kramer65 - GPS is real time enough for unmanned flight. You can get GPS chips which give a 10Hz update. There is very little lag. Combined with a 1kHz update from the IMU, this is easily realtime enough you your application. – Rocketmagnet Mar 18 '13 at 10:59
• Almost 4 years ago I built a prototype of this project. All software worked and the hardware "kinda" worked, but my motor wasn't powerful and I was very busy at work so I never continued. But now I have more time and money to spend, so after four years I got back to this project a week ago. Last week I bought a 100W motor with high torque, and some other stuff (H-bridge, transformer, Raspberry Pi, Gyro etc.). I'm totally stoked about it again, and I just wanted to say another thank you for your in depth answer. I just read it again and I'm definitely going to use your suggestions. Cheers! – kramer65 Feb 16 '17 at 15:36
• @kramer65 - That's great news. Keep us updated. I'd love to see a video when it's working. – Rocketmagnet Feb 16 '17 at 17:38

If the rope length is constant, then how about simple directional and angle sensing? Then with some simple trigonometery you have your kite position.

For example, you attach the kite string to a rotary encoder for the rotation, and on the rotary encoder you have another 180 degree encoder for the angle. You could probably hack this together for less than \$10 or spare parts from various consumer items.

For the calculations, say your kite string is 50m long, and the measured angle is 45 degrees. Now we are assuming reasonably flat ground here so the opposite angle is ~90 degrees (however even if the ground is not flat under the kite you still know the height from your base position if you imagine a right angle triangle)

So using the above numbers, calculating for height we get (sin calculated in degrees here):

$50m \cdot sin(45^\circ) = 35.36m$

For the direction, you simply need a north reference and use the encoder reading to see how far offset it is.

EDIT - about the rope length/bending:

If you are concerned about the rope length and bending you could have a second thin string (e.g. fishing nylon, strong but very light) that could be used on a lightly tensioned bobbin to keep it straight and have yet another encoder on the bobbin to calculate length. I know it's a hack but you say you want to do this cheaply using consumer hardware. I can think of other options but they are liable to be quite expensive and complex for possibly not too much benefit (depending on the accuracy/precision you need)

• Thanks for the suggestion, but in the future I would like to be able to change the rope length. And with a very long rope length the rope can bend and the location is not directly related to the rope angles anymore. – kramer65 Mar 15 '13 at 10:07
• Ah, okay - you said you keep the rope length constant in the question (we need as much info as possible to answer well ;-) ) How accurate do you need it to be? (in both height and direction) Even with a slight bend in the rope this should be pretty accurate. How long will the rope be and how much bend do you expect in the rope? – Oli Glaser Mar 15 '13 at 10:12
• Having flown quite a few kites in my misspent youth, I can tell you that no matter what second string is used, and what tension, the kite will be drawn in way before the string even approximates a semblance of a straight line. Also, the sag is not just due to gravity, but also wind speed - hence not feasible to compute. – Anindo Ghosh Mar 15 '13 at 10:26
• I added a suggestion for your concerns about the length change and bend. It would help to know how accurate you want things to be and how much you are willing to spend. You could also try and combine a couple of ideas, such as the OpenCV together with the trigonometery (or something similar) – Oli Glaser Mar 15 '13 at 10:26
• @Anindo - I have also flown many kites, and it depends on e.g. how long the line is and how heavy (which we don't know yet) - a second tensioned roller as mentioned might work quite well. Plus we don't know how accurate this needs to be yet. It would certainly be worth a try IMHO, as it wouldn't be hard to set up. – Oli Glaser Mar 15 '13 at 10:27

I am working on a similar project, and was very happy to find this discussion.

I am using SimpleCV which is a python binding to OpenCV to get the position and orientation of the kite relative to the camera of my mobile phone. I use the acceleration and magnetometer of my mobile phone to get the orientation of the camera. I then send the data to my computer over wifi and process them into python.

The project is still in development, but everybody's welcome to help. The source code and documentation is available here http://code.google.com/p/robokite/ I have a blog but it is in french, soon in English?

You can also have a look at zenith wind power. It's a student project. The code was on google code as well, but can't be seen anymore for unknown reason. However, you can still get it with svn checkout http://zenith-wind-power.googlecode.com/svn/trunk I was not able to compile it, but they made a great job. Adrien should start working again on the project in September.

• That's awesome! Great to hear that more people are working on this! Unfortunately I will be quite busy with some other work in the coming month or two, but after that I surely want to come back to this project. I'll checking out your code next weekend when I have some spare time. Cheers! – kramer65 Jul 30 '13 at 10:45
• Ok, no problem, i should work on the project quite a lot till december at least, so we might interact later. – user142030 Aug 11 '13 at 1:19