Milsymbol Mapping: Difference between revisions

From Maria GDK Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 29: Line 29:
</source>
</source>


For compatible mapping between the draw object modulen in MARIA GDK 4 and MARIA GDK 5 the following API can be used:
For compatible mapping between the draw object modul in MARIA GDK 4 and MARIA GDK 5 the following API can be used:


<source>
<source>
Line 37: Line 37:


// Get GDK 5 compliant sidc from MIL-STD2525C hierarchy code.
// Get GDK 5 compliant sidc from MIL-STD2525C hierarchy code.
var id_d = GetGDK5CompliantSIDC("TACGRP.CSS.PNT.SPT.GNL);
var id_d = GetGDK5CompliantSIDC("TACGRP.CSS.PNT.SPT.GNL);


</source>
</source>

Revision as of 10:38, 21 October 2025

Milsymbol Mapping

The "MilSymMapper" class provides methods for mapping draw object SIDC and TypeId between the milsymbol versions: APP6D, MIL-STD-2525D, and MIL-STD-2525C.

Examples of Usage

var resources= new DrawObjectCommonResources(...);

// Get APP6D sidc from 15 character MIL-STD-2525C sidc
var id_d = resources.MilSymMapper.MapAPP6CToAPP6D("SUGPUSTA--A----");

// Get APP6D sidc from APP6C hierarchy code.
var id_d = MapAPP6CHierarchyCodeToAPP6D("TACGRP.CSS.PNT.SPT.GNL");

// Get 15 character MIL-STD-2525C sidc from APP6D sidc 
var id_c = resources.MilSymMapper.MapAPP6DToAPP6C("100301000011010400000000000000");

// Get APP6C hierarchy code from APP6D sid.
var id_c = MapAPP6DToAPP6CHierarchyCode("100025000032050000000000000000");

The MilSymMapper can also be created without using the DrawObjectCommonResources:

var milsymMapper = new MilSymMapper();

For compatible mapping between the draw object modul in MARIA GDK 4 and MARIA GDK 5 the following API can be used:

// Get GDK 4 compliant hierarchy code from APP6D sidc.
var id_c = GetGDK4CompliantSIDC("100025000032050000000000000000");

// Get GDK 5 compliant sidc from MIL-STD2525C hierarchy code.
var id_d = GetGDK5CompliantSIDC("TACGRP.CSS.PNT.SPT.GNL);

Handling Mismatches Between APP6D and MIL-STD2525C

There are two files handeling mapping between APP6C and APP6D.....

Some objects cannot be mapped directly between APP6D and MIL-STD2525C. Either because the primitive representation of the objects are not compatible or because the objects are not present in both versions. To handle this, the configuration file MilSymVersionMappings.json (located in the Data folder of the application output), sets up how these objects (SIDCs) should be mapped.

The file is divided into two sections:

  • HierarchyCodeMappings, for mapping a 20 digit APP6D SIDC to a MARIA GDK 4 draw object (MIL-STD2525C) hierarchy code, and vice versa
  • SymbolCodeMappings, for mapping a 20 digit APP6D SIDC to a 15 character MIL-STD2525C SIDC, and vice versa

Entries in each section of the configuration file looks like this: