Skip to content

TAG Handling

iliyan85 edited this page Jul 5, 2026 · 2 revisions

TAG Handling

AISMixer reads an NMEA TAG block when it appears immediately before an extracted !AIVDM or !AIVDO sentence. TAG metadata is handled separately from internal routing identity.

The output-related TAG fields currently handled by AISMixer are s, c, and g. Emitted TAG s and internal source_id are different concepts: TAG s is output metadata, while routing always uses source_id.

TAG s

The emitted TAG s value is selected by priority:

  1. A non-empty global station_id has highest priority.
  2. Otherwise, input alias information may come from a UDP input ID, UDP alias mapping, or authenticated UDPSEC station/client metadata.
  3. An ingress TAG s may be used when no stronger configured alias applies.
  4. Remote IP is the fallback where applicable.

The output TAG s value is sanitized and length-limited for NMEA TAG use. Routing does not use the emitted TAG s; it uses the internal source_id described in Routing Model.

TAG c

When c_preserve_ingress_c is true and ingress TAG c contains valid numeric data, AISMixer preserves that timestamp in output.

When that option is false, or when ingress TAG c is missing or invalid, output uses server time.

TAG g

TAG g is ingress and output group metadata. It is not the multipart assembler key.

For multipart output, AISMixer emits part-total-group metadata. A valid numeric ingress group ID may be preserved when g_preserve_ingress_gid is true. Otherwise, AISMixer generates a numeric group ID.

g_id_digits controls the length of generated group IDs. g_always_tag_single controls whether single-sentence output also receives 1-1-<gid> group metadata.

Policy Boundary

There is no implemented per-output preserve/normalize/overwrite TAG policy. The implemented behavior is controlled by the current s, c, and g options documented in Configuration Reference.

See also Data Plane, Multipart NMEA Assembly, and Security Model.

Clone this wiki locally