@@ -304,7 +304,65 @@ public class SensorEvent {
304304 * in the clockwise direction (mathematically speaking, it should be
305305 * positive in the counter-clockwise direction).
306306 * </p>
307- *
307+ *
308+ * <h4>{@link android.hardware.Sensor#TYPE_RELATIVE_HUMIDITY
309+ * Sensor.TYPE_RELATIVE_HUMIDITY}:</h4>
310+ * <ul>
311+ * <p>
312+ * values[0]: Relative ambient air humidity in percent
313+ * </p>
314+ * </ul>
315+ * <p>
316+ * When relative ambient air humidity and ambient temperature are
317+ * measured, the dew point and absolute humidity can be calculated.
318+ * </p>
319+ * <u>Dew Point</u>
320+ * <p>
321+ * The dew point is the temperature to which a given parcel of air must be
322+ * cooled, at constant barometric pressure, for water vapor to condense
323+ * into water.
324+ * </p>
325+ * <center><pre>
326+ * ln(RH/100%) + m·t/(T<sub>n</sub>+t)
327+ * t<sub>d</sub>(t,RH) = T<sub>n</sub> · ------------------------------
328+ * m - [ln(RH/100%) + m·t/(T<sub>n</sub>+t)]
329+ * </pre></center>
330+ * <dl>
331+ * <dt>t<sub>d</sub></dt> <dd>dew point temperature in °C</dd>
332+ * <dt>t</dt> <dd>actual temperature in °C</dd>
333+ * <dt>RH</dt> <dd>actual relative humidity in %</dd>
334+ * <dt>m</dt> <dd>17.62</dd>
335+ * <dt>T<sub>n</sub></dt> <dd>243.12 °C</dd>
336+ * </dl>
337+ * <p>for example:</p>
338+ * <pre class="prettyprint">
339+ * h = Math.log(rh / 100.0) + (17.62 * t) / (243.12 + t);
340+ * td = 243.12 * h / (17.62 - h);
341+ * </pre>
342+ * <u>Absolute Humidity</u>
343+ * <p>
344+ * The absolute humidity is the mass of water vapor in a particular volume
345+ * of dry air. The unit is g/m<sup>3</sup>.
346+ * </p>
347+ * <center><pre>
348+ * RH/100%·A·exp(m·t/(T<sub>n</sub>+t))
349+ * d<sub>v</sub>(t,RH) = 216.7 · -------------------------
350+ * 273.15 + t
351+ * </pre></center>
352+ * <dl>
353+ * <dt>d<sub>v</sub></dt> <dd>absolute humidity in g/m<sup>3</sup></dd>
354+ * <dt>t</dt> <dd>actual temperature in °C</dd>
355+ * <dt>RH</dt> <dd>actual relative humidity in %</dd>
356+ * <dt>m</dt> <dd>17.62</dd>
357+ * <dt>T<sub>n</sub></dt> <dd>243.12 °C</dd>
358+ * <dt>A</dt> <dd>6.112 hPa</dd>
359+ * </dl>
360+ * <p>for example:</p>
361+ * <pre class="prettyprint">
362+ * dv = 216.7 *
363+ * (rh / 100.0 * 6.112 * Math.exp(17.62 * t / (243.12 + t)) / (273.15 + t));
364+ * </pre>
365+ *
308366 * @see SensorEvent
309367 * @see GeomagneticField
310368 */
0 commit comments