entity-state-to-records
entity-state-to-records converts decoded OpenDIS Entity State Protocol Data Units (PDUs) into entity-state records. The same downstream nodes then work for DIS traffic and for HEAT capture data.
Entity-state records are the JSON records array that hydrate-protobuf-v2 emits with extractionTarget: EntityState. This node produces that shape from the pdu list that opendis-decode emits. Each EntityStatePdu becomes one record with a world_position component and, when velocity is present, a velocity component. Earth-centred coordinates are converted to latitude, longitude and altitude on the WGS84 ellipsoid.
It is not a decoder. PDUs must already be JSON objects with a __class__ field.
When to use
Use this node when the data source is DIS and the dashboard uses entity-state-to-mapdisplay, entity-state-to-flightpath or entity-state-to-chart-data.
Pipeline position
opendis-decode -> entity-state-to-records -> entity-state-to-mapdisplay
-> entity-state-to-flightpath
-> entity-state-to-chart-dataThe node reads the latest output of one parent and uses the first payload only.
Configuration
Configuration is required, but every key is optional.
| Key | Type | Required | Default | Description |
|---|---|---|---|---|
timestampSource | string | No | packet_timestamp_unix_ms | Field in each PDU entry that holds the time stamp. |
baseCapturedAt | string | No | none | ISO 8601 base time stamp. When set, simulation_time_seconds is (timestamp - base) / 1000. |
entityLocationField | string | No | entityLocation | Field in the PDU holding the location vector (x, y, z). |
entityVelocityField | string | No | entityLinearVelocity | Field in the PDU holding the velocity vector (x, y, z). |
entityMarkingField | string | No | marking | Field in the PDU holding the marking object. |
entityIdField | string | No | entityID | Field in the PDU holding the entity id (site, application, entity). |
entityNames | array of string | No | none | Names to keep. Empty means keep every entity. |
entityNameField | string | No | entity_marking | Unused today. The entity name is always derived from the marking. |
Output
A JSON object with a records array.
{
"records": [
{
"entity_state": {
"entity": [
{
"name": "ENTITY01",
"id": "S121A110E7009",
"components": [
{ "world_position": { "latitude": 42.45, "longitude": 11.80, "altitude": 4692.0 } }
]
}
]
},
"packet_timestamp_unix_ms": 1780568643000,
"simulation_time_seconds": 123.456
}
]
}- The entity name comes from the marking, trying
characterString, thencharacter_string, then thecharactersinteger array. When none is present the name falls back to the id stringS<site>A<application>E<entity>. - Both
site,application,entityandsiteID,applicationID,entityIDkey styles are accepted in the entity id. simulation_time_secondsis present only whenbaseCapturedAtis set and valid.
Limitations
- Only PDUs whose
__class__isEntityStatePduare converted. Other PDU types are skipped. - One parent, first payload of the latest output only, even though the manifest marks the template as accepting multiple inputs.
- The node fails when no valid
EntityStatePduis found.
Related
- opendis-decode produces the
pdulist. - entity-state-to-mapdisplay plots the records on a map.
- entity-state-to-flightpath builds a 3D flight path from the records.