Showing results for 
Search instead for 
Did you mean: 

Thought experiments in magnetic tracking.

Level 2
OK, so the lack of hardware of any kind to test with is really killing me here, because it means all of this is pure speculation.

However, while thinking through the issues of the hydra's tracking accuracy once again (latest comments suggest the position can vary in unexpected ways, but is deterministic in nature - that means the error could be calibrated out of the system if you could cross-reference the tracking against some other form of tracking...)

OK, so what has that got to do with anything? Well, I now have a hydra on the way, but also a PS move controller.
The PS move uses optical tracking, which is reasonably accurate too, but suffers from occlusion.
So my initial thought was to strap a Move to a hydra to cross-reference the tracking data.

But then I started looking at the issue more carefully and something much more significant struck me:
The hydra's tracking is magnetic...

The PS move contains, amongst other things, a magnetometer!

Thus, a new thought occurred - What happens to the magnetometer readings of a PS move controller when you have it near a working hydra base-station?

Now, maybe the hydra's magnetic tracking works in a way that would render this useless, but maybe, just maybe, a device with a magnetometer can read enough data to use the hydra base station to perform 3d position tracking!


Any device with a magnetometer would potentially be able to track a 3d position by itself.

The PS move in particular would benefit hugely from it, because the optical tracking and magnetic tracking would be complementary. Optical tracking can calibrate out the problems with the magnetic tracking, and the magnetic tracking could be used where the optical tracking doesn't work (when it's occluded for instance.)

But, and this is where it gets more interesting,

The rift headset also contrains a magnetometer - So if my idle speculation is correct, merely having an active hydra base station nearby would mean you could perform magnetic tracking of the headset without attaching any additional hardware to it...

