Announcement

Collapse
No announcement yet.

Calibration issues with Hang glider exhibit

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Calibration issues with Hang glider exhibit

    I have designed and constructed a hang glider exhibit for a children's museum that uses a wiimote and a single IR led (using Osculator of course) to process raw IR data and convert them to HID joystick output. In Google Earth I have enabled the controller button so that the Earth can be rotated using joystick inputs. The problem that I am having is that Google Earth seems to have calibration issues where .5 is not the neutral point, and unfortunately the neutral point seems to be constantly changing so the exhibit needs to be recalibrated every time the power is shut off.
    Since others have used the space navigator to control Google Earth without these problems I have to assume it has something to do with using Osculator as the joystick emulator. Does anyone have a solution to this problem? I should also note that I thought of trying to just send arrow key signals, but the way OSC is set up it only sends a key code when the IR data passes .5. When you split the X and Y you could change the scaling to send the key code at less than 45 degrees, but sometimes the program misses the .5 impulse as it goes by too fast and sends nothing. (It make for a really clunky control system)

  • #2
    Hi,

    The Space Navigator is a device that is different from the Wiimote IR sensor. First of all, it is designed in such way that when at rest, the position is the neutral point. Also, it has a built-in driver for Google Earth, which means that 3dconnexion has been able to incorporate specific enhancements for controlling Google Earth.

    I would suggest that you create a "dead zone" where no event is sent.
    To do that you can play with the scaling values:
    • open the Scalings Page (Command-F or choose View -> Flip to Scaling Page).
    • split the X position of your Raw IR led.
    • change Input Max of the lo side to 0,4
    • change Input Min of the hi side to 0,6
    This can be easily monitored with the Quick Look (press space bar on a message). You will see that with these setting, there is a sufficiently wide dead zone that will help to account for calibration issues.

    When you split the X and Y you could change the scaling to send the key code at less than 45 degrees, but sometimes the program misses the .5 impulse as it goes by too fast and sends nothing. (It make for a really clunky control system)
    This is what I would have suggested if the joystick solution fails, however I am not sure to understand why OSCulator would miss the 0.5 threshold.

    Note that the keyboard event based solution also needs the "dead zone" adjustment.


    Best Regards,
    Cam
    Last edited by camille; 11-11-2011, 05:17 PM.

    Comment


    • #3
      Thanks Cam for the quick response...
      So I guess the Space Navigator is sending different data to Google Earth for X and Y then the typical 0-1 joystick range?? (or perhaps it sends GE a calibration command to get rid of any data stuck in GE??)

      Unfortunately, I tried the dead zone method thinking that this would solve the problem, but sometimes the neutral point for Google Earth is set as low as .28. I have to recalibrate the scaling page so that .28 is now the center or neutral zone or else I can only turn in one direction. Again, I'm not sure why GE keeps resetting is neutral point and I would love to know how to clear it.
      When I split the X and Y values and send key code info OSC sends no output unless the value is exactly .5. In order for this to work correctly it should be sending a constant key code output (like the up arrow for example) at any value greater than .5. Unfortunately if the harness does not move slowly enough the output might skip from .49 to .51 and no key code is given. (or else the signal is so short that it doesn't register??) t know others have used this fix for games but it doesn't seem to work for me at all. (Even when I just use the motion data to send up and down signals it won't send anything unless exactly .5... like the command is immediately cancelled once it goes beyond .5.)

      Comment


      • #4
        Hi SunnySkies,

        After search for a couple of hours, I think I found something.
        Google Earth has a weird HID support: it tries to calibrate the source with the values received so far.

        The first thing I noticed was that I needed to activate earth control with a button, so I made it so the trigger button (B) resets the HID Joystick X and Y axes to 0,5. Also, the HID values are sent only when the trigger is pressed. I find it makes it easier to control the Earth and stop it from spinning.

        There is an important step you need to follow every time you launch Google Earth:
        1. enable external controller in Google Earth Preferences, it seems it always forget this preference (annoying)
        2. With your Wiimote connected and the trigger button pressed, slowly scan both X and Y axes, so extremes values are sent to Google Earth. This will calibrate the axes. You know when you are done if the Earth stops spinning when the trigger button is released.
        Please check the attached file, and customize it to your needs. If you need any further info, please let me know.


        Best,
        Cam
        Attached Files

        Comment


        • #5
          Wow, Thanks Cam!
          (I wish I had read your post earlier...) I went back to the hang glider exhibit and turned on Google Earth and OSC and found that if I sent Google Earth the max and min values that it would indeed reset the neutral point to .5. I actually discovered this by accident. In a moment of frustration I shook the wiimote and threatened it with some not so nice words... The Earth suddenly stopped spinning. Knowing that computers never actually respond to threats I then figured out that the shaking must have maxed out the accelerometers in all axis. I then tried this in a more controlled manner and it worked!!
          I will try your fix as well and see if it improves the process. Thank you again for your assistance. You seem to have a better understanding of the way Google Earth works than the guys at Google!!

          Comment

          Working...
          X