npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@gov.nasa.jpl.honeycomb/arksml-loader

v0.0.6

Published

Class for loading and parsing the ARKSML file format.

Readme

ARKSML Loader

Loader and parser for ARKSML files using the built in XML parser.

Use

Parsing Raw Annotations

import { ArksmlLoader } from '@gov.nasa.jpl.honeycomb/arksml-loader';

const loader = new ArksmlLoader();
loader.parsers = {
    'CustomAnnotation': node => {
        // ... parse node to object ...
    }
};
loader
    .load('.../path/to/file.arksml')
    .then(result => {

        // ... parsed arksml ...

    });

Parsing Annotations into Frame Data

import { ArksmlLoader } from '@gov.nasa.jpl.honeycomb/arksml-loader';

const loader = new ArksmlLoader();
loader.outputFrames = true;
loader.parsers = {
    'CustomAnnotation': node => {
        // ... parse node to object ...
    }
};
loader
    .load('.../path/to/file.arksml')
    .then(result => {

        // ... parsed arksml ...

    });

API

Functions

ParserFunction

ParserFunction( element : XMLElement ) : Object

parsePosition

parsePosition( node : XMLElement ) : { x : Number, y : Number, z : Number }

Parses a node with 2 or 3 numbers.

parseQuaternion

parseQuaternion( node : XMLElement ) : { x : Number, y : Number, z : Number, w : Number }

Parses a node with 4 numbers.

parseRMCSite

parseRMCSite( node : XMLElement ) : { rmcSite : Number }

Parses a node with <RMC_Site> and <RMC_Drive> children.

parseRectangle

parseRectangle(
	node : XMLElement
) : { position : Object, angle : Number, halfWidth : Number, halfHeight : Number }

Parses a node.

parseTriangle

parseTriangle( node : XMLElement ) : { points : Array<Object> }

Parses a node.

parseCircle

parseCircle( node : XMLElement ) : { position : Object, radius : Number }

Parses a node.

parseKeepZone

parseKeepZone(
	node : XMLElement
) : { shape : Object, shapeType : String, keepZoneType : 'in' | out }

Parses a node.

parseNavGoal

parseNavGoal( node : XMLElement ) : { position : Object, radius : Number }

Parse a node.

parseArmTarget

parseArmTarget( node : XMLElement ) : { position : Object, quaternion : Object, name : String }

Parse a node.

parseRoverState

parseRoverState( node : XMLElement ) : Object<String, Number>

Parse the entire rover state out of an XML node and return an object with key being the name and value being the html content For example, 0.000000 {'ARM_NAMED_TARGET_3_POSE_FULL_Z': 0.0}

parseImageAcquire

parseImageAcquire(
	node : XMLElement
) : { camera : String, position : Object, quaternion : Object, roverState : Object }

Parse an ImageAcquire block from an XML node

<ImageAcquire Camera="NAVR">
          <RMC_Site>1</RMC_Site>
          <RMC_Drive>0</RMC_Drive>
          <Position>0.000000 0.000000 0.000000</Position>
          <Quaternion>0.000000 -0.000000 0.000000 1.000000</Quaternion>
          <RoverState>...</RoverState>
</ImageAcquire>

AnnotationData

type

type : String

The name embedded in the ARKSML file.

ArksmlResult

name

name : String

The name embedded in the ARKSML file.

spans

spans : Array<{ startTime : Number, endtime : Number, annotations : Array<AnnotationData> }>

List of annotation spans within the file.

events

events : Array<{ time : Number, annotations : Array<AnnotationData> }>

List event annotation data.

ArksmlFramesResult

name

name : String

The name embedded in the ARKSML file.

frames

frames : Array<{ time : Number, state : { annotations : Array<AnnotationData> } }>

The array of annotations converted to frames. A new frame is inserted every time the list of relevant annotations change. This includes events.

events

events : Array<{ time : Number, annotations : Array<AnnotationData> }>

List event annotation data.

ArksmlLoader

Extendable class for loading and parsing ARKSML files.

parsers

parsers : Object

Dictionary of parsers. By default ArmTarget, Target, KeepZone, NavGoal, and ImageAcquire tags are parsed.

outputFrames

outputFrames : Boolean = false

Whether or not to return the data as a set of frames in an array of the form

[{
    time,
    state: {
        annotations: [...]
    }
}, ...]

eventDuration

eventDuration : Numbar = 5.0

What the minimum duration for events should be when converting to frames.

minimumDuration

minimumDuration : Numbar = 5.0

The minimum duration of any given annotation in the file. If an annotaiton is shorter than this then it is extended from its startTime to this time.

fetchOptions

fetchOptions : Object = { credentials: 'same-origin' }

Fetch options for loading the file.

constructor

constructor( parsers : Object<String, ParserFunction> = {} ) : void

Takes a dictionary of parser functions for parsing annotation tags. The parser functions are keyed based on the name of the annotation tag it should parse.

load

load( url : String ) : Promise<ArksmlResult | ArksmlFramesResult>

Loads and parses the ARKSML file. The promise resolves with the returned data from the parse function.

parse

parse( str : String ) : RKSMLResult

Parses the contents of the given ARKSML and returns an object describing the telemetry.

preprocessFrames

preprocessFrames(
	rawSpans : Array<{ startTime : Number, endtime : Number, annotations : Array<AnnotationData> }>, 
	rawEvents : Array<{ time : Number, annotations : Array<AnnotationData> }>, 
	name : String
) : void

Overrideable function called when we need to preprocess spans and events