	public SensorData toSensorData(String jsonString)
	{
		JSONObject jsonData = super.parseData(jsonString);
		if (jsonData != null)
		{
			long senseStartTimestamp = super.parseTimeStamp(jsonData);
			SensorConfig sensorConfig = super.getGenericConfig(jsonData);
			try
			{
				JSONArray xs = (JSONArray) jsonData.get(X_AXIS);
				JSONArray ys = (JSONArray) jsonData.get(Y_AXIS);
				JSONArray zs = (JSONArray) jsonData.get(Z_AXIS);
				ArrayList<float[]> sensorReadings = new ArrayList<float[]>();
				for (int i=0; i<xs.size(); i++)
				{
					float[] sample = new float[3];
					sample[0] = (Float) xs.get(i);
					sample[1] = (Float) ys.get(i);
					sample[2] = (Float) zs.get(i);
					sensorReadings.add(sample);
				}
				JSONArray ts = (JSONArray) jsonData.get(READING_TIMESTAMPS);
				ArrayList<Long> sensorReadingTimestamps = new ArrayList<Long>();
				for (int i=0; i<ts.size(); i++)
				{
					sensorReadingTimestamps.add((Long) ts.get(i));
				}
				return new AccelerometerData(senseStartTimestamp, sensorReadings, sensorReadingTimestamps, sensorConfig);
			}
			catch (NullPointerException e)
			{
				e.printStackTrace();
				return null;
			}
		}
		else
			return null;
	}

	public SensorData toSensorData(String jsonString)
	{
		JSONObject jsonData = super.parseData(jsonString);
		if (jsonData != null)
		{
			long senseStartTimestamp = super.parseTimeStamp(jsonData);
			SensorConfig sensorConfig = super.getGenericConfig(jsonData);
			try
			{
				JSONArray xs = (JSONArray) jsonData.get(X_AXIS);
				JSONArray ys = (JSONArray) jsonData.get(Y_AXIS);
				JSONArray zs = (JSONArray) jsonData.get(Z_AXIS);
				ArrayList<float[]> sensorReadings = new ArrayList<float[]>();
				for (int i=0; i<xs.size(); i++)
				{
					float[] sample = new float[3];
					sample[0] = ((Double)xs.get(i)).floatValue();
					sample[1] = ((Double)ys.get(i)).floatValue();
					sample[2] = ((Double)zs.get(i)).floatValue();
					sensorReadings.add(sample);
				}
				JSONArray ts = (JSONArray) jsonData.get(READING_TIMESTAMPS);
				ArrayList<Long> sensorReadingTimestamps = new ArrayList<Long>();
				for (int i=0; i<ts.size(); i++)
				{
					sensorReadingTimestamps.add((Long) ts.get(i));
				}
				return new AccelerometerData(senseStartTimestamp, sensorReadings, sensorReadingTimestamps, sensorConfig);
			}
			catch (NullPointerException e)
			{
				e.printStackTrace();
				return null;
			}
		}
		else
			return null;
	}
