Processing bugs

Seems there’s a bug in Processing whereby if you export a program the serial port libs don’t work and the app hangs. Sucks. Workaround is to install Processing itself and the required library (toxiclibs) and then build/run the EDTRacker UI from scratch.

On a positive note I think I’ve found a way of using the horribly noisy magnetometer on the MPU-9150 for zero drift use.  Having the auto-drift compensation in the existing V2.9 sketch means there’s only marginal benefit paying more for the  MPU9150.

Also had a quick blast with Rise Of Flight and rFactor2 both which support head look joystick bindings and therefore support EDTRacker 🙂   Rise Of Flight  is very pretty.  Now if I can find my old Falcon 4 DVD…

Workaround

 

Download and install  Processing from https://processing.org/download/?processing

Download toxiclibs library from http://hg.postspectacular.com/toxiclibs/downloads/toxiclibs-complete-0020.zip

Unzip these under <my docs>/Processing/libraries

MyDocs->Processing->libraries ->toxiclibs_p5 etc

Create a new folder:  <my docs>/Processing/EDTrackerUtil

Copy the source files from the github zip (https://github.com/pocketmoon/EDTracker2/archive/master.zip )   to the new EDTrackerUtil folder above

i.e the files in the zip in folder  EDTracker2-master\UI\source

Open EDTrackerUtil.pde in Processing hit Run |>

 

I’ve had enough of Processing now.  It’s very quick for prototyping but sucks for  creating applications that will run for everyone.  UI will now be .Net  or perhaps Unity

 

 

 

 

 

 

New UI, Calibration (2.2) and Tracker Sketched (2.9) and updated InvensenseMotionDriver Library

[edit] 15/06  Fixed flip/180 degree issue.  Add ability to set bias to factory vaues.

[edit] 22:37 Github being a pain but should be good to go now!

[edit] 21:00 ish Github updating within the hour with new code so check back soon…

There is an updated UI, Calibration sketch, Tracker sketch and arduino InvensenseMotionDriver Library.

https://github.com/pocketmoon/EDTracker2

Changes:
More robust. Smart scan of com ports for ED Tracker (see note above).

  • A Larger window ‘cos we’re showing more stuff
  • All RAW Gyro and Accel values are now show
  • Enable Accel bias values to be calculated individually.
  • Added temperature to graph – make sure the sensor has ‘warmed up’ before bias calcs.

 

Image

N.B Lated UI works with latest calibration sketch (2.2 or better) and latest tracker sketch (2.9 or later) only.

Calibration

Pre-requisites

  • Latest sketches copied under <you docs>/Arduino/
  • Latest InvensenseMotionDriver library copied to <arduino ide>/library/
  • Latest UI folder placed somwhere
  • Load the EDTrackerIICalibration sketch to the EDTracker using the Arduino IDE

Steps to calculate bias values:

  1.  Ensure sensor is a flat and as still as possible
  2.  Wait for sensor to warm up (temperature shown on red line – can take 10 mins or more)
  3.  Hit 9 and wait 5 second or so for calibration to finish
  4.  Repeat step 3 until all Raw Gyro values are 0.
  5.  Hit x to select Accel X Axis only
  6.  Hit 9 to recalibrate. Repeat until reading +/- single digits. value will vary quickly but should be between -10 & 10)
  7.  Hit y and Repeat steps 5 to 6 for the y axis
  8.  Hit z and repeat but aim for 16380 +/- 10
  9.  Q to quit.

 

Tracker Final Setup

Image

  • Load the EDTrackerII sketch to the ED Tracker using the Arduino IDE
  • Put it on top of your head

Final Setup Steps

  1. Run the UI
  2. Move your head to check that the tracker is active.
  3. Hit 5 to set the orientation correctly – head should mirror you movements
  4. Hit 6 to select and save either Linear or Exponential response mappings.
  5. Hit 3 to recenter the head
  6. Wait a few minutes
  7. Hit 8 to save yaw Drift Compensation
  8. Repeat steps 5 to 7 if needed (drift should be less than +/- 1.0)
  9. Q to quit

 

Play Elite Dangerous!!

 

Auto Gyro Bias – good thing or bad ?

The MPU-6050 has the ability, when using the DMP, to automatically calculate gyro bias value.  When enable, a period of 8 seconds with no motion will trigger bias calculations which replace any that have been previsouly loaded.

I always assumed this was a good thing but I’m wondering if it’s responsible for some of the yaw drift/jump issues I see. I Elite Dangerous there are times wheren you’re not staring straight ahead.  The in game UI panels are lower left and right. When docked and accessing station services there’s a lot of info placed down the sides of the screen.  If the user’s gaze settles somewhere other then dead-ahead, or places the headphones to one side then auto gyro calibration may be kicking in and generating bias values that are not appropriate.

So the latest version of the sketch, 2.8   (https://github.com/pocketmoon/EDTracker2)  does not enable this feature.  This results in some wild orientation values when you first plug in but the Calibration Sketch should be used to tame this, and the main sketch used to fine tune  yaw drift compensation.

I spend 30 minutes chasing a sidewinder last night and it seems to give much better yaw stability. Far better at returning to center.

Another change has been to push the acceleration bias values to the DMP rather than the MPU regs. It appears to change the output of the DMP (which it shouldn’t) but seems ok in use.  Investigations go on.  It’s ironic that Invensense keep emailing me about their upcoming developer conference yet the official dev forum appears to be abandoned apart from the odd ‘read the manual’ response.  Would be nice to see a bit more help for the folks posting in the forum.

Rob