Class IMUSession


  • public class IMUSession
    extends java.lang.Object
    An IMUSession class that is used to retrieve sensor information
    • Field Detail

      • LOG_TAG

        private static final java.lang.String LOG_TAG
      • mSensors

        private java.util.HashMap<java.lang.String,​Sensor> mSensors
      • mSensorManager

        private SensorManager mSensorManager
      • mInitialStepCount

        private float mInitialStepCount
      • mIsRecording

        public java.util.concurrent.atomic.AtomicBoolean mIsRecording
      • mIsWritingFile

        private java.util.concurrent.atomic.AtomicBoolean mIsWritingFile
      • mSensorCounter

        public java.util.HashMap<java.lang.String,​java.lang.Integer> mSensorCounter
      • mAcceBias

        private float[] mAcceBias
      • ids

        public java.lang.String[] ids
      • shortNames

        public java.util.HashMap<java.lang.String,​java.lang.String> shortNames
      • fullNames

        public java.util.HashMap<java.lang.String,​java.lang.String> fullNames
    • Constructor Detail

      • IMUSession

        public IMUSession​(VideoCaptureActivity context)
        Each sensor has a specific file writer under file streamer instance. When the sensor updates, the file writer will write the records in to specific file.
        Parameters:
        context - Activity Context
    • Method Detail

      • registerSensors

        public void registerSensors()
      • unregisterSensors

        public void unregisterSensors()
      • isRecording

        public boolean isRecording()
      • startSession

        public void startSession​(java.lang.String streamFolder,
                                 java.lang.String scanFolderName)
      • stopSession

        public void stopSession()
      • resetSession

        public void resetSession()
      • onSensorChanged

        public void onSensorChanged​(SensorEvent event)
      • onAccuracyChanged

        public void onAccuracyChanged​(Sensor sensor,
                                      int accuracy)