Stripping GPS Geotags from EXIF Data

Pretty straightfoward.

✔ ~/bin
$ git clone https://github.com/exiftool/exiftool
 Cloning into 'exiftool'…
 remote: Enumerating objects: 727, done.
 remote: Counting objects: 100% (727/727), done.
 remote: Compressing objects: 100% (551/551), done.
 remote: Total 12272 (delta 443), reused 301 (delta 170), pack-reused 11545
 Receiving objects: 100% (12272/12272), 15.40 MiB | 12.58 MiB/s, done.
 Resolving deltas: 100% (10445/10445), done.

For instance, when checking some images I can see that there’s a ton of EXIF information in there, including the precise location where the image was taken:

✔ ~/blog
$ exiftool ./2019/11/IMG_20191111_2029432-825x510.jpg
 ExifTool Version Number         : 11.76
 [...]
 GPS Version ID                  : 2.2.0.0
 GPS Latitude Ref                : North
 GPS Longitude Ref               : East
 GPS Altitude Ref                : Above Sea Level
 GPS Time Stamp                  : 19:29:43
 GPS Dilution Of Precision       : 16.132
 GPS Img Direction Ref           : Magnetic North
 GPS Img Direction               : 178
 GPS Processing Method           : fused
 GPS Date Stamp                  : 2019:11:11
 [...]
 GPS Altitude                    : AA.A m Above Sea Level
 GPS Date/Time                   : 2019:11:11 19:29:43Z
 GPS Latitude                    : DD deg MM' SS.SS" N
 GPS Longitude                   : DD deg MM' SS.SS" E

Sanitize that.

✔ ~/blog
exiftool -gps:all= -r -overwrite_original -P -ext jpg .

This will remove the GPS data for all JPEG files in a folder and all subfolders.

Why Are My Backups So Slow?

I recently tested two portable disk drives to use for data backups but was appalled by how badly they performed. The drives would alternate between writing quickly (50 – 100MB/s) and stuttering to a halt (250 – 500KB/s), and I could not understand why.

Here’s what that looked like:

Task Manager showing super terrible disk transfer rates
Continue reading Why Are My Backups So Slow?

Field Of View Measurements

For some reason, when I was googling the Field of View (FOV) value for the Pixel 2 camera recently, I couldn’t find the answer.

So I thought back to high school trigonometry and measured it myself.

It’s not perfect, but it works:

d_h d_v α_h α_v FOV_h FOV_v
Pixel 2 24.5cm 32cm 31.47° 25.11° ~63° ~50°

I took a 30cm ruler and taped it up, then measured how far away the camera needed to be from the ruler to fit the whole thing just inside its Field of View.

d_h = the distance away from the ruler in landscape mode
d_v = the distance away from the ruler in portrait mode

This is what it looks like:

The trigonometry for a right angle triangle means that:

α_h = arctan(15 / d_h) = arctan(15 / 24.5)
α_v = arctan(15 / d_v) = arctan(15 / 32)

and obviously the full FOV_h and FOV_v are double that.

This works with any camera, so if you don’t have the sensor size and don’t want to run through the lens equation, try this method out instead.

Finally, a practical use for all that trigonometry I memorized in high school. (Ok, that’s not true, we used a ton of it in electrical engineering, too.)

In other words, all that the Field of View triangle is saying (and indeed what the tangent ratio is saying) is that:

If we’re holding the camera in landscape mode, then stepping forwards or backwards by 24.5cm will remove or add 30cm of the scene in front of us to the picture.

If we’re holding the camera in portrait mode, then stepping forwards or backwards by 32cm will remove or add 30cm of the scene in front of us to the picture.

New Website Design

After who knows how long, I finally sat down and updated the landing page with a modern design.

The impetus for doing the redesign came from the work I just finished — setting up the landing page for the book I’m writing: From Plan to Prototype.

This gave me an opportunity to play with a few new technologies: Pug, Tailwind CSS, and Parcel.

The biggest improvement was the easy-to-use responsive design classes from Tailwind, which makes layout extremely simple and predictable.

I’m still in awe of this library.

Parcel handled the compiling, bundling, and development hot-reloading for Pug, and is a breeze to use as well.

As it turns out, Parcel has a “my way or the highway” style of compiling and bundling files together that didn’t make any sense to me once the redesign started to involve more than just the landing page. It was overkill.

So I had to take a step back and write a build script to generate the contents of the website, which gave me a chance to learn the command-line versions of pug, tailwind, PostCSS, and PurgeCSS.

New Landing Page

Much nicer, and now using dark mode!
Old and minimal, to a total fault.

New Food Reviews Website

This also gave me the chance to completely rework my food reviews Jekyll site to actually look like something usable in 2019.

Massive redesign of https://vilimpoc.org/food.
Super, super ugly and unappealing.

I pulled all of the posts and assets into the main website monorepo and set up an .htaccess mod_rewrite ruleset to forward all http and https requests for food.vilimpoc.orghttps://vilimpoc.org/food.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^food.vilimpoc.org
RewriteRule ^(.*)$ https://vilimpoc.org/food/$1 [R=301,L,NC,QSA]

New Research Pages

I aligned the Research page styles with the main styles.

The subpages all have a unique style, as they were all written over the course of decades. They’ll keep their styles.

Wired.
Tired.

New Error Pages

Further updates aligned the error pages to the new aesthetic, and use flexbox to center everything.

New and hot.
Old and blindingly ugly.