Class: Component

Component

new Component()

Represents each component part of a manoeuvre. Each of these represent the translation to be done in terms of rolling, turning left or right, and going up or down. The length of each translation is also provided.
Source:

Methods

component(yaw, pitch, roll, length) → {Component}

Creates a new component to be added to array of components within each manoeuvre.
Parameters:
Name Type Description
yaw String Raw yaw value of component from JSON- turn left or right
pitch String Raw pitch value of component from JSON- go up or down
roll String Raw roll value of component from JSON- roll left or right
length String Raw length value of component from JSON- distance to travel
Source:
Returns:
component This object, which is used to translate manoevres
Type
Component

parseDirectionContext(dir) → {Integer}

Parses the JSON direction for each translation. Positive will reflect as adding 1, and negative as translation minus 1. Default is 0, which means to stay on the same tradectory as the previous.
Parameters:
Name Type Description
dir String Direction string coming from raw JSON file
Source:
Returns:
int Translation to matrix value
Type
Integer