Configuration of Virtual Sensors


1. Orientation Virtual Sensor


1.1 XML Code

<ORIENTATION>
 <NAME value="ORIENTATION_SENSOR" >
 <VENDOR value="SAMSUNG" >
 <RAW_DATA_UNIT value="DEGREES" >
 <DEFAULT_SAMPLING_TIME value="100" >
 <ACCEL_STATIC_BIAS value1="0" value2="0" value3="0" >
 <GYRO_STATIC_BIAS value1="0" value2="0" value3="0" >
 <GEOMAGNETIC_STATIC_BIAS value1="0" value2="0" value3="0" >
 <ACCEL_ROTATION_DIRECTION_COMPENSATION value1="-1" value2="-1" value3="-1" >
 <GYRO_ROTATION_DIRECTION_COMPENSATION value1="1" value2="1" value3="1" >
 <GEOMAGNETIC_ROTATION_DIRECTION_COMPENSATION value1="-1" value2="-1" value3="-1" >
 <ACCEL_SCALE value="1" >
 <GYRO_SCALE value="1146" >
 <GEOMAGNETIC_SCALE value="1" >
 <MAGNETIC_ALIGNMENT_FACTOR value="1" >
 <AZIMUTH_ROTATION_COMPENSATION value="-1" >
 <PITCH_ROTATION_COMPENSATION value="-1" >
 <ROLL_ROTATION_COMPENSATION value="-1" >
<ORIENTATION>

1.2 Description of Configuration in XML Code

Based on the configuration parameter there may be a single value or three values assigned. In case of three values, 'value1' represents X-axis component, 'value2' represents Y-axis component and 'value3' represents Z-axis component for any sensor.

1.2.1 NAME

Name of the Virtual Sensor

1.2.2 VENDOR

Name of the vendor who developed Orientation virtual sensor.

1.2.3 RAW_DATA_UNIT

Units for the raw data output from the Orientation virtual sensor. The unit options available are 'DEGREES' and 'RADIANS'. The output device orientation would be expresses in terms of degrees or radians based on the option selected.

1.2.4 DEFAULT_SAMPLING_TIME

Default sampling interval (in msec) value at which the Orientation virtual sensor is initialized.

1.2.5 ACCEL_STATIC_BIAS

The static bias value for accelerometer X, Y and Z axis data is computed when the device is at rest with an device orientation (pitch, roll, azimuth) as (0, 0, 0). The non-zero accelerometer data values observed on the X, Y and Z axis are the bias values to be entered respectively. The entered bias values would be subtracted from the accelerometer input data in the pre-processing stage of the sensor fusion algorithm.

1.2.6 GYRO_STATIC_BIAS

The static bias value for gyroscope X, Y and Z axis data is computed when the device is at rest with an device orientation (pitch, roll, azimuth) as (0, 0, 0). The non-zero gyroscope data values observed on the X, Y and Z axis are the bias values to be entered respectively. The entered bias values would be subtracted from the gyroscope input data in the pre-processing stage of the sensor fusion algorithm.

1.2.7 GEOMAGNETIC_STATIC_BIAS

The static bias value for geomagnetic sensor X, Y and Z axis data is computed when the device is at rest with an device orientation (pitch, roll, azimuth) as (0, 0, 0). The non-zero geomagnetic sensor data values observed on the X, Y and Z axis are the bias values to be entered respectively. The entered bias values would be subtracted from the geomagnetic sensor input data in the pre-processing stage of the sensor fusion algorithm.

1.2.8 ACCEL_ROTATION_DIRECTION_COMPENSATION

The rotation direction compensation for each axis X, Y and Z is assigned a value of "+1" if the clockwise rotation of the device for the particular axis results in positive increase in accelerometer data values. The rotation direction compensation for each axis is assigned a value of "-1" if for the clockwise rotation of the device for the particular axis results in negative increase in accelerometer data value. This parameter will take only take two values +1 or -1.

1.2.9 GYRO_ROTATION_DIRECTION_COMPENSATION

The rotation direction compensation for each axis X, Y and Z is assigned a value of "+1" if the clockwise rotation of the device for the particular axis results in positive change in gyroscope angular rate values. The rotation direction compensation for each axis is assigned a value of "-1" if for the clockwise rotation of the device for the particular axis results in negative change in gyroscope angular rate value. This parameter will take only take two values of either +1 or -1.

1.2.10 GEOMAGNETIC_ROTATION_DIRECTION_COMPENSATION

The rotation direction compensation for each axis X, Y and Z is assigned a value of "+1" if the clockwise rotation of the device around any of the different axis results in a positive increase in geomagnetic sensor data values. The rotation direction compensation for the axis is assigned a value of "-1" if for the clockwise rotation of the device for the any axis results in negative increase in geomagnetic sensor value. This parameter will only take two values of either +1 or -1.

1.2.11 ACCEL_SCALE

In the current version of the sensor fusion algorithm this value is always set to +1.

1.2.12 GYRO_SCALE

If MAX_VAL is the maximum possible gyroscope data magnitude on all three axes for both the positive and negative measured values, then the value equal to (2 x MAX_VAL) should be entered for this field. The MAX_VAL magnitude which also is the same as the maximum range of the gyroscope sensor has to be taken from the sensor specification document or can be computed by rotating the device on all axis and measuring the maximum possible gyroscope value during the rotations.

1.2.13 GEOMAGNETIC_SCALE

In the current version of the sensor fusion algorithm this value is always set to +1.

