Essential GEdit Tweaks

Out of the box, gedit is minimal, fast and boring. It lacks many important features and even trying to change settings can be a struggle. But it can be enhanced to the point where it becomes viable competition for editors such as atom.io and Sublime. Here’s some tweaks that I’ve done Get into the dconf… Read More »

DataInputStreams – More On Why Vala Is Awesome!

Vala makes it incredibly easy to access resources from online. Imagine you would like to access some information from a website. For me, I wanted to download magnetic declination from the NOAA website. I wanted to be able to lookup mag. dec. from a given latitude and longitude. My programming experience has mostly been with… Read More »

Vala Message Dialog Won’t Close!

I never recall having an issue with this in Gtkmm, but this had me snookered for a while. Here’s the answer . . . You must connect the response signal of the message dialog to a function that destroys it! Gtk.MessageDialog msg = new Gtk.MessageDialog(window, Gtk.DialogFlags.MODAL, Gtk.MessageType.ERROR, Gtk.ButtonsType.OK, “An important message!”); msg.response.connect((dlg, r) => {… Read More »

Using Osm-Gps-Map Widget With Vala

These steps apply for Debian based Linux systems. For Arch linux, you can use pacman -S osm-gps-map however at this point it contains a bug which has been reported here. Download and extract the latest source from github Make sure you’ve got libgirepository-dev with sudo apt-get install libgirepository-dev. If you’re on Arch try pacman -S… Read More »

Estimating Gyro Bias – Calculating Orientation pt5

Estimating Gyroscope Bias MEMs gyroscopes never read zero when they are stationary. There is always a small measurement offset. This gyro bias is often related to temperature, so warming up the gyro with a heat gun will cause the bias to change – sometimes quite dramatically. The most common way to remove gyro bias is… Read More »

Modelling Acceleration – Calculating Orientation pt4

Modelling Acceleration Dynamics The accuracy of an orientation sensing system can generally be improved if the acceleration dynamics of the system can be estimated. Accelerometers are commonly used in orientation sensing systems because they can sense gravity (the down vector). They also measure acceleration due to changes in motion – of course. Modelling acceleration dynamics… Read More »

Magnetometer Calibration – Calculating Orientation pt3

Magnetometer Calibration Calibrating magnetometers is critically important. Without a good mag cal, you’ll get rubbish out of your magnetometers. Fortunately it isn’t that hard to do a basic calibration. If you were to create a scatter plot of your magnetometer readings, it would probably show both hard iron and soft iron errors. An ideal plot… Read More »

Quaternion Formulas

Here’s a collection of quaternion formulas. Quaternions are very useful for orientation sensing, game programming and augmented reality applications. Magnitude Normal Quaternion Conjugate Axis Angle To Quaternion Where the axis is v and the angle is theta Quaternion To Axis Angle Where theta is the angle and v is the axis vector Quaternion From Angular… Read More »

Integrating Gyroscopes – Calculating Orientation pt2

Integrating Gyroscopes Gyroscopes measure angular velocity. As with regular velocity, by multiplying by time you get change in position (a distance). By adding these distances up as you go, you can estimate position. Naturally, every little error will also get added up and eventually you’ll end up with large errors. This is called drift and… Read More »