Skip to content

Add a MISB ST 0601 (STANAG 4609 video metadata) codec plugin - #124

Open
Mattbusel wants to merge 1 commit into
kineticlogic-io:mainfrom
Mattbusel:misb0601-codec
Open

Mattbusel wants to merge 1 commit into
kineticlogic-io:mainfrom
Mattbusel:misb0601-codec

Conversation

@Mattbusel

Copy link
Copy Markdown

Adds a built-in misb0601 codec plugin for MISB ST 0601, the KLV metadata in STANAG 4609 drone video, next to stanag4607 and sapient.

Each UAS Datalink packet in a frame becomes a platform record: position (height above ellipsoid when the packet has it, else MSL), heading, course, ground speed, pitch and roll, the platform name (tail number, call sign, designation or mission ID), and the camera pointing (azimuth = heading + relative azimuth, fields of view, slant range) with the frame center. With emit: "all" it also emits a frame_center record (the ground point at the center of the picture, CE90 turned into a 1-sigma circular error).

  • Options: emit (platform | all), verify_checksum (default true; packets with a bad tag 1 checksum are dropped, and a frame where every packet failed returns an error).
  • A frame is one datagram and may hold several packets. No framing for TCP: KLV uses a BER length, which Framing cannot describe.
  • docs/examples/misb0601-udp.json maps the platform to a friendly air track (a-f-A-M-F-Q), and docs/reference.md gets a paragraph next to STANAG 4607 and SAPIENT. The example is in the api.rs examples test too.

Decoding is the misb crate (no dependencies, no unsafe, MIT OR Apache-2.0). Disclosure: I wrote it. Its decoder matches paretech/klvdata on every value of 26 public sample packets (the Day Flight and Night Flight STANAG 4609 samples plus the MISB examples), and it is fuzzed in CI.

Tests:

  • plugin::misb0601 unit tests: manifest and options, platform and frame center records from a two-packet datagram, bad checksum dropped or kept per option.
  • crates/ot-source/tests/misb0601_example.rs: a packet through the plugin and the example mapping to an Observation (track key, callsign, position, HAE, course, speed, time).
  • cargo test -p ot-source --lib plugin::misb0601: 4 pass. cargo test -p ot-source --test misb0601_example: 1 pass. cargo clippy -p ot-source --all-targets -- -D warnings and cargo fmt --all --check are clean (Ubuntu 24.04, toolchain 1.98.1 from rust-toolchain.toml). I did not run the full scripts/check.sh (UI build); CI will cover it.

Built-in misb0601 codec: each UAS Datalink packet in a frame becomes a
platform record (position, course, speed, name, camera pointing, frame
center); emit all adds frame_center records. Checksums are verified by
default. Decoding is the misb crate. Example source
docs/examples/misb0601-udp.json maps the aircraft to a friendly air track.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant