What is this?
A SlimeVR tool to quickly examine your TCAL values and calculated TCAL curves for accuracy.
Simply connect your tracker to your PC with a USB cable and select the correct port with the button below.
Be sure to not have any other serial console open (SlimeVR Serial Console, VSCode PlatformIO Serial Monitor, etc).
It may take a few seconds for results to appear.
What is TCAL?
Temperature calibration (TCAL) is a process of mapping drift values of your trackers to its working temperatures available for BMI series of IMUs.
Depending on the temperature, reported IMU values will be offset by some amount, which will add up to the normal drift all IMUs experience therefore increasing total drift.
TCAL allows firmware to know that offset at various temperatures and remove it from the total output, eliminating the added drift from the temperature.
How do I read the results?
After you've selected the COM port and tool has read the data from your tracker you should be able to see the TCAL data for all configured IMUs.
IMU Index - index of the current IMU;
IMU Type - reported type of the current IMU;
TCAL Supported by IMU - whether or not current IMU supports TCAL;
TCAL Temperature Range (Expected) - configured temperature range for IMU where data is gathered. You begin TCAL by reading lower value and save TCAL data by reaching the upper value;
TCAL Done - how much of configured temperature range is actually covered by gathered data;
And under that you should see the graphs for X, Y, Z offsets in regards to temperature.
What do these graphs mean?
TCAL works by gathering offset data at various temperature points and then constructing a polynomial to interpolate offset at much higher accuracy.
If your gathered data covers the entire temperature range then you should see orange curves being roughly in the middle between blue points, following the expected trend line.
However, if there are gaps in gathered data then the curve will try to approximate how much offset the IMU will experience at uncaptured temperatures.
Depending on how few data points there are, the curve may massively diverge from the real offsets, therefore actually increasing expected drift at those temperatures.
With that, you should examine these graphs and see if the calculated curves (orange line) is more or less where it's expected to be based on gathered data (blue dots).
It's more important to have data be accurate at around your operating temperatures, since that is the data you will actually be using in your applications.
What does "From file" button do?
If you already have saved TCAL data from before or want to use the plotting feature of this tool without having a browser supporting Web Serial API, you can upload a file with the TCAL commands output.
It expects a text file with the TCAL command and its output included and consequtive. For example:
tcal print
[INFO ] [BMI160Sensor:0] Sensor 0 temperature calibration state:
[INFO ] [BMI160Sensor:0] current temp: 31.3224 C (88.3803 F)
[INFO ] [BMI160Sensor:0] total range: min 15.0000 C max 45.0000 C (min 59.0000 F max 113.0000 F)
[INFO ] [BMI160Sensor:0] calibrated range: min 14.9679 C max 32.3263 C (min 58.9423 F max 90.1874 F)
[INFO ] [BMI160Sensor:0] done: 58.3
...
tcal debug
[INFO ] [BMI160Sensor:0] Sensor 0 gyro odr 400.000000 hz, sensitivity 32.799999 lsb
[INFO ] [BMI160Sensor:0] Sensor 0 temperature calibration matrix (tempC x y z):
[INFO ] [BMI160Sensor:0] BUF 0 60
[INFO ] [BMI160Sensor:0] SENS 0 32.799999
[INFO ] [BMI160Sensor:0] DATA 0
[INFO ] [BMI160Sensor:0] 14.825710 -4.308642 -3.987654 -2.938272
[INFO ] [BMI160Sensor:0] 15.332200 -4.740741 -3.629630 -3.222222
[INFO ] [BMI160Sensor:0] 15.832540 -5.271605 -3.876543 -2.382716
...etc...
It's pretty robust in filtering the data it actually needs, so you can leave the boot sequence and periodic notifications in.