This is an article on calibrating the Mountain Wave Avionics EFIS – you’ll need to be able to ssh into the device.
First, Load the Latest Application and calfile from here:
To load the firmware, use an SCP transfer. Depending on your host system there are various ways to do this. I use SmarTTY:
Once both the calfile and the updated application are uploaded, we’ll need to do two things: rename the old sensorcal file so the app doesn’t load it, and make ExEFIS executable
You will need to export the display and allow hosts to connect to it before running the app. Use “export DISPLAY=:0.0” and “xhost +” to allow this
Now, let’s run the app, using “sudo ./ExEFIS” – your terminal should look similar to below – you can use CTRL+C to end the app at any time.
First, let’s calibrate the accelerometer. Note the 3 values in the command prompt after accelerometer: those are the values (in g’s, x1000) for each axis. Run the application again, being careful to hold the device in each of it’s 3 orientations. We want each axis to read 1000 (or 1g) in each applicable orientation, and we want it to read zero when it’s perpendicular. Here is a terminal view showing the device in each orientation. Note the values near 1000, or -1000 in each orientation.
Since the X values are are around 1002, we’ll use 0.002 as our X Accel Bias. Since the Y Values are around -1002, we’ll use 0.002 as our Y Accel Bias. Since the Z values areound -1016, we’ll use 0.016 as our Z Accel Bias.
Next, we’ll calibrate the gyros, these are more simple, we only need to ensure that the unit it not moving:
Here, we can see that the x gyro sits at around 0.08 on average, the y gyro sits at around 0.09 on average, and the z gyro sits at around – 0.2. The best way to calibrate the gyros is to take lots of still data, and then import into excel and average. Note that the data stream is in csv format. A dump of the terminal will load right in. Now that we have both the accel and gyro data, we can modify the sensorcal file. I use nano:
You can test the calibration by running the application again. You should see the gyro values much closer to zero, and the accel values much closer to 1000, or zero depending on orientation:
The final piece of the calibration is the magnetometer calibration. To run the magnetometer calibration, run the application again, but this time with a “-m” argument. The application will then prompt you to wave the device in a figure 8. The application will log the magnetometer and spit out the correct calibration, then copy and paste this into your calfile:
To verify the magnetic calibration, you can run the application with a “-g” argument. This will display the magnetometer vector length. If the vector length remains relatively constant in all directions, the magnetometer is properly calibrated:
Here we see that the magnetic vector length is fairly constant (hovering around 500) so the magnetometer reasonably well calibrated:
The Application will load any file containing “sensorcal” in the name, so fee free to rename your calibration with some more unique identifiers if you wish. I append mine with the raspberry pi serial number. You can see your raspberry pi serial number at the start of the application, and you can also see the name of the calfile that the application is loading on launch:
At this point, you have a calibrated EFIS!