/* * Copyright 2012 Phidgets Inc. All rights reserved. */ package com.phidgets; /** * This class represents an a set of spatial data. It's used in the SpatialData event. * * @author Phidget Inc. */ public final class SpatialEventData { private double[] acceleration; private double[] angularRate; private double[] magneticField; private int timeSeconds, timeMicroSeconds; /** * Creates a new SpatialEventData object. * @param acceleration the acceleration data * @param angularRate the gyro data * @param magneticField the compass data * @param timeSeconds the timestamp in seconds * @param timeMicroSeconds the time since the last second in microseconds */ public SpatialEventData(double[] acceleration, double[] angularRate, double[] magneticField, int timeSeconds, int timeMicroSeconds) { this.acceleration = new double[acceleration.length]; this.angularRate = new double[angularRate.length]; this.magneticField = new double[magneticField.length]; for(int i=0;i