Introduction
MISB 0601 Standard details the Unmanned Air System (UAS) Datalink Local Data Set(LDS) for UAS platforms. It also provides a mapping between UAS Datalink Local Data Set items, ESD items, and Universal Data Set (UDS) items defined in the SMPTE KLV dictionary (RP-210) as well as in the MISB-managed Department of Defense (DoD) keyspace. The latest revision of the specification (0601.5, released 6 October 2011) defines some 93 keys and their mapping to the corresponding UDS items.
EG0601ConvLib C++ helper library is a complete programming tool set which simplifies the tasks of encoding and decoding the metadata (usually carried in KLV format) according to the standard. Primarily intended for use by developers working on the UAV related appications, IEG0601Converter and IEG0102Converter provide the following functionality:
- Helper functions that deal with MISB 0601 related conversion formulas.
- Helper functions that convert LDS tags to UDS keys and vice versa.
- Helper functions that convert the suplied KLV (MISB 0601 compliant) values according to the key.
- Helper functions that convert the metadata values into MISB 0601 compliant values according to the key.
- MISB 102.9 (Security Metadata Set) encoding / decoding helper functions.
Getting started with EG0601ConvLib
EG0601ConvLib provides examples with source code to help you get started using the converter. Here is a brief example of using the EG0601ConvLib for some basic tasks.
- Add EG0601ConvLib.lib and make sure you have EG0601ConvLib.dll accessible by your code.
- Include "IEG0601Conv.h" file.
- Create converter instance.
- Create and initialize a VARIANT variable that will be filled with the converted value. Using VARIANT allows decoding of all keys with different types without any prior knowledge of the key/type relationship
VARIANT vt;
VariantInit(&vt);
- Call DecodeValue with the corresponding parameters. vt will be filled with the converted value. For example, LDS metadata (Longitude) caried in KLV format will have a a Key = 14 and a Value 4 bytes. To demonstrate the conversion, we created unsigned int (4 bytes) variable and filled it with some data 0x5B5360C4. As Bytes within the metadata are represented Most Significant Bit(msb) first (Big-Endian byte encoding), we swap the bytes, to simulate the metadata in the real STANAG4609 stream (0xC460535B).
unsigned int val_32 = 0x5B5360C4;
conv->
DecodeValue( 14, (
const char*) &val_32,
sizeof(
unsigned int), &vt );
The above code fills the vt variable with 128.42675904204452, and sets variant variable type to R8 - double. - Note
- There is no need to swap bytes if the data is already in Big-Endian byte encoding format.
- EncodeValue does the opposite. Here is an example of how to convert 128.42675904 degres into the byte array used above.
double d_val = 128.42675904;
- Convert LDS tag to UDS Key.
- Get auxiliary information on the LDS Tag.
cout << "LDS Tag : " << convItem->LDS_KeyStr << endl;
cout << "LDS Name : " << convItem->LDS_Name << endl;
cout << "UDS Key : " << convItem->UDS_KeyStr << endl;
cout << "UDS Name : " << convItem->UDS_Name << endl;
The above code will provide the following output:
- Get auxiliary information on the UDS Tag.
unsigned char udsArr[] = {0x06, 0x0E, 0x2B, 0x34, 0x01, 0x01, 0x01, 0x03, 0x07, 0x01, 0x02, 0x01, 0x02, 0x06, 0x02, 0x00 };
cout << "LDS Tag : " << convItem->LDS_KeyStr << endl;
cout << "LDS Name : " << convItem->LDS_Name << endl;
cout << "UDS Key : " << convItem->UDS_KeyStr << endl;
cout << "UDS Name : " << convItem->UDS_Name << endl;
The above code will provide the following output:
- Delete converter instance.
For more information please see some Sample Code
IEG0601Converter class
Please see IEG0601Converter for more details.
Security Metadata Set (MISB EG0102)
Library also provides MISB 102 (Security Metadata Set) encoding / decoding functionality.
Here is an example on how to encode and decode security metadata set structure.
pSecurityMetadataSetItem->
Caveats =
"Caveats";
pSecurityMetadataSetItem->
Version = 1205;
Next, create the helper converter instance
size_t length;
const char* p = conv01012->
EncodeMetadataSet(pSecurityMetadataSetItem, length,
false);
conv01012->
DecodeLDS( p, length, decodedItem );
Please see IEG0102Converter for more details.
Supported LDS / UDS Keys
Please see MISB 0601 supported keys for more info on supported Keys