Milsymbol Mapping: Difference between revisions

From Maria GDK Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Milsymbol Mapping ==
== 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.
The "MilSymMapper" class provides methods for mapping draw object SIDC between the milsymbol versions: APP6D and APP6C.
The result contains the result and status of the result. If the mapping is ambiguous, additional results are contained in the result (result.AdditionalResults).


=== Examples of Usage ===
=== Examples of Usage ===
Line 8: Line 9:


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


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


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


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


</source>
</source>
Line 29: Line 34:
</source>
</source>


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


<source>
<source>
Line 41: Line 46:
</source>
</source>


=== How to Change Mapping Between APP6D and MIL-STD2525C ===
=== How to Update Mapping Between APP6D and APP6C ===


There are two files handeling mapping between APP6C and APP6D:
There are two files handeling mapping between APP6C and APP6D:
Line 48: Line 53:
* D2CMapping.csv, handels mapping from APP6D to APP6C
* D2CMapping.csv, handels mapping from APP6D to APP6C


Each file containes one line per mapping and is a comma separated list of values. The first line in each file contains a desrciptive name of each "column".
Each file contains one line per mapping and is a comma separated list of values. The first line in each file contains a descriptive name of each "column".


==== The File C2DMapping.csv ====
==== The File C2DMapping.csv ====
Line 58: Line 63:
==== The File D2CMapping.csv ====
==== The File D2CMapping.csv ====
<syntaxhighlight lang="csharp">
<syntaxhighlight lang="csharp">
D_Sidc,C_SymbolCode,C_HierarchyCode
D_Sidc,C_SymbolCode,C_HierarchyCode,Status
100001000011000000000000000000,S*A*M-----*****,WAR.AIRTRK.MIL
100001000011000000000000000000,S*A*M-----*****,WAR.AIRTRK.MIL,
</syntaxhighlight>
</syntaxhighlight>
[[Category:GDK5]]
[[Category:GDK5]]

Latest revision as of 19:40, 15 November 2025

Milsymbol Mapping

The "MilSymMapper" class provides methods for mapping draw object SIDC between the milsymbol versions: APP6D and APP6C. The result contains the result and status of the result. If the mapping is ambiguous, additional results are contained in the result (result.AdditionalResults).

Examples of Usage

var resources= new DrawObjectCommonResources(...);

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

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

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

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

The MilSymMapper can also be created without using the DrawObjectCommonResources:

var milsymMapper = new MilSymMapper();

For compatible mapping between draw objects 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);

How to Update Mapping Between APP6D and APP6C

There are two files handeling mapping between APP6C and APP6D:

  • C2DMapping.csv, handels mapping from APP6C to APP6D
  • D2CMapping.csv, handels mapping from APP6D to APP6C

Each file contains one line per mapping and is a comma separated list of values. The first line in each file contains a descriptive name of each "column".

The File C2DMapping.csv

C_SymbolCode,D_Sidc,C_HierarchyCode,Status
S*A*M-----*****,100001000011000000000000000000,WAR.AIRTRK.MIL,

The File D2CMapping.csv

D_Sidc,C_SymbolCode,C_HierarchyCode,Status
100001000011000000000000000000,S*A*M-----*****,WAR.AIRTRK.MIL,