es.ucm.look.locationProvider
Class DeviceSensor

java.lang.Object
  extended by es.ucm.look.locationProvider.DeviceSensor

public class DeviceSensor
extends java.lang.Object

Process sensors information and decides whether the device is moving or not.


Field Summary
static float[] devA
           
static float[] devM
           
static float[] devO
           
static boolean flagMoving
           
static float[] geomagnetic
           
static float[] gravity
           
static java.lang.Object lockMoving
           
static java.lang.Object lockSensing
           
static float[] mI
           
static float[] mR
           
static float[] refA
           
static float[] refO
           
static float wsAggregate
           
static int wsPosition
           
static float[] wsSequence
           
 
Constructor Summary
DeviceSensor()
           
 
Method Summary
static void disableMoving()
           
static void enableMoving()
           
static float getHeading()
          Return the angle between the device direction and the north direction in the Earth's coordination system
static float[] getRefAcceleration()
          Synchronized get function to get the reference acceleration in the Earth's coordination system
static boolean isMoving()
           
static void setDevA(float[] raw)
          Set the accelerometer sample values and calibrate the data if required * @param raw The raw output from accelerometer
static void setDevM(float[] raw)
          Set the magnetic sample values and calibrate the data if required
static void setDevO(float[] raw)
           
static boolean toEarthCS()
          Convert the sensor data from the device's coordination system to the world's coordination system including motion and orientation
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

devA

public static float[] devA

devM

public static float[] devM

devO

public static float[] devO

flagMoving

public static boolean flagMoving

geomagnetic

public static float[] geomagnetic

gravity

public static float[] gravity

lockMoving

public static java.lang.Object lockMoving

lockSensing

public static java.lang.Object lockSensing

mI

public static float[] mI

mR

public static float[] mR

refA

public static float[] refA

refO

public static float[] refO

wsAggregate

public static float wsAggregate

wsPosition

public static int wsPosition

wsSequence

public static float[] wsSequence
Constructor Detail

DeviceSensor

public DeviceSensor()
Method Detail

disableMoving

public static void disableMoving()

enableMoving

public static void enableMoving()

getHeading

public static float getHeading()
Return the angle between the device direction and the north direction in the Earth's coordination system

Returns:
the heading angle in degrees

getRefAcceleration

public static float[] getRefAcceleration()
Synchronized get function to get the reference acceleration in the Earth's coordination system

Returns:
the vector containing the acceleration in (x, y, z)

isMoving

public static boolean isMoving()

setDevA

public static void setDevA(float[] raw)
Set the accelerometer sample values and calibrate the data if required * @param raw The raw output from accelerometer


setDevM

public static void setDevM(float[] raw)
Set the magnetic sample values and calibrate the data if required

Parameters:
raw - The raw magnetic output from sensor

setDevO

public static void setDevO(float[] raw)

toEarthCS

public static boolean toEarthCS()
Convert the sensor data from the device's coordination system to the world's coordination system including motion and orientation

Returns:
true if convertible