Entries by Kevin Godden

An implementation of ntohf() with code

I am working on extracting data from some binary navigation messages today. Working with binary data can be difficult and quite confusing – especially when converting byte order from network (big endian) to host byte order (possibly little endian). The integer types are well covered by ntohs() and ntohl() et al. but when dealing with […]

ExifTool truncates ASCII MakerNote data

ExifTool can be used to output a specific Exif MakerNote from your images’ metadata by using the following command: exiftool -u -Unknown_0x0013 image.jpg This will output makernote Id 0x13, however if the makernote that you are interested is long, then ExifTool may truncate it and output only the start with […] at the end! Unknown […]

Cross compiling libEXIF for ARM on Ubutnu

libexif is a software library that allows you to add EXIF tags to JPEG images, for example when saving JPEG images via libJPEG. The following is a log of the steps taken to cross compile libexif on ubuntu for an ARM IoT device, you will need the arm-linux-gnueabi tool-chain installed on your build machine: 1.) […]

Code to test u-blox Binary GPS Packet Checksum

Here’s something random for a Thursday, the following is some simple C++ code for checking the checksum of a u-blox binary GPS packet, for some reason we get quite a few packet data errors, so it turns out that it is important to check the checksum! There must be an unwritten (or written?) software engineering […]

IEEE has C as top Programming Language in 2016

The IEEE reports here that C is the number 1 programming language in 2016. As usual, I am slightly dubious about a lot of these rankings, each one seems to yield a different order. Still you would hope that the IEEE would employ a little more rigour than most! Funny thing is I just don’t […]