That means that all the ideas about strapping a hydra controller to your head become redundant, and we suddenly have a positional tracking mechanism using the internal hardware of the rift alone!
(Obviously, the problems with magnetic tracking mean you'd want to supplement it with something else - I would suggest a form of optical tracking; This would have issues in not being able to see the headset at all times, but as a supplement to magnetic tracking, can help to transparently remove the error from the magnetic tracking data.)

However, there is one obvious pitfall. - I don't actually know if this works.
Once my Hydra and PS Move (or rift) arrive, I can test this for myself, but until then I have no idea if this is all just wildly optimistic.

But, for everyone else, maybe you can test this now, and get back to me?

What you'll need:
1. A razer hydra
2. A device containing a magnetometer (that you have access to the raw data output for) - This includes the PS move, many mobile phones and tablet computers, The Wii U gamepad (assuming you know of any way to read it's sensor data), and of course, the Oculus rift headset...

If you have the hardware, try the following:
Get the raw magnetometer readings from your device, and see what happens when the hydra base-station is on, compared to what the readings look like with it switched off.

If there's no change whatsoever, then clearly the idea falls apart.
But, if you get some kind of obvious change, get the sixsense/hydra sdk, and see if you can read the raw sensor data from a hydra controller. - Then compare it with your device containing a magnetometer while holding it in approximately the same position.

If this works, anyone with a hydra can eventually get positional head tracking (with a few accuracy problems, mind you) for free, without losing the use of any of the hydra's controllers...

If it doesn't work... Well... It was worth testing at least, wasn't it?

Update: So... No responses to this so far... That's fine. I'll just have to wait then... XD

But meanwhile, I've done some extra research. - gives some basic info about how the hydra works.

It all makes sense really. The question is if a magnetometer will pick up the fields sufficiently to mimic the coils in the hydra, and if it can operate quickly enough.

There's also a minor concern that this method would require using software to process something the hydra does using a dedicated DSP.

But in short, this appears to be a summary of how the hydra works:

The base station contains 3 coils pointed along perpendicular axes.
The controllers contain something similar.

The base station switches on each coil in sequence, then pauses for a moment.
The trackers then read the effect of each coil being turned on. The orientation can be determined by the fact that the magnetic field is weakest when a coil is perpendicular to one in the base station, and strongest when parallel to it. (this is related to the dot product of the vectors between the two coils). Thus, for each pulse, you can determine the relative angles of all 3 coils in the tracker, relative to the single activated coil in the base station.
The distance from the base station is then calculated from the based on the fact that the signal to each coil in the tracker changes at about the same rate when moving towards or away from the base station.

This is thus repeated for each of the 3 coils, giving several orientation and distance values.

So far, so good. No reason why a 3 axis magnetometer wouldn't be able to do the same.

An interesting observation here by the way is that this positioning scheme clearly lends itself more naturally to polar coordinates than to cartesian coordinates, given that we have a set of relative orientation values, and a distance.
A second observation is that the magnetic field most likely obeys an inverse square law, which implies reduced accuracy with range.
Combined with a system naturally based on polar coordinates, this only worsens the range/accuracy relation.

Now we get to the problem areas though. - the timing for each sensor reading is such that the pulses are 2 ms long, with a gap of 2ms between readings. Each reading takes a total of 8 ms, but this involves 3 steps of 2 ms in duration.

The Nyquest theorem therefore states that when using a magnetometer with a digital output, we'd need at least 2 samples for each, and ideally 5 or more.

Meaning... For this to work effectively, it would seem to require a magnetometer with an update rate of between 1000 and 2500 hz... Which is a pretty substantial demand.
We'd also have to be able to get the computer to process it at this rate.

Ideally then, we'd want a magnetometer with a tracking rate of about 2500 hz, but with dedicated hardware that can buffer about 25-100 updates, and send them to the PC as a batch.

Processing a batch of 100 readings all at once is probably less of a hassle than processing 100 individual sensor readings...

In any event, this would seem to put a bit of a dent in the theory, since ideally it would seem to require some amount of hardware support (And a very fast magnetometer), which defeats the purpose of the whole idea anyway...

But... Only time will really tell, and I may be wrong on several possible points about this...

By turning on each coil in the base station one at a time, you get 3 references

Level 2
Updated the OP with some new information about the workings of the hydra, if anyone is interested.

Level 2
Unfortunately, the miniaturised 3-axis magnetometer in the Rift (and PS move, your phone, etc) are not sufficiently sensitive on their own to pick up the fields the Hydra base station puts out, and likely tuned to integrate over some time period. The Hydra controllers use a trio of orthogonal coils to pick up the three spatial components of the field with sufficient sensitivity, and amplifies this on-board before sending the amplified signals back to the base station where the actual processing is performed. Additionally, the Hydra uses timed pulses, which any alternative receiver would have to match to know which transmit coil was energised when.

If you can find a magnetometer chip that accepts external coils, you may be able to produce an unofficial Hydra controller. Unfortunately, existing devices will likely not work, or work with better spatial accuracy than a few tens of centimetres.

Level 2
Yes. I thought as much.

I wasn't sure about the sensitivity of it, but after studying how the hydra tracking works, I already reached the conclusion most magnetometers are too slow.

(a 2ms pulse is never going to be picked up by any of them. The fastest I've seen so far updates at about 160 hz, which is about 1/5th the minimum requirment to even be able to detect the pulses.)

It was an interesting thought, but it seems out of the realms of practicality.

I might still experiment with it just to be sure when I get a working hydra in my hands though. (I now have a PS move controller, so at least one magnetometer I can experiment with...)

Level 2
For anyone that was curious, I have now tested this for myself, and proven (as edzieba said) that the magnetic field of the hydra is too weak for a magnetometer to even pick up.

I placed a PS move controller near the base station, then monitored the readings of it's magnetometer.

Although the readings changed if I moved the controller closer to the base station, (or, ironically, if I moved a hydra controller near to the move controller), it made no difference whatsoever to the readings whether the hydra was switched on or off, nor what I was doing with the hydra.

(other than the fact that physical proximity of a hydra controller to the move controller increased the magnetic field reading very slightly.)

So... Yeah, this is not a workable idea in the slightest.

But... Sometimes you have to see the evidence of that for yourself. XD

(I bet a Wii extension controller could read the hydra's magnetic field though... - Well, a custom built one obviously... To what end, I have no idea... XD)

Level 2
Thanks for sharing above info. Was just thinking the same thing just now and started googling to see if anybody had experimented. I had my fingers crossed and was hoping for the best as I was reading through!

Level 2
There's some substantial differences between the way a coil senses a magnetic field, and the way a magnetometer does. The most obvious is that unlike a magnetometer, a coil cannot sense a static magnetic field, that's why all commercial/consumer magnetic trackers generate a changing field - whether AC or pulsed-DC. Another aspect is that currents are only induced in coils when there's a parallel component in the magnetic field - those that are perpendicular do not.

Magnetometers on the other hand can sense static fields, and in the case of IC devices, the sensing elements are small and close to one another, so that they can be used to determine the direction and magnitude of the flux lines at a given (small) point in a magnetic field. Since they detect flux strength and not induced currents, and since magnetic fields curve and the direction changes as the flux "flows" from the center of the magnet to around the periphery, the math used for positional tracking would be a bit different depending on which type of sensors you use.