@orbat-mapper/msdllib v0.14.0
MSDLlib
Experimental
A JavaScript library for parsing Military Scenario Definition Language (MSDL) data. Currently, MSDLlib only supports the most commonly used MSDL data structures.
The Military Scenario Definition Language is an XML-based language designed to support military scenario development. MSDL, also known as SISO-STD-007-2008, is a standard developed by the Simulation Interoperability Standards Organization (SISO). For more information about MSDL please visit the SISO standards page and SISO Product data files page.
Please note that MSDL will be superseded by C2SIM-Initialize. You can read more about this on the C2SIM project page.
See msdl-editor for an example project that uses MSDLlib.
Copyright notice
The MSDL schema SISO-STD-007-2008 is copyright © 2015 by the Simulation Interoperability Standards Organization, Inc.
Usage
To use MSDLlib in your project, follow these steps:
Install the library using npm:
npm install @orbat-mapper/msdllib
Import and use the library in your TypeScript or JavaScript code:
// Example usage import { MilitaryScenario } from "@orbat-mapper/msdllib"; async function loadMsdlFile(url: string) { try { const response = await fetch(url); const msdlAsText = await response.text(); const msdlScenario = MilitaryScenario.createFromString(msdlString); return msdlScenario; } catch (error) { console.error("Failed to load MSDL file", error); } } const msdl = loadMsdlFile("https://example.com/msdl-file.xml"); console.log(msdl.forceSides[0].toGeoJson());
Development
MSDLlib is developed in TypeScript. To contribute or modify the library, follow these steps:
Clone the repository:
git clone https://github.com/orbat-mapper/msdllib.git cd msdllib
Install dependencies:
npm install
Build the project:
npm run build
Run tests:
npm run test
License
This project is licensed under the MIT License. See the LICENSE file for details.