com.metaio.sdk.jni
Class ISensorsComponent

java.lang.Object
  extended by com.metaio.sdk.jni.ISensorsComponent
Direct Known Subclasses:
SensorsComponentAndroid

public class ISensorsComponent
extends Object

Interface for sensors like location, gravity and compass sensors. The return values from the getter function must be consistent with the coordinate system used in the metaio SDK. See explicit getter function for more information.


Field Summary
static int SENSOR_ALL
           
static int SENSOR_ATTITUDE
           
static int SENSOR_DEVICE_MOVEMENT
           
static int SENSOR_GRAVITY
           
static int SENSOR_HEADING
           
static int SENSOR_LOCATION
           
static int SENSOR_NONE
           
static int SENSOR_USER_ACCELERATION
           
 
Constructor Summary
ISensorsComponent()
           
ISensorsComponent(long cPtr, boolean cMemoryOwn)
           
 
Method Summary
 void delete()
           
static long getCPtr(ISensorsComponent obj)
           
 Vector3d getGravity()
          The metaio camera-COS is defined as follows: if the device is hold in landscape mode with button to the right and the touch screen facing you, then the positive X-axis points right, the positive Y-axis points up and the positive Z-axis points to you | ________________________________ | | | | | | | ^ Y | | | | | | | | | | | | | | -|--> X | O | | | \\ | | | | \\ | | | | v Z | | | |________________________________| | |________________________________________|This means: If device is hold: => then the gravity vector is: landscape button right => 0 -1 0 landscape button left => 0 +1 0 portrait button down => +1 0 0 portrait button up => -1 0 0 lying horizontal with screen facing up => 0 0 -1 lying horizontal with screen facing down=> 0 0 +1Vector containing the last reading
 float getHeading()
          Heading in degrees
 LLACoordinate getLocation()
          location as LLA coordinates
 SensorValues getSensorValues()
          The sensor values are returned in the metaio camera coordinate system used by metaio SDK.
 void resetManualLocation()
          See: setManualLocation
 void setManualLocation(LLACoordinate location)
           
 int start(int sensors)
           
 int stop()
           
 int stop(int sensors)
           
 void swigReleaseOwnership()
           
 void swigTakeOwnership()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SENSOR_NONE

public static final int SENSOR_NONE

SENSOR_LOCATION

public static final int SENSOR_LOCATION

SENSOR_GRAVITY

public static final int SENSOR_GRAVITY

SENSOR_HEADING

public static final int SENSOR_HEADING

SENSOR_ATTITUDE

public static final int SENSOR_ATTITUDE

SENSOR_USER_ACCELERATION

public static final int SENSOR_USER_ACCELERATION

SENSOR_DEVICE_MOVEMENT

public static final int SENSOR_DEVICE_MOVEMENT

SENSOR_ALL

public static final int SENSOR_ALL
Constructor Detail

ISensorsComponent

public ISensorsComponent(long cPtr,
                         boolean cMemoryOwn)

ISensorsComponent

public ISensorsComponent()
Method Detail

getCPtr

public static long getCPtr(ISensorsComponent obj)

delete

public void delete()

swigReleaseOwnership

public void swigReleaseOwnership()

swigTakeOwnership

public void swigTakeOwnership()

start

public int start(int sensors)
Parameters:
sensors - Sensors to start (see ESENSOR) sensors that are actually started See: ESENSOR, stop

stop

public int stop(int sensors)
Parameters:
sensors - Sensors to stop (default is all sensors, i.e. SENSOR_ALL) sensors that are actually stopped See: start

stop

public int stop()
Parameters:
sensors - Sensors to stop (default is all sensors, i.e. SENSOR_ALL) sensors that are actually stopped See: start

setManualLocation

public void setManualLocation(LLACoordinate location)
Parameters:
location - Manual location See: resetManualLocation

resetManualLocation

public void resetManualLocation()
See: setManualLocation


getLocation

public LLACoordinate getLocation()
location as LLA coordinates


getGravity

public Vector3d getGravity()
The metaio camera-COS is defined as follows: if the device is hold in landscape mode with button to the right and the touch screen facing you, then the positive X-axis points right, the positive Y-axis points up and the positive Z-axis points to you | ________________________________ | | | | | | | ^ Y | | | | | | | | | | | | | | -|--> X | O | | | \\ | | | | \\ | | | | v Z | | | |________________________________| | |________________________________________|This means: If device is hold: => then the gravity vector is: landscape button right => 0 -1 0 landscape button left => 0 +1 0 portrait button down => +1 0 0 portrait button up => -1 0 0 lying horizontal with screen facing up => 0 0 -1 lying horizontal with screen facing down=> 0 0 +1Vector containing the last reading


getHeading

public float getHeading()
Heading in degrees


getSensorValues

public SensorValues getSensorValues()
The sensor values are returned in the metaio camera coordinate system used by metaio SDK. The metaio camera-COS is defined as follows: if the device is hold in landscape mode with button to the right and the touch screen facing you, then the positive X-axis points right, the positive Y-axis points up and the positive Z-axis points to you | ________________________________ | | | | | | | ^ Y | | | | | | | | | | | | | | -|--> X | O | | | \\ | | | | \\ | | | | v Z | | | |________________________________| | |________________________________________|This means: If device is hold: => then the gravity vector is: landscape button right => 0 -1 0 landscape button left => 0 +1 0 portrait button down => +1 0 0 portrait button up => -1 0 0 lying horizontal with screen facing up => 0 0 -1 lying horizontal with screen facing down=> 0 0 +1The values may be invalid if the required sensors are not running or startedsensor values