@gov.nasa.jpl.honeycomb/rksml-loader
v0.0.6
Published
Loader and parser for the RKSML telemetry format.
Readme
rksml-loader
Loader and parser for RKSML files using regex for fast parsing rather than the built in XML parser.
!> Note that only the first drive in the file is returned.
Use
import { RKSMLLoader } from '@gov.nasa.jpl.honeycomb/rksml-loader';
const loader = new RKSMLLoader();
loader
.load('.../path/to/file.rksml')
.then(result => {
// ... parsed rksml ...
});API
RKSMLResult
name
name : StringThe name of the RKSML file as specified by the <Name> tag.
mission
mission : StringThe name of the mission in the RKSML file.
timeFormat
timeFormat : 'ET' | 'SCLK'The format of the times reported in the frames. Either "ET" or "SCLK"
frames
frames : ArrayAn array of objects describing the state of the RKSML knots at a given time:
{
time: 0,
state: {
ROVER_X: 0.0,
ROVER_Y: 0.0,
ROVER_Z: 0.0,
// ...
}
}RksmlLoader
Class for loading and parsing RKSML
backfill
backfill : Boolean = falseIf true a new frame is created at the beginning of the list of frames containing the initial state for all knot fields in the RKSML.
fetchOptions
fetchOptions : Object = { credentials: 'same-origin' }Fetch options for loading the file.
load
load( url : String ) : Promise<RKSMLResult>Loads and parses the RKSML file. The promise resolves with the returned data from the parse function.
parse
parse( str : String ) : RKSMLResultParses the contents of the given RKSML and returns an object describing the telemetry.
