measuring direction and angle of elevation

hi boys and gals,

i'm starting a fairly ambitious project that is going to involve gathering accurate realtime info about a person's movement within a defined space - possibly quite a large area, in- or outdoors. in particular, i want to monitor the movements of their head (they will be wearing some kind of helmet, headband etc that contains appropriate sensors).

i need to know: a) which direction they are looking in, to the nearest 10 degrees or better. this can be relative to any point - magnetic north or some kind of internationally recognised standard would be useful, but anything fixed on land will do otherwise. a radio point source? a wi-fi router? something that won't be confused by objects (buildings etc) in the way.

b) what the angle of elevation (up or down) of their head is. again, to the nearest 10 degrees or better. they will be walking around, so i don't want their body movements to compromise this sensor's readings.

in addition to being quite accurate, i need both sets of data to be rapidly updated - at least 10 times per second, but preferably much faster.

i'm posting this here in the hope that someone could give me some suggestions as to what sensors i could use (in conjunction with arduino) to achieve these two goals. sorry if this has been discussed in other forum topics, but i don't exactly know what to look for yet.

the one that i'm most unsure of is the direction (azimuth) sensor. perhaps someone who knows a bit about astronomy might be able to help...?

love, jon.


Looks like you'll need some gyros. Anything with gyros will be expensive, and will involve some complicated math. The cheapest thing off the shelf I know that will do this is this:

It will interface with a radio control airplane transmitter, but I'm not sure if it'll be easy to interface it with arduino.

If all you want is tilt, you can use an accelerometer, which are much cheaper and easier to work with, as long as the person doesn't move around too much. You can also use a magnetometer (electronic compass) to measure pan angle, but they are hopeless when the tilt angles gets large. There are 3 axis magnetometers with tilt compensation and fancy stuff that will work, but they are almost as expensive as a full gyro solution.

Trying to find the attitude of something in space is tough, maybe instead of a full inertial measurement unit with gyros and stuff, since it's inside a room, you can consider using a camera and some IR LEDs on the person's head and do image processing. I think that's how the Wii controller works.

If you find some better solution, let me know. I'm also trying to figure out how to do this cheaply.


thanks zitron... that's really useful!

have you or anyone else used the MicroMag 3-axis magnetometer? here's a link to a writeup at sparkfun electronics, which has a link to the datasheet: it certainly sounds like it's just what the doctor ordered, but like i said, i didn't even know wat i was looking for before you told me what it was actually called...

in any case, $60ish for a sensor is getting expensive, but i don't mind spending that much or more if it will do the job well. it's not going to be the biggest outlay of the project.

i'm a little bit worried about indoor electromagnetic interference - might that be an issue with this sensor? i plan on doing initial testing outdoors in the park opposite my house, but i would eventually like the system to work in practically any environment. and i'm also going to need some form of wireless communication from the user back to a remote computer...

maybe a combination of magnetometer and some other system might be sensible...

I have never personally used a magentometer before, but I think it should do what you want. Here's someone who have made one, but I don't speak Spanish:

I think a magentometer will have all the problems of a regular magnetic compass, i.e. don't put it near motors, refrigerators, speakers and so on. There's a lot of stuff on sparkfun forum about how to use something like this.

If all else fails, and if your test person can promise not to talk:


hehe! that’s priceless…