Headtracker: BOSCH Sensortec BNO055

for the headset i need a headtracking solution.

The IMUs have problems with drift in horizontal and that makes manual centering via custom key set needed.
I could notice that drift with the usb headtracker from ZEISS.

Maybe the drift is more or less, depending on a calibration after powering up the device, 10 seconds none moving. And maybe i will give it a second try?

BUT again..
i thought about TrackIR – its expensive solution, without look over shoulder feature.
i thought about EDtracker a arduino solution with MPU-9250
which seems well supported by the german team from:
while edtracker founders withdrawed.

and while looking through internet i came around with the BOSCH Sensortec BNO055
„Smart sensor combining accelerometer, gyroscope, magnetometer and orientation software“

This IMU has many great features that should be a better solution to me.
– a auto calibration
– python libs
– community support
– hight refresh rate
– fusion data, quaternions to euler
this all was interesting enough to me to give it a chance , and i ordered the USB Stick Evaluation Version, red USB3.0 version, from Digi-Key for 50,-€ incl. shipping from USA. Shipping was very fast within 3 days!

the BNO055 is available in different styles
– the BOSCH evaluation USB Stick green USB2.0 only, red USB3.0
– Arduino breakouts from adafruit and others
– Arduino Professional Series: IoT MKR https://store.arduino.cc/arduino-mkr-imu-shield
– and as chip alone

BOSCH Sensortec – Calibrating BNO055
NDof Nine Degrees of freedom
FMC = Fast Magneto Calibration

Paul McWorther uses BNO055 with Arduino and explains equations.. great stuff ;o)

there are documentations from BOSCH and code examples in the internet.
Finally it was a trail within 4 days to get the device working in streaming mode on a windows pc using python 3, build up on existing scripts, modified by me.

First we need to install the BOSCH Sensortec Development Desktop 2.0.
When it is installed we can run the programm and connect to the USB Stick. For me the USB connections failed , but COM3 worked.

In the installation folder structure of Development Desktop 2.0 we find the .dll and PDF manual for a first small python script.
Is started with python version2.
The script was not fully ready to go, and did not contained full fledged support of everything the bno055 delivers.

From that point i looked through various examples for arduino, and found BOSCH github repository

the .h header file gives impression on whats all possible, the registers and values, functions…

and then, there is BOSCH sensortec forum:
where some usefull information is located.

this post contains a zip with python example using the co called „GenericAPI“,

finally i got a full fledged python3 script into my hands,
that was intended for linux.
so i had to install python3, comes ready with pip inside, batteries included ;o)
then installed pyserial … (py -m pip install pyserial)
then outcommented linux lib „pyudev“(that needs linux only „fcntl“) and setted manual values in the autodetec function to use COM3…
from that point it was working in streaming mode.

from there is used a while loop with sleep 0.01,
and reading stream 10 packages,
read the euler values and converted them in usefull representation for
Virtual Joystick vJoy

vJoy gives us the possibility to simulate a Joystick Device within python.
So i update the 3 axis of that virtual joystick.

Next step is simple.. using OpenTrack
to read the input from that (virtual) Joystick and make output for „freetrack2.0 enhanced“.
Figure out some settings in OpenTrack and i was ready to go, to use it within in WarThunder.

i could use simlulating mouse input using python, but OpenTrack gives already some usefull features (axis mappings and much more) and outputs comon protocolls.


i still used Euler values because i dont need endless rotations, and i mapped the euler values to suitable values for my aim to use as headtracking look around with feature of „look over shoulder“ with 1:1 ratio of Head-View-Alignment.