The Targeting Pod

This is the first sensor in the project before anything else started working interms of instrumentation.The simulator learned to see and learned to broadcast in the same version. (GitHub: controller, data bridge — versions explained in Eight Copies.)

A Camera on a Neck

Physically, the pod is the simplest sensor in the project: a Unity camera mounted on a sensorHead transform that can rotate ±90 degrees on two axes. A gimballed eye.

The controls are where the hardware shows through. Four slew buttons on the sidestick nudge the head around, and the code reads them the way an electronics person would expect:

Checking for zero to mean pressed because the physical buttons sit on pull-up resistors, idle high, pulled low when pushed. The electrical convention of the hardware travels through the firmware, across the network, and surfaces intact in a C# string comparison.

The slew rate knob is real. An analog knob on the stick, mapped from its raw 0–1023 reading to a rotation speed:

Turn the knob, and the pod slews faster or slower.

One Stick, Two Jobs

The sidestick’s slew controls do double duty, and the mode switch between those duties is one of my favourite pieces of design in the input layer. A pair of buttons flips a flag called isSidestickSensorSlewing. When it is off, the stick’s hat inputs trim the aircraft. When it is on, the same physical controls stop flying the jet and start steering the sensor head.

This is the heart of real HOTAS philosophy, where switches like TMS and DMS change what the hands-on controls mean depending on what the pilot is managing. But implementing it taught me why it works: the mode lives in the software, so the hardware stays simple, and the pilot’s hands never move. The controls capture intent; the aircraft decides what the intent means.

The Pod Was Secretly a TV Station

Now the strange part. The pod’s picture had to appear on a cockpit display — which, in this project, means another computer. So DataBridge does something I did not fully appreciate the ambition of at the time: it broadcasts video.

Every capture: render the sensor camera to a texture, encode the frame as a PNG, slice the bytes into 1,400-byte chunks, and push them over TCP to a viewer, followed by the sensor’s rotation angle, followed by a six-byte end-of-frame marker. Decode those six bytes as ASCII and they read TGP-TX.

The chunk size, 1,400, is not a number I calculated. When the feed first choked, my opening move was to attack the pipe: I tried to raise the MTU by overriding the network interfaces on both machines so whole frames could travel unsplit. That went nowhere, and chunking the frames to just under the standard 1,500-byte limit was the retreat that shipped. The code opens a fresh TCP connection for every chunk, which is gloriously wasteful and worked anyway, because the frames were small and the LAN was two metres long.

The Feed That Moved House

The snapshots preserve an architecture change here that I had half-forgotten. In the ACE-5 through ACE-7 era, the display computer’s code pulls TGP frames across the LAN — from the sim machine’s address, on its own pair of ports, with its own little three-byte request handshake. The pod’s picture was travelling between physical machines, painted onto a display object inside the second computer’s Unity scene.

By ACE-8, the DataBridge points at 127.0.0.1: the viewer had moved onto the sim machine itself. Same pipeline, different geography the kind of migration that happens when a demo setup gets consolidated, preserved only because I versioned by copying folders.

Pods Versus EOTS

The real-world mapping here is the sharpest F-16-versus-F-35 contrast in the project.

The F-16 does not have a built-in targeting camera. It carries one — a Sniper or LITENING pod, a separate machine with its own sensors and processors, hung on a hardpoint and talking to the jet over an interface. The F-35 went the other way: its EOTS is built into the airframe, fused into the aircraft’s core systems.

My targeting pod is, architecturally, an actual pod. It is a semi-independent device whose product is a video feed consumed by a display somewhere else.