1.2.14 MAGNETIC_ALIGNMENT_FACTOR

If the magnetic orientation of the device geomagnetic sensor points to north when the device azimuth is pointing north this value is set as +1. If the magnetic orientation of the device geomagnetic sensor points to south when the device azimuth is pointing north this value is set as -1. For both the settings, the North->East->South->West rotation of the device results in positive change in geomagnetic sensor data values and North->West->South->East rotation results in a negative change in geomagnetic sensor data values.

1.2.15 AZIMUTH_ROTATION_COMPENSATION

If the North->East->South->West azimuth rotation of the device results in positive increase in the azimuth output this value is set to +1. If the North->East->South->West azimuth rotation of the device results in negative increase in the azimuth output this value is set to -1.

1.2.16 PITCH_ROTATION_COMPENSATION

If the clockwise pitch rotation of the device results in positive increase in the pitch output this value is set to +1. If the clockwise pitch rotation of the device results in negative increase in the pitch output this value is set to -1.

1.2.17 ROLL_ROTATION_COMPENSATION

If the clockwise roll rotation of the device results in positive increase in the roll output this value is set to +1. If the clockwise roll rotation of the device results in negative increase in the roll output this value is set to -1.

2. Gravity Virtual Sensor


2.1 XML Code

<GRAVITY>
 <NAME value="GRAVITY_SENSOR" >
 <VENDOR value="SAMSUNG" >
 <RAW_DATA_UNIT value="M/S^2" >
 <DEFAULT_SAMPLING_TIME value="100" >
 <GRAVITY_SIGN_COMPENSATION value1="1" value2="1" value3="1" >
<GRAVITY>

2.2 Description of Configuration in XML Code

Based on the configuration parameter there may be a single value or three values assigned. In case of three values, 'value1' represents X-axis component, 'value2' represents Y-axis component and 'value3' represents Z-axis component for any sensor.

2.2.1 NAME

Name of the Virtual Sensor

2.2.2 VENDOR

Name of the vendor who developed Gravity virtual sensor.

2.2.3 RAW_DATA_UNIT

Units for the raw data output from the Gravity virtual sensor. The unit options available are "m/s2".

2.2.4 DEFAULT_SAMPLING_TIME

Default sampling interval (in msec) value at which the Gravity virtual sensor is initialized.

2.2.5 GRAVITY_SIGN_COMPENSATION

When the device orientation on a specific axis changes from 0 to Π/2 and the gravity component for the orthogonal axis changes from 0 to +G, the orthogonal axis gravity component is set to +1. When the device orientation on a specific axis changes from 0 to Π/2 and the gravity component for the orthogonal axis changes from 0 to -G, the orthogonal axis gravity component value is set to -1.

3. Linear Acceleration Virtual Sensor

3.1 XML Code

<LINEAR_ACCEL>
 <NAME value="LINEAR_ACCEL_SENSOR" >
 <VENDOR value="SAMSUNG" >
 <RAW_DATA_UNIT value="M/S^2" >
 <DEFAULT_SAMPLING_TIME value="100" >
 <ACCEL_STATIC_BIAS value1="0" value2="0" value3="0" >
 <ACCEL_ROTATION_DIRECTION_COMPENSATION value1="-1" value2="-1" value3="-1" >
 <ACCEL_SCALE value="1" >
 <LINEAR_ACCEL_SIGN_COMPENSATION value1="1" value2="1" value3="1" >
<LINEAR_ACCEL>

3.2 Description of Configuration in XML Code

Based on the configuration parameter there may be a single value or three values assigned. In case of three values, 'value1' represents X-axis component, 'value2' represents Y-axis component and 'value3' represents Z-axis component for any sensor.

3.2.1 NAME

Name of the Virtual Sensor

3.2.2 VENDOR

Name of the vendor who developed Linear Acceleration virtual sensor.

3.2.3 RAW_DATA_UNIT

Units for the raw data output from the Linear Acceleration virtual sensor. The unit options available are "m/s2".

3.2.4 DEFAULT_SAMPLING_TIME

Default sampling interval (in msec) value at which the Linear Acceleration virtual sensor is initialized.

3.2.5 ACCEL_STATIC_BIAS

The static bias value for accelerometer X, Y and Z axis data is computed when the device is at rest with an device orientation (pitch, roll, azimuth) as (0, 0, 0). The non-zero accelerometer data values observed on the X, Y and Z axis are the bias values to be entered respectively. The entered bias values would be subtracted from the accelerometer input data in the pre-processing stage of the sensor fusion algorithm.

3.2.6 ACCEL_ROTATION_DIRECTION_COMPENSATION

The rotation direction compensation for each axis X, Y and Z is assigned a value of "+1" if the clockwise rotation of the device for the particular axis results in positive increase in accelerometer data values. The rotation direction compensation for each axis is assigned a value of "-1" if for the clockwise rotation of the device for the particular axis results in negative increase in accelerometer data value. This parameter will take only take two values +1 or -1.

3.2.7 ACCEL_SCALE

In the current version of the sensor fusion algorithm this value is always set to +1.

3.2.8 LINEAR_ACCEL_SIGN_COMPENSATION

When the device is linearly displaced along any of the axis in positive direction and the linear acceleration component for that axis should be positive, in this case then this value is set to +1. When the device is linearly displaced along any of the axis in the positive direction and if the linear acceleration component for that axis is measured to be negative, in this case this value is set to -1.