Category Archives: Uncategorized

Mapness: Google Maps for Gtk+3.0 and Vala

Mapness is an open source (LGPL) Gtk+3.0 widget for displaying maps (google, bing, open street maps). It is written in Vala and has bindings for C, Python and GJS (gnome javascript). A while ago, I was using osm-gps-map inside Gtkmm/C++ applications. That worked fine. After discovering Vala, I found osm-gps-map a bit clunky to… Read More »

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 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 »