Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
kingtut's avatar
kingtut
Honored Guest
13 years ago

Magnetic fields in buildings

It would be useful if the Unity/UDK code for OVR will allow the magnetic compass to be enabled/disabled on the headtracker...

I live in a multi-storey building with a steel frame, and there are all sorts of strong magnetic fields in the flat. When I move 30cm sideways, holding a traditional magnetic compass, the apparent North can change by 45+degrees. Whilst absolute north isn't important for a head-tracker, a 'north' which varies wildly may, I think, cause problems.

The headtracker I believe uses a magnetic compass to counter yaw drifting in the gyros. As long as I stay stationary then this will work well. However, I'm worried that if I translate sideways by a relatively small distance, then the compass will detect a change in 'north' and read that as a rotation of my head - of much greater magnitude than the gradual loss of accuracy from gyro drift.

With the YEI 3-space sensors I have, this effect appears to be quite apparent - I'm intrigued how the Oculus Rift will handle things.

6 Replies

  • I have similar problems in my apartment, and I've never used a compass drift correction solution that actually performed well (note that the Oculus API currently doesn't use the compass anyway). I posted a little about it here if you are interested: viewtopic.php?f=20&t=60&p=377#p377
  • ganzuul's avatar
    ganzuul
    Honored Guest
    ED:

    /ED

    What about magnets? Seriously. I have two of these crazy strong, like space-distorting neodymium magnets which I'm no longer allowed to play with affixed to my fridge door. I can get them off from there because their fields have completely saturated the steel's potential.

    I think that with software you could pick up on where the magnets are positioned in the room, perhaps even get accurate positional data...
  • Yes, I thought of that. Personally, I don't have the background to know how well that would work or how safe it is (for the electronics in my apartment). Someone was talking about similar strategies in the other thread:

    "edzieba" wrote:

    If the local magnetic field is not stable enough (e.g. you have a lot of electric motors running nearby), you might be able to put a big Helmholtz Coil on opposite walls (or go full Maxwell if you want a really uniform field), and sit within the relatively uniform and stable solenoid field set up between them. You don't need a strong field, so you could run them off a USB PSU or a battery.


    It would be nice if someone with some experience in this area could say how feasible it would be to build such a solution that would work in pretty much any location (that doesn't already have a super strong magnet obviously). I'd be interested in anything that would allow me a roughly 12x12 foot space where yaw angles could be detected within 2 degrees, and the cost is not too ridiculous (say under $300 US).

    If you just plan to sit down and look in the same direction (more or less) however, you won't need anything that complicated as I said in the other thread. You just need a camera based head tracking solution like FreeTrack or an AR marker to update drift offsets once in a while.
  • kingtut's avatar
    kingtut
    Honored Guest
    Yeah, I noticed that other thread just after posting this one. The key thing will be that the magnetic field needs to be uniform (i.e. the magnetic field lines look parallel) in the entire play space. As I understand things, that means the coils would need to be as wide as your desired play space, and as their separation equals their radius, you're talking about some big-ass coils.

    Field strength is the other parameter which would need to be tuned. I actually don't think it'll need to be too strong though - just strong enough to override any other fields - and I doubt it'll cause any problems with electrical kit. You may need to be careful about the coils overheating though. The formula at http://en.wikipedia.org/wiki/Helmholtz_coil can be used to work out the required current (B = 3-7 x 10^-5 Tesla, i.e. 0.03-0.07 mT for the earths magnetic field) and number of turns. This can be combined with ohms law, and knowledge of the conductivity/resistance of different gauge wires, to identify what current and voltage is needed for which number of turns.

    I'm just worried that if the developers aren't aware of this issue, then they'll hard-code yaw compensation in, and thus make games unplayable.
  • edzieba's avatar
    edzieba
    Honored Guest
    Assuming a 0.03mT desired field strength, a 1m radius coil (2m diameter by 1m long effective area), and 20 turn coils (so you don't have to spend a week winding the damn things), you need a current of a little under 1.7 amps for each coil. That seems entirely feasible to construct from low-gauge magnet wire and run from commodity PSUs. Even if you decide to go for an overpowering 0.1mT field, your coil current is still under 6A, well within the range of off-the-shelf PSUs and home-wound coils.
    The only real pains are in mounting your enormous coils, the limited working volume for non-seated use (unless you have exceptionally high ceilings), and building a form to wind the coils (a few pegs in a board would probably suffice.)

    Working