Remove unnecessary setting
[platform/core/system/sensord.git] / documentation / virtual_sensor_configuration.htm
1 <html>
2 <head><title>Information on Configuration of Virtual Sensors</title></head>
3
4 <h1><center>Configuration of Virtual Sensors</center></h1><br>
5
6 <h2>1. Orientation Virtual Sensor</h2>
7
8 <FIGURE>
9 <img src="./device_orientation.png" width="30%" height="40%">
10 </FIGURE><br>
11
12 <h3>1.1 XML Code</h3>
13
14 &lt;ORIENTATION&gt;<br>
15 &emsp;&lt;NAME value="ORIENTATION_SENSOR" &gt;<br>
16 &emsp;&lt;VENDOR value="SAMSUNG" &gt;<br>
17 &emsp;&lt;RAW_DATA_UNIT value="DEGREES" &gt;<br>
18 &emsp;&lt;DEFAULT_SAMPLING_TIME value="100" &gt;<br>
19 &emsp;&lt;ACCEL_STATIC_BIAS value1="0" value2="0" value3="0" &gt;<br>
20 &emsp;&lt;GYRO_STATIC_BIAS value1="0" value2="0" value3="0" &gt;<br>
21 &emsp;&lt;GEOMAGNETIC_STATIC_BIAS value1="0" value2="0" value3="0" &gt;<br>
22 &emsp;&lt;ACCEL_ROTATION_DIRECTION_COMPENSATION value1="-1" value2="-1" value3="-1" &gt;<br>
23 &emsp;&lt;GYRO_ROTATION_DIRECTION_COMPENSATION value1="1" value2="1" value3="1" &gt;<br>
24 &emsp;&lt;GEOMAGNETIC_ROTATION_DIRECTION_COMPENSATION value1="-1" value2="-1" value3="-1" &gt;<br>
25 &emsp;&lt;ACCEL_SCALE value="1" &gt;<br>
26 &emsp;&lt;GYRO_SCALE value="1146" &gt;<br>
27 &emsp;&lt;GEOMAGNETIC_SCALE value="1" &gt;<br>
28 &emsp;&lt;MAGNETIC_ALIGNMENT_FACTOR value="1" &gt;<br>
29 &emsp;&lt;AZIMUTH_ROTATION_COMPENSATION value="-1" &gt;<br>
30 &emsp;&lt;PITCH_ROTATION_COMPENSATION value="-1" &gt;<br>
31 &emsp;&lt;ROLL_ROTATION_COMPENSATION value="-1" &gt;<br>
32 &lt;ORIENTATION&gt;<br>
33
34 <h3>1.2 Description of Configuration in XML Code</h3>
35
36 <p>Based on the configuration parameter there may be a single value or
37 three values assigned. In case of three values, 'value1' represents X-axis
38 component, 'value2' represents Y-axis component and 'value3' represents
39 Z-axis component for any sensor.</p>
40
41 <h4>1.2.1 NAME</h4>
42 <p>Name of the Virtual Sensor</p>
43
44 <h4>1.2.2 VENDOR</h4>
45 <p>Name of the vendor who developed Orientation virtual sensor.</p>
46
47 <h4>1.2.3 RAW_DATA_UNIT</h4>
48 <p>Units for the raw data output from the Orientation virtual sensor. The
49 unit options available are 'DEGREES' and 'RADIANS'. The output device
50 orientation would be expresses in terms of degrees or radians based on the
51 option selected.</p>
52
53 <h4>1.2.4 DEFAULT_SAMPLING_TIME</h4>
54 <p>Default sampling interval (in msec) value at which the Orientation
55 virtual sensor is initialized.</p>
56
57 <h4>1.2.5 ACCEL_STATIC_BIAS</h4>
58 <p>The static bias value for accelerometer X, Y and Z axis data is
59 computed when the device is at rest with an device orientation (pitch,
60 roll, azimuth) as (0, 0, 0). The non-zero accelerometer data values observed
61 on the X, Y and Z axis are the bias values to be entered respectively.
62 The entered bias values would be subtracted from the accelerometer input
63 data in the pre-processing stage of the sensor fusion algorithm.</p>
64
65 <h4>1.2.6 GYRO_STATIC_BIAS</h4>
66 <p>The static bias value for gyroscope X, Y and Z axis data is computed
67 when the device is at rest with an device orientation (pitch, roll, azimuth)
68 as (0, 0, 0). The non-zero gyroscope data values observed on the X, Y and
69 Z axis are the bias values to be entered respectively. The entered bias
70 values would be subtracted from the gyroscope input data in the
71 pre-processing stage of the sensor fusion algorithm.</p>
72
73 <h4>1.2.7 GEOMAGNETIC_STATIC_BIAS</h4>
74 <p>The static bias value for geomagnetic sensor X, Y and Z axis data is
75 computed when the device is at rest with an device orientation (pitch, roll,
76 azimuth) as (0, 0, 0). The non-zero geomagnetic sensor data values observed
77 on the X, Y and Z axis are the bias values to be entered respectively. The
78 entered bias values would be subtracted from the geomagnetic sensor input
79 data in the pre-processing stage of the sensor fusion algorithm.</p>
80
81 <h4>1.2.8 ACCEL_ROTATION_DIRECTION_COMPENSATION</h4>
82 <p>The rotation direction compensation for each axis X, Y and Z is assigned a
83 value of "+1" if the clockwise rotation of the device for the particular axis
84 results in positive increase in accelerometer data values. The rotation
85 direction compensation for each axis is assigned a value of "-1" if for the
86 clockwise rotation of the device for the particular axis results in negative
87 increase in accelerometer data value. This parameter will take only take two
88 values +1 or -1.</p>
89
90 <h4>1.2.9 GYRO_ROTATION_DIRECTION_COMPENSATION</h4>
91 <p>The rotation direction compensation for each axis X, Y and Z is assigned a
92 value of "+1" if the clockwise rotation of the device for the particular axis
93 results in positive change in gyroscope angular rate values. The rotation
94 direction compensation for each axis is assigned a value of "-1" if for the
95 clockwise rotation of the device for the particular axis results in negative
96 change in gyroscope angular rate value. This parameter will take only take
97 two values of either +1 or -1.</p>
98
99 <h4>1.2.10 GEOMAGNETIC_ROTATION_DIRECTION_COMPENSATION</h4>
100 <p>The rotation direction compensation for each axis X, Y and Z is assigned a
101 value of "+1" if the clockwise rotation of the device around any of the
102 different axis results in a positive increase in geomagnetic sensor data values.
103 The rotation direction compensation for the axis is assigned a value of "-1"
104 if for the clockwise rotation of the device for the any axis results in
105 negative increase in geomagnetic sensor value. This parameter will only take
106 two values of either +1 or -1.</p>
107
108 <h4>1.2.11 ACCEL_SCALE</h4>
109 <p>In the current version of the sensor fusion algorithm this value is always
110 set to +1.</p>
111
112 <h4>1.2.12 GYRO_SCALE</h4>
113 <p>If MAX_VAL is the maximum possible gyroscope data magnitude on all three
114 axes for both the positive and negative measured values, then the value equal
115 to (2 x MAX_VAL) should be entered for this field. The MAX_VAL magnitude which
116 also is the same as the maximum range of the gyroscope sensor has to be taken
117 from the sensor specification document or can be computed by rotating the
118 device on all axis and measuring the maximum possible gyroscope value during
119 the rotations.</p>
120
121 <h4>1.2.13 GEOMAGNETIC_SCALE</h4>
122 <p>In the current version of the sensor fusion algorithm this value is always
123 set to +1.</p>
124
125 <h4>1.2.14 MAGNETIC_ALIGNMENT_FACTOR</h4>
126 <p>If the magnetic orientation of the device geomagnetic sensor points to north
127 when the device azimuth is pointing north this value is set as +1. If the
128 magnetic orientation of the device geomagnetic sensor points to south
129 when the device azimuth is pointing north this value is set as -1. For both
130 the settings, the North->East->South->West rotation of the device results in
131 positive change in geomagnetic sensor data values and North->West->South->East
132 rotation results in a negative change in geomagnetic sensor data values.</p>
133
134 <h4>1.2.15 AZIMUTH_ROTATION_COMPENSATION</h4>
135 <p>If the North->East->South->West azimuth rotation of the device results in
136 positive increase in the azimuth output this value is set to +1. If the
137 North->East->South->West azimuth rotation of the device results in negative
138 increase in the azimuth output this value is set to -1.</p>
139
140 <h4>1.2.16 PITCH_ROTATION_COMPENSATION</h4>
141 <p>If the clockwise pitch rotation of the device results in positive increase
142 in the pitch output this value is set to +1. If the clockwise pitch rotation
143 of the device results in negative increase in the pitch output this value is
144 set to -1.</p>
145
146 <h4>1.2.17 ROLL_ROTATION_COMPENSATION</h4>
147 <p>If the clockwise roll rotation of the device results in positive increase
148 in the roll output this value is set to +1. If the clockwise roll rotation
149 of the device results in negative increase in the roll output this value is
150 set to -1.</p>
151
152 <h2>2. Gravity Virtual Sensor</h2>
153
154 <FIGURE>
155 <img src="./device_gravity.png" width="30%" height="40%">
156 </FIGURE><br>
157
158 <h3>2.1 XML Code</h3>
159
160 &lt;GRAVITY&gt;<br>
161 &emsp;&lt;NAME value="GRAVITY_SENSOR" &gt;<br>
162 &emsp;&lt;VENDOR value="SAMSUNG" &gt;<br>
163 &emsp;&lt;RAW_DATA_UNIT value="M/S^2" &gt;<br>
164 &emsp;&lt;DEFAULT_SAMPLING_TIME value="100" &gt;<br>
165 &emsp;&lt;GRAVITY_SIGN_COMPENSATION value1="1" value2="1" value3="1" &gt;<br>
166 &lt;GRAVITY&gt;<br>
167
168 <h3>2.2 Description of Configuration in XML Code</h3>
169
170 <p>Based on the configuration parameter there may be a single value or
171 three values assigned. In case of three values, 'value1' represents X-axis
172 component, 'value2' represents Y-axis component and 'value3' represents
173 Z-axis component for any sensor.</p>
174
175 <h4>2.2.1 NAME</h4>
176 <p>Name of the Virtual Sensor</p>
177
178 <h4>2.2.2 VENDOR</h4>
179 <p>Name of the vendor who developed Gravity virtual sensor.</p>
180
181 <h4>2.2.3 RAW_DATA_UNIT</h4>
182 <p>Units for the raw data output from the Gravity virtual sensor. The
183 unit options available are &quot;m/s<sup>2</sup>&quot;.</p>
184
185 <h4>2.2.4 DEFAULT_SAMPLING_TIME</h4>
186 <p>Default sampling interval (in msec) value at which the Gravity virtual
187 sensor is initialized.</p>
188
189 <h4>2.2.5 GRAVITY_SIGN_COMPENSATION</h4>
190 <p>When the device orientation on a specific axis changes from 0 to
191 &#928/2 and the gravity component for the orthogonal axis changes from 0
192 to +G, the orthogonal axis gravity component is set to +1. When the device
193 orientation on a specific axis changes from 0 to &#928/2 and the gravity
194 component for the orthogonal axis changes from 0 to -G, the orthogonal axis
195 gravity component value is set to -1.</p>
196
197 <h2>3. Linear Acceleration Virtual Sensor</h2>
198
199 <h3>3.1 XML Code</h3>
200
201 &lt;LINEAR_ACCEL&gt;<br>
202 &emsp;&lt;NAME value="LINEAR_ACCEL_SENSOR" &gt;<br>
203 &emsp;&lt;VENDOR value="SAMSUNG" &gt;<br>
204 &emsp;&lt;RAW_DATA_UNIT value="M/S^2" &gt;<br>
205 &emsp;&lt;DEFAULT_SAMPLING_TIME value="100" &gt;<br>
206 &emsp;&lt;ACCEL_STATIC_BIAS value1="0" value2="0" value3="0" &gt;<br>
207 &emsp;&lt;ACCEL_ROTATION_DIRECTION_COMPENSATION value1="-1" value2="-1" value3="-1" &gt;<br>
208 &emsp;&lt;ACCEL_SCALE value="1" &gt;<br>
209 &emsp;&lt;LINEAR_ACCEL_SIGN_COMPENSATION value1="1" value2="1" value3="1" &gt;<br>
210 &lt;LINEAR_ACCEL&gt;<br>
211
212 <h3>3.2 Description of Configuration in XML Code</h3>
213
214 <p>Based on the configuration parameter there may be a single value or
215 three values assigned. In case of three values, 'value1' represents X-axis
216 component, 'value2' represents Y-axis component and 'value3' represents
217 Z-axis component for any sensor.</p>
218
219 <h4>3.2.1 NAME</h4>
220 <p>Name of the Virtual Sensor</p>
221
222 <h4>3.2.2 VENDOR</h4>
223 <p>Name of the vendor who developed Linear Acceleration virtual sensor.</p>
224
225 <h4>3.2.3 RAW_DATA_UNIT</h4>
226 <p>Units for the raw data output from the Linear Acceleration virtual
227 sensor. The unit options available are &quot;m/s<sup>2</sup>&quot;.</p>
228
229 <h4>3.2.4 DEFAULT_SAMPLING_TIME</h4>
230 <p>Default sampling interval (in msec) value at which the Linear
231 Acceleration virtual sensor is initialized.</p>
232
233 <h4>3.2.5 ACCEL_STATIC_BIAS</h4>
234 <p>The static bias value for accelerometer X, Y and Z axis data is
235 computed when the device is at rest with an device orientation (pitch,
236 roll, azimuth) as (0, 0, 0). The non-zero accelerometer data values observed
237 on the X, Y and Z axis are the bias values to be entered respectively.
238 The entered bias values would be subtracted from the accelerometer input
239 data in the pre-processing stage of the sensor fusion algorithm.</p>
240
241 <h4>3.2.6 ACCEL_ROTATION_DIRECTION_COMPENSATION</h4>
242 <p>The rotation direction compensation for each axis X, Y and Z is assigned a
243 value of "+1" if the clockwise rotation of the device for the particular axis
244 results in positive increase in accelerometer data values. The rotation
245 direction compensation for each axis is assigned a value of "-1" if for the
246 clockwise rotation of the device for the particular axis results in negative
247 increase in accelerometer data value. This parameter will take only take two
248 values +1 or -1.</p>
249
250 <h4>3.2.7 ACCEL_SCALE</h4>
251 <p>In the current version of the sensor fusion algorithm this value is always
252 set to +1.</p>
253
254 <h4>3.2.8 LINEAR_ACCEL_SIGN_COMPENSATION</h4>
255 <p>When the device is linearly displaced along any of the axis in positive
256 direction and the linear acceleration component for that axis should be
257 positive, in this case then this value is set to +1. When the device is
258 linearly displaced along any of the axis in the positive direction and if the
259 linear acceleration component for that axis is measured to be negative, in this
260 case this value is set to -1.</p>