@nasa-jpl/aerie-ampcs
v1.0.6
Published
Utility functions to convert a standard XML AMPCS command dictionary to JavaScript.
Downloads
243
Maintainers
Keywords
Readme
@nasa-jpl/aerie-ampcs
This package contains utility functions to convert a standard XML AMPCS command dictionary to JavaScript.
Install
npm install @nasa-jpl/aerie-ampcs --save
Usage
parse
Parse an XML string in the AMPCS command dictionary standard into JavaScript.
import { parse } from '@nasa-jpl/aerie-ampcs';
const xml = `
<?xml version='1.0' encoding='UTF-8'?>
<command_dictionary>
<header mission_name="GENERIC" spacecraft_id="42" schema_version="5.0" version="2022-001T00:00:00.000" />
<command_definitions>
</command_definitions>
</command_dictionary>
`;
const js = parse(xml);
console.log(js);
const json = JSON.stringify(js);
console.log(json);
License
The scripts and documentation in this project are released under the MIT License.