OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef DEVICE_GENERIC_SENSOR_GENERIC_SENSOR_CONSTS_H_ |
| 6 #define DEVICE_GENERIC_SENSOR_GENERIC_SENSOR_CONSTS_H_ |
| 7 |
| 8 #define _USE_MATH_DEFINES |
| 9 #include <math.h> |
| 10 |
| 11 namespace device { |
| 12 |
| 13 // Required for conversion from G/s^2 to m/s^2 |
| 14 constexpr double kMeanGravity = 9.80665; |
| 15 |
| 16 // Required for conversion from deg to rad |
| 17 constexpr double kRadiansInDegrees = M_PI / 180.0; |
| 18 |
| 19 // Required for conversion from Gauss to uT. |
| 20 constexpr double kMicroteslaInGauss = 100.0; |
| 21 |
| 22 // Required for conversion from Milligauss to Microtesla. |
| 23 constexpr double kMicroteslaInMilligauss = 0.1; |
| 24 |
| 25 // Default rate for returning value of the ambient light sensor. |
| 26 constexpr int kDefaultAmbientLightFrequencyHz = 5; |
| 27 |
| 28 // Default rate for returning value of the accelerometer sensor. |
| 29 constexpr int kDefaultAccelerometerFrequencyHz = 10; |
| 30 |
| 31 // Default rate for returning value of the gyroscope sensor. |
| 32 constexpr int kDefaultGyroscopeFrequencyHz = 10; |
| 33 |
| 34 // Default rate for returning value of the magnetometer sensor. |
| 35 constexpr int kDefaultMagnetometerFrequencyHz = 10; |
| 36 |
| 37 } // namespace device |
| 38 |
| 39 #endif // DEVICE_GENERIC_SENSOR_GENERIC_SENSOR_CONSTS_H_ |
OLD | NEW |