Watching The Watchers: The State Of Space Surveillance

By now you’ve almost certainly heard about the recent release of a high-resolution satellite image showing the aftermath of Iran’s failed attempt to launch their Safir liquid fuel rocket. The geopolitical ramifications of Iran developing this type of ballistic missile technology is certainly a newsworthy story in its own right, but in this case, there’s been far more interest in how the picture was taken. Given known variables such as the time and date of the incident and the location of the launch pad, analysts have determined it was likely taken by a classified American KH-11 satellite.

The image is certainly striking, showing a level of detail that far exceeds what’s available through any of the space observation services we as civilians have access to. Estimated to have been taken from a distance of approximately 382 km, the image appears to have a resolution of at least ten centimeters per pixel. Given that the orbit of the satellite in question dips as low as 270 km on its closest approach to the Earth’s surface, it’s likely that the maximum resolution is even higher.

Of course, there are many aspects of the KH-11 satellites that remain highly classified, especially in regards to the latest hardware revisions. But their existence and general design has been common knowledge for decades. Images taken from earlier generation KH-11 satellites were leaked or otherwise released in the 1980s and 1990s, and while the Iranian image is certainly of a higher fidelity, this is not wholly surprising given the intervening decades.

What we know far less about are the orbital surveillance assets that supersede the KH-11. The satellite that took this image, known by its designation USA 224, has been in orbit since 2011. The National Reconnaissance Office (NRO) has launched a number of newer spacecraft since then, with several more slated to be lifted into orbit between now and 2021.

So let’s take a closer look at the KH-11 series of reconnaissance satellites, and compare that to what we can piece together about the next generation or orbital espionage technology that’s already circling overhead might be capable of.

Continue reading “Watching The Watchers: The State Of Space Surveillance”

Books You Should Read: Exact Constraint: Machine Design Using Kinematic Principles

Surely, if you’re reading this website you’ve teased the thought of building your own 3D printer. I certainly did. But from my years of repeated rebuilds of my homebrew laser cutter, I learned one thing: machine design is hard, and parts cost money. Rather than jump the gun and start iterating on a few machine builds like I’ve done before, I thought I’d try to tease out the founding principles of what makes a rock-solid machine. Along the way, I discovered this book: Exact Constraint: Machine Design Using Kinematic Principles by Douglass L. Blanding.

This book is a casual but thorough introduction to the design of machines using the method of exact constraint. This methodology invites us to carefully assess how parts connect and move relative to each other. Rather than exclusively relying on precision parts, like linear guides or bearings, to limit a machine’s degrees of freedom, this book shows us a means of restricting degrees of freedom by looking at the basic kinematic connections between parts. By doing so, we can save ourselves cost by using precision rails and bearings only in the places where absolutely necessary.

While this promise might seem abstract, consider the movements made by a 3D printer. Many styles of this machine rely on motor-driven movement along three orthogonal axes: X, Y, and Z. We usually restrict individual motor movement to a single axis by constraining it using a precision part, like a linear rod or rail. However, the details of how we physically constrain the motor’s movements using these parts is a non-trivial task. Overconstrain the axis, and it will either bind or wiggle. Underconstrain it, and it may translate or twist in unwanted directions. Properly constraining a machine’s degrees of freedom is a fundamental aspect of building a solid machine. This is the core subject of the book: how to join these precision parts together in a way that leads to precision movement only in the directions that we want them.

Part of what makes this book so fantastic is that it makes no heavy expectations about prior knowledge to pick up the basics, although be prepared to draw some diagrams. Concepts are unfolded in a generous step-by-step fashion with well-diagrammed examples. As you progress, the training wheels come loose, and examples become less-heavily decorated with annotations. In this sense, the book is extremely coherent as subsequent chapters build off ideas from the previous. While this may sound daunting, don’t fret! The entire book is only about 140 pages in length.

Continue reading “Books You Should Read: Exact Constraint: Machine Design Using Kinematic Principles”

Lambdas For C — Sort Of

A lot of programming languages these days feature lambda functions, or what I would be just as happy to call anonymous functions. Some people make a big deal out of these but the core idea is very simple. Sometimes you need a little snippet of code that you only need in one place — most commonly, as a callback function to pass another function — so why bother giving it a name? Depending on the language, there can be more to it that, especially if you get into closures and currying.

For example, in Python, the map function takes a function as an argument. Suppose you have a list and you want to capitalize each word in the list. A Python string has a capitalize method and you could write a loop to apply it to each element in the list. However, map and a lambda can do it more concisely:

map(lambda x: x.capitalize(), ['madam','im','adam'])

The anonymous function here takes an argument x and calls the capitalize method on it. The map call ensures that the anonymous function is called once for each item.

Modern C++ has lambda expressions. However, in C you have to define a function by name and pass a pointer — not a huge problem, but it can get messy if you have a lot of callback functions that you use only one time. It’s just hard to think up that many disposable function names. However, if you use gcc, there are some nonstandard C features you can use to get most of what you want out of lambda expressions.

