Class EstimateOrientation

java.lang.Object
se.hendeby.sensordata.EstimateOrientation

public class EstimateOrientation extends Object
An orientation estimation implementation The implemented orientation estimation algorithm is a java version of the MARG orientation filter by Sebastian Madgwick, for details see: http://www.x-io.co.uk/open-source-imu-and-ahrs-algorithms/
  • Constructor Details

    • EstimateOrientation

      public EstimateOrientation(SensorDataReader server)
      Constructor
      Parameters:
      server - A SensorDataReader that will provide the measurements.
  • Method Details

    • start

      public void start() throws IOException
      Start up the server, the phone view, and start filtering.
      Throws:
      IOException - Throws an IOException on I/O errors.
    • status

      public boolean status()
      Status of the orientation estimation.
      Returns:
      True if the server is up and running.
    • getQuat

      public double[] getQuat()
      Extract the current orientation.
      Returns:
      The current orientation as a normalized quaternion.
    • stop

      public void stop() throws IOException
      Stop the orientation estimation.
      Throws:
      IOException - An IOException are thrown on I/O errors.
    • finalize

      protected void finalize() throws Throwable
      Destructor. Kill the orientation estimation on destruction.
      Overrides:
      finalize in class Object
      Throws:
      Throwable