Border and maritime awareness

Fuse authorised camera, radar and ship-tracking feeds to flag unusual movement and vessels that switch tracking off.

Updated CompTech Team

A coastal or border watch already has the sensors. A camera covers a river bend. A radar paints tracks. Ships broadcast their identity and position on the Automatic Identification System (AIS). Each feed has a console, and the unusual thing is the one that appears in two feeds and in neither person's notebook.

This lab fuses those authorised feeds into one picture and raises a flag a watch officer can accept or reject. The flag is a candidate. It is not an order to intercept, and it is not connected to a weapon. The principles forbid that connection. The lab uses recorded samples or a synthetic track file, so you can test the rules before a live feed is attached.

One track, three sources

Put every report into the same schema before you write a rule.

Field Camera Radar AIS
time Frame time Plot time Report time
where Bearing and a range, if the camera has been calibrated, or a sector Range and bearing, converted to a position Latitude and longitude
id Track number you assigned Track number MMSI, name, type
motion — Course and speed when the radar provides them Course and speed over ground

Store the raw message beside the normalised row. When a flag looks wrong, the watch officer needs the original sentence, not only the row you derived.

Fusion for the lab is deliberately simple. Associate an AIS report with a radar plot when they are close in time and position. Leave the camera as a linked clip when the plot falls inside a calibrated sector. Do not smooth away a disagreement. A radar plot with no AIS, or an AIS position that jumps, is the event you want to keep.

Streams land in Kafka on the data pipeline path, then into a table the rules read. A folder of CSV files is enough for the first run.

Flags worth a person's time

Start with two rules the watch already applies by eye.

Tracking switched off. A vessel was broadcasting AIS and the reports stop, while a radar track consistent with its last position continues. Emit a flag with the last AIS report, the continuing radar track, and the time the broadcast stopped. Ships do switch AIS off for innocent reasons, including equipment failure. The flag says the reports stopped. The officer decides what it means.

Movement that breaks the pattern. A track in a sector at a speed or a time of day the officer has marked as worth seeing, or a track that crosses a declared line. Encode the line and the hours as data, not as a hardcoded place in the source. The officer can change them without a new build.

Each flag is a row: rule, tracks, started, evidence (the raw ids), state. state moves from open to confirmed or dismissed under the officer's user id. Dismissed flags stay. They are how you learn that a rule is noisy.

-- AIS silent, radar still moving: illustrative, on the lab table
select a.mmsi, max(a.time) as last_ais
from ais a
join radar r
  on r.time > a.time
 and r.time < a.time + interval '30 minutes'
where a.mmsi = r.associated_mmsi
group by a.mmsi
having max(a.time) < now() - interval '15 minutes';

Tune the windows with the watch supervisor. A window copied from another coast will page the officer all night.

The picture and the search

The current flags and the last known position of each associated track are the picture. Video of a flagged sector uses the ISR search: the officer asks, in plain language, what the camera showed in the ten minutes around the flag, and gets a time range to play.

Access labels apply to feeds as they do to documents. A camera covering a sensitive site is not searchable by every logged-in user. Filter on the token before a track or a clip is returned, and log the query.

A recorded hour

Build the lab from files so the rules are debuggable before a socket is opened.

  1. An AIS CSV: MMSI, time, lat, lon, course, speed, for a handful of vessels. One vessel stops reporting halfway through.
  2. A radar CSV: time, position, track id. Continue that vessel's motion after the AIS stop, and associate it.
  3. Run the silent-tracking query. It should emit one flag with last_ais, the radar track id and the gap.
  4. Add a second vessel that stops because it docked and the radar track ends too. It must not flag. If it does, the rule is "AIS stopped" and not "AIS stopped while radar continues."
  5. Open the flag as the watch officer, set dismissed or confirmed, and read the row back. The user id is on the row.

Keep the raw lines that produced the flag. When the officer says the association is wrong, you need the two messages, not a rewritten position.

Live feeds come later, through the pipeline, with the same schema. A camera sector is linked only after someone has calibrated it. An uncalibrated camera is a clip the officer can open, not a position the rule can join on.

From file to feed

Stay on CSV until the rules are boring. Then attach a live source one at a time.

  • AIS over the message bus, normalised into the same columns as the file.
  • Radar plots the same way. Association remains a separate step you can turn off.
  • A camera only as a linked clip, and only after calibration. No calibration, no join.
  • Flags into the same review table, with open, confirmed, dismissed.
  • The watch officer's user id on every transition. A flag nobody owns is noise.

The maritime picture and the disaster picture can share a map. They do not share rules. A dark-ship flag must not close a relief route, and a flood polygon must not look like a contact.

What's next

  1. Surveillance and ISR: the video half of the same watch floor.
  2. Disaster response: boats and trucks routed when the picture is a flood, not a contact.
  3. Data pipelines: how the three feeds become one table.