code: @Override
  	public <U extends SensorEvent> HorizontalMotionEvent getMotionEvent(final U sensorEvent) 
  	throws MotionDetectorException {
  
  		try {
  			
  			Sensor sensor = sensorEvent.sensor;
  	
  			if (sensor.getType() != Sensor.TYPE_ACCELEROMETER) { 
  	
  				return null;
  			}
  	
  			final float[] input = sensorEvent.values;
  			final float[] output = new float[input.length];
  	
  			try {
  	
  				smoothingFilter.filter(input, output, null);
  			} 
  			catch (SmoothingFilterException sfe) {
  	
  				Log.w(getClass().getName(), 
  					  "Failed to execute " + smoothingFilter.getClass().getName() + " on " + input);
  			}
  	
  			float max = sensorEvent.sensor.getMaximumRange();
  			float mid = max / 2.0f;
  	
  			float midRangeHigh = mid + 1.0f;
  			float midRangeLow = mid - 1.0f;
  	
  			HORIZONTAL_DIRECTION direction = processHorizontalDirection(output, midRangeHigh, midRangeLow);
  			
  			return new HorizontalMotionEvent(sensorEvent, direction, output);
  		}
  		catch (Exception e) {
  	
  			throw new MotionDetectorException(getClass(), sensorEvent, e);
  		}
  	}
docs: {@inheritDoc}
  
  <p>The current implementation handles only {@link Sensor}s of type
  {@link Sensor#TYPE_ACCELEROMETER}.</p>
  
  <p>Future implementations may support {@link Sensor#TYPE_GYROSCOPE}.</p>