Getting started

MisbCore SDK makes extensive use of the JSON concept (and syntax) for dealing with the nesting MISB standards hierarchy. JSON key represents a MISB Tag of a Local Set, whereas the value contains MISB decoded data.

Easy to Use...

The code for creating MISB compatible metadata using the SDK is very simple - just create (using your preferred method) a JSON object or string representing your metadata packet and call EncodePacket method.
If you should decode a KLV encoded data, for example, STANAG4609, just provide the data buffer to the DecodePacket method of the SDK and you will get back a JSON formatted object with MISB601 entries at the root level and nested sub-standards as child elements.

Make sure you've added the dependency references (either directly from the setup or as a nuget package).

For example, let's create a very simple MISB 601 Local set packet (sample data from MISB ST 0601.16a).

string json = @"{
    2: '2008-10-24T00:13:29.913',
    3: 'MISSION01',
    13: 60.176822966978335,
    14: 128.42675904204452,
    15: 14190.7195,
    16: 144.571298,
    65: 13
}";

Next, we will create an instance of MISB601 and pass the string to the EncodePacket* method.

var misb601 = new MISB601();
var buf = misb601.EncodePacket(json);

The resulting buffer is a RAW Klv that comprises all the mandatory parts of the packet:
Encoded buffer

  • The UAS Local Set 16-Byte UL “Key”-0x06 0x0E 0x2B 0x34 0x02 0x0B 0x01 0x01 0x0E 0x01 0x03 0x01 0x01 0x00 0x00 0x00
  • Packet length - 0x30
  • Packet data payload - Klv triplets: tag, length and value
  • Checksum (last klv triplet, last 4 bytes)

This buffer can be injected into STANAG4609 multiplex:

If we would need to decode the data:

var misb601 = new MISB601();
var json = misb601.DecodePacket(buf);

Here is the result:

{
  "2": "2008-10-24T00:13:29.913Z",
  "3": "MISSION01",
  "13": 60.176822967,
  "14": 128.426759042,
  "15": 14190.72,
  "16": 144.5713,
  "65": 13,
  "1": 53482
}

We can work not only with json strings, but for example with JObject (Json.NET library), which performs all the data manipulation, or create the packet manually, adding key:value pairs...

Here is more on this:

Nested data

To allow re-use of metadata items in the UAS Datalink LS, other Local Sets may nest within the UAS Datalink LS.
MisbCore SDK treats the nested data as JSON child items and data arrays as JSON arrays:
For example, the mandatory Security Metadata set can be easily presented as a JSON object with 48 Key:

string json = @"{
    2: '2008-10-24T00:13:29.913',
    3: 'MISSION01',
    48: {
        1: 'UNCLASSIFIED//',
        2: 'ISO_3166_ThreeLetter',
        3: '//IL',
        4: 'Impleo test flight',
        22: 9  
    },
    65: 13
}";

Or

string json = @"{
    2: '2008-10-24T00:13:29.913',
    3: 'MISSION01',
    48: {
        1: 1,
        2: 2,
        3: '//IL',
        4: 'Impleo test flight',
        22: 9  
   },
    65: 13
}";

Multiple items

Though most items within UAS Datalink LS shall be included only once, there are some exceptions.
Tags 100, 101, 102, 115 noted as Multiples Allowed. As json cannot have multiple keys (tags), which are the same, MisbCore SDK uses json arrays to address this.
For example:

string json = @"{
    2: '2008-10-24T00:13:29.913',
    3: 'MISSION01',
    100: [
            {
                13: 60.176822966978335,
                14: 128.42675904204452,
                15: 14190.7195,
            },
            {
                13: 60.176828966,
                14: 128.42678904,
                15: 14192.3,
            }
    ],
    65: 13
}";

Note. If only one instance is present in the Local Set, it can be presented as a JSON object and not an object in the array.

Complex types

While most of the data can be represented by numbers (byte, integer, float), strings or arrays of numbers / strings , some tags require a bit more complex structures.
Here are the exceptions:

  • Tag 94. MIIS Core Identifier
 "94": {
    "Version": 1,
    "SensorID": {
      "Quality": "Physical",
      "UUID": "F592-F023-7336-4AF8-AA91-62C0-0F2E-B2DA"
    },
    "PlatformID": {
      "Quality": "Virtual",
      "UUID": "16B7-4341-0008-41A0-BE36-5B5A-B96A-3645"
    }
  }
  • Tag 115. Control Command
   "115": [ 5, "Fly to Waypoint 1", "2008-10-24T00:13:29.913" ]  

Note. The last element (Time) is optional.

Tag 115 may also contain an array of commands:

  "115": [
   [ 5, "Fly to Waypoint 1", "2022-04-24T00:13:29.913" ],  
   [ 6, "Fly to Waypoint 2" ],  
  ]

Tag 122 Country Codes

  "122": {
    "CodingMethod": 14,
    "OverflightCountry": "CAN",
    "OperatorCountry": "",
    "CountryOfManufacture": "FRA"
  }
  • Tag 128. Wavelengths List
  "128": [
    [ 21, 1000, 2000, "NNIR" ]
  ],
  • Tag 130. Airbase Locations
  "130": {
    "TakeOff": [ 38.841859, -77.036784, 3 ],
    "Recovery": [ 38.939353, -77.459811, 95 ]
  }
  • Tag 138. Payload List
 "138": {
    "PayloadCount": 3,
    "PayloadRecords": [
      [ 0, 0, "VIS Nose Camera" ],
      [ 1, 0, "ACME VIS Model 123" ],
      [ 2, 0, "ACME IR Model 456" ]
    ]
  }
  • Tag 139. Active Payloads
  "139": 11 

Or array of bytes (Use additional bytes when the Payload List (Item 138) has more than eight payloads. )

  "139": [ 2, 11 ]

Getting help

To get help with MisbCore SDK, please contact us at support@impleotv.com.