diff --git a/docs/documentation/android/code_documentation/MotionProcessor.md b/docs/documentation/android/code_documentation/MotionProcessor.md index 7f3f782..18e9d88 100644 --- a/docs/documentation/android/code_documentation/MotionProcessor.md +++ b/docs/documentation/android/code_documentation/MotionProcessor.md @@ -16,9 +16,16 @@ public void stopListening() { ... } Parses an incoming WebSocket message packet and processes the data. The data that is accepted is a string that can be of the following formats: -- "data `Ax`;`Ay`;`Az`;`Rx`;`Ry`;`Rz`" -- "sampleRate `x`" -- "calibrate `x`;`y`;`z`" +```java +// Sending data +"data accelerationX;accelerationY;accelerationZ;rotationX;rotationY;rotationZ" // all values are floats + +// Changing the sample rate +"sampleRate rate" // rate is an integer + +// Calibrating the zero point +"zero x;y;z" // x, y, z are floats +``` ```java public void parsePacket(@NotNull String message) { ... } ``` @@ -29,6 +36,11 @@ motionDataEventHandler with the calculated vector. public void addMotionData(MotionData data) { ... } ``` +Sets the gesture path to the provided path. +```java +public void setGesturePath(GesturePath gesturePath) { ... } +``` + Updates the relative path to the provided path. ```java public void setRelativePath(List relativePath) { ... } @@ -51,15 +63,24 @@ This compares the relative path (calibrated) to the provided path segments, and returns the offsets. ```java public List getErrors(GesturePath referencePath) { ... } +public List getErrors() { ... } // Using pre-set path ``` -Get the error offset of the provided vector to the provided path. +Get the error offset of the provided vector to the provided path, or with the +set path. This compares a given vector to the provided GesturePath object. ```java -public double getError(GesturePath path, Vector3 referencePoint) { ... } +public double getError(GesturePath path, Vector3 referencePoint) { ... } +public double getError(Vector3 referencePoint) { ... } // Using pre-set path ``` Get the average error offset of the relative path and the provided GesturePath object. ```java public double getAverageError(GesturePath referencePath) { ... } -``` \ No newline at end of file +public double getAverageError() { ... } // Using pre-set path +``` + +Logs statistics to the console +```java +public void logStatistics(GesturePath referencePath) { ... } +```