Continue reading “Lambdas For C — Sort Of”

Why Ada Is The Language You Want To Be Programming Your Systems With

The Ada programming language was born in the mid-1970s, when the US Department of Defense (DoD) and the UK’s Ministry Of Defence sought to replace the hundreds of specialized programming languages used for the embedded computer systems that increasingly made up essential parts of military projects.  Instead, Ada was designed to be be a single language, capable of running on all of those embedded systems, that offered the same or better level of performance and reliability.

With the 1995 revision, the language also targeted general purpose systems  and added support for object-oriented programming (OOP) while not losing sight of the core values of reliability, maintainability and efficiency. Today, software written in Ada forms the backbone of not only military hardware, but also commercial projects like avionics and air-traffic control systems. Ada code controls rockets like the Ariane 4 and 5, many satellites, and countless other systems where small glitches can have major consequences.

Ada might also be the right choice for your next embedded project. Continue reading “Why Ada Is The Language You Want To Be Programming Your Systems With”

Norovirus Smartphone: Using Megapixels And Microfluidics To Fight The Other Kind Of Virus Infection

Chances are pretty good that at some time in your life, you’ve crossed paths with a norovirus. And chances are that you remember the encounter vividly, or at least its aftermath. I recall a run-in with the bug one Christmas, when my parents brought over more than just toys for the kids when they visited. Within a day, everyone in the house was sharing the joy. Twas the season; they don’t call it the winter vomiting bug for nothing.

Most of the 685 million norovirus infections each year resolve after a few miserable days, but some require hospitalization and 200,000 of them result in death, mainly from dehydration and mainly children. An easy to use, cheap, and accurate means of detecting the virus in the field would be quite a boon to public health. And soon, smartphones may be able to do just that.

Continue reading “Norovirus Smartphone: Using Megapixels And Microfluidics To Fight The Other Kind Of Virus Infection”

Can You Really Use The Raspberry Pi 4 As A Desktop Machine?

When the Raspberry Pi 4 was released, many looked at the dual micro HDMI ports with disdain. Why would an SBC like the Raspberry Pi need two HDMI ports? The answer was that the Pi 4 is finally fast enough to work as a desktop replacement, and the killer feature (for many of us) for a desktop is multiple monitors.

Now I know what many of you are thinking. There’s no way a $35, or even $55, credit-card-sized computer can replace a $1000+ desktop machine, right? Right? Of course not, but at the same time, yes, yes it can. So I tried to use the Pi as a desktop replacement for a week, and it worked. In fact, this article has been written almost entirely on the Pi 4 with 4 GB of memory, as well as a couple of my recent security columns. I could definitely continue working with the Pi as my daily driver for that purpose.

There are a few points of order to cover first. Initial reviews were based on the June 20th release of Raspbian, which in turn was based on the pre-release Debian Buster. Since then, Buster has released. Fixes that were queued up have landed now that the release freeze has ended. A new Raspbian image was released on July 10, and many of the initial release issues have been fixed.
Continue reading “Can You Really Use The Raspberry Pi 4 As A Desktop Machine?”

Sensor Filters For Coders

Anybody interested in building their own robot, sending spacecraft to the moon, or launching inter-continental ballistic missiles should have at least some basic filter options in their toolkit, otherwise the robot will likely wobble about erratically and the missile will miss it’s target.

What is a filter anyway? In practical terms, the filter should smooth out erratic sensor data with as little time lag, or ‘error lag’ as possible. In the case of the missile, it could travel nice and smoothly through the air, but miss it’s target because the positional data is getting processed ‘too late’. The simplest filter, that many of us will have already used, is to pause our code, take about 10 quick readings from our sensor and then calculate the mean by dividing by 10. Incredibly simple and effective as long as our machine or process is not time sensitive – perfect for a weather station temperature sensor, although wind direction is slightly more complicated. A wind vane is actually an example of a good sensor giving ‘noisy’ readings: not that the sensor itself is noisy, but that wind is inherently gusty and is constantly changing direction.

It’s a really good idea to try and model our data on some kind of computer running software that will print out graphs – I chose the Raspberry Pi and installed Jupyter Notebook running Python 3.

The photo on the left shows my test rig. There’s a PT100 probe with it’s MAX31865 break-out board, a Dallas DS18B20 and a DHT22. The shield on the Pi is a GPS shield which is currently not used. If you don’t want the hassle of setting up these probes there’s a Jupyter Notebook file that can also use the internal temp sensor in the Raspberry Pi. It’s incredibly quick and easy to get up and running.

It’s quite interesting to see the performance of the different sensors, but I quickly ended up completely mangling the data from the DS18B20 by artificially adding randomly generated noise and some very nasty data spikes to really punish the filters as much as possible. Getting the temperature data to change rapidly was effected by putting a small piece of frozen Bockwurst on top of the DS18B20 and then removing it again.

Continue reading “Sensor Filters For Coders”