qtmobility/src/sensors/qmagnetometer.cpp
changeset 8 71781823f776
parent 4 90517678cc4f
child 11 06b8e2af4411
equal deleted inserted replaced
5:453da2cfceef 8:71781823f776
    48 
    48 
    49 /*!
    49 /*!
    50     \class QMagnetometerReading
    50     \class QMagnetometerReading
    51     \ingroup sensors_reading
    51     \ingroup sensors_reading
    52 
    52 
    53     \preliminary
       
    54     \brief The QMagnetometerReading class represents one reading from the
    53     \brief The QMagnetometerReading class represents one reading from the
    55            magnetometer.
    54            magnetometer.
    56 
    55 
    57     \section2 QMagnetometerReading Units
    56     \section2 QMagnetometerReading Units
    58     The magnetometer returns magnetic flux density values along 3 axes.
    57     The magnetometer returns magnetic flux density values along 3 axes.
    59     The scale of the values is teslas. The axes are arranged as follows.
    58     The scale of the values is teslas. The axes are arranged as follows.
    60 
    59 
    61 \code
    60     \image sensors-coordinates2.jpg
    62              +z
       
    63               |
       
    64               |      +y
       
    65               |     /
       
    66               |----/----
       
    67              /| NOKIA  /|
       
    68             //|--/--- / |
       
    69            // | /   //  /
       
    70           //  |/   //  /
       
    71          //   '--------------- +x
       
    72         //       //  /
       
    73        //       //  /
       
    74       /---------/  /
       
    75      /    O    /  /
       
    76     /         /  /
       
    77     ----------  /
       
    78     |_________!/
       
    79 \endcode
       
    80 
    61 
    81     The magnetometer can report on either raw magnetic flux values or geomagnetic flux values.
    62     The magnetometer can report on either raw magnetic flux values or geomagnetic flux values.
    82     By default it returns raw magnetic flux values. The QMagnetometer::returnGeoValues property
    63     By default it returns raw magnetic flux values. The QMagnetometer::returnGeoValues property
    83     must be set to return geomagnetic flux values.
    64     must be set to return geomagnetic flux values.
    84 
    65 
    85     The primary difference between raw and geomagnetic values is that extra processing
    66     The primary difference between raw and geomagnetic values is that extra processing
    86     is done to eliminate local magnetic interference from the geomagnetic values so they
    67     is done to eliminate local magnetic interference from the geomagnetic values so they
    87     represent only the effect of the Earth's magnetic field. This process is not perfect
    68     represent only the effect of the Earth's magnetic field. This process is not perfect
    88     and the accuracy of each reading may change.
    69     and the accuracy of each reading may change.
    89 
    70 
       
    71     The image below shows the difference between geomagnetic (on the left) and raw (on the right)
       
    72     readings for a phone that is being subjected to magnetic interference.
       
    73 
       
    74     \image sensors-geo-vs-raw-magnetism.jpg
       
    75 
    90     The accuracy of each reading is measured as a number from 0 to 1.
    76     The accuracy of each reading is measured as a number from 0 to 1.
    91     A value of 1 is the highest level that the device can support and 0 is
    77     A value of 1 is the highest level that the device can support and 0 is
    92     the worst.
    78     the worst.
    93 */
    79 */
    94 
    80 
   183 
   169 
   184 /*!
   170 /*!
   185     \class QMagnetometerFilter
   171     \class QMagnetometerFilter
   186     \ingroup sensors_filter
   172     \ingroup sensors_filter
   187 
   173 
   188     \preliminary
       
   189     \brief The QMagnetometerFilter class is a convenience wrapper around QSensorFilter.
   174     \brief The QMagnetometerFilter class is a convenience wrapper around QSensorFilter.
   190 
   175 
   191     The only difference is that the filter() method features a pointer to QMagnetometerReading
   176     The only difference is that the filter() method features a pointer to QMagnetometerReading
   192     instead of QSensorReading.
   177     instead of QSensorReading.
   193 */
   178 */
   204 
   189 
   205 /*!
   190 /*!
   206     \class QMagnetometer
   191     \class QMagnetometer
   207     \ingroup sensors_type
   192     \ingroup sensors_type
   208 
   193 
   209     \preliminary
       
   210     \brief The QMagnetometer class is a convenience wrapper around QSensor.
   194     \brief The QMagnetometer class is a convenience wrapper around QSensor.
   211 
   195 
   212     The only behavioural difference is that this class sets the type properly.
   196     The only behavioural difference is that this class sets the type properly.
   213 
   197 
   214     This class also features a reading() function that returns a QMagnetometerReading instead of a QSensorReading.
   198     This class also features a reading() function that returns a QMagnetometerReading instead of a QSensorReading.